Package org.lwjgl.cuda
Class CUDA_ARRAY_MEMORY_REQUIREMENTS
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CUDA_ARRAY_MEMORY_REQUIREMENTS>
org.lwjgl.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUDA_ARRAY_MEMORY_REQUIREMENTS
extends org.lwjgl.system.Struct<CUDA_ARRAY_MEMORY_REQUIREMENTS>
implements org.lwjgl.system.NativeResource
Layout
struct CUDA_ARRAY_MEMORY_REQUIREMENTS {
size_t size;
size_t alignment;
unsigned int reserved[4];
}-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn array ofCUDA_ARRAY_MEMORY_REQUIREMENTSstructs.Nested 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 member offsets.static final intThe struct alignment in bytes.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_ARRAY_MEMORY_REQUIREMENTS(ByteBuffer container) Creates aCUDA_ARRAY_MEMORY_REQUIREMENTSinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionlongcalloc()Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTSinstance allocated withmemCalloc.calloc(int capacity) Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTS.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTS.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.calloc(org.lwjgl.system.MemoryStack stack) Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTSinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.create()Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTSinstance allocated withBufferUtils.create(int capacity) Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTS.Bufferinstance allocated withBufferUtils.create(long address) Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTSinstance for the specified memory address.create(long address, int capacity) Create aCUDA_ARRAY_MEMORY_REQUIREMENTS.Bufferinstance at the specified memory.static @Nullable CUDA_ARRAY_MEMORY_REQUIREMENTScreateSafe(long address) static @Nullable CUDA_ARRAY_MEMORY_REQUIREMENTS.BuffercreateSafe(long address, int capacity) malloc()Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTSinstance allocated withmemAlloc.malloc(int capacity) Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTS.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTS.Bufferinstance allocated on the specifiedMemoryStack.malloc(org.lwjgl.system.MemoryStack stack) Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTSinstance allocated on the specifiedMemoryStack.static longnalignment(long struct) Unsafe version ofalignment().static IntBuffernreserved(long struct) Unsafe version ofreserved().static intnreserved(long struct, int index) Unsafe version ofreserved.static longnsize(long struct) Unsafe version ofsize().reserved()intreserved(int index) longsize()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. -
SIZE
public static final int SIZEThe struct member offsets. -
ALIGNMENT
public static final int ALIGNMENTThe struct member offsets. -
RESERVED
public static final int RESERVEDThe struct member offsets.
-
-
Constructor Details
-
CUDA_ARRAY_MEMORY_REQUIREMENTS
Creates aCUDA_ARRAY_MEMORY_REQUIREMENTSinstance 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_ARRAY_MEMORY_REQUIREMENTS>
-
size
public long size()- Returns:
- the value of the
sizefield.
-
alignment
public long alignment()- Returns:
- the value of the
alignmentfield.
-
reserved
- Returns:
- a
IntBufferview of thereservedfield.
-
reserved
public int reserved(int index) - Returns:
- the value at the specified index of the
reservedfield.
-
malloc
Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTSinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTSinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTSinstance allocated withBufferUtils. -
create
Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTSinstance for the specified memory address. -
createSafe
-
malloc
Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTS.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTS.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTS.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCUDA_ARRAY_MEMORY_REQUIREMENTS.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
public static @Nullable CUDA_ARRAY_MEMORY_REQUIREMENTS.Buffer createSafe(long address, int capacity) -
malloc
Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTSinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTSinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static CUDA_ARRAY_MEMORY_REQUIREMENTS.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTS.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static CUDA_ARRAY_MEMORY_REQUIREMENTS.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUDA_ARRAY_MEMORY_REQUIREMENTS.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsize
public static long nsize(long struct) Unsafe version ofsize(). -
nalignment
public static long nalignment(long struct) Unsafe version ofalignment(). -
nreserved
Unsafe version ofreserved(). -
nreserved
public static int nreserved(long struct, int index) Unsafe version ofreserved.
-