Package org.lwjgl.cuda
Class CUmemPoolProps
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CUmemPoolProps>
org.lwjgl.cuda.CUmemPoolProps
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUmemPoolProps
extends org.lwjgl.system.Struct<CUmemPoolProps>
implements org.lwjgl.system.NativeResource
Layout
struct CUmemPoolProps {
CUmemAllocationType allocType;
CUmemAllocationHandleType handleTypes;
CUmemLocation location;
void * win32SecurityAttributes;
unsigned char reserved[64];
}-
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 size in bytes.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
ConstructorsConstructorDescriptionCUmemPoolProps(ByteBuffer container) Creates aCUmemPoolPropsinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintallocType(int value) Sets the specified value to theallocTypefield.static CUmemPoolPropscalloc()Returns a newCUmemPoolPropsinstance allocated withmemCalloc.static CUmemPoolProps.Buffercalloc(int capacity) Returns a newCUmemPoolProps.Bufferinstance allocated withmemCalloc.static CUmemPoolProps.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUmemPoolProps.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUmemPoolPropscalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUmemPoolPropsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CUmemPoolPropscreate()Returns a newCUmemPoolPropsinstance allocated withBufferUtils.static CUmemPoolProps.Buffercreate(int capacity) Returns a newCUmemPoolProps.Bufferinstance allocated withBufferUtils.static CUmemPoolPropscreate(long address) Returns a newCUmemPoolPropsinstance for the specified memory address.static CUmemPoolProps.Buffercreate(long address, int capacity) Create aCUmemPoolProps.Bufferinstance at the specified memory.static @Nullable CUmemPoolPropscreateSafe(long address) static @Nullable CUmemPoolProps.BuffercreateSafe(long address, int capacity) inthandleTypes(int value) Sets the specified value to thehandleTypesfield.location()location(Consumer<CUmemLocation> consumer) Passes thelocationfield to the specifiedConsumer.location(CUmemLocation value) Copies the specifiedCUmemLocationto thelocationfield.static CUmemPoolPropsmalloc()Returns a newCUmemPoolPropsinstance allocated withmemAlloc.static CUmemPoolProps.Buffermalloc(int capacity) Returns a newCUmemPoolProps.Bufferinstance allocated withmemAlloc.static CUmemPoolProps.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCUmemPoolProps.Bufferinstance allocated on the specifiedMemoryStack.static CUmemPoolPropsmalloc(org.lwjgl.system.MemoryStack stack) Returns a newCUmemPoolPropsinstance allocated on the specifiedMemoryStack.static intnallocType(long struct) Unsafe version ofallocType().static voidnallocType(long struct, int value) Unsafe version ofallocType.static intnhandleTypes(long struct) Unsafe version ofhandleTypes().static voidnhandleTypes(long struct, int value) Unsafe version ofhandleTypes.static CUmemLocationnlocation(long struct) Unsafe version oflocation().static voidnlocation(long struct, CUmemLocation value) Unsafe version oflocation.static ByteBuffernreserved(long struct) Unsafe version ofreserved().static bytenreserved(long struct, int index) Unsafe version ofreserved.static voidnreserved(long struct, int index, byte value) Unsafe version ofreserved.static voidnreserved(long struct, ByteBuffer value) Unsafe version ofreserved.static longnwin32SecurityAttributes(long struct) Unsafe version ofwin32SecurityAttributes().static voidnwin32SecurityAttributes(long struct, long value) Unsafe version ofwin32SecurityAttributes.reserved()bytereserved(int index) reserved(int index, byte value) Sets the specified value at the specified index of thereservedfield.reserved(ByteBuffer value) Copies the specifiedByteBufferto thereservedfield.set(int allocType, int handleTypes, CUmemLocation location, long win32SecurityAttributes, ByteBuffer reserved) Initializes this struct with the specified values.set(CUmemPoolProps src) Copies the specified struct data to this struct.intsizeof()longwin32SecurityAttributes(long value) Sets the specified value to thewin32SecurityAttributesfield.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. -
ALLOCTYPE
public static final int ALLOCTYPEThe struct member offsets. -
HANDLETYPES
public static final int HANDLETYPESThe struct member offsets. -
LOCATION
public static final int LOCATIONThe struct member offsets. -
WIN32SECURITYATTRIBUTES
public static final int WIN32SECURITYATTRIBUTESThe struct member offsets. -
RESERVED
public static final int RESERVEDThe struct member offsets.
-
-
Constructor Details
-
CUmemPoolProps
Creates aCUmemPoolPropsinstance 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<CUmemPoolProps>
-
allocType
public int allocType()- Returns:
- the value of the
allocTypefield.
-
handleTypes
public int handleTypes()- Returns:
- the value of the
handleTypesfield.
-
location
- Returns:
- a
CUmemLocationview of thelocationfield.
-
win32SecurityAttributes
public long win32SecurityAttributes()- Returns:
- the value of the
win32SecurityAttributesfield.
-
reserved
- Returns:
- a
ByteBufferview of thereservedfield.
-
reserved
public byte reserved(int index) - Returns:
- the value at the specified index of the
reservedfield.
-
allocType
Sets the specified value to theallocTypefield. -
handleTypes
Sets the specified value to thehandleTypesfield. -
location
Copies the specifiedCUmemLocationto thelocationfield. -
location
Passes thelocationfield to the specifiedConsumer. -
win32SecurityAttributes
Sets the specified value to thewin32SecurityAttributesfield. -
reserved
Copies the specifiedByteBufferto thereservedfield. -
reserved
Sets the specified value at the specified index of thereservedfield. -
set
public CUmemPoolProps set(int allocType, int handleTypes, CUmemLocation location, long win32SecurityAttributes, ByteBuffer 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 newCUmemPoolPropsinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCUmemPoolPropsinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCUmemPoolPropsinstance allocated withBufferUtils. -
create
Returns a newCUmemPoolPropsinstance for the specified memory address. -
createSafe
-
malloc
Returns a newCUmemPoolProps.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCUmemPoolProps.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCUmemPoolProps.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCUmemPoolProps.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newCUmemPoolPropsinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCUmemPoolPropsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newCUmemPoolProps.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newCUmemPoolProps.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nallocType
public static int nallocType(long struct) Unsafe version ofallocType(). -
nhandleTypes
public static int nhandleTypes(long struct) Unsafe version ofhandleTypes(). -
nlocation
Unsafe version oflocation(). -
nwin32SecurityAttributes
public static long nwin32SecurityAttributes(long struct) Unsafe version ofwin32SecurityAttributes(). -
nreserved
Unsafe version ofreserved(). -
nreserved
public static byte nreserved(long struct, int index) Unsafe version ofreserved. -
nallocType
public static void nallocType(long struct, int value) Unsafe version ofallocType. -
nhandleTypes
public static void nhandleTypes(long struct, int value) Unsafe version ofhandleTypes. -
nlocation
Unsafe version oflocation. -
nwin32SecurityAttributes
public static void nwin32SecurityAttributes(long struct, long value) Unsafe version ofwin32SecurityAttributes. -
nreserved
Unsafe version ofreserved. -
nreserved
public static void nreserved(long struct, int index, byte value) Unsafe version ofreserved.
-