Class CLDeviceTopologyAMD

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class CLDeviceTopologyAMD
    extends Struct
    implements NativeResource
    The struct returned by GetDeviceInfo with param_name set to DEVICE_TOPOLOGY_AMD.

    Layout

    
     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 Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • RAW, RAW_TYPE, RAW_DATA, PCIE, PCIE_TYPE, PCIE_BUS, PCIE_DEVICE, PCIE_FUNCTION

        The struct member offsets.
    • Constructor Detail

      • CLDeviceTopologyAMD

        public CLDeviceTopologyAMD​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • raw_type

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

        public java.nio.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​(long address)
        Returns a new CLDeviceTopologyAMD instance for the specified memory address.
      • createSafe

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

        public static CLDeviceTopologyAMD callocStack()
        Returns a new CLDeviceTopologyAMD instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

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

        public static CLDeviceTopologyAMD callocStack​(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
      • nraw_type

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

        public static java.nio.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().