Package org.lwjgl.cuda
Class CUmemPoolProps
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.cuda.CUmemPoolProps
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CUmemPoolProps extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceSpecifies the properties of allocations made from the pool.Layout
struct CUmemPoolProps { CUmemAllocationTypeallocType(); CUmemAllocationHandleTypehandleTypes();CUmemLocationlocation(); void *win32SecurityAttributes(); unsigned charreserved()[64]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCUmemPoolProps.BufferAn array ofCUmemPoolPropsstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intALLOCTYPE
HANDLETYPES
LOCATION
RESERVEDThe struct member offsets.static intSIZEOFThe struct size in bytes.static intWIN32SECURITYATTRIBUTESThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description CUmemPoolProps(java.nio.ByteBuffer container)Creates aCUmemPoolPropsinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intallocType()allocation type.CUmemPoolPropsallocType(int value)Sets the specified value to theallocType()field.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 CUmemPoolPropscreateSafe(long address)static CUmemPoolProps.BuffercreateSafe(long address, int capacity)inthandleTypes()handle types that will be supported by allocations from the poolCUmemPoolPropshandleTypes(int value)Sets the specified value to thehandleTypes()field.CUmemLocationlocation()location where allocations should resideCUmemPoolPropslocation(java.util.function.Consumer<CUmemLocation> consumer)Passes thelocation()field to the specifiedConsumer.CUmemPoolPropslocation(CUmemLocation value)Copies the specifiedCUmemLocationto thelocation()field.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 java.nio.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, java.nio.ByteBuffer value)Unsafe version ofreserved.static longnwin32SecurityAttributes(long struct)Unsafe version ofwin32SecurityAttributes().static voidnwin32SecurityAttributes(long struct, long value)Unsafe version ofwin32SecurityAttributes.java.nio.ByteBufferreserved()reserved for future use, must be 0bytereserved(int index)reserved for future use, must be 0CUmemPoolPropsreserved(int index, byte value)Sets the specified value at the specified index of thereserved()field.CUmemPoolPropsreserved(java.nio.ByteBuffer value)Copies the specifiedByteBufferto thereserved()field.CUmemPoolPropsset(int allocType, int handleTypes, CUmemLocation location, long win32SecurityAttributes, java.nio.ByteBuffer reserved)Initializes this struct with the specified values.CUmemPoolPropsset(CUmemPoolProps src)Copies the specified struct data to this struct.intsizeof()longwin32SecurityAttributes()windows-specificLPSECURITYATTRIBUTESrequired whenMEM_HANDLE_TYPE_WIN32is specified.CUmemPoolPropswin32SecurityAttributes(long value)Sets the specified value to thewin32SecurityAttributes()field.
-
-
-
Constructor Detail
-
CUmemPoolProps
public CUmemPoolProps(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
allocType
public int allocType()
allocation type. Currently must be specified asMEM_ALLOCATION_TYPE_PINNED.
-
handleTypes
public int handleTypes()
handle types that will be supported by allocations from the pool
-
location
public CUmemLocation location()
location where allocations should reside
-
win32SecurityAttributes
public long win32SecurityAttributes()
windows-specificLPSECURITYATTRIBUTESrequired whenMEM_HANDLE_TYPE_WIN32is specified. This security attribute defines the scope of which exported allocations may be tranferred to other processes. In all other cases, this field is required to be zero.
-
reserved
public java.nio.ByteBuffer reserved() public byte reserved(int index)
reserved for future use, must be 0
-
allocType
public CUmemPoolProps allocType(int value)
Sets the specified value to theallocType()field.
-
handleTypes
public CUmemPoolProps handleTypes(int value)
Sets the specified value to thehandleTypes()field.
-
location
public CUmemPoolProps location(CUmemLocation value)
Copies the specifiedCUmemLocationto thelocation()field.
-
location
public CUmemPoolProps location(java.util.function.Consumer<CUmemLocation> consumer)
Passes thelocation()field to the specifiedConsumer.
-
win32SecurityAttributes
public CUmemPoolProps win32SecurityAttributes(long value)
Sets the specified value to thewin32SecurityAttributes()field.
-
reserved
public CUmemPoolProps reserved(java.nio.ByteBuffer value)
Copies the specifiedByteBufferto thereserved()field.
-
reserved
public CUmemPoolProps reserved(int index, byte value)
Sets the specified value at the specified index of thereserved()field.
-
set
public CUmemPoolProps set(int allocType, int handleTypes, CUmemLocation location, long win32SecurityAttributes, java.nio.ByteBuffer reserved)
Initializes this struct with the specified values.
-
set
public CUmemPoolProps set(CUmemPoolProps src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static CUmemPoolProps malloc()
Returns a newCUmemPoolPropsinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CUmemPoolProps calloc()
Returns a newCUmemPoolPropsinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CUmemPoolProps create()
Returns a newCUmemPoolPropsinstance allocated withBufferUtils.
-
create
public static CUmemPoolProps create(long address)
Returns a newCUmemPoolPropsinstance for the specified memory address.
-
createSafe
@Nullable public static CUmemPoolProps createSafe(long address)
-
malloc
public static CUmemPoolProps.Buffer malloc(int capacity)
Returns a newCUmemPoolProps.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CUmemPoolProps.Buffer calloc(int capacity)
Returns a newCUmemPoolProps.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CUmemPoolProps.Buffer create(int capacity)
Returns a newCUmemPoolProps.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CUmemPoolProps.Buffer create(long address, int capacity)
Create aCUmemPoolProps.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static CUmemPoolProps.Buffer createSafe(long address, int capacity)
-
malloc
public static CUmemPoolProps malloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUmemPoolPropsinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static CUmemPoolProps calloc(org.lwjgl.system.MemoryStack stack)
Returns a newCUmemPoolPropsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static CUmemPoolProps.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUmemPoolProps.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static CUmemPoolProps.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCUmemPoolProps.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nallocType
public static int nallocType(long struct)
Unsafe version ofallocType().
-
nhandleTypes
public static int nhandleTypes(long struct)
Unsafe version ofhandleTypes().
-
nlocation
public static CUmemLocation nlocation(long struct)
Unsafe version oflocation().
-
nwin32SecurityAttributes
public static long nwin32SecurityAttributes(long struct)
Unsafe version ofwin32SecurityAttributes().
-
nreserved
public static java.nio.ByteBuffer nreserved(long struct)
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
public static void nlocation(long struct, CUmemLocation value)Unsafe version oflocation.
-
nwin32SecurityAttributes
public static void nwin32SecurityAttributes(long struct, long value)Unsafe version ofwin32SecurityAttributes.
-
nreserved
public static void nreserved(long struct, java.nio.ByteBuffer value)Unsafe version ofreserved.
-
nreserved
public static void nreserved(long struct, int index, byte value)Unsafe version ofreserved.
-
-