Package org.lwjgl.opencl
Class CLImageFormat
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.opencl.CLImageFormat
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class CLImageFormat extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
The image format descriptor struct.Member documentation
image_channel_order
– specifies the number of channels and the channel layout i.e. the memory layout in which channels are stored in the imageimage_channel_data_type
– describes the size of the channel data type. The number of bits per element determined by theimage_channel_data_type
andimage_channel_order
must be a power of two.
Layout
struct cl_image_format { cl_channel_order image_channel_order; cl_channel_type image_channel_data_type; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CLImageFormat.Buffer
An array ofCLImageFormat
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
IMAGE_CHANNEL_DATA_TYPE
IMAGE_CHANNEL_ORDERThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description CLImageFormat(java.nio.ByteBuffer container)
Creates aCLImageFormat
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CLImageFormat
calloc()
Returns a newCLImageFormat
instance allocated withmemCalloc
.static CLImageFormat.Buffer
calloc(int capacity)
Returns a newCLImageFormat.Buffer
instance allocated withmemCalloc
.static CLImageFormat
callocStack()
Returns a newCLImageFormat
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static CLImageFormat.Buffer
callocStack(int capacity)
Returns a newCLImageFormat.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static CLImageFormat.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCLImageFormat.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static CLImageFormat
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newCLImageFormat
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static CLImageFormat
create()
Returns a newCLImageFormat
instance allocated withBufferUtils
.static CLImageFormat.Buffer
create(int capacity)
Returns a newCLImageFormat.Buffer
instance allocated withBufferUtils
.static CLImageFormat
create(long address)
Returns a newCLImageFormat
instance for the specified memory address.static CLImageFormat.Buffer
create(long address, int capacity)
Create aCLImageFormat.Buffer
instance at the specified memory.static CLImageFormat
createSafe(long address)
static CLImageFormat.Buffer
createSafe(long address, int capacity)
int
image_channel_data_type()
Returns the value of theimage_channel_data_type
field.CLImageFormat
image_channel_data_type(int value)
Sets the specified value to theimage_channel_data_type
field.int
image_channel_order()
Returns the value of theimage_channel_order
field.CLImageFormat
image_channel_order(int value)
Sets the specified value to theimage_channel_order
field.static CLImageFormat
malloc()
Returns a newCLImageFormat
instance allocated withmemAlloc
.static CLImageFormat.Buffer
malloc(int capacity)
Returns a newCLImageFormat.Buffer
instance allocated withmemAlloc
.static CLImageFormat
mallocStack()
Returns a newCLImageFormat
instance allocated on the thread-localMemoryStack
.static CLImageFormat.Buffer
mallocStack(int capacity)
Returns a newCLImageFormat.Buffer
instance allocated on the thread-localMemoryStack
.static CLImageFormat.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCLImageFormat.Buffer
instance allocated on the specifiedMemoryStack
.static CLImageFormat
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newCLImageFormat
instance allocated on the specifiedMemoryStack
.static int
nimage_channel_data_type(long struct)
Unsafe version ofimage_channel_data_type()
.static void
nimage_channel_data_type(long struct, int value)
Unsafe version ofimage_channel_data_type
.static int
nimage_channel_order(long struct)
Unsafe version ofimage_channel_order()
.static void
nimage_channel_order(long struct, int value)
Unsafe version ofimage_channel_order
.CLImageFormat
set(int image_channel_order, int image_channel_data_type)
Initializes this struct with the specified values.CLImageFormat
set(CLImageFormat src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
CLImageFormat
public CLImageFormat(java.nio.ByteBuffer container)
Creates aCLImageFormat
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
-
image_channel_order
public int image_channel_order()
Returns the value of theimage_channel_order
field.
-
image_channel_data_type
public int image_channel_data_type()
Returns the value of theimage_channel_data_type
field.
-
image_channel_order
public CLImageFormat image_channel_order(int value)
Sets the specified value to theimage_channel_order
field.
-
image_channel_data_type
public CLImageFormat image_channel_data_type(int value)
Sets the specified value to theimage_channel_data_type
field.
-
set
public CLImageFormat set(int image_channel_order, int image_channel_data_type)
Initializes this struct with the specified values.
-
set
public CLImageFormat set(CLImageFormat src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static CLImageFormat malloc()
Returns a newCLImageFormat
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static CLImageFormat calloc()
Returns a newCLImageFormat
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static CLImageFormat create()
Returns a newCLImageFormat
instance allocated withBufferUtils
.
-
create
public static CLImageFormat create(long address)
Returns a newCLImageFormat
instance for the specified memory address.
-
createSafe
@Nullable public static CLImageFormat createSafe(long address)
-
malloc
public static CLImageFormat.Buffer malloc(int capacity)
Returns a newCLImageFormat.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static CLImageFormat.Buffer calloc(int capacity)
Returns a newCLImageFormat.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static CLImageFormat.Buffer create(int capacity)
Returns a newCLImageFormat.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static CLImageFormat.Buffer create(long address, int capacity)
Create aCLImageFormat.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static CLImageFormat.Buffer createSafe(long address, int capacity)
-
mallocStack
public static CLImageFormat mallocStack()
Returns a newCLImageFormat
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static CLImageFormat callocStack()
Returns a newCLImageFormat
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static CLImageFormat mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newCLImageFormat
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static CLImageFormat callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newCLImageFormat
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static CLImageFormat.Buffer mallocStack(int capacity)
Returns a newCLImageFormat.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static CLImageFormat.Buffer callocStack(int capacity)
Returns a newCLImageFormat.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static CLImageFormat.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCLImageFormat.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static CLImageFormat.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCLImageFormat.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nimage_channel_order
public static int nimage_channel_order(long struct)
Unsafe version ofimage_channel_order()
.
-
nimage_channel_data_type
public static int nimage_channel_data_type(long struct)
Unsafe version ofimage_channel_data_type()
.
-
nimage_channel_order
public static void nimage_channel_order(long struct, int value)
Unsafe version ofimage_channel_order
.
-
nimage_channel_data_type
public static void nimage_channel_data_type(long struct, int value)
Unsafe version ofimage_channel_data_type
.
-
-