Package org.lwjgl.opencl
Class CLMemEXTHostPtr
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct cl_mem_ext_host_ptr {
cl_uint allocation_type;
cl_uint host_cache_policy;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
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
ConstructorsConstructorDescriptionCLMemEXTHostPtr(ByteBuffer container) Creates aCLMemEXTHostPtrinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintallocation_type(int value) Sets the specified value to theallocation_typefield.static CLMemEXTHostPtrcalloc()Returns a newCLMemEXTHostPtrinstance allocated withmemCalloc.static CLMemEXTHostPtr.Buffercalloc(int capacity) Returns a newCLMemEXTHostPtr.Bufferinstance allocated withmemCalloc.static CLMemEXTHostPtr.Buffercalloc(int capacity, MemoryStack stack) Returns a newCLMemEXTHostPtr.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CLMemEXTHostPtrcalloc(MemoryStack stack) Returns a newCLMemEXTHostPtrinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CLMemEXTHostPtrcreate()Returns a newCLMemEXTHostPtrinstance allocated withBufferUtils.static CLMemEXTHostPtr.Buffercreate(int capacity) Returns a newCLMemEXTHostPtr.Bufferinstance allocated withBufferUtils.static CLMemEXTHostPtrcreate(long address) Returns a newCLMemEXTHostPtrinstance for the specified memory address.static CLMemEXTHostPtr.Buffercreate(long address, int capacity) Create aCLMemEXTHostPtr.Bufferinstance at the specified memory.static @Nullable CLMemEXTHostPtrcreateSafe(long address) static @Nullable CLMemEXTHostPtr.BuffercreateSafe(long address, int capacity) inthost_cache_policy(int value) Sets the specified value to thehost_cache_policyfield.static CLMemEXTHostPtrmalloc()Returns a newCLMemEXTHostPtrinstance allocated withmemAlloc.static CLMemEXTHostPtr.Buffermalloc(int capacity) Returns a newCLMemEXTHostPtr.Bufferinstance allocated withmemAlloc.static CLMemEXTHostPtr.Buffermalloc(int capacity, MemoryStack stack) Returns a newCLMemEXTHostPtr.Bufferinstance allocated on the specifiedMemoryStack.static CLMemEXTHostPtrmalloc(MemoryStack stack) Returns a newCLMemEXTHostPtrinstance allocated on the specifiedMemoryStack.static intnallocation_type(long struct) Unsafe version ofallocation_type().static voidnallocation_type(long struct, int value) Unsafe version ofallocation_type.static intnhost_cache_policy(long struct) Unsafe version ofhost_cache_policy().static voidnhost_cache_policy(long struct, int value) Unsafe version ofhost_cache_policy.set(int allocation_type, int host_cache_policy) Initializes this struct with the specified values.set(CLMemEXTHostPtr src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).Methods 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. -
ALLOCATION_TYPE
public static final int ALLOCATION_TYPEThe struct member offsets. -
HOST_CACHE_POLICY
public static final int HOST_CACHE_POLICYThe struct member offsets.
-
-
Constructor Details
-
CLMemEXTHostPtr
Creates aCLMemEXTHostPtrinstance 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()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<CLMemEXTHostPtr>
-
allocation_type
public int allocation_type()- Returns:
- the value of the
allocation_typefield.
-
host_cache_policy
public int host_cache_policy()- Returns:
- the value of the
host_cache_policyfield.
-
allocation_type
Sets the specified value to theallocation_typefield. -
host_cache_policy
Sets the specified value to thehost_cache_policyfield. -
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 newCLMemEXTHostPtrinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCLMemEXTHostPtrinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCLMemEXTHostPtrinstance allocated withBufferUtils. -
create
Returns a newCLMemEXTHostPtrinstance for the specified memory address. -
createSafe
-
malloc
Returns a newCLMemEXTHostPtr.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCLMemEXTHostPtr.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCLMemEXTHostPtr.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCLMemEXTHostPtr.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newCLMemEXTHostPtrinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCLMemEXTHostPtrinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newCLMemEXTHostPtr.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newCLMemEXTHostPtr.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nallocation_type
public static int nallocation_type(long struct) Unsafe version ofallocation_type(). -
nhost_cache_policy
public static int nhost_cache_policy(long struct) Unsafe version ofhost_cache_policy(). -
nallocation_type
public static void nallocation_type(long struct, int value) Unsafe version ofallocation_type. -
nhost_cache_policy
public static void nhost_cache_policy(long struct, int value) Unsafe version ofhost_cache_policy.
-