Package org.lwjgl.cuda
Class CUDA_ARRAY_DESCRIPTOR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.cuda.CUDA_ARRAY_DESCRIPTOR
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUDA_ARRAY_DESCRIPTOR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceArray descriptor.Layout
struct CUDA_ARRAY_DESCRIPTOR { size_tWidth(); size_tHeight(); CUarray_formatFormat(); unsigned intNumChannels(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCUDA_ARRAY_DESCRIPTOR.BufferAn array ofCUDA_ARRAY_DESCRIPTORstructs.
-
Constructor Summary
Constructors Constructor Description CUDA_ARRAY_DESCRIPTOR(java.nio.ByteBuffer container)Creates aCUDA_ARRAY_DESCRIPTORinstance 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_ARRAY_DESCRIPTORcalloc()Returns a newCUDA_ARRAY_DESCRIPTORinstance allocated withmemCalloc.static CUDA_ARRAY_DESCRIPTOR.Buffercalloc(int capacity)Returns a newCUDA_ARRAY_DESCRIPTOR.Bufferinstance allocated withmemCalloc.static CUDA_ARRAY_DESCRIPTOR.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCUDA_ARRAY_DESCRIPTOR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUDA_ARRAY_DESCRIPTORcalloc(org.lwjgl.system.MemoryStack stack)Returns a newCUDA_ARRAY_DESCRIPTORinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUDA_ARRAY_DESCRIPTORcallocStack()Deprecated.static CUDA_ARRAY_DESCRIPTOR.BuffercallocStack(int capacity)Deprecated.static CUDA_ARRAY_DESCRIPTOR.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static CUDA_ARRAY_DESCRIPTORcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static CUDA_ARRAY_DESCRIPTORcreate()Returns a newCUDA_ARRAY_DESCRIPTORinstance allocated withBufferUtils.static CUDA_ARRAY_DESCRIPTOR.Buffercreate(int capacity)Returns a newCUDA_ARRAY_DESCRIPTOR.Bufferinstance allocated withBufferUtils.static CUDA_ARRAY_DESCRIPTORcreate(long address)Returns a newCUDA_ARRAY_DESCRIPTORinstance for the specified memory address.static CUDA_ARRAY_DESCRIPTOR.Buffercreate(long address, int capacity)Create aCUDA_ARRAY_DESCRIPTOR.Bufferinstance at the specified memory.static CUDA_ARRAY_DESCRIPTORcreateSafe(long address)static CUDA_ARRAY_DESCRIPTOR.BuffercreateSafe(long address, int capacity)intFormat()Array formatCUDA_ARRAY_DESCRIPTORFormat(int value)Sets the specified value to theFormat()field.longHeight()Height of arrayCUDA_ARRAY_DESCRIPTORHeight(long value)Sets the specified value to theHeight()field.static CUDA_ARRAY_DESCRIPTORmalloc()Returns a newCUDA_ARRAY_DESCRIPTORinstance allocated withmemAlloc.static CUDA_ARRAY_DESCRIPTOR.Buffermalloc(int capacity)Returns a newCUDA_ARRAY_DESCRIPTOR.Bufferinstance allocated withmemAlloc.static CUDA_ARRAY_DESCRIPTOR.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCUDA_ARRAY_DESCRIPTOR.Bufferinstance allocated on the specifiedMemoryStack.static CUDA_ARRAY_DESCRIPTORmalloc(org.lwjgl.system.MemoryStack stack)Returns a newCUDA_ARRAY_DESCRIPTORinstance allocated on the specifiedMemoryStack.static CUDA_ARRAY_DESCRIPTORmallocStack()Deprecated.static CUDA_ARRAY_DESCRIPTOR.BuffermallocStack(int capacity)Deprecated.static CUDA_ARRAY_DESCRIPTOR.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static CUDA_ARRAY_DESCRIPTORmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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 intnNumChannels(long struct)Unsafe version ofNumChannels().static voidnNumChannels(long struct, int value)Unsafe version ofNumChannels.intNumChannels()Channels per array elementCUDA_ARRAY_DESCRIPTORNumChannels(int value)Sets the specified value to theNumChannels()field.static longnWidth(long struct)Unsafe version ofWidth().static voidnWidth(long struct, long value)Unsafe version ofWidth.CUDA_ARRAY_DESCRIPTORset(long Width, long Height, int Format, int NumChannels)Initializes this struct with the specified values.CUDA_ARRAY_DESCRIPTORset(CUDA_ARRAY_DESCRIPTOR src)Copies the specified struct data to this struct.intsizeof()longWidth()Width of arrayCUDA_ARRAY_DESCRIPTORWidth(long value)Sets the specified value to theWidth()field.
-
-
-
Constructor Detail
-
CUDA_ARRAY_DESCRIPTOR
public CUDA_ARRAY_DESCRIPTOR(java.nio.ByteBuffer container)
Creates aCUDA_ARRAY_DESCRIPTORinstance 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
-
Width
public long Width()
Width of array
-
Height
public long Height()
Height of array
-
Format
public int Format()
Array format
-
NumChannels
public int NumChannels()
Channels per array element
-
Width
public CUDA_ARRAY_DESCRIPTOR Width(long value)
Sets the specified value to theWidth()field.
-
Height
public CUDA_ARRAY_DESCRIPTOR Height(long value)
Sets the specified value to theHeight()field.
-
Format
public CUDA_ARRAY_DESCRIPTOR Format(int value)
Sets the specified value to theFormat()field.
-
NumChannels
public CUDA_ARRAY_DESCRIPTOR NumChannels(int value)
Sets the specified value to theNumChannels()field.
-
set
public CUDA_ARRAY_DESCRIPTOR set(long Width, long Height, int Format, int NumChannels)
Initializes this struct with the specified values.
-
set
public CUDA_ARRAY_DESCRIPTOR set(CUDA_ARRAY_DESCRIPTOR src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static CUDA_ARRAY_DESCRIPTOR malloc()
Returns a newCUDA_ARRAY_DESCRIPTORinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CUDA_ARRAY_DESCRIPTOR calloc()
Returns a newCUDA_ARRAY_DESCRIPTORinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CUDA_ARRAY_DESCRIPTOR create()
Returns a newCUDA_ARRAY_DESCRIPTORinstance allocated withBufferUtils.
-
create
public static CUDA_ARRAY_DESCRIPTOR create(long address)
Returns a newCUDA_ARRAY_DESCRIPTORinstance for the specified memory address.
-
createSafe
@Nullable public static CUDA_ARRAY_DESCRIPTOR createSafe(long address)
-
malloc
public static CUDA_ARRAY_DESCRIPTOR.Buffer malloc(int capacity)
Returns a newCUDA_ARRAY_DESCRIPTOR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CUDA_ARRAY_DESCRIPTOR.Buffer calloc(int capacity)
Returns a newCUDA_ARRAY_DESCRIPTOR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CUDA_ARRAY_DESCRIPTOR.Buffer create(int capacity)
Returns a newCUDA_ARRAY_DESCRIPTOR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CUDA_ARRAY_DESCRIPTOR.Buffer create(long address, int capacity)
Create aCUDA_ARRAY_DESCRIPTOR.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static CUDA_ARRAY_DESCRIPTOR.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static CUDA_ARRAY_DESCRIPTOR mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_ARRAY_DESCRIPTOR callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CUDA_ARRAY_DESCRIPTOR mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_ARRAY_DESCRIPTOR callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CUDA_ARRAY_DESCRIPTOR.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static CUDA_ARRAY_DESCRIPTOR.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static CUDA_ARRAY_DESCRIPTOR.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_ARRAY_DESCRIPTOR.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_ARRAY_DESCRIPTOR malloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_ARRAY_DESCRIPTORinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static CUDA_ARRAY_DESCRIPTOR calloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_ARRAY_DESCRIPTORinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static CUDA_ARRAY_DESCRIPTOR.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_ARRAY_DESCRIPTOR.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static CUDA_ARRAY_DESCRIPTOR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUDA_ARRAY_DESCRIPTOR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nWidth
public static long nWidth(long struct)
Unsafe version ofWidth().
-
nHeight
public static long nHeight(long struct)
Unsafe version ofHeight().
-
nFormat
public static int nFormat(long struct)
Unsafe version ofFormat().
-
nNumChannels
public static int nNumChannels(long struct)
Unsafe version ofNumChannels().
-
nWidth
public static void nWidth(long struct, long value)Unsafe version ofWidth.
-
nHeight
public static void nHeight(long struct, long value)Unsafe version ofHeight.
-
nFormat
public static void nFormat(long struct, int value)Unsafe version ofFormat.
-
nNumChannels
public static void nNumChannels(long struct, int value)Unsafe version ofNumChannels.
-
-