Class CLDeviceTopologyAMD

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class CLDeviceTopologyAMD extends Struct<CLDeviceTopologyAMD> implements NativeResource

 union cl_device_topology_amd {
     struct {
         cl_uint type;
         cl_uint data[5];
     } raw;
     struct {
         cl_uint type;
         char[17];
         cl_char bus;
         cl_char device;
         cl_char function;
     } pcie;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int RAW
      The struct member offsets.
    • RAW_TYPE

      public static final int RAW_TYPE
      The struct member offsets.
    • RAW_DATA

      public static final int RAW_DATA
      The struct member offsets.
    • PCIE

      public static final int PCIE
      The struct member offsets.
    • PCIE_TYPE

      public static final int PCIE_TYPE
      The struct member offsets.
    • PCIE_BUS

      public static final int PCIE_BUS
      The struct member offsets.
    • PCIE_DEVICE

      public static final int PCIE_DEVICE
      The struct member offsets.
    • PCIE_FUNCTION

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

    • CLDeviceTopologyAMD

      public CLDeviceTopologyAMD(ByteBuffer container)
      Creates a CLDeviceTopologyAMD 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<CLDeviceTopologyAMD>
    • raw_type

      public int raw_type()
      Returns:
      the value of the raw.type field.
    • raw_data

      public IntBuffer raw_data()
      Returns:
      a IntBuffer view of the raw.data field.
    • raw_data

      public int raw_data(int index)
      Returns:
      the value at the specified index of the raw.data field.
    • pcie_type

      public int pcie_type()
      Returns:
      the value of the pcie.type field.
    • pcie_bus

      public byte pcie_bus()
      Returns:
      the value of the pcie.bus field.
    • pcie_device

      public byte pcie_device()
      Returns:
      the value of the pcie.device field.
    • pcie_function

      public byte pcie_function()
      Returns:
      the value of the pcie.function field.
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nraw_type(long struct)
      Unsafe version of raw_type().
    • nraw_data

      public static IntBuffer nraw_data(long struct)
      Unsafe version of raw_data().
    • nraw_data

      public static int nraw_data(long struct, int index)
      Unsafe version of raw_data.
    • npcie_type

      public static int npcie_type(long struct)
      Unsafe version of pcie_type().
    • npcie_bus

      public static byte npcie_bus(long struct)
      Unsafe version of pcie_bus().
    • npcie_device

      public static byte npcie_device(long struct)
      Unsafe version of pcie_device().
    • npcie_function

      public static byte npcie_function(long struct)
      Unsafe version of pcie_function().