Class hwloc_infos_s

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class hwloc_infos_s extends Struct<hwloc_infos_s> implements NativeResource

 struct hwloc_infos_s {
     {@link hwloc_info_s struct hwloc_info_s} * array;
     unsigned count;
     unsigned allocated;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • ARRAY

      public static final int ARRAY
      The struct member offsets.
    • COUNT

      public static final int COUNT
      The struct member offsets.
    • ALLOCATED

      public static final int ALLOCATED
      The struct member offsets.
  • Constructor Details

    • hwloc_infos_s

      public hwloc_infos_s(ByteBuffer container)
      Creates a hwloc_infos_s instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

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

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<hwloc_infos_s>
    • array

      public @Nullable hwloc_info_s.Buffer array()
      Returns:
      a hwloc_info_s.Buffer view of the struct array pointed to by the array field.
    • count

      public int count()
      Returns:
      the value of the count field.
    • malloc

      public static hwloc_infos_s malloc()
      Returns a new hwloc_infos_s instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static hwloc_infos_s calloc()
      Returns a new hwloc_infos_s instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static hwloc_infos_s create()
      Returns a new hwloc_infos_s instance allocated with BufferUtils.
    • create

      public static hwloc_infos_s create(long address)
      Returns a new hwloc_infos_s instance for the specified memory address.
    • createSafe

      public static @Nullable hwloc_infos_s createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static hwloc_infos_s.Buffer malloc(int capacity)
      Returns a new hwloc_infos_s.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static hwloc_infos_s.Buffer calloc(int capacity)
      Returns a new hwloc_infos_s.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static hwloc_infos_s.Buffer create(int capacity)
      Returns a new hwloc_infos_s.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static hwloc_infos_s.Buffer create(long address, int capacity)
      Create a hwloc_infos_s.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable hwloc_infos_s.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static hwloc_infos_s malloc(MemoryStack stack)
      Returns a new hwloc_infos_s instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static hwloc_infos_s calloc(MemoryStack stack)
      Returns a new hwloc_infos_s instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static hwloc_infos_s.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new hwloc_infos_s.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static hwloc_infos_s.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new hwloc_infos_s.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • narray

      public static @Nullable hwloc_info_s.Buffer narray(long struct)
      Unsafe version of array().
    • ncount

      public static int ncount(long struct)
      Unsafe version of count().
    • nallocated

      public static int nallocated(long struct)