Package org.lwjgl.cuda
Class CUDA_LAUNCH_PARAMS
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CUDA_LAUNCH_PARAMS>
org.lwjgl.cuda.CUDA_LAUNCH_PARAMS
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUDA_LAUNCH_PARAMS
extends org.lwjgl.system.Struct<CUDA_LAUNCH_PARAMS>
implements org.lwjgl.system.NativeResource
Layout
struct CUDA_LAUNCH_PARAMS {
CUfunction function;
unsigned int gridDimX;
unsigned int gridDimY;
unsigned int gridDimZ;
unsigned int blockDimX;
unsigned int blockDimY;
unsigned int blockDimZ;
unsigned int sharedMemBytes;
CUstream hStream;
void ** kernelParams;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionCUDA_LAUNCH_PARAMS(ByteBuffer container) Creates aCUDA_LAUNCH_PARAMSinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintblockDimX(int value) Sets the specified value to theblockDimXfield.intblockDimY(int value) Sets the specified value to theblockDimYfield.intblockDimZ(int value) Sets the specified value to theblockDimZfield.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_PARAMSDeprecated.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 @Nullable CUDA_LAUNCH_PARAMScreateSafe(long address) static @Nullable CUDA_LAUNCH_PARAMS.BuffercreateSafe(long address, int capacity) longfunction()function(long value) Sets the specified value to thefunctionfield.intgridDimX()gridDimX(int value) Sets the specified value to thegridDimXfield.intgridDimY()gridDimY(int value) Sets the specified value to thegridDimYfield.intgridDimZ()gridDimZ(int value) Sets the specified value to thegridDimZfield.longhStream()hStream(long value) Sets the specified value to thehStreamfield.@Nullable org.lwjgl.PointerBufferkernelParams(int capacity) kernelParams(@Nullable org.lwjgl.PointerBuffer value) Sets the address of the specifiedPointerBufferto thekernelParamsfield.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_PARAMSDeprecated.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 @Nullable org.lwjgl.PointerBuffernkernelParams(long struct, int capacity) Unsafe version ofkernelParams.static voidnkernelParams(long struct, @Nullable org.lwjgl.PointerBuffer value) Unsafe version ofkernelParams.static intnsharedMemBytes(long struct) Unsafe version ofsharedMemBytes().static voidnsharedMemBytes(long struct, int value) Unsafe version ofsharedMemBytes.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(CUDA_LAUNCH_PARAMS src) Copies the specified struct data to this struct.intsharedMemBytes(int value) Sets the specified value to thesharedMemBytesfield.intsizeof()static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
FUNCTION
public static final int FUNCTIONThe struct member offsets. -
GRIDDIMX
public static final int GRIDDIMXThe struct member offsets. -
GRIDDIMY
public static final int GRIDDIMYThe struct member offsets. -
GRIDDIMZ
public static final int GRIDDIMZThe struct member offsets. -
BLOCKDIMX
public static final int BLOCKDIMXThe struct member offsets. -
BLOCKDIMY
public static final int BLOCKDIMYThe struct member offsets. -
BLOCKDIMZ
public static final int BLOCKDIMZThe struct member offsets. -
SHAREDMEMBYTES
public static final int SHAREDMEMBYTESThe struct member offsets. -
HSTREAM
public static final int HSTREAMThe struct member offsets. -
KERNELPARAMS
public static final int KERNELPARAMSThe struct member offsets.
-
-
Constructor Details
-
CUDA_LAUNCH_PARAMS
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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<CUDA_LAUNCH_PARAMS>
-
function
public long function()- Returns:
- the value of the
functionfield.
-
gridDimX
public int gridDimX()- Returns:
- the value of the
gridDimXfield.
-
gridDimY
public int gridDimY()- Returns:
- the value of the
gridDimYfield.
-
gridDimZ
public int gridDimZ()- Returns:
- the value of the
gridDimZfield.
-
blockDimX
public int blockDimX()- Returns:
- the value of the
blockDimXfield.
-
blockDimY
public int blockDimY()- Returns:
- the value of the
blockDimYfield.
-
blockDimZ
public int blockDimZ()- Returns:
- the value of the
blockDimZfield.
-
hStream
public long hStream()- Returns:
- the value of the
hStreamfield.
-
kernelParams
public @Nullable org.lwjgl.PointerBuffer kernelParams(int capacity) - Parameters:
capacity- the number of elements in the returned buffer- Returns:
- a
PointerBufferview of the data pointed to by thekernelParamsfield.
-
function
Sets the specified value to thefunctionfield. -
gridDimX
Sets the specified value to thegridDimXfield. -
gridDimY
Sets the specified value to thegridDimYfield. -
gridDimZ
Sets the specified value to thegridDimZfield. -
blockDimX
Sets the specified value to theblockDimXfield. -
blockDimY
Sets the specified value to theblockDimYfield. -
blockDimZ
Sets the specified value to theblockDimZfield. -
hStream
Sets the specified value to thehStreamfield. -
kernelParams
Sets the address of the specifiedPointerBufferto thekernelParamsfield. -
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
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newCUDA_LAUNCH_PARAMSinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCUDA_LAUNCH_PARAMSinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCUDA_LAUNCH_PARAMSinstance allocated withBufferUtils. -
create
Returns a newCUDA_LAUNCH_PARAMSinstance for the specified memory address. -
createSafe
-
malloc
Returns a newCUDA_LAUNCH_PARAMS.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCUDA_LAUNCH_PARAMS.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCUDA_LAUNCH_PARAMS.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCUDA_LAUNCH_PARAMS.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
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
Returns a newCUDA_LAUNCH_PARAMSinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCUDA_LAUNCH_PARAMSinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newCUDA_LAUNCH_PARAMS.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newCUDA_LAUNCH_PARAMS.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
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(). -
nhStream
public static long nhStream(long struct) Unsafe version ofhStream(). -
nkernelParams
public static @Nullable 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. -
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
-