Package org.lwjgl.opencl
Class CLMemEXTHostPtr
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CLMemEXTHostPtr>
org.lwjgl.opencl.CLMemEXTHostPtr
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CLMemEXTHostPtr
extends org.lwjgl.system.Struct<CLMemEXTHostPtr>
implements org.lwjgl.system.NativeResource
Accepted by the
host_ptr argument of CreateBuffer, CreateImage2D and CreateImage3D.
Layout
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
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
ConstructorsConstructorDescriptionCLMemEXTHostPtr(ByteBuffer container) Creates aCLMemEXTHostPtrinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptioninttype of external memory allocation.allocation_type(int value) Sets the specified value to theallocation_type()field.static CLMemEXTHostPtrcalloc()Returns a newCLMemEXTHostPtrinstance allocated withmemCalloc.static CLMemEXTHostPtr.Buffercalloc(int capacity) Returns a newCLMemEXTHostPtr.Bufferinstance allocated withmemCalloc.static CLMemEXTHostPtr.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCLMemEXTHostPtr.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CLMemEXTHostPtrcalloc(org.lwjgl.system.MemoryStack stack) Returns a newCLMemEXTHostPtrinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CLMemEXTHostPtrDeprecated.static CLMemEXTHostPtr.BuffercallocStack(int capacity) Deprecated.static CLMemEXTHostPtr.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static CLMemEXTHostPtrcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.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 for this external memory allocationhost_cache_policy(int value) Sets the specified value to thehost_cache_policy()field.static CLMemEXTHostPtrmalloc()Returns a newCLMemEXTHostPtrinstance allocated withmemAlloc.static CLMemEXTHostPtr.Buffermalloc(int capacity) Returns a newCLMemEXTHostPtr.Bufferinstance allocated withmemAlloc.static CLMemEXTHostPtr.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCLMemEXTHostPtr.Bufferinstance allocated on the specifiedMemoryStack.static CLMemEXTHostPtrmalloc(org.lwjgl.system.MemoryStack stack) Returns a newCLMemEXTHostPtrinstance allocated on the specifiedMemoryStack.static CLMemEXTHostPtrDeprecated.static CLMemEXTHostPtr.BuffermallocStack(int capacity) Deprecated.static CLMemEXTHostPtr.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static CLMemEXTHostPtrmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.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()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. -
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()- Specified by:
sizeofin classorg.lwjgl.system.Struct<CLMemEXTHostPtr>
-
allocation_type
public int allocation_type()type of external memory allocation. Legal values will be defined in layered extensions. -
host_cache_policy
public int host_cache_policy()host cache policy for this external memory allocation -
allocation_type
Sets the specified value to theallocation_type()field. -
host_cache_policy
Sets the specified value to thehost_cache_policy()field. -
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
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static CLMemEXTHostPtr.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static CLMemEXTHostPtr.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
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.
-