Package org.lwjgl.cuda
Class CUDA_LAUNCH_PARAMS
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.cuda.CUDA_LAUNCH_PARAMS
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUDA_LAUNCH_PARAMS extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceKernel launch parameters.Layout
struct CUDA_LAUNCH_PARAMS { CUfunctionfunction(); unsigned intgridDimX(); unsigned intgridDimY(); unsigned intgridDimZ(); unsigned intblockDimX(); unsigned intblockDimY(); unsigned intblockDimZ(); unsigned intsharedMemBytes(); CUstreamhStream(); void **kernelParams(int); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCUDA_LAUNCH_PARAMS.BufferAn array ofCUDA_LAUNCH_PARAMSstructs.
-
Constructor Summary
Constructors Constructor Description CUDA_LAUNCH_PARAMS(java.nio.ByteBuffer container)Creates aCUDA_LAUNCH_PARAMSinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intblockDimX()X dimension of each thread blockCUDA_LAUNCH_PARAMSblockDimX(int value)Sets the specified value to theblockDimX()field.intblockDimY()Y dimension of each thread blockCUDA_LAUNCH_PARAMSblockDimY(int value)Sets the specified value to theblockDimY()field.intblockDimZ()Z dimension of each thread blockCUDA_LAUNCH_PARAMSblockDimZ(int value)Sets the specified value to theblockDimZ()field.static CUDA_LAUNCH_PARAMScalloc()Returns a newCUDA_LAUNCH_PARAMSinstance allocated withmemCalloc.static CUDA_LAUNCH_PARAMS.Buffercalloc(int capacity)Returns a newCUDA_LAUNCH_PARAMS.Bufferinstance allocated withmemCalloc.static CUDA_LAUNCH_PARAMS.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCUDA_LAUNCH_PARAMS.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUDA_LAUNCH_PARAMScalloc(org.lwjgl.system.MemoryStack stack)Returns a newCUDA_LAUNCH_PARAMSinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUDA_LAUNCH_PARAMScallocStack()Deprecated.static CUDA_LAUNCH_PARAMS.BuffercallocStack(int capacity)Deprecated.static CUDA_LAUNCH_PARAMS.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static CUDA_LAUNCH_PARAMScallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static CUDA_LAUNCH_PARAMScreate()Returns a newCUDA_LAUNCH_PARAMSinstance allocated withBufferUtils.static CUDA_LAUNCH_PARAMS.Buffercreate(int capacity)Returns a newCUDA_LAUNCH_PARAMS.Bufferinstance allocated withBufferUtils.static CUDA_LAUNCH_PARAMScreate(long address)Returns a newCUDA_LAUNCH_PARAMSinstance for the specified memory address.static CUDA_LAUNCH_PARAMS.Buffercreate(long address, int capacity)Create aCUDA_LAUNCH_PARAMS.Bufferinstance at the specified memory.static CUDA_LAUNCH_PARAMScreateSafe(long address)static CUDA_LAUNCH_PARAMS.BuffercreateSafe(long address, int capacity)longfunction()Kernel to launchCUDA_LAUNCH_PARAMSfunction(long value)Sets the specified value to thefunction()field.intgridDimX()Width of grid in blocksCUDA_LAUNCH_PARAMSgridDimX(int value)Sets the specified value to thegridDimX()field.intgridDimY()Height of grid in blocksCUDA_LAUNCH_PARAMSgridDimY(int value)Sets the specified value to thegridDimY()field.intgridDimZ()Depth of grid in blocksCUDA_LAUNCH_PARAMSgridDimZ(int value)Sets the specified value to thegridDimZ()field.longhStream()Stream identifierCUDA_LAUNCH_PARAMShStream(long value)Sets the specified value to thehStream()field.org.lwjgl.PointerBufferkernelParams(int capacity)CUDA_LAUNCH_PARAMSkernelParams(org.lwjgl.PointerBuffer value)Sets the address of the specifiedPointerBufferto thekernelParams(int)field.static CUDA_LAUNCH_PARAMSmalloc()Returns a newCUDA_LAUNCH_PARAMSinstance allocated withmemAlloc.static CUDA_LAUNCH_PARAMS.Buffermalloc(int capacity)Returns a newCUDA_LAUNCH_PARAMS.Bufferinstance allocated withmemAlloc.static CUDA_LAUNCH_PARAMS.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCUDA_LAUNCH_PARAMS.Bufferinstance allocated on the specifiedMemoryStack.static CUDA_LAUNCH_PARAMSmalloc(org.lwjgl.system.MemoryStack stack)Returns a newCUDA_LAUNCH_PARAMSinstance allocated on the specifiedMemoryStack.static CUDA_LAUNCH_PARAMSmallocStack()Deprecated.static CUDA_LAUNCH_PARAMS.BuffermallocStack(int capacity)Deprecated.static CUDA_LAUNCH_PARAMS.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static CUDA_LAUNCH_PARAMSmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static intnblockDimX(long struct)Unsafe version ofblockDimX().static voidnblockDimX(long struct, int value)Unsafe version ofblockDimX.static intnblockDimY(long struct)Unsafe version ofblockDimY().static voidnblockDimY(long struct, int value)Unsafe version ofblockDimY.static intnblockDimZ(long struct)Unsafe version ofblockDimZ().static voidnblockDimZ(long struct, int value)Unsafe version ofblockDimZ.static longnfunction(long struct)Unsafe version offunction().static voidnfunction(long struct, long value)Unsafe version offunction.static intngridDimX(long struct)Unsafe version ofgridDimX().static voidngridDimX(long struct, int value)Unsafe version ofgridDimX.static intngridDimY(long struct)Unsafe version ofgridDimY().static voidngridDimY(long struct, int value)Unsafe version ofgridDimY.static intngridDimZ(long struct)Unsafe version ofgridDimZ().static voidngridDimZ(long struct, int value)Unsafe version ofgridDimZ.static longnhStream(long struct)Unsafe version ofhStream().static voidnhStream(long struct, long value)Unsafe version ofhStream.static org.lwjgl.PointerBuffernkernelParams(long struct, int capacity)Unsafe version ofkernelParams.static voidnkernelParams(long struct, org.lwjgl.PointerBuffer value)Unsafe version ofkernelParams.static intnsharedMemBytes(long struct)Unsafe version ofsharedMemBytes().static voidnsharedMemBytes(long struct, int value)Unsafe version ofsharedMemBytes.CUDA_LAUNCH_PARAMSset(long function, int gridDimX, int gridDimY, int gridDimZ, int blockDimX, int blockDimY, int blockDimZ, int sharedMemBytes, long hStream, org.lwjgl.PointerBuffer kernelParams)Initializes this struct with the specified values.CUDA_LAUNCH_PARAMSset(CUDA_LAUNCH_PARAMS src)Copies the specified struct data to this struct.intsharedMemBytes()Dynamic shared-memory size per thread block in bytesCUDA_LAUNCH_PARAMSsharedMemBytes(int value)Sets the specified value to thesharedMemBytes()field.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
CUDA_LAUNCH_PARAMS
public CUDA_LAUNCH_PARAMS(java.nio.ByteBuffer container)
Creates aCUDA_LAUNCH_PARAMSinstance at the current position of the specifiedByteBuffercontainer. 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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
function
public long function()
Kernel to launch
-
gridDimX
public int gridDimX()
Width of grid in blocks
-
gridDimY
public int gridDimY()
Height of grid in blocks
-
gridDimZ
public int gridDimZ()
Depth of grid in blocks
-
blockDimX
public int blockDimX()
X dimension of each thread block
-
blockDimY
public int blockDimY()
Y dimension of each thread block
-
blockDimZ
public int blockDimZ()
Z dimension of each thread block
-
sharedMemBytes
public int sharedMemBytes()
Dynamic shared-memory size per thread block in bytes
-
hStream
public long hStream()
Stream identifier
-
kernelParams
@Nullable public org.lwjgl.PointerBuffer kernelParams(int capacity)
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- Array of pointers to kernel parameters
-
function
public CUDA_LAUNCH_PARAMS function(long value)
Sets the specified value to thefunction()field.
-
gridDimX
public CUDA_LAUNCH_PARAMS gridDimX(int value)
Sets the specified value to thegridDimX()field.
-
gridDimY
public CUDA_LAUNCH_PARAMS gridDimY(int value)
Sets the specified value to thegridDimY()field.
-
gridDimZ
public CUDA_LAUNCH_PARAMS gridDimZ(int value)
Sets the specified value to thegridDimZ()field.
-
blockDimX
public CUDA_LAUNCH_PARAMS blockDimX(int value)
Sets the specified value to theblockDimX()field.
-
blockDimY
public CUDA_LAUNCH_PARAMS blockDimY(int value)
Sets the specified value to theblockDimY()field.
-
blockDimZ
public CUDA_LAUNCH_PARAMS blockDimZ(int value)
Sets the specified value to theblockDimZ()field.
-
sharedMemBytes
public CUDA_LAUNCH_PARAMS sharedMemBytes(int value)
Sets the specified value to thesharedMemBytes()field.
-
hStream
public CUDA_LAUNCH_PARAMS hStream(long value)
Sets the specified value to thehStream()field.
-
kernelParams
public CUDA_LAUNCH_PARAMS kernelParams(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBufferto thekernelParams(int)field.
-
set
public CUDA_LAUNCH_PARAMS set(long function, int gridDimX, int gridDimY, int gridDimZ, int blockDimX, int blockDimY, int blockDimZ, int sharedMemBytes, long hStream, @Nullable org.lwjgl.PointerBuffer kernelParams)
Initializes this struct with the specified values.
-
set
public CUDA_LAUNCH_PARAMS set(CUDA_LAUNCH_PARAMS src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static CUDA_LAUNCH_PARAMS malloc()
Returns a newCUDA_LAUNCH_PARAMSinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CUDA_LAUNCH_PARAMS calloc()
Returns a newCUDA_LAUNCH_PARAMSinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CUDA_LAUNCH_PARAMS create()
Returns a newCUDA_LAUNCH_PARAMSinstance allocated withBufferUtils.
-
create
public static CUDA_LAUNCH_PARAMS create(long address)
Returns a newCUDA_LAUNCH_PARAMSinstance for the specified memory address.
-
createSafe
@Nullable public static CUDA_LAUNCH_PARAMS createSafe(long address)
-
malloc
public static CUDA_LAUNCH_PARAMS.Buffer malloc(int capacity)
Returns a newCUDA_LAUNCH_PARAMS.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CUDA_LAUNCH_PARAMS.Buffer calloc(int capacity)
Returns a newCUDA_LAUNCH_PARAMS.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CUDA_LAUNCH_PARAMS.Buffer create(int capacity)
Returns a newCUDA_LAUNCH_PARAMS.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CUDA_LAUNCH_PARAMS.Buffer create(long address, int capacity)
Create aCUDA_LAUNCH_PARAMS.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static CUDA_LAUNCH_PARAMS.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static CUDA_LAUNCH_PARAMS mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_LAUNCH_PARAMS callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CUDA_LAUNCH_PARAMS mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_LAUNCH_PARAMS callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CUDA_LAUNCH_PARAMS.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_LAUNCH_PARAMS.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static CUDA_LAUNCH_PARAMS.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_LAUNCH_PARAMS.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static CUDA_LAUNCH_PARAMS malloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_LAUNCH_PARAMSinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static CUDA_LAUNCH_PARAMS calloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_LAUNCH_PARAMSinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static CUDA_LAUNCH_PARAMS.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_LAUNCH_PARAMS.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static CUDA_LAUNCH_PARAMS.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_LAUNCH_PARAMS.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nfunction
public static long nfunction(long struct)
Unsafe version offunction().
-
ngridDimX
public static int ngridDimX(long struct)
Unsafe version ofgridDimX().
-
ngridDimY
public static int ngridDimY(long struct)
Unsafe version ofgridDimY().
-
ngridDimZ
public static int ngridDimZ(long struct)
Unsafe version ofgridDimZ().
-
nblockDimX
public static int nblockDimX(long struct)
Unsafe version ofblockDimX().
-
nblockDimY
public static int nblockDimY(long struct)
Unsafe version ofblockDimY().
-
nblockDimZ
public static int nblockDimZ(long struct)
Unsafe version ofblockDimZ().
-
nsharedMemBytes
public static int nsharedMemBytes(long struct)
Unsafe version ofsharedMemBytes().
-
nhStream
public static long nhStream(long struct)
Unsafe version ofhStream().
-
nkernelParams
@Nullable public static org.lwjgl.PointerBuffer nkernelParams(long struct, int capacity)Unsafe version ofkernelParams.
-
nfunction
public static void nfunction(long struct, long value)Unsafe version offunction.
-
ngridDimX
public static void ngridDimX(long struct, int value)Unsafe version ofgridDimX.
-
ngridDimY
public static void ngridDimY(long struct, int value)Unsafe version ofgridDimY.
-
ngridDimZ
public static void ngridDimZ(long struct, int value)Unsafe version ofgridDimZ.
-
nblockDimX
public static void nblockDimX(long struct, int value)Unsafe version ofblockDimX.
-
nblockDimY
public static void nblockDimY(long struct, int value)Unsafe version ofblockDimY.
-
nblockDimZ
public static void nblockDimZ(long struct, int value)Unsafe version ofblockDimZ.
-
nsharedMemBytes
public static void nsharedMemBytes(long struct, int value)Unsafe version ofsharedMemBytes.
-
nhStream
public static void nhStream(long struct, long value)Unsafe version ofhStream.
-
nkernelParams
public static void nkernelParams(long struct, @Nullable org.lwjgl.PointerBuffer value)Unsafe version ofkernelParams.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-