Class VkCudaLaunchInfoNV

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

public class VkCudaLaunchInfoNV extends org.lwjgl.system.Struct<VkCudaLaunchInfoNV> implements org.lwjgl.system.NativeResource
Structure specifying the parameters to launch a CUDA kernel.
Description

Kernel parameters of function are specified via pParams, very much the same way as described in cuLaunchKernel

If function has N parameters, then pParams must be an array of N pointers and paramCount must be N. Each of kernelParams[0] through kernelParams[N-1] must point to a region of memory from which the actual kernel parameter will be copied. The number of kernel parameters and their offsets and sizes are not specified here as that information is stored in the VkCudaFunctionNV object.

The application-owned memory pointed to by pParams and kernelParams[0] through kernelParams[N-1] are consumed immediately, and may be altered or freed after CmdCudaLaunchKernelNV has returned.

Valid Usage
  • gridDimX must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[0]
  • gridDimY must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[1]
  • gridDimZ must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[2]
  • paramCount must be the total amount of parameters listed in the pParams table
  • pParams must be a pointer to a table of paramCount parameters, corresponding to the arguments of function
  • extraCount must be 0
  • pExtras must be NULL
Valid Usage (Implicit)
See Also

CmdCudaLaunchKernelNV

Layout


 struct VkCudaLaunchInfoNV {
     VkStructureType sType();
     void const * pNext();
     VkCudaFunctionNV function();
     uint32_t gridDimX();
     uint32_t gridDimY();
     uint32_t gridDimZ();
     uint32_t blockDimX();
     uint32_t blockDimY();
     uint32_t blockDimZ();
     uint32_t sharedMemBytes();
     size_t paramCount();
     void const * const * pParams();
     size_t extraCount();
     void const * const * pExtras();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int STYPE
      The struct member offsets.
    • PNEXT

      public static final int PNEXT
      The struct member offsets.
    • FUNCTION

      public static final int FUNCTION
      The struct member offsets.
    • 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.
    • PARAMCOUNT

      public static final int PARAMCOUNT
      The struct member offsets.
    • PPARAMS

      public static final int PPARAMS
      The struct member offsets.
    • EXTRACOUNT

      public static final int EXTRACOUNT
      The struct member offsets.
    • PEXTRAS

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

    • VkCudaLaunchInfoNV

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

      public int sType()
      a VkStructureType value identifying this structure.
    • pNext

      public long pNext()
      NULL or a pointer to a structure extending this structure.
    • function

      public long function()
      the CUDA-Driver handle to the function being launched.
    • gridDimX

      public int gridDimX()
      the number of local workgroups to dispatch in the X dimension. It must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[0]
    • gridDimY

      public int gridDimY()
      the number of local workgroups to dispatch in the Y dimension. It must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[1]
    • gridDimZ

      public int gridDimZ()
      the number of local workgroups to dispatch in the Z dimension. It must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[2]
    • blockDimX

      public int blockDimX()
      block size in the X dimension.
    • blockDimY

      public int blockDimY()
      block size in the Y dimension.
    • blockDimZ

      public int blockDimZ()
      block size in the Z dimension.
    • sharedMemBytes

      public int sharedMemBytes()
      the dynamic shared-memory size per thread block in bytes.
    • paramCount

      public long paramCount()
      the length of the pParams table.
    • pParams

      public @Nullable org.lwjgl.PointerBuffer pParams()
      a pointer to an array of paramCount pointers, corresponding to the arguments of function.
    • extraCount

      public long extraCount()
      reserved for future use.
    • pExtras

      public @Nullable org.lwjgl.PointerBuffer pExtras()
      reserved for future use.
    • sType

      public VkCudaLaunchInfoNV sType(int value)
      Sets the specified value to the sType() field.
    • sType$Default

      public VkCudaLaunchInfoNV sType$Default()
      Sets the STRUCTURE_TYPE_CUDA_LAUNCH_INFO_NV value to the sType() field.
    • pNext

      public VkCudaLaunchInfoNV pNext(long value)
      Sets the specified value to the pNext() field.
    • function

      public VkCudaLaunchInfoNV function(long value)
      Sets the specified value to the function() field.
    • gridDimX

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

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

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

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

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

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

      public VkCudaLaunchInfoNV sharedMemBytes(int value)
      Sets the specified value to the sharedMemBytes() field.
    • paramCount

      public VkCudaLaunchInfoNV paramCount(long value)
      Sets the specified value to the paramCount() field.
    • pParams

      public VkCudaLaunchInfoNV pParams(@Nullable org.lwjgl.PointerBuffer value)
      Sets the address of the specified PointerBuffer to the pParams() field.
    • extraCount

      public VkCudaLaunchInfoNV extraCount(long value)
      Sets the specified value to the extraCount() field.
    • pExtras

      public VkCudaLaunchInfoNV pExtras(@Nullable org.lwjgl.PointerBuffer value)
      Sets the address of the specified PointerBuffer to the pExtras() field.
    • set

      public VkCudaLaunchInfoNV set(int sType, long pNext, long function, int gridDimX, int gridDimY, int gridDimZ, int blockDimX, int blockDimY, int blockDimZ, int sharedMemBytes, long paramCount, @Nullable org.lwjgl.PointerBuffer pParams, long extraCount, @Nullable org.lwjgl.PointerBuffer pExtras)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nsType(long struct)
      Unsafe version of sType().
    • npNext

      public static long npNext(long struct)
      Unsafe version of pNext().
    • nfunction

      public static long nfunction(long struct)
      Unsafe version of function().
    • 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().
    • nparamCount

      public static long nparamCount(long struct)
      Unsafe version of paramCount().
    • npParams

      public static @Nullable org.lwjgl.PointerBuffer npParams(long struct)
      Unsafe version of pParams.
    • nextraCount

      public static long nextraCount(long struct)
      Unsafe version of extraCount().
    • npExtras

      public static @Nullable org.lwjgl.PointerBuffer npExtras(long struct)
      Unsafe version of pExtras.
    • nsType

      public static void nsType(long struct, int value)
      Unsafe version of sType.
    • npNext

      public static void npNext(long struct, long value)
      Unsafe version of pNext.
    • nfunction

      public static void nfunction(long struct, long value)
      Unsafe version of function.
    • 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.
    • nparamCount

      public static void nparamCount(long struct, long value)
      Sets the specified value to the paramCount field of the specified struct.
    • npParams

      public static void npParams(long struct, @Nullable org.lwjgl.PointerBuffer value)
      Unsafe version of pParams.
    • nextraCount

      public static void nextraCount(long struct, long value)
      Sets the specified value to the extraCount field of the specified struct.
    • npExtras

      public static void npExtras(long struct, @Nullable org.lwjgl.PointerBuffer value)
      Unsafe version of pExtras.