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.NativeResourceThe 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_typeandimage_channel_ordermust 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 and Description static classCLImageFormat.BufferAn array ofCLImageFormatstructs.
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor and Description CLImageFormat(java.nio.ByteBuffer container)Creates aCLImageFormatinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static CLImageFormatcalloc()Returns a newCLImageFormatinstance allocated withmemCalloc.static CLImageFormat.Buffercalloc(int capacity)Returns a newCLImageFormat.Bufferinstance allocated withmemCalloc.static CLImageFormatcallocStack()Returns a newCLImageFormatinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static CLImageFormat.BuffercallocStack(int capacity)Returns a newCLImageFormat.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static CLImageFormat.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCLImageFormat.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CLImageFormatcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newCLImageFormatinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CLImageFormatcreate()Returns a newCLImageFormatinstance allocated withBufferUtils.static CLImageFormat.Buffercreate(int capacity)Returns a newCLImageFormat.Bufferinstance allocated withBufferUtils.static CLImageFormatcreate(long address)Returns a newCLImageFormatinstance for the specified memory address.static CLImageFormat.Buffercreate(long address, int capacity)Create aCLImageFormat.Bufferinstance at the specified memory.static CLImageFormatcreateSafe(long address)static CLImageFormat.BuffercreateSafe(long address, int capacity)intimage_channel_data_type()Returns the value of theimage_channel_data_typefield.CLImageFormatimage_channel_data_type(int value)Sets the specified value to theimage_channel_data_typefield.intimage_channel_order()Returns the value of theimage_channel_orderfield.CLImageFormatimage_channel_order(int value)Sets the specified value to theimage_channel_orderfield.static CLImageFormatmalloc()Returns a newCLImageFormatinstance allocated withmemAlloc.static CLImageFormat.Buffermalloc(int capacity)Returns a newCLImageFormat.Bufferinstance allocated withmemAlloc.static CLImageFormatmallocStack()Returns a newCLImageFormatinstance allocated on the thread-localMemoryStack.static CLImageFormat.BuffermallocStack(int capacity)Returns a newCLImageFormat.Bufferinstance allocated on the thread-localMemoryStack.static CLImageFormat.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCLImageFormat.Bufferinstance allocated on the specifiedMemoryStack.static CLImageFormatmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newCLImageFormatinstance allocated on the specifiedMemoryStack.CLImageFormatset(CLImageFormat src)Copies the specified struct data to this struct.CLImageFormatset(int image_channel_order, int image_channel_data_type)Initializes this struct with the specified values.intsizeof()
-
-
-
Constructor Detail
-
CLImageFormat
public CLImageFormat(java.nio.ByteBuffer container)
Creates aCLImageFormatinstance 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
-
image_channel_order
public int image_channel_order()
Returns the value of theimage_channel_orderfield.
-
image_channel_data_type
public int image_channel_data_type()
Returns the value of theimage_channel_data_typefield.
-
image_channel_order
public CLImageFormat image_channel_order(int value)
Sets the specified value to theimage_channel_orderfield.
-
image_channel_data_type
public CLImageFormat image_channel_data_type(int value)
Sets the specified value to theimage_channel_data_typefield.
-
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 newCLImageFormatinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CLImageFormat calloc()
Returns a newCLImageFormatinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CLImageFormat create()
Returns a newCLImageFormatinstance allocated withBufferUtils.
-
create
public static CLImageFormat create(long address)
Returns a newCLImageFormatinstance for the specified memory address.
-
createSafe
@Nullable public static CLImageFormat createSafe(long address)
-
malloc
public static CLImageFormat.Buffer malloc(int capacity)
Returns a newCLImageFormat.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CLImageFormat.Buffer calloc(int capacity)
Returns a newCLImageFormat.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CLImageFormat.Buffer create(int capacity)
Returns a newCLImageFormat.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CLImageFormat.Buffer create(long address, int capacity)
Create aCLImageFormat.Bufferinstance 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 newCLImageFormatinstance allocated on the thread-localMemoryStack.
-
callocStack
public static CLImageFormat callocStack()
Returns a newCLImageFormatinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static CLImageFormat mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newCLImageFormatinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static CLImageFormat callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newCLImageFormatinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static CLImageFormat.Buffer callocStack(int capacity)
Returns a newCLImageFormat.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-