Package org.lwjgl.cuda
Class CUmemAllocationProp
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CUmemAllocationProp>
org.lwjgl.cuda.CUmemAllocationProp
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUmemAllocationProp
extends org.lwjgl.system.Struct<CUmemAllocationProp>
implements org.lwjgl.system.NativeResource
Layout
struct CUmemAllocationProp {
CUmemAllocationType type;
CUmemAllocationHandleType requestedHandleTypes;
CUmemLocation location;
void * win32HandleMetaData;
struct {
unsigned char compressionType;
unsigned char gpuDirectRDMACapable;
unsigned short usage;
unsigned char reserved[4];
} allocFlags;
}-
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 member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionCUmemAllocationProp(ByteBuffer container) Creates aCUmemAllocationPropinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionbyteallocFlags_compressionType(byte value) Sets the specified value to thecompressionTypefield.byteallocFlags_gpuDirectRDMACapable(byte value) Sets the specified value to thegpuDirectRDMACapablefield.byteallocFlags_reserved(int index) allocFlags_reserved(int index, byte value) Sets the specified value at the specified index of thereservedfield.allocFlags_reserved(ByteBuffer value) Copies the specifiedByteBufferto thereservedfield.shortallocFlags_usage(short value) Sets the specified value to theusagefield.static CUmemAllocationPropcalloc()Returns a newCUmemAllocationPropinstance allocated withmemCalloc.static CUmemAllocationProp.Buffercalloc(int capacity) Returns a newCUmemAllocationProp.Bufferinstance allocated withmemCalloc.static CUmemAllocationProp.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUmemAllocationProp.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUmemAllocationPropcalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUmemAllocationPropinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUmemAllocationPropcreate()Returns a newCUmemAllocationPropinstance allocated withBufferUtils.static CUmemAllocationProp.Buffercreate(int capacity) Returns a newCUmemAllocationProp.Bufferinstance allocated withBufferUtils.static CUmemAllocationPropcreate(long address) Returns a newCUmemAllocationPropinstance for the specified memory address.static CUmemAllocationProp.Buffercreate(long address, int capacity) Create aCUmemAllocationProp.Bufferinstance at the specified memory.static @Nullable CUmemAllocationPropcreateSafe(long address) static @Nullable CUmemAllocationProp.BuffercreateSafe(long address, int capacity) location()location(Consumer<CUmemLocation> consumer) Passes thelocationfield to the specifiedConsumer.location(CUmemLocation value) Copies the specifiedCUmemLocationto thelocationfield.static CUmemAllocationPropmalloc()Returns a newCUmemAllocationPropinstance allocated withmemAlloc.static CUmemAllocationProp.Buffermalloc(int capacity) Returns a newCUmemAllocationProp.Bufferinstance allocated withmemAlloc.static CUmemAllocationProp.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUmemAllocationProp.Bufferinstance allocated on the specifiedMemoryStack.static CUmemAllocationPropmalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUmemAllocationPropinstance allocated on the specifiedMemoryStack.static bytenallocFlags_compressionType(long struct) Unsafe version ofallocFlags_compressionType().static voidnallocFlags_compressionType(long struct, byte value) Unsafe version ofallocFlags_compressionType.static bytenallocFlags_gpuDirectRDMACapable(long struct) Unsafe version ofallocFlags_gpuDirectRDMACapable().static voidnallocFlags_gpuDirectRDMACapable(long struct, byte value) Unsafe version ofallocFlags_gpuDirectRDMACapable.static ByteBuffernallocFlags_reserved(long struct) Unsafe version ofallocFlags_reserved().static bytenallocFlags_reserved(long struct, int index) Unsafe version ofallocFlags_reserved.static voidnallocFlags_reserved(long struct, int index, byte value) Unsafe version ofallocFlags_reserved.static voidnallocFlags_reserved(long struct, ByteBuffer value) Unsafe version ofallocFlags_reserved.static shortnallocFlags_usage(long struct) Unsafe version ofallocFlags_usage().static voidnallocFlags_usage(long struct, short value) Unsafe version ofallocFlags_usage.static CUmemLocationnlocation(long struct) Unsafe version oflocation().static voidnlocation(long struct, CUmemLocation value) Unsafe version oflocation.static intnrequestedHandleTypes(long struct) Unsafe version ofrequestedHandleTypes().static voidnrequestedHandleTypes(long struct, int value) Unsafe version ofrequestedHandleTypes.static intntype(long struct) Unsafe version oftype().static voidntype(long struct, int value) Unsafe version oftype.static longnwin32HandleMetaData(long struct) Unsafe version ofwin32HandleMetaData().static voidnwin32HandleMetaData(long struct, long value) Unsafe version ofwin32HandleMetaData.intrequestedHandleTypes(int value) Sets the specified value to therequestedHandleTypesfield.set(int type, int requestedHandleTypes, CUmemLocation location, long win32HandleMetaData, byte allocFlags_compressionType, byte allocFlags_gpuDirectRDMACapable, short allocFlags_usage, ByteBuffer allocFlags_reserved) Initializes this struct with the specified values.set(CUmemAllocationProp src) Copies the specified struct data to this struct.intsizeof()inttype()type(int value) Sets the specified value to thetypefield.longwin32HandleMetaData(long value) Sets the specified value to thewin32HandleMetaDatafield.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. -
TYPE
public static final int TYPEThe struct member offsets. -
REQUESTEDHANDLETYPES
public static final int REQUESTEDHANDLETYPESThe struct member offsets. -
LOCATION
public static final int LOCATIONThe struct member offsets. -
WIN32HANDLEMETADATA
public static final int WIN32HANDLEMETADATAThe struct member offsets. -
ALLOCFLAGS
public static final int ALLOCFLAGSThe struct member offsets. -
ALLOCFLAGS_COMPRESSIONTYPE
public static final int ALLOCFLAGS_COMPRESSIONTYPEThe struct member offsets. -
ALLOCFLAGS_GPUDIRECTRDMACAPABLE
public static final int ALLOCFLAGS_GPUDIRECTRDMACAPABLEThe struct member offsets. -
ALLOCFLAGS_USAGE
public static final int ALLOCFLAGS_USAGEThe struct member offsets. -
ALLOCFLAGS_RESERVED
public static final int ALLOCFLAGS_RESERVEDThe struct member offsets.
-
-
Constructor Details
-
CUmemAllocationProp
Creates aCUmemAllocationPropinstance 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<CUmemAllocationProp>
-
type
public int type()- Returns:
- the value of the
typefield.
-
requestedHandleTypes
public int requestedHandleTypes()- Returns:
- the value of the
requestedHandleTypesfield.
-
location
- Returns:
- a
CUmemLocationview of thelocationfield.
-
win32HandleMetaData
public long win32HandleMetaData()- Returns:
- the value of the
win32HandleMetaDatafield.
-
allocFlags_compressionType
public byte allocFlags_compressionType()- Returns:
- the value of the
allocFlags.compressionTypefield.
-
allocFlags_gpuDirectRDMACapable
public byte allocFlags_gpuDirectRDMACapable()- Returns:
- the value of the
allocFlags.gpuDirectRDMACapablefield.
-
allocFlags_usage
public short allocFlags_usage()- Returns:
- the value of the
allocFlags.usagefield.
-
allocFlags_reserved
- Returns:
- a
ByteBufferview of theallocFlags.reservedfield.
-
allocFlags_reserved
public byte allocFlags_reserved(int index) - Returns:
- the value at the specified index of the
allocFlags.reservedfield.
-
type
Sets the specified value to thetypefield. -
requestedHandleTypes
Sets the specified value to therequestedHandleTypesfield. -
location
Copies the specifiedCUmemLocationto thelocationfield. -
location
Passes thelocationfield to the specifiedConsumer. -
win32HandleMetaData
Sets the specified value to thewin32HandleMetaDatafield. -
allocFlags_compressionType
Sets the specified value to thecompressionTypefield. -
allocFlags_gpuDirectRDMACapable
Sets the specified value to thegpuDirectRDMACapablefield. -
allocFlags_usage
Sets the specified value to theusagefield. -
allocFlags_reserved
Copies the specifiedByteBufferto thereservedfield. -
allocFlags_reserved
Sets the specified value at the specified index of thereservedfield. -
set
public CUmemAllocationProp set(int type, int requestedHandleTypes, CUmemLocation location, long win32HandleMetaData, byte allocFlags_compressionType, byte allocFlags_gpuDirectRDMACapable, short allocFlags_usage, ByteBuffer allocFlags_reserved) 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 newCUmemAllocationPropinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCUmemAllocationPropinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCUmemAllocationPropinstance allocated withBufferUtils. -
create
Returns a newCUmemAllocationPropinstance for the specified memory address. -
createSafe
-
malloc
Returns a newCUmemAllocationProp.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCUmemAllocationProp.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCUmemAllocationProp.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCUmemAllocationProp.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newCUmemAllocationPropinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCUmemAllocationPropinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newCUmemAllocationProp.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newCUmemAllocationProp.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ntype
public static int ntype(long struct) Unsafe version oftype(). -
nrequestedHandleTypes
public static int nrequestedHandleTypes(long struct) Unsafe version ofrequestedHandleTypes(). -
nlocation
Unsafe version oflocation(). -
nwin32HandleMetaData
public static long nwin32HandleMetaData(long struct) Unsafe version ofwin32HandleMetaData(). -
nallocFlags_compressionType
public static byte nallocFlags_compressionType(long struct) Unsafe version ofallocFlags_compressionType(). -
nallocFlags_gpuDirectRDMACapable
public static byte nallocFlags_gpuDirectRDMACapable(long struct) Unsafe version ofallocFlags_gpuDirectRDMACapable(). -
nallocFlags_usage
public static short nallocFlags_usage(long struct) Unsafe version ofallocFlags_usage(). -
nallocFlags_reserved
Unsafe version ofallocFlags_reserved(). -
nallocFlags_reserved
public static byte nallocFlags_reserved(long struct, int index) Unsafe version ofallocFlags_reserved. -
ntype
public static void ntype(long struct, int value) Unsafe version oftype. -
nrequestedHandleTypes
public static void nrequestedHandleTypes(long struct, int value) Unsafe version ofrequestedHandleTypes. -
nlocation
Unsafe version oflocation. -
nwin32HandleMetaData
public static void nwin32HandleMetaData(long struct, long value) Unsafe version ofwin32HandleMetaData. -
nallocFlags_compressionType
public static void nallocFlags_compressionType(long struct, byte value) Unsafe version ofallocFlags_compressionType. -
nallocFlags_gpuDirectRDMACapable
public static void nallocFlags_gpuDirectRDMACapable(long struct, byte value) Unsafe version ofallocFlags_gpuDirectRDMACapable. -
nallocFlags_usage
public static void nallocFlags_usage(long struct, short value) Unsafe version ofallocFlags_usage. -
nallocFlags_reserved
Unsafe version ofallocFlags_reserved. -
nallocFlags_reserved
public static void nallocFlags_reserved(long struct, int index, byte value) Unsafe version ofallocFlags_reserved.
-