Class hwloc_obj.Buffer

All Implemented Interfaces:
AutoCloseable, Iterable<hwloc_obj>, NativeResource, Pointer
Enclosing class:
hwloc_obj

public static class hwloc_obj.Buffer extends StructBuffer<hwloc_obj,hwloc_obj.Buffer> implements NativeResource
An array of hwloc_obj structs.
  • Constructor Details

    • Buffer

      public Buffer(ByteBuffer container)
      Creates a new hwloc_obj.Buffer instance backed by the specified container.

      Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by hwloc_obj.SIZEOF, and its mark will be undefined.

      The created buffer instance holds a strong reference to the container object.

    • Buffer

      public Buffer(long address, int cap)
  • Method Details

    • type

      public int type()
      Returns:
      the value of the type field.
    • subtype

      public ByteBuffer subtype()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the subtype field.
    • subtypeString

      public String subtypeString()
      Returns:
      the null-terminated string pointed to by the subtype field.
    • os_index

      public int os_index()
      Returns:
      the value of the os_index field.
    • name

      public @Nullable ByteBuffer name()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the name field.
    • nameString

      public @Nullable String nameString()
      Returns:
      the null-terminated string pointed to by the name field.
    • total_memory

      public long total_memory()
      Returns:
      the value of the total_memory field.
    • attr

      public hwloc_obj_attr_u attr()
      Returns:
      a hwloc_obj_attr_u view of the struct pointed to by the attr field.
    • depth

      public int depth()
      Returns:
      the value of the depth field.
    • logical_index

      public int logical_index()
      Returns:
      the value of the logical_index field.
    • next_cousin

      public @Nullable hwloc_obj next_cousin()
      Returns:
      a hwloc_obj view of the struct pointed to by the next_cousin field.
    • prev_cousin

      public @Nullable hwloc_obj prev_cousin()
      Returns:
      a hwloc_obj view of the struct pointed to by the prev_cousin field.
    • parent

      public @Nullable hwloc_obj parent()
      Returns:
      a hwloc_obj view of the struct pointed to by the parent field.
    • sibling_rank

      public int sibling_rank()
      Returns:
      the value of the sibling_rank field.
    • next_sibling

      public @Nullable hwloc_obj next_sibling()
      Returns:
      a hwloc_obj view of the struct pointed to by the next_sibling field.
    • prev_sibling

      public @Nullable hwloc_obj prev_sibling()
      Returns:
      a hwloc_obj view of the struct pointed to by the prev_sibling field.
    • arity

      public int arity()
      Returns:
      the value of the arity field.
    • children

      public @Nullable PointerBuffer children()
      Returns:
      a PointerBuffer view of the data pointed to by the children field.
    • first_child

      public @Nullable hwloc_obj first_child()
      Returns:
      a hwloc_obj view of the struct pointed to by the first_child field.
    • last_child

      public @Nullable hwloc_obj last_child()
      Returns:
      a hwloc_obj view of the struct pointed to by the last_child field.
    • symmetric_subtree

      public boolean symmetric_subtree()
      Returns:
      the value of the symmetric_subtree field.
    • memory_arity

      public int memory_arity()
      Returns:
      the value of the memory_arity field.
    • memory_first_child

      public @Nullable hwloc_obj memory_first_child()
      Returns:
      a hwloc_obj view of the struct pointed to by the memory_first_child field.
    • io_arity

      public int io_arity()
      Returns:
      the value of the io_arity field.
    • io_first_child

      public @Nullable hwloc_obj io_first_child()
      Returns:
      a hwloc_obj view of the struct pointed to by the io_first_child field.
    • misc_arity

      public int misc_arity()
      Returns:
      the value of the misc_arity field.
    • misc_first_child

      public @Nullable hwloc_obj misc_first_child()
      Returns:
      a hwloc_obj view of the struct pointed to by the misc_first_child field.
    • cpuset

      public long cpuset()
      Returns:
      the value of the cpuset field.
    • complete_cpuset

      public long complete_cpuset()
      Returns:
      the value of the complete_cpuset field.
    • nodeset

      public long nodeset()
      Returns:
      the value of the nodeset field.
    • complete_nodeset

      public long complete_nodeset()
      Returns:
      the value of the complete_nodeset field.
    • infos

      public hwloc_infos_s infos()
      Returns:
      a hwloc_infos_s view of the infos field.
    • userdata

      public long userdata()
      Returns:
      the value of the userdata field.
    • gp_index

      public long gp_index()
      Returns:
      the value of the gp_index field.
    • userdata

      public hwloc_obj.Buffer userdata(long value)
      Sets the specified value to the userdata field.