Package org.lwjgl.cuda
Class CUDA_KERNEL_NODE_PARAMS
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.cuda.CUDA_KERNEL_NODE_PARAMS
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUDA_KERNEL_NODE_PARAMS extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceGPU kernel node parameter.Layout
struct CUDA_KERNEL_NODE_PARAMS { CUfunctionfunc(); unsigned intgridDimX(); unsigned intgridDimY(); unsigned intgridDimZ(); unsigned intblockDimX(); unsigned intblockDimY(); unsigned intblockDimZ(); unsigned intsharedMemBytes(); void **kernelParams(int); void **extra(int); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCUDA_KERNEL_NODE_PARAMS.BufferAn array ofCUDA_KERNEL_NODE_PARAMSstructs.
-
Constructor Summary
Constructors Constructor Description CUDA_KERNEL_NODE_PARAMS(java.nio.ByteBuffer container)Creates aCUDA_KERNEL_NODE_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_KERNEL_NODE_PARAMSblockDimX(int value)Sets the specified value to theblockDimX()field.intblockDimY()Y dimension of each thread blockCUDA_KERNEL_NODE_PARAMSblockDimY(int value)Sets the specified value to theblockDimY()field.intblockDimZ()Z dimension of each thread blockCUDA_KERNEL_NODE_PARAMSblockDimZ(int value)Sets the specified value to theblockDimZ()field.static CUDA_KERNEL_NODE_PARAMScalloc()Returns a newCUDA_KERNEL_NODE_PARAMSinstance allocated withmemCalloc.static CUDA_KERNEL_NODE_PARAMS.Buffercalloc(int capacity)Returns a newCUDA_KERNEL_NODE_PARAMS.Bufferinstance allocated withmemCalloc.static CUDA_KERNEL_NODE_PARAMS.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCUDA_KERNEL_NODE_PARAMS.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUDA_KERNEL_NODE_PARAMScalloc(org.lwjgl.system.MemoryStack stack)Returns a newCUDA_KERNEL_NODE_PARAMSinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUDA_KERNEL_NODE_PARAMScallocStack()Deprecated.static CUDA_KERNEL_NODE_PARAMS.BuffercallocStack(int capacity)Deprecated.static CUDA_KERNEL_NODE_PARAMS.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static CUDA_KERNEL_NODE_PARAMScallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static CUDA_KERNEL_NODE_PARAMScreate()Returns a newCUDA_KERNEL_NODE_PARAMSinstance allocated withBufferUtils.static CUDA_KERNEL_NODE_PARAMS.Buffercreate(int capacity)Returns a newCUDA_KERNEL_NODE_PARAMS.Bufferinstance allocated withBufferUtils.static CUDA_KERNEL_NODE_PARAMScreate(long address)Returns a newCUDA_KERNEL_NODE_PARAMSinstance for the specified memory address.static CUDA_KERNEL_NODE_PARAMS.Buffercreate(long address, int capacity)Create aCUDA_KERNEL_NODE_PARAMS.Bufferinstance at the specified memory.static CUDA_KERNEL_NODE_PARAMScreateSafe(long address)static CUDA_KERNEL_NODE_PARAMS.BuffercreateSafe(long address, int capacity)org.lwjgl.PointerBufferextra(int capacity)CUDA_KERNEL_NODE_PARAMSextra(org.lwjgl.PointerBuffer value)Sets the address of the specifiedPointerBufferto theextra(int)field.longfunc()Kernel to launchCUDA_KERNEL_NODE_PARAMSfunc(long value)Sets the specified value to thefunc()field.intgridDimX()Width of grid in blocksCUDA_KERNEL_NODE_PARAMSgridDimX(int value)Sets the specified value to thegridDimX()field.intgridDimY()Height of grid in blocksCUDA_KERNEL_NODE_PARAMSgridDimY(int value)Sets the specified value to thegridDimY()field.intgridDimZ()Depth of grid in blocksCUDA_KERNEL_NODE_PARAMSgridDimZ(int value)Sets the specified value to thegridDimZ()field.org.lwjgl.PointerBufferkernelParams(int capacity)CUDA_KERNEL_NODE_PARAMSkernelParams(org.lwjgl.PointerBuffer value)Sets the address of the specifiedPointerBufferto thekernelParams(int)field.static CUDA_KERNEL_NODE_PARAMSmalloc()Returns a newCUDA_KERNEL_NODE_PARAMSinstance allocated withmemAlloc.static CUDA_KERNEL_NODE_PARAMS.Buffermalloc(int capacity)Returns a newCUDA_KERNEL_NODE_PARAMS.Bufferinstance allocated withmemAlloc.static CUDA_KERNEL_NODE_PARAMS.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCUDA_KERNEL_NODE_PARAMS.Bufferinstance allocated on the specifiedMemoryStack.static CUDA_KERNEL_NODE_PARAMSmalloc(org.lwjgl.system.MemoryStack stack)Returns a newCUDA_KERNEL_NODE_PARAMSinstance allocated on the specifiedMemoryStack.static CUDA_KERNEL_NODE_PARAMSmallocStack()Deprecated.static CUDA_KERNEL_NODE_PARAMS.BuffermallocStack(int capacity)Deprecated.static CUDA_KERNEL_NODE_PARAMS.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static CUDA_KERNEL_NODE_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 org.lwjgl.PointerBuffernextra(long struct, int capacity)Unsafe version ofextra.static voidnextra(long struct, org.lwjgl.PointerBuffer value)Unsafe version ofextra.static longnfunc(long struct)Unsafe version offunc().static voidnfunc(long struct, long value)Unsafe version offunc.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 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_KERNEL_NODE_PARAMSset(long func, int gridDimX, int gridDimY, int gridDimZ, int blockDimX, int blockDimY, int blockDimZ, int sharedMemBytes, org.lwjgl.PointerBuffer kernelParams, org.lwjgl.PointerBuffer extra)Initializes this struct with the specified values.CUDA_KERNEL_NODE_PARAMSset(CUDA_KERNEL_NODE_PARAMS src)Copies the specified struct data to this struct.intsharedMemBytes()Dynamic shared-memory size per thread block in bytesCUDA_KERNEL_NODE_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_KERNEL_NODE_PARAMS
public CUDA_KERNEL_NODE_PARAMS(java.nio.ByteBuffer container)
Creates aCUDA_KERNEL_NODE_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
-
func
public long func()
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
-
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
-
extra
@Nullable public org.lwjgl.PointerBuffer extra(int capacity)
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- Extra options
-
func
public CUDA_KERNEL_NODE_PARAMS func(long value)
Sets the specified value to thefunc()field.
-
gridDimX
public CUDA_KERNEL_NODE_PARAMS gridDimX(int value)
Sets the specified value to thegridDimX()field.
-
gridDimY
public CUDA_KERNEL_NODE_PARAMS gridDimY(int value)
Sets the specified value to thegridDimY()field.
-
gridDimZ
public CUDA_KERNEL_NODE_PARAMS gridDimZ(int value)
Sets the specified value to thegridDimZ()field.
-
blockDimX
public CUDA_KERNEL_NODE_PARAMS blockDimX(int value)
Sets the specified value to theblockDimX()field.
-
blockDimY
public CUDA_KERNEL_NODE_PARAMS blockDimY(int value)
Sets the specified value to theblockDimY()field.
-
blockDimZ
public CUDA_KERNEL_NODE_PARAMS blockDimZ(int value)
Sets the specified value to theblockDimZ()field.
-
sharedMemBytes
public CUDA_KERNEL_NODE_PARAMS sharedMemBytes(int value)
Sets the specified value to thesharedMemBytes()field.
-
kernelParams
public CUDA_KERNEL_NODE_PARAMS kernelParams(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBufferto thekernelParams(int)field.
-
extra
public CUDA_KERNEL_NODE_PARAMS extra(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBufferto theextra(int)field.
-
set
public CUDA_KERNEL_NODE_PARAMS set(long func, int gridDimX, int gridDimY, int gridDimZ, int blockDimX, int blockDimY, int blockDimZ, int sharedMemBytes, @Nullable org.lwjgl.PointerBuffer kernelParams, @Nullable org.lwjgl.PointerBuffer extra)
Initializes this struct with the specified values.
-
set
public CUDA_KERNEL_NODE_PARAMS set(CUDA_KERNEL_NODE_PARAMS src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static CUDA_KERNEL_NODE_PARAMS malloc()
Returns a newCUDA_KERNEL_NODE_PARAMSinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CUDA_KERNEL_NODE_PARAMS calloc()
Returns a newCUDA_KERNEL_NODE_PARAMSinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CUDA_KERNEL_NODE_PARAMS create()
Returns a newCUDA_KERNEL_NODE_PARAMSinstance allocated withBufferUtils.
-
create
public static CUDA_KERNEL_NODE_PARAMS create(long address)
Returns a newCUDA_KERNEL_NODE_PARAMSinstance for the specified memory address.
-
createSafe
@Nullable public static CUDA_KERNEL_NODE_PARAMS createSafe(long address)
-
malloc
public static CUDA_KERNEL_NODE_PARAMS.Buffer malloc(int capacity)
Returns a newCUDA_KERNEL_NODE_PARAMS.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CUDA_KERNEL_NODE_PARAMS.Buffer calloc(int capacity)
Returns a newCUDA_KERNEL_NODE_PARAMS.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CUDA_KERNEL_NODE_PARAMS.Buffer create(int capacity)
Returns a newCUDA_KERNEL_NODE_PARAMS.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CUDA_KERNEL_NODE_PARAMS.Buffer create(long address, int capacity)
Create aCUDA_KERNEL_NODE_PARAMS.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static CUDA_KERNEL_NODE_PARAMS.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static CUDA_KERNEL_NODE_PARAMS mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_KERNEL_NODE_PARAMS callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CUDA_KERNEL_NODE_PARAMS mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_KERNEL_NODE_PARAMS callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CUDA_KERNEL_NODE_PARAMS.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_KERNEL_NODE_PARAMS.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static CUDA_KERNEL_NODE_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_KERNEL_NODE_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_KERNEL_NODE_PARAMS malloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_KERNEL_NODE_PARAMSinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static CUDA_KERNEL_NODE_PARAMS calloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_KERNEL_NODE_PARAMSinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static CUDA_KERNEL_NODE_PARAMS.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_KERNEL_NODE_PARAMS.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static CUDA_KERNEL_NODE_PARAMS.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_KERNEL_NODE_PARAMS.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nfunc
public static long nfunc(long struct)
Unsafe version offunc().
-
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().
-
nkernelParams
@Nullable public static org.lwjgl.PointerBuffer nkernelParams(long struct, int capacity)Unsafe version ofkernelParams.
-
nextra
@Nullable public static org.lwjgl.PointerBuffer nextra(long struct, int capacity)Unsafe version ofextra.
-
nfunc
public static void nfunc(long struct, long value)Unsafe version offunc.
-
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.
-
nkernelParams
public static void nkernelParams(long struct, @Nullable org.lwjgl.PointerBuffer value)Unsafe version ofkernelParams.
-
nextra
public static void nextra(long struct, @Nullable org.lwjgl.PointerBuffer value)Unsafe version ofextra.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-