Class CUlaunchConfig

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CUlaunchConfig>
org.lwjgl.cuda.CUlaunchConfig
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class CUlaunchConfig extends org.lwjgl.system.Struct<CUlaunchConfig> implements org.lwjgl.system.NativeResource

Layout


 struct CUlaunchConfig {
     unsigned int gridDimX;
     unsigned int gridDimY;
     unsigned int gridDimZ;
     unsigned int blockDimX;
     unsigned int blockDimY;
     unsigned int blockDimZ;
     unsigned int sharedMemBytes;
     CUstream hStream;
     CUlaunchAttribute * attrs;
     unsigned int numAttrs;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int GRIDDIMX
      The struct member offsets.
    • GRIDDIMY

      public static final int GRIDDIMY
      The struct member offsets.
    • GRIDDIMZ

      public static final int GRIDDIMZ
      The struct member offsets.
    • BLOCKDIMX

      public static final int BLOCKDIMX
      The struct member offsets.
    • BLOCKDIMY

      public static final int BLOCKDIMY
      The struct member offsets.
    • BLOCKDIMZ

      public static final int BLOCKDIMZ
      The struct member offsets.
    • SHAREDMEMBYTES

      public static final int SHAREDMEMBYTES
      The struct member offsets.
    • HSTREAM

      public static final int HSTREAM
      The struct member offsets.
    • ATTRS

      public static final int ATTRS
      The struct member offsets.
    • NUMATTRS

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

    • CUlaunchConfig

      public CUlaunchConfig(ByteBuffer container)
      Creates a CUlaunchConfig 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<CUlaunchConfig>
    • gridDimX

      public int gridDimX()
      Returns:
      the value of the gridDimX field.
    • gridDimY

      public int gridDimY()
      Returns:
      the value of the gridDimY field.
    • gridDimZ

      public int gridDimZ()
      Returns:
      the value of the gridDimZ field.
    • blockDimX

      public int blockDimX()
      Returns:
      the value of the blockDimX field.
    • blockDimY

      public int blockDimY()
      Returns:
      the value of the blockDimY field.
    • blockDimZ

      public int blockDimZ()
      Returns:
      the value of the blockDimZ field.
    • sharedMemBytes

      public int sharedMemBytes()
      Returns:
      the value of the sharedMemBytes field.
    • hStream

      public long hStream()
      Returns:
      the value of the hStream field.
    • attrs

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

      public int numAttrs()
      Returns:
      the value of the numAttrs field.
    • gridDimX

      public CUlaunchConfig gridDimX(int value)
      Sets the specified value to the gridDimX field.
    • gridDimY

      public CUlaunchConfig gridDimY(int value)
      Sets the specified value to the gridDimY field.
    • gridDimZ

      public CUlaunchConfig gridDimZ(int value)
      Sets the specified value to the gridDimZ field.
    • blockDimX

      public CUlaunchConfig blockDimX(int value)
      Sets the specified value to the blockDimX field.
    • blockDimY

      public CUlaunchConfig blockDimY(int value)
      Sets the specified value to the blockDimY field.
    • blockDimZ

      public CUlaunchConfig blockDimZ(int value)
      Sets the specified value to the blockDimZ field.
    • sharedMemBytes

      public CUlaunchConfig sharedMemBytes(int value)
      Sets the specified value to the sharedMemBytes field.
    • hStream

      public CUlaunchConfig hStream(long value)
      Sets the specified value to the hStream field.
    • attrs

      public CUlaunchConfig attrs(@Nullable CUlaunchAttribute.Buffer value)
      Sets the address of the specified CUlaunchAttribute.Buffer to the attrs field.
    • numAttrs

      public CUlaunchConfig numAttrs(int value)
      Sets the specified value to the numAttrs field.
    • set

      public CUlaunchConfig set(int gridDimX, int gridDimY, int gridDimZ, int blockDimX, int blockDimY, int blockDimZ, int sharedMemBytes, long hStream, @Nullable CUlaunchAttribute.Buffer attrs, int numAttrs)
      Initializes this struct with the specified values.
    • set

      public CUlaunchConfig set(CUlaunchConfig src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static CUlaunchConfig.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new CUlaunchConfig.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
    • ngridDimX

      public static int ngridDimX(long struct)
      Unsafe version of gridDimX().
    • ngridDimY

      public static int ngridDimY(long struct)
      Unsafe version of gridDimY().
    • ngridDimZ

      public static int ngridDimZ(long struct)
      Unsafe version of gridDimZ().
    • nblockDimX

      public static int nblockDimX(long struct)
      Unsafe version of blockDimX().
    • nblockDimY

      public static int nblockDimY(long struct)
      Unsafe version of blockDimY().
    • nblockDimZ

      public static int nblockDimZ(long struct)
      Unsafe version of blockDimZ().
    • nsharedMemBytes

      public static int nsharedMemBytes(long struct)
      Unsafe version of sharedMemBytes().
    • nhStream

      public static long nhStream(long struct)
      Unsafe version of hStream().
    • nattrs

      public static @Nullable CUlaunchAttribute.Buffer nattrs(long struct)
      Unsafe version of attrs().
    • nnumAttrs

      public static int nnumAttrs(long struct)
      Unsafe version of numAttrs().
    • ngridDimX

      public static void ngridDimX(long struct, int value)
      Unsafe version of gridDimX.
    • ngridDimY

      public static void ngridDimY(long struct, int value)
      Unsafe version of gridDimY.
    • ngridDimZ

      public static void ngridDimZ(long struct, int value)
      Unsafe version of gridDimZ.
    • nblockDimX

      public static void nblockDimX(long struct, int value)
      Unsafe version of blockDimX.
    • nblockDimY

      public static void nblockDimY(long struct, int value)
      Unsafe version of blockDimY.
    • nblockDimZ

      public static void nblockDimZ(long struct, int value)
      Unsafe version of blockDimZ.
    • nsharedMemBytes

      public static void nsharedMemBytes(long struct, int value)
      Unsafe version of sharedMemBytes.
    • nhStream

      public static void nhStream(long struct, long value)
      Unsafe version of hStream.
    • nattrs

      public static void nattrs(long struct, @Nullable CUlaunchAttribute.Buffer value)
      Unsafe version of attrs.
    • nnumAttrs

      public static void nnumAttrs(long struct, int value)
      Sets the specified value to the numAttrs field of the specified struct.