Package org.lwjgl.opencl
Class CLMemEXTHostPtr
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.opencl.CLMemEXTHostPtr
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class CLMemEXTHostPtr extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Accepted by thehost_ptr
argument ofCreateBuffer
,CreateImage2D
andCreateImage3D
.Member documentation
allocation_type
– type of external memory allocation. Legal values will be defined in layered extensions.host_cache_policy
– host cache policy for this external memory allocation
Layout
struct cl_mem_ext_host_ptr { cl_uint allocation_type; cl_uint host_cache_policy; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CLMemEXTHostPtr.Buffer
An array ofCLMemEXTHostPtr
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
ALLOCATION_TYPE
HOST_CACHE_POLICYThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description CLMemEXTHostPtr(java.nio.ByteBuffer container)
Creates aCLMemEXTHostPtr
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
allocation_type()
Returns the value of theallocation_type
field.CLMemEXTHostPtr
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
callocStack()
Returns a newCLMemEXTHostPtr
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static CLMemEXTHostPtr.Buffer
callocStack(int capacity)
Returns a newCLMemEXTHostPtr.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static CLMemEXTHostPtr.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCLMemEXTHostPtr.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static CLMemEXTHostPtr
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newCLMemEXTHostPtr
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.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 CLMemEXTHostPtr
createSafe(long address)
static CLMemEXTHostPtr.Buffer
createSafe(long address, int capacity)
int
host_cache_policy()
Returns the value of thehost_cache_policy
field.CLMemEXTHostPtr
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
mallocStack()
Returns a newCLMemEXTHostPtr
instance allocated on the thread-localMemoryStack
.static CLMemEXTHostPtr.Buffer
mallocStack(int capacity)
Returns a newCLMemEXTHostPtr.Buffer
instance allocated on the thread-localMemoryStack
.static CLMemEXTHostPtr.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCLMemEXTHostPtr.Buffer
instance allocated on the specifiedMemoryStack
.static CLMemEXTHostPtr
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newCLMemEXTHostPtr
instance allocated on the specifiedMemoryStack
.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
.CLMemEXTHostPtr
set(int allocation_type, int host_cache_policy)
Initializes this struct with the specified values.CLMemEXTHostPtr
set(CLMemEXTHostPtr src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
CLMemEXTHostPtr
public CLMemEXTHostPtr(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
allocation_type
public int allocation_type()
Returns the value of theallocation_type
field.
-
host_cache_policy
public int host_cache_policy()
Returns the value of thehost_cache_policy
field.
-
allocation_type
public CLMemEXTHostPtr allocation_type(int value)
Sets the specified value to theallocation_type
field.
-
host_cache_policy
public CLMemEXTHostPtr host_cache_policy(int value)
Sets the specified value to thehost_cache_policy
field.
-
set
public CLMemEXTHostPtr set(int allocation_type, int host_cache_policy)
Initializes this struct with the specified values.
-
set
public CLMemEXTHostPtr set(CLMemEXTHostPtr src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static CLMemEXTHostPtr malloc()
Returns a newCLMemEXTHostPtr
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static CLMemEXTHostPtr calloc()
Returns a newCLMemEXTHostPtr
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static CLMemEXTHostPtr create()
Returns a newCLMemEXTHostPtr
instance allocated withBufferUtils
.
-
create
public static CLMemEXTHostPtr create(long address)
Returns a newCLMemEXTHostPtr
instance for the specified memory address.
-
createSafe
@Nullable public static CLMemEXTHostPtr createSafe(long address)
-
malloc
public static CLMemEXTHostPtr.Buffer malloc(int capacity)
Returns a newCLMemEXTHostPtr.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static CLMemEXTHostPtr.Buffer calloc(int capacity)
Returns a newCLMemEXTHostPtr.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static CLMemEXTHostPtr.Buffer create(int capacity)
Returns a newCLMemEXTHostPtr.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static CLMemEXTHostPtr.Buffer create(long address, int capacity)
Create aCLMemEXTHostPtr.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static CLMemEXTHostPtr.Buffer createSafe(long address, int capacity)
-
mallocStack
public static CLMemEXTHostPtr mallocStack()
Returns a newCLMemEXTHostPtr
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static CLMemEXTHostPtr callocStack()
Returns a newCLMemEXTHostPtr
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static CLMemEXTHostPtr mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newCLMemEXTHostPtr
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static CLMemEXTHostPtr callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newCLMemEXTHostPtr
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static CLMemEXTHostPtr.Buffer mallocStack(int capacity)
Returns a newCLMemEXTHostPtr.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static CLMemEXTHostPtr.Buffer callocStack(int capacity)
Returns a newCLMemEXTHostPtr.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static CLMemEXTHostPtr.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCLMemEXTHostPtr.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static CLMemEXTHostPtr.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCLMemEXTHostPtr.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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
.
-
-