Package org.lwjgl.cuda
Class CUDA_RESOURCE_VIEW_DESC
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.cuda.CUDA_RESOURCE_VIEW_DESC
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUDA_RESOURCE_VIEW_DESC extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceResource view descriptor.Layout
struct CUDA_RESOURCE_VIEW_DESC { CUresourceViewFormatformat(); size_twidth(); size_theight(); size_tdepth(); unsigned intfirstMipmapLevel(); unsigned intlastMipmapLevel(); unsigned intfirstLayer(); unsigned intlastLayer(); unsigned int reserved[16]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCUDA_RESOURCE_VIEW_DESC.BufferAn array ofCUDA_RESOURCE_VIEW_DESCstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intDEPTH
FIRSTLAYER
FIRSTMIPMAPLEVEL
FORMAT
HEIGHT
LASTLAYER
LASTMIPMAPLEVEL
RESERVEDThe struct member offsets.static intSIZEOFThe struct size in bytes.static intWIDTHThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description CUDA_RESOURCE_VIEW_DESC(java.nio.ByteBuffer container)Creates aCUDA_RESOURCE_VIEW_DESCinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static CUDA_RESOURCE_VIEW_DESCcalloc()Returns a newCUDA_RESOURCE_VIEW_DESCinstance allocated withmemCalloc.static CUDA_RESOURCE_VIEW_DESC.Buffercalloc(int capacity)Returns a newCUDA_RESOURCE_VIEW_DESC.Bufferinstance allocated withmemCalloc.static CUDA_RESOURCE_VIEW_DESC.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCUDA_RESOURCE_VIEW_DESC.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUDA_RESOURCE_VIEW_DESCcalloc(org.lwjgl.system.MemoryStack stack)Returns a newCUDA_RESOURCE_VIEW_DESCinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUDA_RESOURCE_VIEW_DESCcallocStack()Deprecated.static CUDA_RESOURCE_VIEW_DESC.BuffercallocStack(int capacity)Deprecated.static CUDA_RESOURCE_VIEW_DESC.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static CUDA_RESOURCE_VIEW_DESCcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static CUDA_RESOURCE_VIEW_DESCcreate()Returns a newCUDA_RESOURCE_VIEW_DESCinstance allocated withBufferUtils.static CUDA_RESOURCE_VIEW_DESC.Buffercreate(int capacity)Returns a newCUDA_RESOURCE_VIEW_DESC.Bufferinstance allocated withBufferUtils.static CUDA_RESOURCE_VIEW_DESCcreate(long address)Returns a newCUDA_RESOURCE_VIEW_DESCinstance for the specified memory address.static CUDA_RESOURCE_VIEW_DESC.Buffercreate(long address, int capacity)Create aCUDA_RESOURCE_VIEW_DESC.Bufferinstance at the specified memory.static CUDA_RESOURCE_VIEW_DESCcreateSafe(long address)static CUDA_RESOURCE_VIEW_DESC.BuffercreateSafe(long address, int capacity)longdepth()Depth of the resource viewCUDA_RESOURCE_VIEW_DESCdepth(long value)Sets the specified value to thedepth()field.intfirstLayer()First layer indexCUDA_RESOURCE_VIEW_DESCfirstLayer(int value)Sets the specified value to thefirstLayer()field.intfirstMipmapLevel()First defined mipmap levelCUDA_RESOURCE_VIEW_DESCfirstMipmapLevel(int value)Sets the specified value to thefirstMipmapLevel()field.intformat()Resource view formatCUDA_RESOURCE_VIEW_DESCformat(int value)Sets the specified value to theformat()field.longheight()Height of the resource viewCUDA_RESOURCE_VIEW_DESCheight(long value)Sets the specified value to theheight()field.intlastLayer()Last layer indexCUDA_RESOURCE_VIEW_DESClastLayer(int value)Sets the specified value to thelastLayer()field.intlastMipmapLevel()Last defined mipmap levelCUDA_RESOURCE_VIEW_DESClastMipmapLevel(int value)Sets the specified value to thelastMipmapLevel()field.static CUDA_RESOURCE_VIEW_DESCmalloc()Returns a newCUDA_RESOURCE_VIEW_DESCinstance allocated withmemAlloc.static CUDA_RESOURCE_VIEW_DESC.Buffermalloc(int capacity)Returns a newCUDA_RESOURCE_VIEW_DESC.Bufferinstance allocated withmemAlloc.static CUDA_RESOURCE_VIEW_DESC.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCUDA_RESOURCE_VIEW_DESC.Bufferinstance allocated on the specifiedMemoryStack.static CUDA_RESOURCE_VIEW_DESCmalloc(org.lwjgl.system.MemoryStack stack)Returns a newCUDA_RESOURCE_VIEW_DESCinstance allocated on the specifiedMemoryStack.static CUDA_RESOURCE_VIEW_DESCmallocStack()Deprecated.static CUDA_RESOURCE_VIEW_DESC.BuffermallocStack(int capacity)Deprecated.static CUDA_RESOURCE_VIEW_DESC.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static CUDA_RESOURCE_VIEW_DESCmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static longndepth(long struct)Unsafe version ofdepth().static voidndepth(long struct, long value)Unsafe version ofdepth.static intnfirstLayer(long struct)Unsafe version offirstLayer().static voidnfirstLayer(long struct, int value)Unsafe version offirstLayer.static intnfirstMipmapLevel(long struct)Unsafe version offirstMipmapLevel().static voidnfirstMipmapLevel(long struct, int value)Unsafe version offirstMipmapLevel.static intnformat(long struct)Unsafe version offormat().static voidnformat(long struct, int value)Unsafe version offormat.static longnheight(long struct)Unsafe version ofheight().static voidnheight(long struct, long value)Unsafe version ofheight.static intnlastLayer(long struct)Unsafe version oflastLayer().static voidnlastLayer(long struct, int value)Unsafe version oflastLayer.static intnlastMipmapLevel(long struct)Unsafe version oflastMipmapLevel().static voidnlastMipmapLevel(long struct, int value)Unsafe version oflastMipmapLevel.static java.nio.IntBuffernreserved(long struct)Unsafe version ofreserved().static intnreserved(long struct, int index)Unsafe version ofreserved.static voidnreserved(long struct, int index, int value)Unsafe version ofreserved.static voidnreserved(long struct, java.nio.IntBuffer value)Unsafe version ofreserved.static longnwidth(long struct)Unsafe version ofwidth().static voidnwidth(long struct, long value)Unsafe version ofwidth.java.nio.IntBufferreserved()intreserved(int index)CUDA_RESOURCE_VIEW_DESCreserved(int index, int value)Sets the specified value at the specified index of thereservedfield.CUDA_RESOURCE_VIEW_DESCreserved(java.nio.IntBuffer value)Copies the specifiedIntBufferto thereservedfield.CUDA_RESOURCE_VIEW_DESCset(int format, long width, long height, long depth, int firstMipmapLevel, int lastMipmapLevel, int firstLayer, int lastLayer, java.nio.IntBuffer reserved)Initializes this struct with the specified values.CUDA_RESOURCE_VIEW_DESCset(CUDA_RESOURCE_VIEW_DESC src)Copies the specified struct data to this struct.intsizeof()longwidth()Width of the resource viewCUDA_RESOURCE_VIEW_DESCwidth(long value)Sets the specified value to thewidth()field.
-
-
-
Constructor Detail
-
CUDA_RESOURCE_VIEW_DESC
public CUDA_RESOURCE_VIEW_DESC(java.nio.ByteBuffer container)
Creates aCUDA_RESOURCE_VIEW_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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
format
public int format()
Resource view format
-
width
public long width()
Width of the resource view
-
height
public long height()
Height of the resource view
-
depth
public long depth()
Depth of the resource view
-
firstMipmapLevel
public int firstMipmapLevel()
First defined mipmap level
-
lastMipmapLevel
public int lastMipmapLevel()
Last defined mipmap level
-
firstLayer
public int firstLayer()
First layer index
-
lastLayer
public int lastLayer()
Last layer index
-
reserved
public java.nio.IntBuffer reserved()
- Returns:
- a
IntBufferview of thereservedfield.
-
reserved
public int reserved(int index)
- Returns:
- the value at the specified index of the
reservedfield.
-
format
public CUDA_RESOURCE_VIEW_DESC format(int value)
Sets the specified value to theformat()field.
-
width
public CUDA_RESOURCE_VIEW_DESC width(long value)
Sets the specified value to thewidth()field.
-
height
public CUDA_RESOURCE_VIEW_DESC height(long value)
Sets the specified value to theheight()field.
-
depth
public CUDA_RESOURCE_VIEW_DESC depth(long value)
Sets the specified value to thedepth()field.
-
firstMipmapLevel
public CUDA_RESOURCE_VIEW_DESC firstMipmapLevel(int value)
Sets the specified value to thefirstMipmapLevel()field.
-
lastMipmapLevel
public CUDA_RESOURCE_VIEW_DESC lastMipmapLevel(int value)
Sets the specified value to thelastMipmapLevel()field.
-
firstLayer
public CUDA_RESOURCE_VIEW_DESC firstLayer(int value)
Sets the specified value to thefirstLayer()field.
-
lastLayer
public CUDA_RESOURCE_VIEW_DESC lastLayer(int value)
Sets the specified value to thelastLayer()field.
-
reserved
public CUDA_RESOURCE_VIEW_DESC reserved(java.nio.IntBuffer value)
Copies the specifiedIntBufferto thereservedfield.
-
reserved
public CUDA_RESOURCE_VIEW_DESC reserved(int index, int value)
Sets the specified value at the specified index of thereservedfield.
-
set
public CUDA_RESOURCE_VIEW_DESC set(int format, long width, long height, long depth, int firstMipmapLevel, int lastMipmapLevel, int firstLayer, int lastLayer, java.nio.IntBuffer reserved)
Initializes this struct with the specified values.
-
set
public CUDA_RESOURCE_VIEW_DESC set(CUDA_RESOURCE_VIEW_DESC src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static CUDA_RESOURCE_VIEW_DESC malloc()
Returns a newCUDA_RESOURCE_VIEW_DESCinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CUDA_RESOURCE_VIEW_DESC calloc()
Returns a newCUDA_RESOURCE_VIEW_DESCinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CUDA_RESOURCE_VIEW_DESC create()
Returns a newCUDA_RESOURCE_VIEW_DESCinstance allocated withBufferUtils.
-
create
public static CUDA_RESOURCE_VIEW_DESC create(long address)
Returns a newCUDA_RESOURCE_VIEW_DESCinstance for the specified memory address.
-
createSafe
@Nullable public static CUDA_RESOURCE_VIEW_DESC createSafe(long address)
-
malloc
public static CUDA_RESOURCE_VIEW_DESC.Buffer malloc(int capacity)
Returns a newCUDA_RESOURCE_VIEW_DESC.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CUDA_RESOURCE_VIEW_DESC.Buffer calloc(int capacity)
Returns a newCUDA_RESOURCE_VIEW_DESC.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CUDA_RESOURCE_VIEW_DESC.Buffer create(int capacity)
Returns a newCUDA_RESOURCE_VIEW_DESC.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CUDA_RESOURCE_VIEW_DESC.Buffer create(long address, int capacity)
Create aCUDA_RESOURCE_VIEW_DESC.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static CUDA_RESOURCE_VIEW_DESC.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static CUDA_RESOURCE_VIEW_DESC mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_RESOURCE_VIEW_DESC callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CUDA_RESOURCE_VIEW_DESC mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_RESOURCE_VIEW_DESC callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CUDA_RESOURCE_VIEW_DESC.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_RESOURCE_VIEW_DESC.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static CUDA_RESOURCE_VIEW_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_VIEW_DESC.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_RESOURCE_VIEW_DESC malloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_RESOURCE_VIEW_DESCinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static CUDA_RESOURCE_VIEW_DESC calloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_RESOURCE_VIEW_DESCinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static CUDA_RESOURCE_VIEW_DESC.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_RESOURCE_VIEW_DESC.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static CUDA_RESOURCE_VIEW_DESC.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_RESOURCE_VIEW_DESC.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nformat
public static int nformat(long struct)
Unsafe version offormat().
-
nwidth
public static long nwidth(long struct)
Unsafe version ofwidth().
-
nheight
public static long nheight(long struct)
Unsafe version ofheight().
-
ndepth
public static long ndepth(long struct)
Unsafe version ofdepth().
-
nfirstMipmapLevel
public static int nfirstMipmapLevel(long struct)
Unsafe version offirstMipmapLevel().
-
nlastMipmapLevel
public static int nlastMipmapLevel(long struct)
Unsafe version oflastMipmapLevel().
-
nfirstLayer
public static int nfirstLayer(long struct)
Unsafe version offirstLayer().
-
nlastLayer
public static int nlastLayer(long struct)
Unsafe version oflastLayer().
-
nreserved
public static java.nio.IntBuffer nreserved(long struct)
Unsafe version ofreserved().
-
nreserved
public static int nreserved(long struct, int index)Unsafe version ofreserved.
-
nformat
public static void nformat(long struct, int value)Unsafe version offormat.
-
nwidth
public static void nwidth(long struct, long value)Unsafe version ofwidth.
-
nheight
public static void nheight(long struct, long value)Unsafe version ofheight.
-
ndepth
public static void ndepth(long struct, long value)Unsafe version ofdepth.
-
nfirstMipmapLevel
public static void nfirstMipmapLevel(long struct, int value)Unsafe version offirstMipmapLevel.
-
nlastMipmapLevel
public static void nlastMipmapLevel(long struct, int value)Unsafe version oflastMipmapLevel.
-
nfirstLayer
public static void nfirstLayer(long struct, int value)Unsafe version offirstLayer.
-
nlastLayer
public static void nlastLayer(long struct, int value)Unsafe version oflastLayer.
-
nreserved
public static void nreserved(long struct, java.nio.IntBuffer value)Unsafe version ofreserved.
-
nreserved
public static void nreserved(long struct, int index, int value)Unsafe version ofreserved.
-
-