C Specification
The VkCudaLaunchInfoNV
structure is very close to the parameters of
the CUDA-Driver function
cuLaunchKernel
documented in section
6.19
Execution Control of CUDA Driver API.
The structure is defined as:
// Provided by VK_NV_cuda_kernel_launch
typedef struct VkCudaLaunchInfoNV {
VkStructureType sType;
const void* 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;
const void* const * pParams;
size_t extraCount;
const void* const * pExtras;
} VkCudaLaunchInfoNV;
Members
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
function
is the CUDA-Driver handle to the function being launched. -
gridDimX
is the number of local workgroups to dispatch in the X dimension. It must be less than or equal toVkPhysicalDeviceLimits
::maxComputeWorkGroupCount
[0] -
gridDimY
is the number of local workgroups to dispatch in the Y dimension. It must be less than or equal toVkPhysicalDeviceLimits
::maxComputeWorkGroupCount
[1] -
gridDimZ
is the number of local workgroups to dispatch in the Z dimension. It must be less than or equal toVkPhysicalDeviceLimits
::maxComputeWorkGroupCount
[2] -
blockDimX
is block size in the X dimension. -
blockDimY
is block size in the Y dimension. -
blockDimZ
is block size in the Z dimension. -
sharedMemBytes
is the dynamic shared-memory size per thread block in bytes. -
paramCount
is the length of thepParams
table. -
pParams
is a pointer to an array ofparamCount
pointers, corresponding to the arguments offunction
. -
extraCount
is reserved for future use. -
pExtras
is reserved for future use.
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 set to 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
vkCmdCudaLaunchKernelNV has returned.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.