Class hwloc_location

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class hwloc_location extends Struct<hwloc_location> implements NativeResource

 struct hwloc_location {
     enum hwloc_location_type_e type;
     {@link hwloc_location_u hwloc_location_u} location;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int TYPE
      The struct member offsets.
    • LOCATION

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

    • hwloc_location

      public hwloc_location(ByteBuffer container)
      Creates a hwloc_location 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_location>
    • type

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

      public hwloc_location_u location()
      Returns:
      a hwloc_location_u view of the location field.
    • malloc

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

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

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

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

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

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

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

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

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

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

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

      public static hwloc_location calloc(MemoryStack stack)
      Returns a new hwloc_location 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_location.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new hwloc_location.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static hwloc_location.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new hwloc_location.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
    • ntype

      public static int ntype(long struct)
      Unsafe version of type().
    • nlocation

      public static hwloc_location_u nlocation(long struct)
      Unsafe version of location().