Package org.lwjgl.cuda
Class CUmemAccessDesc
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CUmemAccessDesc>
org.lwjgl.cuda.CUmemAccessDesc
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUmemAccessDesc
extends org.lwjgl.system.Struct<CUmemAccessDesc>
implements org.lwjgl.system.NativeResource
Layout
struct CUmemAccessDesc {
CUmemLocation location;
CUmemAccess_flags flags;
}-
Nested Class Summary
Nested ClassesNested 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 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
ConstructorsConstructorDescriptionCUmemAccessDesc(ByteBuffer container) Creates aCUmemAccessDescinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic CUmemAccessDesccalloc()Returns a newCUmemAccessDescinstance allocated withmemCalloc.static CUmemAccessDesc.Buffercalloc(int capacity) Returns a newCUmemAccessDesc.Bufferinstance allocated withmemCalloc.static CUmemAccessDesc.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUmemAccessDesc.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUmemAccessDesccalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUmemAccessDescinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUmemAccessDesccreate()Returns a newCUmemAccessDescinstance allocated withBufferUtils.static CUmemAccessDesc.Buffercreate(int capacity) Returns a newCUmemAccessDesc.Bufferinstance allocated withBufferUtils.static CUmemAccessDesccreate(long address) Returns a newCUmemAccessDescinstance for the specified memory address.static CUmemAccessDesc.Buffercreate(long address, int capacity) Create aCUmemAccessDesc.Bufferinstance at the specified memory.static @Nullable CUmemAccessDesccreateSafe(long address) static @Nullable CUmemAccessDesc.BuffercreateSafe(long address, int capacity) intflags()flags(int value) Sets the specified value to theflagsfield.location()location(Consumer<CUmemLocation> consumer) Passes thelocationfield to the specifiedConsumer.location(CUmemLocation value) Copies the specifiedCUmemLocationto thelocationfield.static CUmemAccessDescmalloc()Returns a newCUmemAccessDescinstance allocated withmemAlloc.static CUmemAccessDesc.Buffermalloc(int capacity) Returns a newCUmemAccessDesc.Bufferinstance allocated withmemAlloc.static CUmemAccessDesc.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUmemAccessDesc.Bufferinstance allocated on the specifiedMemoryStack.static CUmemAccessDescmalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUmemAccessDescinstance allocated on the specifiedMemoryStack.static intnflags(long struct) Unsafe version offlags().static voidnflags(long struct, int value) Unsafe version offlags.static CUmemLocationnlocation(long struct) Unsafe version oflocation().static voidnlocation(long struct, CUmemLocation value) Unsafe version oflocation.set(CUmemAccessDesc src) Copies the specified struct data to this struct.set(CUmemLocation location, int flags) Initializes this struct with the specified values.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. -
LOCATION
public static final int LOCATIONThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets.
-
-
Constructor Details
-
CUmemAccessDesc
Creates aCUmemAccessDescinstance 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<CUmemAccessDesc>
-
location
- Returns:
- a
CUmemLocationview of thelocationfield.
-
flags
public int flags()- Returns:
- the value of the
flagsfield.
-
location
Copies the specifiedCUmemLocationto thelocationfield. -
location
Passes thelocationfield to the specifiedConsumer. -
flags
Sets the specified value to theflagsfield. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newCUmemAccessDescinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCUmemAccessDescinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCUmemAccessDescinstance allocated withBufferUtils. -
create
Returns a newCUmemAccessDescinstance for the specified memory address. -
createSafe
-
malloc
Returns a newCUmemAccessDesc.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCUmemAccessDesc.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCUmemAccessDesc.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCUmemAccessDesc.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newCUmemAccessDescinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCUmemAccessDescinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newCUmemAccessDesc.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newCUmemAccessDesc.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nlocation
Unsafe version oflocation(). -
nflags
public static int nflags(long struct) Unsafe version offlags(). -
nlocation
Unsafe version oflocation. -
nflags
public static void nflags(long struct, int value) Unsafe version offlags.
-