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.NativeResourceAccepted by thehost_ptrargument ofCreateBuffer,CreateImage2DandCreateImage3D.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 and Description static classCLMemEXTHostPtr.BufferAn array ofCLMemEXTHostPtrstructs.
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor and Description CLMemEXTHostPtr(java.nio.ByteBuffer container)Creates aCLMemEXTHostPtrinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description intallocation_type()Returns the value of theallocation_typefield.CLMemEXTHostPtrallocation_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 CLMemEXTHostPtrcallocStack()Returns a newCLMemEXTHostPtrinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static CLMemEXTHostPtr.BuffercallocStack(int capacity)Returns a newCLMemEXTHostPtr.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static CLMemEXTHostPtr.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCLMemEXTHostPtr.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CLMemEXTHostPtrcallocStack(org.lwjgl.system.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 CLMemEXTHostPtrcreateSafe(long address)static CLMemEXTHostPtr.BuffercreateSafe(long address, int capacity)inthost_cache_policy()Returns the value of thehost_cache_policyfield.CLMemEXTHostPtrhost_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 CLMemEXTHostPtrmallocStack()Returns a newCLMemEXTHostPtrinstance allocated on the thread-localMemoryStack.static CLMemEXTHostPtr.BuffermallocStack(int capacity)Returns a newCLMemEXTHostPtr.Bufferinstance allocated on the thread-localMemoryStack.static CLMemEXTHostPtr.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCLMemEXTHostPtr.Bufferinstance allocated on the specifiedMemoryStack.static CLMemEXTHostPtrmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newCLMemEXTHostPtrinstance allocated on the specifiedMemoryStack.CLMemEXTHostPtrset(CLMemEXTHostPtr src)Copies the specified struct data to this struct.CLMemEXTHostPtrset(int allocation_type, int host_cache_policy)Initializes this struct with the specified values.intsizeof()
-
-
-
Constructor Detail
-
CLMemEXTHostPtr
public CLMemEXTHostPtr(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
allocation_type
public int allocation_type()
Returns the value of theallocation_typefield.
-
host_cache_policy
public int host_cache_policy()
Returns the value of thehost_cache_policyfield.
-
allocation_type
public CLMemEXTHostPtr allocation_type(int value)
Sets the specified value to theallocation_typefield.
-
host_cache_policy
public CLMemEXTHostPtr host_cache_policy(int value)
Sets the specified value to thehost_cache_policyfield.
-
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 newCLMemEXTHostPtrinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CLMemEXTHostPtr calloc()
Returns a newCLMemEXTHostPtrinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CLMemEXTHostPtr create()
Returns a newCLMemEXTHostPtrinstance allocated withBufferUtils.
-
create
public static CLMemEXTHostPtr create(long address)
Returns a newCLMemEXTHostPtrinstance for the specified memory address.
-
createSafe
@Nullable public static CLMemEXTHostPtr createSafe(long address)
-
malloc
public static CLMemEXTHostPtr.Buffer malloc(int capacity)
Returns a newCLMemEXTHostPtr.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CLMemEXTHostPtr.Buffer calloc(int capacity)
Returns a newCLMemEXTHostPtr.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CLMemEXTHostPtr.Buffer create(int capacity)
Returns a newCLMemEXTHostPtr.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CLMemEXTHostPtr.Buffer create(long address, int capacity)
Create aCLMemEXTHostPtr.Bufferinstance 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 newCLMemEXTHostPtrinstance allocated on the thread-localMemoryStack.
-
callocStack
public static CLMemEXTHostPtr callocStack()
Returns a newCLMemEXTHostPtrinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static CLMemEXTHostPtr mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newCLMemEXTHostPtrinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static CLMemEXTHostPtr callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newCLMemEXTHostPtrinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static CLMemEXTHostPtr.Buffer callocStack(int capacity)
Returns a newCLMemEXTHostPtr.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-