Package org.lwjgl.cuda
Class CUDA_RESOURCE_DESC
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CUDA_RESOURCE_DESC>
org.lwjgl.cuda.CUDA_RESOURCE_DESC
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUDA_RESOURCE_DESC
extends org.lwjgl.system.Struct<CUDA_RESOURCE_DESC>
implements org.lwjgl.system.NativeResource
Layout
struct CUDA_RESOURCE_DESC {
CUresourcetype resType;
union {
struct {
CUarray hArray;
} array;
struct {
CUmipmappedArray hMipmappedArray;
} mipmap;
struct {
CUdeviceptr devPtr;
CUarray_format format;
unsigned int numChannels;
size_t sizeInBytes;
} linear;
struct {
CUdeviceptr devPtr;
CUarray_format format;
unsigned int numChannels;
size_t width;
size_t height;
size_t pitchInBytes;
} pitch2D;
struct {
int reserved[32];
} reserved;
} res;
unsigned int flags;
}-
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 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 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_RESOURCE_DESC(ByteBuffer container) Creates aCUDA_RESOURCE_DESCinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic CUDA_RESOURCE_DESCcalloc()Returns a newCUDA_RESOURCE_DESCinstance allocated withmemCalloc.static CUDA_RESOURCE_DESC.Buffercalloc(int capacity) Returns a newCUDA_RESOURCE_DESC.Bufferinstance allocated withmemCalloc.static CUDA_RESOURCE_DESC.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUDA_RESOURCE_DESC.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUDA_RESOURCE_DESCcalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUDA_RESOURCE_DESCinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUDA_RESOURCE_DESCDeprecated.static CUDA_RESOURCE_DESC.BuffercallocStack(int capacity) Deprecated.static CUDA_RESOURCE_DESC.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static CUDA_RESOURCE_DESCcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static CUDA_RESOURCE_DESCcreate()Returns a newCUDA_RESOURCE_DESCinstance allocated withBufferUtils.static CUDA_RESOURCE_DESC.Buffercreate(int capacity) Returns a newCUDA_RESOURCE_DESC.Bufferinstance allocated withBufferUtils.static CUDA_RESOURCE_DESCcreate(long address) Returns a newCUDA_RESOURCE_DESCinstance for the specified memory address.static CUDA_RESOURCE_DESC.Buffercreate(long address, int capacity) Create aCUDA_RESOURCE_DESC.Bufferinstance at the specified memory.static @Nullable CUDA_RESOURCE_DESCcreateSafe(long address) static @Nullable CUDA_RESOURCE_DESC.BuffercreateSafe(long address, int capacity) intflags()flags(int value) Sets the specified value to theflagsfield.static CUDA_RESOURCE_DESCmalloc()Returns a newCUDA_RESOURCE_DESCinstance allocated withmemAlloc.static CUDA_RESOURCE_DESC.Buffermalloc(int capacity) Returns a newCUDA_RESOURCE_DESC.Bufferinstance allocated withmemAlloc.static CUDA_RESOURCE_DESC.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUDA_RESOURCE_DESC.Bufferinstance allocated on the specifiedMemoryStack.static CUDA_RESOURCE_DESCmalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUDA_RESOURCE_DESCinstance allocated on the specifiedMemoryStack.static CUDA_RESOURCE_DESCDeprecated.static CUDA_RESOURCE_DESC.BuffermallocStack(int capacity) Deprecated.static CUDA_RESOURCE_DESC.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static CUDA_RESOURCE_DESCmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static intnflags(long struct) Unsafe version offlags().static voidnflags(long struct, int value) Unsafe version offlags.static longnres_array_hArray(long struct) Unsafe version ofres_array_hArray().static voidnres_array_hArray(long struct, long value) Unsafe version ofres_array_hArray.static longnres_linear_devPtr(long struct) Unsafe version ofres_linear_devPtr().static voidnres_linear_devPtr(long struct, long value) Unsafe version ofres_linear_devPtr.static intnres_linear_format(long struct) Unsafe version ofres_linear_format().static voidnres_linear_format(long struct, int value) Unsafe version ofres_linear_format.static intnres_linear_numChannels(long struct) Unsafe version ofres_linear_numChannels().static voidnres_linear_numChannels(long struct, int value) Unsafe version ofres_linear_numChannels.static longnres_linear_sizeInBytes(long struct) Unsafe version ofres_linear_sizeInBytes().static voidnres_linear_sizeInBytes(long struct, long value) Unsafe version ofres_linear_sizeInBytes.static longnres_mipmap_hMipmappedArray(long struct) Unsafe version ofres_mipmap_hMipmappedArray().static voidnres_mipmap_hMipmappedArray(long struct, long value) Unsafe version ofres_mipmap_hMipmappedArray.static longnres_pitch2D_devPtr(long struct) Unsafe version ofres_pitch2D_devPtr().static voidnres_pitch2D_devPtr(long struct, long value) Unsafe version ofres_pitch2D_devPtr.static intnres_pitch2D_format(long struct) Unsafe version ofres_pitch2D_format().static voidnres_pitch2D_format(long struct, int value) Unsafe version ofres_pitch2D_format.static longnres_pitch2D_height(long struct) Unsafe version ofres_pitch2D_height().static voidnres_pitch2D_height(long struct, long value) Unsafe version ofres_pitch2D_height.static intnres_pitch2D_numChannels(long struct) Unsafe version ofres_pitch2D_numChannels().static voidnres_pitch2D_numChannels(long struct, int value) Unsafe version ofres_pitch2D_numChannels.static longnres_pitch2D_pitchInBytes(long struct) Unsafe version ofres_pitch2D_pitchInBytes().static voidnres_pitch2D_pitchInBytes(long struct, long value) Unsafe version ofres_pitch2D_pitchInBytes.static longnres_pitch2D_width(long struct) Unsafe version ofres_pitch2D_width().static voidnres_pitch2D_width(long struct, long value) Unsafe version ofres_pitch2D_width.static IntBuffernres_reserved_reserved(long struct) Unsafe version ofres_reserved_reserved().static intnres_reserved_reserved(long struct, int index) Unsafe version ofres_reserved_reserved.static voidnres_reserved_reserved(long struct, int index, int value) Unsafe version ofres_reserved_reserved.static voidnres_reserved_reserved(long struct, IntBuffer value) Unsafe version ofres_reserved_reserved.static intnresType(long struct) Unsafe version ofresType().static voidnresType(long struct, int value) Unsafe version ofresType.longres_array_hArray(long value) Sets the specified value to thehArrayfield.longres_linear_devPtr(long value) Sets the specified value to thedevPtrfield.intres_linear_format(int value) Sets the specified value to theformatfield.intres_linear_numChannels(int value) Sets the specified value to thenumChannelsfield.longres_linear_sizeInBytes(long value) Sets the specified value to thesizeInBytesfield.longres_mipmap_hMipmappedArray(long value) Sets the specified value to thehMipmappedArrayfield.longres_pitch2D_devPtr(long value) Sets the specified value to thedevPtrfield.intres_pitch2D_format(int value) Sets the specified value to theformatfield.longres_pitch2D_height(long value) Sets the specified value to theheightfield.intres_pitch2D_numChannels(int value) Sets the specified value to thenumChannelsfield.longres_pitch2D_pitchInBytes(long value) Sets the specified value to thepitchInBytesfield.longres_pitch2D_width(long value) Sets the specified value to thewidthfield.intres_reserved_reserved(int index) res_reserved_reserved(int index, int value) Sets the specified value at the specified index of thereservedfield.res_reserved_reserved(IntBuffer value) Copies the specifiedIntBufferto thereservedfield.intresType()resType(int value) Sets the specified value to theresTypefield.set(CUDA_RESOURCE_DESC src) Copies the specified struct data to this struct.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. -
RESTYPE
public static final int RESTYPEThe struct member offsets. -
RES
public static final int RESThe struct member offsets. -
RES_ARRAY
public static final int RES_ARRAYThe struct member offsets. -
RES_ARRAY_HARRAY
public static final int RES_ARRAY_HARRAYThe struct member offsets. -
RES_MIPMAP
public static final int RES_MIPMAPThe struct member offsets. -
RES_MIPMAP_HMIPMAPPEDARRAY
public static final int RES_MIPMAP_HMIPMAPPEDARRAYThe struct member offsets. -
RES_LINEAR
public static final int RES_LINEARThe struct member offsets. -
RES_LINEAR_DEVPTR
public static final int RES_LINEAR_DEVPTRThe struct member offsets. -
RES_LINEAR_FORMAT
public static final int RES_LINEAR_FORMATThe struct member offsets. -
RES_LINEAR_NUMCHANNELS
public static final int RES_LINEAR_NUMCHANNELSThe struct member offsets. -
RES_LINEAR_SIZEINBYTES
public static final int RES_LINEAR_SIZEINBYTESThe struct member offsets. -
RES_PITCH2D
public static final int RES_PITCH2DThe struct member offsets. -
RES_PITCH2D_DEVPTR
public static final int RES_PITCH2D_DEVPTRThe struct member offsets. -
RES_PITCH2D_FORMAT
public static final int RES_PITCH2D_FORMATThe struct member offsets. -
RES_PITCH2D_NUMCHANNELS
public static final int RES_PITCH2D_NUMCHANNELSThe struct member offsets. -
RES_PITCH2D_WIDTH
public static final int RES_PITCH2D_WIDTHThe struct member offsets. -
RES_PITCH2D_HEIGHT
public static final int RES_PITCH2D_HEIGHTThe struct member offsets. -
RES_PITCH2D_PITCHINBYTES
public static final int RES_PITCH2D_PITCHINBYTESThe struct member offsets. -
RES_RESERVED
public static final int RES_RESERVEDThe struct member offsets. -
RES_RESERVED_RESERVED
public static final int RES_RESERVED_RESERVEDThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets.
-
-
Constructor Details
-
CUDA_RESOURCE_DESC
Creates aCUDA_RESOURCE_DESCinstance 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_RESOURCE_DESC>
-
resType
public int resType()- Returns:
- the value of the
resTypefield.
-
res_array_hArray
public long res_array_hArray()- Returns:
- the value of the
res.array.hArrayfield.
-
res_mipmap_hMipmappedArray
public long res_mipmap_hMipmappedArray()- Returns:
- the value of the
res.mipmap.hMipmappedArrayfield.
-
res_linear_devPtr
public long res_linear_devPtr()- Returns:
- the value of the
res.linear.devPtrfield.
-
res_linear_format
public int res_linear_format()- Returns:
- the value of the
res.linear.formatfield.
-
res_linear_numChannels
public int res_linear_numChannels()- Returns:
- the value of the
res.linear.numChannelsfield.
-
res_linear_sizeInBytes
public long res_linear_sizeInBytes()- Returns:
- the value of the
res.linear.sizeInBytesfield.
-
res_pitch2D_devPtr
public long res_pitch2D_devPtr()- Returns:
- the value of the
res.pitch2D.devPtrfield.
-
res_pitch2D_format
public int res_pitch2D_format()- Returns:
- the value of the
res.pitch2D.formatfield.
-
res_pitch2D_numChannels
public int res_pitch2D_numChannels()- Returns:
- the value of the
res.pitch2D.numChannelsfield.
-
res_pitch2D_width
public long res_pitch2D_width()- Returns:
- the value of the
res.pitch2D.widthfield.
-
res_pitch2D_height
public long res_pitch2D_height()- Returns:
- the value of the
res.pitch2D.heightfield.
-
res_pitch2D_pitchInBytes
public long res_pitch2D_pitchInBytes()- Returns:
- the value of the
res.pitch2D.pitchInBytesfield.
-
res_reserved_reserved
- Returns:
- a
IntBufferview of theres.reserved.reservedfield.
-
res_reserved_reserved
public int res_reserved_reserved(int index) - Returns:
- the value at the specified index of the
res.reserved.reservedfield.
-
flags
public int flags()- Returns:
- the value of the
flagsfield.
-
resType
Sets the specified value to theresTypefield. -
res_array_hArray
Sets the specified value to thehArrayfield. -
res_mipmap_hMipmappedArray
Sets the specified value to thehMipmappedArrayfield. -
res_linear_devPtr
Sets the specified value to thedevPtrfield. -
res_linear_format
Sets the specified value to theformatfield. -
res_linear_numChannels
Sets the specified value to thenumChannelsfield. -
res_linear_sizeInBytes
Sets the specified value to thesizeInBytesfield. -
res_pitch2D_devPtr
Sets the specified value to thedevPtrfield. -
res_pitch2D_format
Sets the specified value to theformatfield. -
res_pitch2D_numChannels
Sets the specified value to thenumChannelsfield. -
res_pitch2D_width
Sets the specified value to thewidthfield. -
res_pitch2D_height
Sets the specified value to theheightfield. -
res_pitch2D_pitchInBytes
Sets the specified value to thepitchInBytesfield. -
res_reserved_reserved
Copies the specifiedIntBufferto thereservedfield. -
res_reserved_reserved
Sets the specified value at the specified index of thereservedfield. -
flags
Sets the specified value to theflagsfield. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newCUDA_RESOURCE_DESCinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCUDA_RESOURCE_DESCinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCUDA_RESOURCE_DESCinstance allocated withBufferUtils. -
create
Returns a newCUDA_RESOURCE_DESCinstance for the specified memory address. -
createSafe
-
malloc
Returns a newCUDA_RESOURCE_DESC.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCUDA_RESOURCE_DESC.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCUDA_RESOURCE_DESC.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCUDA_RESOURCE_DESC.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_RESOURCE_DESC.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_RESOURCE_DESC.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_RESOURCE_DESCinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCUDA_RESOURCE_DESCinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newCUDA_RESOURCE_DESC.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newCUDA_RESOURCE_DESC.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nresType
public static int nresType(long struct) Unsafe version ofresType(). -
nres_array_hArray
public static long nres_array_hArray(long struct) Unsafe version ofres_array_hArray(). -
nres_mipmap_hMipmappedArray
public static long nres_mipmap_hMipmappedArray(long struct) Unsafe version ofres_mipmap_hMipmappedArray(). -
nres_linear_devPtr
public static long nres_linear_devPtr(long struct) Unsafe version ofres_linear_devPtr(). -
nres_linear_format
public static int nres_linear_format(long struct) Unsafe version ofres_linear_format(). -
nres_linear_numChannels
public static int nres_linear_numChannels(long struct) Unsafe version ofres_linear_numChannels(). -
nres_linear_sizeInBytes
public static long nres_linear_sizeInBytes(long struct) Unsafe version ofres_linear_sizeInBytes(). -
nres_pitch2D_devPtr
public static long nres_pitch2D_devPtr(long struct) Unsafe version ofres_pitch2D_devPtr(). -
nres_pitch2D_format
public static int nres_pitch2D_format(long struct) Unsafe version ofres_pitch2D_format(). -
nres_pitch2D_numChannels
public static int nres_pitch2D_numChannels(long struct) Unsafe version ofres_pitch2D_numChannels(). -
nres_pitch2D_width
public static long nres_pitch2D_width(long struct) Unsafe version ofres_pitch2D_width(). -
nres_pitch2D_height
public static long nres_pitch2D_height(long struct) Unsafe version ofres_pitch2D_height(). -
nres_pitch2D_pitchInBytes
public static long nres_pitch2D_pitchInBytes(long struct) Unsafe version ofres_pitch2D_pitchInBytes(). -
nres_reserved_reserved
Unsafe version ofres_reserved_reserved(). -
nres_reserved_reserved
public static int nres_reserved_reserved(long struct, int index) Unsafe version ofres_reserved_reserved. -
nflags
public static int nflags(long struct) Unsafe version offlags(). -
nresType
public static void nresType(long struct, int value) Unsafe version ofresType. -
nres_array_hArray
public static void nres_array_hArray(long struct, long value) Unsafe version ofres_array_hArray. -
nres_mipmap_hMipmappedArray
public static void nres_mipmap_hMipmappedArray(long struct, long value) Unsafe version ofres_mipmap_hMipmappedArray. -
nres_linear_devPtr
public static void nres_linear_devPtr(long struct, long value) Unsafe version ofres_linear_devPtr. -
nres_linear_format
public static void nres_linear_format(long struct, int value) Unsafe version ofres_linear_format. -
nres_linear_numChannels
public static void nres_linear_numChannels(long struct, int value) Unsafe version ofres_linear_numChannels. -
nres_linear_sizeInBytes
public static void nres_linear_sizeInBytes(long struct, long value) Unsafe version ofres_linear_sizeInBytes. -
nres_pitch2D_devPtr
public static void nres_pitch2D_devPtr(long struct, long value) Unsafe version ofres_pitch2D_devPtr. -
nres_pitch2D_format
public static void nres_pitch2D_format(long struct, int value) Unsafe version ofres_pitch2D_format. -
nres_pitch2D_numChannels
public static void nres_pitch2D_numChannels(long struct, int value) Unsafe version ofres_pitch2D_numChannels. -
nres_pitch2D_width
public static void nres_pitch2D_width(long struct, long value) Unsafe version ofres_pitch2D_width. -
nres_pitch2D_height
public static void nres_pitch2D_height(long struct, long value) Unsafe version ofres_pitch2D_height. -
nres_pitch2D_pitchInBytes
public static void nres_pitch2D_pitchInBytes(long struct, long value) Unsafe version ofres_pitch2D_pitchInBytes. -
nres_reserved_reserved
Unsafe version ofres_reserved_reserved. -
nres_reserved_reserved
public static void nres_reserved_reserved(long struct, int index, int value) Unsafe version ofres_reserved_reserved. -
nflags
public static void nflags(long struct, int value) Unsafe version offlags.
-