Class CLImageFormat

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class CLImageFormat extends Struct<CLImageFormat> implements NativeResource

 struct cl_image_format {
     cl_channel_order image_channel_order;
     cl_channel_type image_channel_data_type;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • IMAGE_CHANNEL_ORDER

      public static final int IMAGE_CHANNEL_ORDER
      The struct member offsets.
    • IMAGE_CHANNEL_DATA_TYPE

      public static final int IMAGE_CHANNEL_DATA_TYPE
      The struct member offsets.
  • Constructor Details

    • CLImageFormat

      public CLImageFormat(ByteBuffer container)
      Creates a CLImageFormat instance at the current position of the specified ByteBuffer 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
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<CLImageFormat>
    • image_channel_order

      public int image_channel_order()
      Returns:
      the value of the image_channel_order field.
    • image_channel_data_type

      public int image_channel_data_type()
      Returns:
      the value of the image_channel_data_type field.
    • image_channel_order

      public CLImageFormat image_channel_order(int value)
      Sets the specified value to the image_channel_order field.
    • image_channel_data_type

      public CLImageFormat image_channel_data_type(int value)
      Sets the specified value to the image_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 new CLImageFormat instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static CLImageFormat calloc()
      Returns a new CLImageFormat instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static CLImageFormat create()
      Returns a new CLImageFormat instance allocated with BufferUtils.
    • create

      public static CLImageFormat create(long address)
      Returns a new CLImageFormat instance for the specified memory address.
    • createSafe

      public static @Nullable CLImageFormat createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static CLImageFormat.Buffer malloc(int capacity)
      Returns a new CLImageFormat.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static CLImageFormat.Buffer calloc(int capacity)
      Returns a new CLImageFormat.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static CLImageFormat.Buffer create(int capacity)
      Returns a new CLImageFormat.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static CLImageFormat.Buffer create(long address, int capacity)
      Create a CLImageFormat.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable CLImageFormat.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static CLImageFormat malloc(MemoryStack stack)
      Returns a new CLImageFormat instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static CLImageFormat calloc(MemoryStack stack)
      Returns a new CLImageFormat instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static CLImageFormat.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new CLImageFormat.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static CLImageFormat.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new CLImageFormat.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nimage_channel_order

      public static int nimage_channel_order(long struct)
      Unsafe version of image_channel_order().
    • nimage_channel_data_type

      public static int nimage_channel_data_type(long struct)
      Unsafe version of image_channel_data_type().
    • nimage_channel_order

      public static void nimage_channel_order(long struct, int value)
      Unsafe version of image_channel_order.
    • nimage_channel_data_type

      public static void nimage_channel_data_type(long struct, int value)
      Unsafe version of image_channel_data_type.