Top Description Inners Fields Constructors Methods
org.lwjgl.cuda

public Class CUDA_RESOURCE_DESC

extends Struct<CUDA_RESOURCE_DESC>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

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 and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
FLAGS

The struct member offsets.

public static final int
RES

The struct member offsets.

public static final int
RES_ARRAY

The struct member offsets.

public static final int
RES_ARRAY_HARRAY

The struct member offsets.

public static final int
RES_LINEAR

The struct member offsets.

public static final int
RES_LINEAR_DEVPTR

The struct member offsets.

public static final int
RES_LINEAR_FORMAT

The struct member offsets.

public static final int
RES_LINEAR_NUMCHANNELS

The struct member offsets.

public static final int
RES_LINEAR_SIZEINBYTES

The struct member offsets.

public static final int
RES_MIPMAP

The struct member offsets.

public static final int
RES_MIPMAP_HMIPMAPPEDARRAY

The struct member offsets.

public static final int
RES_PITCH2D

The struct member offsets.

public static final int
RES_PITCH2D_DEVPTR

The struct member offsets.

public static final int
RES_PITCH2D_FORMAT

The struct member offsets.

public static final int
RES_PITCH2D_HEIGHT

The struct member offsets.

public static final int
RES_PITCH2D_NUMCHANNELS

The struct member offsets.

public static final int
RES_PITCH2D_PITCHINBYTES

The struct member offsets.

public static final int
RES_PITCH2D_WIDTH

The struct member offsets.

public static final int
RES_RESERVED

The struct member offsets.

public static final int
RES_RESERVED_RESERVED

The struct member offsets.

public static final int
RESTYPE

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
CUDA_RESOURCE_DESC(long address, ByteBuffer container)

public
CUDA_RESOURCE_DESC(ByteBuffer container)

Creates a CUDA_RESOURCE_DESC instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static CUDA_RESOURCE_DESC
calloc()

Returns a new CUDA_RESOURCE_DESC instance allocated with memCalloc.

public static CUDA_RESOURCE_DESC.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new CUDA_RESOURCE_DESC.Buffer instance allocated with memCalloc.

public static CUDA_RESOURCE_DESC
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new CUDA_RESOURCE_DESC instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static CUDA_RESOURCE_DESC.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new CUDA_RESOURCE_DESC.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static CUDA_RESOURCE_DESC
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static CUDA_RESOURCE_DESC
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static CUDA_RESOURCE_DESC.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static CUDA_RESOURCE_DESC.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected CUDA_RESOURCE_DESC
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static CUDA_RESOURCE_DESC
create()

Returns a new CUDA_RESOURCE_DESC instance allocated with BufferUtils.

public static CUDA_RESOURCE_DESC
create(long address)

Returns a new CUDA_RESOURCE_DESC instance for the specified memory address.

public static CUDA_RESOURCE_DESC.Buffer
create(int
the buffer capacity
capacity
)

Returns a new CUDA_RESOURCE_DESC.Buffer instance allocated with BufferUtils.

public static CUDA_RESOURCE_DESC.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a CUDA_RESOURCE_DESC.Buffer instance at the specified memory.

public static CUDA_RESOURCE_DESC
createSafe(long address)

Like create, but returns null if address is NULL.

public static CUDA_RESOURCE_DESC.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public int

Returns:

the value of the flags field.
flags
()

public CUDA_RESOURCE_DESC
flags(int value)

Sets the specified value to the flags field.

public static CUDA_RESOURCE_DESC
malloc()

Returns a new CUDA_RESOURCE_DESC instance allocated with memAlloc.

public static CUDA_RESOURCE_DESC.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new CUDA_RESOURCE_DESC.Buffer instance allocated with memAlloc.

public static CUDA_RESOURCE_DESC
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new CUDA_RESOURCE_DESC instance allocated on the specified MemoryStack.

public static CUDA_RESOURCE_DESC.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new CUDA_RESOURCE_DESC.Buffer instance allocated on the specified MemoryStack.

public static CUDA_RESOURCE_DESC
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static CUDA_RESOURCE_DESC
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static CUDA_RESOURCE_DESC.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static CUDA_RESOURCE_DESC.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static int
nflags(long struct)

Unsafe version of flags.

public static void
nflags(long struct, int value)

Unsafe version of flags.

public static long
nres_array_hArray(long struct)

Unsafe version of res_array_hArray.

public static void
nres_array_hArray(long struct, long value)

Unsafe version of res_array_hArray.

public static long
nres_linear_devPtr(long struct)

Unsafe version of res_linear_devPtr.

public static void
nres_linear_devPtr(long struct, long value)

Unsafe version of res_linear_devPtr.

public static int
nres_linear_format(long struct)

Unsafe version of res_linear_format.

public static void
nres_linear_format(long struct, int value)

Unsafe version of res_linear_format.

public static int
nres_linear_numChannels(long struct)

Unsafe version of res_linear_numChannels.

public static void
nres_linear_numChannels(long struct, int value)

Unsafe version of res_linear_numChannels.

public static long
nres_linear_sizeInBytes(long struct)

Unsafe version of res_linear_sizeInBytes.

public static void
nres_linear_sizeInBytes(long struct, long value)

Unsafe version of res_linear_sizeInBytes.

public static long
public static void
nres_mipmap_hMipmappedArray(long struct, long value)

Unsafe version of res_mipmap_hMipmappedArray.

public static long
nres_pitch2D_devPtr(long struct)

Unsafe version of res_pitch2D_devPtr.

public static void
nres_pitch2D_devPtr(long struct, long value)

Unsafe version of res_pitch2D_devPtr.

public static int
nres_pitch2D_format(long struct)

Unsafe version of res_pitch2D_format.

public static void
nres_pitch2D_format(long struct, int value)

Unsafe version of res_pitch2D_format.

public static long
nres_pitch2D_height(long struct)

Unsafe version of res_pitch2D_height.

public static void
nres_pitch2D_height(long struct, long value)

Unsafe version of res_pitch2D_height.

public static int
nres_pitch2D_numChannels(long struct)

Unsafe version of res_pitch2D_numChannels.

public static void
nres_pitch2D_numChannels(long struct, int value)

Unsafe version of res_pitch2D_numChannels.

public static long
nres_pitch2D_pitchInBytes(long struct)

Unsafe version of res_pitch2D_pitchInBytes.

public static void
nres_pitch2D_pitchInBytes(long struct, long value)

Unsafe version of res_pitch2D_pitchInBytes.

public static long
nres_pitch2D_width(long struct)

Unsafe version of res_pitch2D_width.

public static void
nres_pitch2D_width(long struct, long value)

Unsafe version of res_pitch2D_width.

public static IntBuffer
nres_reserved_reserved(long struct)

Unsafe version of res_reserved_reserved.

public static int
nres_reserved_reserved(long struct, int index)

Unsafe version of res_reserved_reserved.

public static void
nres_reserved_reserved(long struct, IntBuffer value)

Unsafe version of res_reserved_reserved.

public static void
nres_reserved_reserved(long struct, int index, int value)

Unsafe version of res_reserved_reserved.

public static int
nresType(long struct)

Unsafe version of resType.

public static void
nresType(long struct, int value)

Unsafe version of resType.

public long

Returns:

the value of the res.array.hArray field.
res_array_hArray
()

public CUDA_RESOURCE_DESC
res_array_hArray(long value)

Sets the specified value to the hArray field.

public long

Returns:

the value of the res.linear.devPtr field.
res_linear_devPtr
()

public CUDA_RESOURCE_DESC
res_linear_devPtr(long value)

Sets the specified value to the devPtr field.

public int

Returns:

the value of the res.linear.format field.
res_linear_format
()

public CUDA_RESOURCE_DESC
res_linear_format(int value)

Sets the specified value to the format field.

public int

Returns:

the value of the res.linear.numChannels field.
res_linear_numChannels
()

public CUDA_RESOURCE_DESC
res_linear_numChannels(int value)

Sets the specified value to the numChannels field.

public long

Returns:

the value of the res.linear.sizeInBytes field.
res_linear_sizeInBytes
()

public CUDA_RESOURCE_DESC
res_linear_sizeInBytes(long value)

Sets the specified value to the sizeInBytes field.

public long

Returns:

the value of the res.mipmap.hMipmappedArray field.
res_mipmap_hMipmappedArray
()

public CUDA_RESOURCE_DESC
res_mipmap_hMipmappedArray(long value)

Sets the specified value to the hMipmappedArray field.

public long

Returns:

the value of the res.pitch2D.devPtr field.
res_pitch2D_devPtr
()

public CUDA_RESOURCE_DESC
res_pitch2D_devPtr(long value)

Sets the specified value to the devPtr field.

public int

Returns:

the value of the res.pitch2D.format field.
res_pitch2D_format
()

public CUDA_RESOURCE_DESC
res_pitch2D_format(int value)

Sets the specified value to the format field.

public long

Returns:

the value of the res.pitch2D.height field.
res_pitch2D_height
()

public CUDA_RESOURCE_DESC
res_pitch2D_height(long value)

Sets the specified value to the height field.

public int

Returns:

the value of the res.pitch2D.numChannels field.
res_pitch2D_numChannels
()

public CUDA_RESOURCE_DESC
res_pitch2D_numChannels(int value)

Sets the specified value to the numChannels field.

public long

Returns:

the value of the res.pitch2D.pitchInBytes field.
res_pitch2D_pitchInBytes
()

public CUDA_RESOURCE_DESC
res_pitch2D_pitchInBytes(long value)

Sets the specified value to the pitchInBytes field.

public long

Returns:

the value of the res.pitch2D.width field.
res_pitch2D_width
()

public CUDA_RESOURCE_DESC
res_pitch2D_width(long value)

Sets the specified value to the width field.

public IntBuffer

Returns:

a IntBuffer view of the res.reserved.reserved field.
res_reserved_reserved
()

public int

Returns:

the value at the specified index of the res.reserved.reserved field.
res_reserved_reserved
(int index)

public CUDA_RESOURCE_DESC
res_reserved_reserved(IntBuffer value)

Copies the specified IntBuffer to the reserved field.

public CUDA_RESOURCE_DESC
res_reserved_reserved(int index, int value)

Sets the specified value at the specified index of the reserved field.

public int

Returns:

the value of the resType field.
resType
()

public CUDA_RESOURCE_DESC
resType(int value)

Sets the specified value to the resType field.

public CUDA_RESOURCE_DESC

Returns:

this struct
set
(CUDA_RESOURCE_DESC
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate