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.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The 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 aCLMemEXTHostPtr
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionint
allocation_type
(int value) Sets the specified value to theallocation_type
field.static CLMemEXTHostPtr
calloc()
Returns a newCLMemEXTHostPtr
instance allocated withmemCalloc
.static CLMemEXTHostPtr.Buffer
calloc
(int capacity) Returns a newCLMemEXTHostPtr.Buffer
instance allocated withmemCalloc
.static CLMemEXTHostPtr.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newCLMemEXTHostPtr.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static CLMemEXTHostPtr
calloc
(MemoryStack stack) Returns a newCLMemEXTHostPtr
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static CLMemEXTHostPtr
Deprecated.static CLMemEXTHostPtr.Buffer
callocStack
(int capacity) Deprecated.static CLMemEXTHostPtr.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static CLMemEXTHostPtr
callocStack
(MemoryStack stack) Deprecated.static CLMemEXTHostPtr
create()
Returns a newCLMemEXTHostPtr
instance allocated withBufferUtils
.static CLMemEXTHostPtr.Buffer
create
(int capacity) Returns a newCLMemEXTHostPtr.Buffer
instance allocated withBufferUtils
.static CLMemEXTHostPtr
create
(long address) Returns a newCLMemEXTHostPtr
instance for the specified memory address.static CLMemEXTHostPtr.Buffer
create
(long address, int capacity) Create aCLMemEXTHostPtr.Buffer
instance at the specified memory.static @Nullable CLMemEXTHostPtr
createSafe
(long address) static @Nullable CLMemEXTHostPtr.Buffer
createSafe
(long address, int capacity) int
host_cache_policy
(int value) Sets the specified value to thehost_cache_policy
field.static CLMemEXTHostPtr
malloc()
Returns a newCLMemEXTHostPtr
instance allocated withmemAlloc
.static CLMemEXTHostPtr.Buffer
malloc
(int capacity) Returns a newCLMemEXTHostPtr.Buffer
instance allocated withmemAlloc
.static CLMemEXTHostPtr.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newCLMemEXTHostPtr.Buffer
instance allocated on the specifiedMemoryStack
.static CLMemEXTHostPtr
malloc
(MemoryStack stack) Returns a newCLMemEXTHostPtr
instance allocated on the specifiedMemoryStack
.static CLMemEXTHostPtr
Deprecated.static CLMemEXTHostPtr.Buffer
mallocStack
(int capacity) Deprecated.static CLMemEXTHostPtr.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static CLMemEXTHostPtr
mallocStack
(MemoryStack stack) Deprecated.static int
nallocation_type
(long struct) Unsafe version ofallocation_type()
.static void
nallocation_type
(long struct, int value) Unsafe version ofallocation_type
.static int
nhost_cache_policy
(long struct) Unsafe version ofhost_cache_policy()
.static void
nhost_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.int
sizeof()
Returnssizeof(struct)
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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 aCLMemEXTHostPtr
instance at the current position of the specifiedByteBuffer
container. 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:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<CLMemEXTHostPtr>
-
allocation_type
public int allocation_type()- Returns:
- the value of the
allocation_type
field.
-
host_cache_policy
public int host_cache_policy()- Returns:
- the value of the
host_cache_policy
field.
-
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 newCLMemEXTHostPtr
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newCLMemEXTHostPtr
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newCLMemEXTHostPtr
instance allocated withBufferUtils
. -
create
Returns a newCLMemEXTHostPtr
instance for the specified memory address. -
createSafe
-
malloc
Returns a newCLMemEXTHostPtr.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newCLMemEXTHostPtr.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newCLMemEXTHostPtr.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aCLMemEXTHostPtr.Buffer
instance 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.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newCLMemEXTHostPtr
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newCLMemEXTHostPtr
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newCLMemEXTHostPtr.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newCLMemEXTHostPtr.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-