public class CUDA_RESOURCE_DESC
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
resType – Resource typeres
res.array
res.array.hArray – CUDA arrayres.mipmap
res.mipmap.hMipmappedArray – CUDA mipmapped arrayres.linear
res.linear.devPtr – Device pointerres.linear.format – Array formatres.linear.numChannels – Channels per array elementres.linear.sizeInBytes – Size in bytesres.pitch2D
res.pitch2D.devPtr – Device pointerres.pitch2D.format – Array formatres.pitch2D.numChannels – Channels per array elementres.pitch2D.width – Width of the array in elementsres.pitch2D.height – Height of the array in elementsres.pitch2D.pitchInBytes – Pitch between two rows in bytesflags – Flags (must be zero)
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;
}| Modifier and Type | Class and Description |
|---|---|
static class |
CUDA_RESOURCE_DESC.Buffer
An array of
CUDA_RESOURCE_DESC structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
FLAGS
The struct member offsets.
|
static int |
RES
The struct member offsets.
|
static int |
RES_ARRAY
The struct member offsets.
|
static int |
RES_ARRAY_HARRAY
The struct member offsets.
|
static int |
RES_LINEAR
The struct member offsets.
|
static int |
RES_LINEAR_DEVPTR
The struct member offsets.
|
static int |
RES_LINEAR_FORMAT
The struct member offsets.
|
static int |
RES_LINEAR_NUMCHANNELS
The struct member offsets.
|
static int |
RES_LINEAR_SIZEINBYTES
The struct member offsets.
|
static int |
RES_MIPMAP
The struct member offsets.
|
static int |
RES_MIPMAP_HMIPMAPPEDARRAY
The struct member offsets.
|
static int |
RES_PITCH2D
The struct member offsets.
|
static int |
RES_PITCH2D_DEVPTR
The struct member offsets.
|
static int |
RES_PITCH2D_FORMAT
The struct member offsets.
|
static int |
RES_PITCH2D_HEIGHT
The struct member offsets.
|
static int |
RES_PITCH2D_NUMCHANNELS
The struct member offsets.
|
static int |
RES_PITCH2D_PITCHINBYTES
The struct member offsets.
|
static int |
RES_PITCH2D_WIDTH
The struct member offsets.
|
static int |
RES_RESERVED
The struct member offsets.
|
static int |
RES_RESERVED_RESERVED
The struct member offsets.
|
static int |
RESTYPE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
CUDA_RESOURCE_DESC(java.nio.ByteBuffer container)
Creates a
CUDA_RESOURCE_DESC instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static CUDA_RESOURCE_DESC |
calloc()
Returns a new
CUDA_RESOURCE_DESC instance allocated with memCalloc. |
static CUDA_RESOURCE_DESC.Buffer |
calloc(int capacity)
Returns a new
CUDA_RESOURCE_DESC.Buffer instance allocated with memCalloc. |
static CUDA_RESOURCE_DESC |
callocStack()
Returns a new
CUDA_RESOURCE_DESC instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static CUDA_RESOURCE_DESC.Buffer |
callocStack(int capacity)
Returns a new
CUDA_RESOURCE_DESC.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static CUDA_RESOURCE_DESC.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
CUDA_RESOURCE_DESC.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static CUDA_RESOURCE_DESC |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
CUDA_RESOURCE_DESC instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static CUDA_RESOURCE_DESC |
create()
Returns a new
CUDA_RESOURCE_DESC instance allocated with BufferUtils. |
static CUDA_RESOURCE_DESC.Buffer |
create(int capacity)
Returns a new
CUDA_RESOURCE_DESC.Buffer instance allocated with BufferUtils. |
static CUDA_RESOURCE_DESC |
create(long address)
Returns a new
CUDA_RESOURCE_DESC instance for the specified memory address. |
static CUDA_RESOURCE_DESC.Buffer |
create(long address,
int capacity)
Create a
CUDA_RESOURCE_DESC.Buffer instance at the specified memory. |
static CUDA_RESOURCE_DESC |
createSafe(long address)
|
static CUDA_RESOURCE_DESC.Buffer |
createSafe(long address,
int capacity)
|
int |
flags()
Returns the value of the
flags field. |
CUDA_RESOURCE_DESC |
flags(int value)
Sets the specified value to the
flags field. |
static CUDA_RESOURCE_DESC |
malloc()
Returns a new
CUDA_RESOURCE_DESC instance allocated with memAlloc. |
static CUDA_RESOURCE_DESC.Buffer |
malloc(int capacity)
Returns a new
CUDA_RESOURCE_DESC.Buffer instance allocated with memAlloc. |
static CUDA_RESOURCE_DESC |
mallocStack()
Returns a new
CUDA_RESOURCE_DESC instance allocated on the thread-local MemoryStack. |
static CUDA_RESOURCE_DESC.Buffer |
mallocStack(int capacity)
Returns a new
CUDA_RESOURCE_DESC.Buffer instance allocated on the thread-local MemoryStack. |
static CUDA_RESOURCE_DESC.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
CUDA_RESOURCE_DESC.Buffer instance allocated on the specified MemoryStack. |
static CUDA_RESOURCE_DESC |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
CUDA_RESOURCE_DESC instance allocated on the specified MemoryStack. |
static int |
nflags(long struct)
Unsafe version of
flags(). |
static void |
nflags(long struct,
int value)
Unsafe version of
flags. |
static long |
nres_array_hArray(long struct)
Unsafe version of
res_array_hArray(). |
static void |
nres_array_hArray(long struct,
long value)
Unsafe version of
res_array_hArray. |
static long |
nres_linear_devPtr(long struct)
Unsafe version of
res_linear_devPtr(). |
static void |
nres_linear_devPtr(long struct,
long value)
Unsafe version of
res_linear_devPtr. |
static int |
nres_linear_format(long struct)
Unsafe version of
res_linear_format(). |
static void |
nres_linear_format(long struct,
int value)
Unsafe version of
res_linear_format. |
static int |
nres_linear_numChannels(long struct)
Unsafe version of
res_linear_numChannels(). |
static void |
nres_linear_numChannels(long struct,
int value)
Unsafe version of
res_linear_numChannels. |
static long |
nres_linear_sizeInBytes(long struct)
Unsafe version of
res_linear_sizeInBytes(). |
static void |
nres_linear_sizeInBytes(long struct,
long value)
Unsafe version of
res_linear_sizeInBytes. |
static long |
nres_mipmap_hMipmappedArray(long struct)
Unsafe version of
res_mipmap_hMipmappedArray(). |
static void |
nres_mipmap_hMipmappedArray(long struct,
long value)
Unsafe version of
res_mipmap_hMipmappedArray. |
static long |
nres_pitch2D_devPtr(long struct)
Unsafe version of
res_pitch2D_devPtr(). |
static void |
nres_pitch2D_devPtr(long struct,
long value)
Unsafe version of
res_pitch2D_devPtr. |
static int |
nres_pitch2D_format(long struct)
Unsafe version of
res_pitch2D_format(). |
static void |
nres_pitch2D_format(long struct,
int value)
Unsafe version of
res_pitch2D_format. |
static long |
nres_pitch2D_height(long struct)
Unsafe version of
res_pitch2D_height(). |
static void |
nres_pitch2D_height(long struct,
long value)
Unsafe version of
res_pitch2D_height. |
static int |
nres_pitch2D_numChannels(long struct)
Unsafe version of
res_pitch2D_numChannels(). |
static void |
nres_pitch2D_numChannels(long struct,
int value)
Unsafe version of
res_pitch2D_numChannels. |
static long |
nres_pitch2D_pitchInBytes(long struct)
Unsafe version of
res_pitch2D_pitchInBytes(). |
static void |
nres_pitch2D_pitchInBytes(long struct,
long value)
Unsafe version of
res_pitch2D_pitchInBytes. |
static long |
nres_pitch2D_width(long struct)
Unsafe version of
res_pitch2D_width(). |
static void |
nres_pitch2D_width(long struct,
long value)
Unsafe version of
res_pitch2D_width. |
static java.nio.IntBuffer |
nres_reserved_reserved(long struct)
Unsafe version of
res_reserved_reserved(). |
static int |
nres_reserved_reserved(long struct,
int index)
Unsafe version of
res_reserved_reserved. |
static void |
nres_reserved_reserved(long struct,
java.nio.IntBuffer value)
Unsafe version of
res_reserved_reserved. |
static void |
nres_reserved_reserved(long struct,
int index,
int value)
Unsafe version of
res_reserved_reserved. |
static int |
nresType(long struct)
Unsafe version of
resType(). |
static void |
nresType(long struct,
int value)
Unsafe version of
resType. |
long |
res_array_hArray()
Returns the value of the
res.array.hArray field. |
CUDA_RESOURCE_DESC |
res_array_hArray(long value)
Sets the specified value to the
res.array.hArray field. |
long |
res_linear_devPtr()
Returns the value of the
res.linear.devPtr field. |
CUDA_RESOURCE_DESC |
res_linear_devPtr(long value)
Sets the specified value to the
res.linear.devPtr field. |
int |
res_linear_format()
Returns the value of the
res.linear.format field. |
CUDA_RESOURCE_DESC |
res_linear_format(int value)
Sets the specified value to the
res.linear.format field. |
int |
res_linear_numChannels()
Returns the value of the
res.linear.numChannels field. |
CUDA_RESOURCE_DESC |
res_linear_numChannels(int value)
Sets the specified value to the
res.linear.numChannels field. |
long |
res_linear_sizeInBytes()
Returns the value of the
res.linear.sizeInBytes field. |
CUDA_RESOURCE_DESC |
res_linear_sizeInBytes(long value)
Sets the specified value to the
res.linear.sizeInBytes field. |
long |
res_mipmap_hMipmappedArray()
Returns the value of the
res.mipmap.hMipmappedArray field. |
CUDA_RESOURCE_DESC |
res_mipmap_hMipmappedArray(long value)
Sets the specified value to the
res.mipmap.hMipmappedArray field. |
long |
res_pitch2D_devPtr()
Returns the value of the
res.pitch2D.devPtr field. |
CUDA_RESOURCE_DESC |
res_pitch2D_devPtr(long value)
Sets the specified value to the
res.pitch2D.devPtr field. |
int |
res_pitch2D_format()
Returns the value of the
res.pitch2D.format field. |
CUDA_RESOURCE_DESC |
res_pitch2D_format(int value)
Sets the specified value to the
res.pitch2D.format field. |
long |
res_pitch2D_height()
Returns the value of the
res.pitch2D.height field. |
CUDA_RESOURCE_DESC |
res_pitch2D_height(long value)
Sets the specified value to the
res.pitch2D.height field. |
int |
res_pitch2D_numChannels()
Returns the value of the
res.pitch2D.numChannels field. |
CUDA_RESOURCE_DESC |
res_pitch2D_numChannels(int value)
Sets the specified value to the
res.pitch2D.numChannels field. |
long |
res_pitch2D_pitchInBytes()
Returns the value of the
res.pitch2D.pitchInBytes field. |
CUDA_RESOURCE_DESC |
res_pitch2D_pitchInBytes(long value)
Sets the specified value to the
res.pitch2D.pitchInBytes field. |
long |
res_pitch2D_width()
Returns the value of the
res.pitch2D.width field. |
CUDA_RESOURCE_DESC |
res_pitch2D_width(long value)
Sets the specified value to the
res.pitch2D.width field. |
java.nio.IntBuffer |
res_reserved_reserved()
Returns a
IntBuffer view of the res.reserved.reserved field. |
int |
res_reserved_reserved(int index)
Returns the value at the specified index of the
res.reserved.reserved field. |
CUDA_RESOURCE_DESC |
res_reserved_reserved(java.nio.IntBuffer value)
Copies the specified
IntBuffer to the res.reserved.reserved field. |
CUDA_RESOURCE_DESC |
res_reserved_reserved(int index,
int value)
Sets the specified value at the specified index of the
res.reserved.reserved field. |
int |
resType()
Returns the value of the
resType field. |
CUDA_RESOURCE_DESC |
resType(int value)
Sets the specified value to the
resType field. |
CUDA_RESOURCE_DESC |
set(CUDA_RESOURCE_DESC src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int RESTYPE
public static final int RES
public static final int RES_ARRAY
public static final int RES_ARRAY_HARRAY
public static final int RES_MIPMAP
public static final int RES_MIPMAP_HMIPMAPPEDARRAY
public static final int RES_LINEAR
public static final int RES_LINEAR_DEVPTR
public static final int RES_LINEAR_FORMAT
public static final int RES_LINEAR_NUMCHANNELS
public static final int RES_LINEAR_SIZEINBYTES
public static final int RES_PITCH2D
public static final int RES_PITCH2D_DEVPTR
public static final int RES_PITCH2D_FORMAT
public static final int RES_PITCH2D_NUMCHANNELS
public static final int RES_PITCH2D_WIDTH
public static final int RES_PITCH2D_HEIGHT
public static final int RES_PITCH2D_PITCHINBYTES
public static final int RES_RESERVED
public static final int RES_RESERVED_RESERVED
public static final int FLAGS
public CUDA_RESOURCE_DESC(java.nio.ByteBuffer container)
CUDA_RESOURCE_DESC instance at the current position of the specified ByteBuffer container. 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int resType()
resType field.public long res_array_hArray()
res.array.hArray field.public long res_mipmap_hMipmappedArray()
res.mipmap.hMipmappedArray field.public long res_linear_devPtr()
res.linear.devPtr field.public int res_linear_format()
res.linear.format field.public int res_linear_numChannels()
res.linear.numChannels field.public long res_linear_sizeInBytes()
res.linear.sizeInBytes field.public long res_pitch2D_devPtr()
res.pitch2D.devPtr field.public int res_pitch2D_format()
res.pitch2D.format field.public int res_pitch2D_numChannels()
res.pitch2D.numChannels field.public long res_pitch2D_width()
res.pitch2D.width field.public long res_pitch2D_height()
res.pitch2D.height field.public long res_pitch2D_pitchInBytes()
res.pitch2D.pitchInBytes field.public java.nio.IntBuffer res_reserved_reserved()
IntBuffer view of the res.reserved.reserved field.public int res_reserved_reserved(int index)
res.reserved.reserved field.public int flags()
flags field.public CUDA_RESOURCE_DESC resType(int value)
resType field.public CUDA_RESOURCE_DESC res_array_hArray(long value)
res.array.hArray field.public CUDA_RESOURCE_DESC res_mipmap_hMipmappedArray(long value)
res.mipmap.hMipmappedArray field.public CUDA_RESOURCE_DESC res_linear_devPtr(long value)
res.linear.devPtr field.public CUDA_RESOURCE_DESC res_linear_format(int value)
res.linear.format field.public CUDA_RESOURCE_DESC res_linear_numChannels(int value)
res.linear.numChannels field.public CUDA_RESOURCE_DESC res_linear_sizeInBytes(long value)
res.linear.sizeInBytes field.public CUDA_RESOURCE_DESC res_pitch2D_devPtr(long value)
res.pitch2D.devPtr field.public CUDA_RESOURCE_DESC res_pitch2D_format(int value)
res.pitch2D.format field.public CUDA_RESOURCE_DESC res_pitch2D_numChannels(int value)
res.pitch2D.numChannels field.public CUDA_RESOURCE_DESC res_pitch2D_width(long value)
res.pitch2D.width field.public CUDA_RESOURCE_DESC res_pitch2D_height(long value)
res.pitch2D.height field.public CUDA_RESOURCE_DESC res_pitch2D_pitchInBytes(long value)
res.pitch2D.pitchInBytes field.public CUDA_RESOURCE_DESC res_reserved_reserved(java.nio.IntBuffer value)
IntBuffer to the res.reserved.reserved field.public CUDA_RESOURCE_DESC res_reserved_reserved(int index, int value)
res.reserved.reserved field.public CUDA_RESOURCE_DESC flags(int value)
flags field.public CUDA_RESOURCE_DESC set(CUDA_RESOURCE_DESC src)
src - the source structpublic static CUDA_RESOURCE_DESC malloc()
CUDA_RESOURCE_DESC instance allocated with memAlloc. The instance must be explicitly freed.public static CUDA_RESOURCE_DESC calloc()
CUDA_RESOURCE_DESC instance allocated with memCalloc. The instance must be explicitly freed.public static CUDA_RESOURCE_DESC create()
CUDA_RESOURCE_DESC instance allocated with BufferUtils.public static CUDA_RESOURCE_DESC create(long address)
CUDA_RESOURCE_DESC instance for the specified memory address.@Nullable public static CUDA_RESOURCE_DESC createSafe(long address)
public static CUDA_RESOURCE_DESC.Buffer malloc(int capacity)
CUDA_RESOURCE_DESC.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static CUDA_RESOURCE_DESC.Buffer calloc(int capacity)
CUDA_RESOURCE_DESC.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static CUDA_RESOURCE_DESC.Buffer create(int capacity)
CUDA_RESOURCE_DESC.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static CUDA_RESOURCE_DESC.Buffer create(long address, int capacity)
CUDA_RESOURCE_DESC.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static CUDA_RESOURCE_DESC.Buffer createSafe(long address, int capacity)
public static CUDA_RESOURCE_DESC mallocStack()
CUDA_RESOURCE_DESC instance allocated on the thread-local MemoryStack.public static CUDA_RESOURCE_DESC callocStack()
CUDA_RESOURCE_DESC instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static CUDA_RESOURCE_DESC mallocStack(org.lwjgl.system.MemoryStack stack)
CUDA_RESOURCE_DESC instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static CUDA_RESOURCE_DESC callocStack(org.lwjgl.system.MemoryStack stack)
CUDA_RESOURCE_DESC instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static CUDA_RESOURCE_DESC.Buffer mallocStack(int capacity)
CUDA_RESOURCE_DESC.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static CUDA_RESOURCE_DESC.Buffer callocStack(int capacity)
CUDA_RESOURCE_DESC.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static CUDA_RESOURCE_DESC.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
CUDA_RESOURCE_DESC.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static CUDA_RESOURCE_DESC.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
CUDA_RESOURCE_DESC.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nresType(long struct)
resType().public static long nres_array_hArray(long struct)
res_array_hArray().public static long nres_mipmap_hMipmappedArray(long struct)
res_mipmap_hMipmappedArray().public static long nres_linear_devPtr(long struct)
res_linear_devPtr().public static int nres_linear_format(long struct)
res_linear_format().public static int nres_linear_numChannels(long struct)
res_linear_numChannels().public static long nres_linear_sizeInBytes(long struct)
res_linear_sizeInBytes().public static long nres_pitch2D_devPtr(long struct)
res_pitch2D_devPtr().public static int nres_pitch2D_format(long struct)
res_pitch2D_format().public static int nres_pitch2D_numChannels(long struct)
res_pitch2D_numChannels().public static long nres_pitch2D_width(long struct)
res_pitch2D_width().public static long nres_pitch2D_height(long struct)
res_pitch2D_height().public static long nres_pitch2D_pitchInBytes(long struct)
res_pitch2D_pitchInBytes().public static java.nio.IntBuffer nres_reserved_reserved(long struct)
res_reserved_reserved().public static int nres_reserved_reserved(long struct,
int index)
res_reserved_reserved.public static int nflags(long struct)
flags().public static void nresType(long struct,
int value)
resType.public static void nres_array_hArray(long struct,
long value)
res_array_hArray.public static void nres_mipmap_hMipmappedArray(long struct,
long value)
res_mipmap_hMipmappedArray.public static void nres_linear_devPtr(long struct,
long value)
res_linear_devPtr.public static void nres_linear_format(long struct,
int value)
res_linear_format.public static void nres_linear_numChannels(long struct,
int value)
res_linear_numChannels.public static void nres_linear_sizeInBytes(long struct,
long value)
res_linear_sizeInBytes.public static void nres_pitch2D_devPtr(long struct,
long value)
res_pitch2D_devPtr.public static void nres_pitch2D_format(long struct,
int value)
res_pitch2D_format.public static void nres_pitch2D_numChannels(long struct,
int value)
res_pitch2D_numChannels.public static void nres_pitch2D_width(long struct,
long value)
res_pitch2D_width.public static void nres_pitch2D_height(long struct,
long value)
res_pitch2D_height.public static void nres_pitch2D_pitchInBytes(long struct,
long value)
res_pitch2D_pitchInBytes.public static void nres_reserved_reserved(long struct,
java.nio.IntBuffer value)
res_reserved_reserved.public static void nres_reserved_reserved(long struct,
int index,
int value)
res_reserved_reserved.public static void nflags(long struct,
int value)
flags.Copyright LWJGL. All Rights Reserved. License terms.