Class CLImageFormat

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class CLImageFormat
    extends Struct
    implements 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 image
    • image_channel_data_type – describes the size of the channel data type. The number of bits per element determined by the image_channel_data_type and image_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;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • IMAGE_CHANNEL_ORDER, IMAGE_CHANNEL_DATA_TYPE

        The struct member offsets.
    • Constructor Detail

      • CLImageFormat

        public CLImageFormat​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • 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
      • create

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

        @Nullable
        public static CLImageFormat createSafe​(long address)
        Like create, but returns null if address is NULL.
      • 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

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

        public static CLImageFormat callocStack​(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
      • 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.