Package org.lwjgl.cuda
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;
}-
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
ConstructorsConstructorDescriptionCUlaunchConfig(ByteBuffer container) Creates aCUlaunchConfiginstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescription@Nullable CUlaunchAttribute.Bufferattrs()attrs(@Nullable CUlaunchAttribute.Buffer value) Sets the address of the specifiedCUlaunchAttribute.Bufferto theattrsfield.intblockDimX(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 CUlaunchConfigcalloc()Returns a newCUlaunchConfiginstance allocated withmemCalloc.static CUlaunchConfig.Buffercalloc(int capacity) Returns a newCUlaunchConfig.Bufferinstance allocated withmemCalloc.static CUlaunchConfig.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUlaunchConfig.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUlaunchConfigcalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUlaunchConfiginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUlaunchConfigcreate()Returns a newCUlaunchConfiginstance allocated withBufferUtils.static CUlaunchConfig.Buffercreate(int capacity) Returns a newCUlaunchConfig.Bufferinstance allocated withBufferUtils.static CUlaunchConfigcreate(long address) Returns a newCUlaunchConfiginstance for the specified memory address.static CUlaunchConfig.Buffercreate(long address, int capacity) Create aCUlaunchConfig.Bufferinstance at the specified memory.static @Nullable CUlaunchConfigcreateSafe(long address) static @Nullable CUlaunchConfig.BuffercreateSafe(long address, int capacity) 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.static CUlaunchConfigmalloc()Returns a newCUlaunchConfiginstance allocated withmemAlloc.static CUlaunchConfig.Buffermalloc(int capacity) Returns a newCUlaunchConfig.Bufferinstance allocated withmemAlloc.static CUlaunchConfig.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUlaunchConfig.Bufferinstance allocated on the specifiedMemoryStack.static CUlaunchConfigmalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUlaunchConfiginstance allocated on the specifiedMemoryStack.static @Nullable CUlaunchAttribute.Buffernattrs(long struct) Unsafe version ofattrs().static voidnattrs(long struct, @Nullable CUlaunchAttribute.Buffer value) Unsafe version ofattrs.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 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 intnnumAttrs(long struct) Unsafe version ofnumAttrs().static voidnnumAttrs(long struct, int value) Sets the specified value to thenumAttrsfield of the specifiedstruct.static intnsharedMemBytes(long struct) Unsafe version ofsharedMemBytes().static voidnsharedMemBytes(long struct, int value) Unsafe version ofsharedMemBytes.intnumAttrs()numAttrs(int value) Sets the specified value to thenumAttrsfield.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(CUlaunchConfig src) Copies the specified struct data to this struct.intsharedMemBytes(int value) Sets the specified value to thesharedMemBytesfield.intsizeof()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. -
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. -
ATTRS
public static final int ATTRSThe struct member offsets. -
NUMATTRS
public static final int NUMATTRSThe struct member offsets.
-
-
Constructor Details
-
CUlaunchConfig
Creates aCUlaunchConfiginstance 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<CUlaunchConfig>
-
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.
-
attrs
- Returns:
- a
CUlaunchAttribute.Bufferview of the struct array pointed to by theattrsfield.
-
numAttrs
public int numAttrs()- Returns:
- the value of the
numAttrsfield.
-
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. -
attrs
Sets the address of the specifiedCUlaunchAttribute.Bufferto theattrsfield. -
numAttrs
Sets the specified value to thenumAttrsfield. -
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
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newCUlaunchConfiginstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCUlaunchConfiginstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCUlaunchConfiginstance allocated withBufferUtils. -
create
Returns a newCUlaunchConfiginstance for the specified memory address. -
createSafe
-
malloc
Returns a newCUlaunchConfig.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCUlaunchConfig.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCUlaunchConfig.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCUlaunchConfig.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newCUlaunchConfiginstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCUlaunchConfiginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newCUlaunchConfig.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newCUlaunchConfig.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
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(). -
nattrs
Unsafe version ofattrs(). -
nnumAttrs
public static int nnumAttrs(long struct) Unsafe version ofnumAttrs(). -
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. -
nattrs
Unsafe version ofattrs. -
nnumAttrs
public static void nnumAttrs(long struct, int value) Sets the specified value to thenumAttrsfield of the specifiedstruct.
-