Class CLImageDesc

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • IMAGE_TYPE, IMAGE_WIDTH, IMAGE_HEIGHT, IMAGE_DEPTH, IMAGE_ARRAY_SIZE, IMAGE_ROW_PITCH, IMAGE_SLICE_PITCH, NUM_MIP_LEVELS, NUM_SAMPLES, BUFFER, MEM_OBJECT

        The struct member offsets.
    • Constructor Detail

      • CLImageDesc

        public CLImageDesc​(java.nio.ByteBuffer container)
        Creates a CLImageDesc 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()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • image_type

        public int image_type()
        describes the image type
      • image_height

        public long image_height()
        the height of the image in pixels. This is only used if the image is a 2D, 3D or 2D image array. For a 2D image or image array, the image height must be ≤ DEVICE_IMAGE2D_MAX_HEIGHT. For a 3D image, the image height must be ≤ DEVICE_IMAGE3D_MAX_HEIGHT.
      • image_depth

        public long image_depth()
        the depth of the image in pixels. This is only used if the image is a 3D image and must be a value ≥ 1 and ≤ DEVICE_IMAGE3D_MAX_DEPTH.
      • image_array_size

        public long image_array_size()
        the number of images in the image array. This is only used if the image is a 1D or 2D image array. The values for image_array_size, if specified, must be a value ≥ 1 and ≤ DEVICE_IMAGE_MAX_ARRAY_SIZE.

        Note that reading and writing 2D image arrays from a kernel with image_array_size = 1 may be lower performance than 2D images.

      • image_row_pitch

        public long image_row_pitch()
        the scan-line pitch in bytes. This must be 0 if host_ptr is NULL and can be either 0 or ≥ image_width * size of element in bytes if host_ptr is not NULL. If host_ptr is not NULL and image_row_pitch = 0, image_row_pitch is calculated as image_width * size of element in bytes. If image_row_pitch is not 0, it must be a multiple of the image element size in bytes.
      • image_slice_pitch

        public long image_slice_pitch()
        the size in bytes of each 2D slice in the 3D image or the size in bytes of each image in a 1D or 2D image array. This must be 0 if host_ptr is NULL. If host_ptr is not NULL, image_slice_pitch can be either 0 or ≥ image_row_pitch * image_height for a 2D image array or 3D image and can be either 0 or ≥ image_row_pitch for a 1D image array. If host_ptr is not NULL and image_slice_pitch = 0, image_slice_pitch is calculated as image_row_pitch * image_height for a 2D image array or 3D image and image_row_pitch for a 1D image array. If image_slice_pitch is not 0, it must be a multiple of the image_row_pitch.
      • num_mip_levels, num_samples

        public int num_mip_levels()
        
        public int num_samples()
        
        must be 0
      • buffer

        public long buffer()
        alias for mem_object
      • mem_object

        public long mem_object()
        refers to a valid buffer or image memory object.

        mem_object can be a buffer memory object if image_type is MEM_OBJECT_IMAGE1D_BUFFER or MEM_OBJECT_IMAGE2D. mem_object can be an image object if image_type is MEM_OBJECT_IMAGE2D. Otherwise it must be NULL. The image pixels are taken from the memory object’s data store. When the contents of the specified memory object’s data store are modified, those changes are reflected in the contents of the image object and vice-versa at corresponding sychronization points. For a 1D image buffer object, the image_width * size of element in bytes must be ≤ size of buffer object data store. For a 2D image created from a buffer, the image_row_pitch * image_height must be ≤ size of buffer object data store. For an image object created from another image object, the values specified in the image descriptor except for mem_object must match the image descriptor information associated with mem_object.

      • buffer

        public CLImageDesc buffer​(long value)
        Sets the specified value to the buffer() field.
      • set

        public CLImageDesc set​(CLImageDesc src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

        public static CLImageDesc malloc()
        Returns a new CLImageDesc instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

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

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

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

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

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

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

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

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

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

        @Deprecated
        public static CLImageDesc mallocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
      • callocStack

        @Deprecated
        public static CLImageDesc callocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
      • mallocStack

        @Deprecated
        public static CLImageDesc.Buffer mallocStack​(int capacity,
                                                     org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
      • callocStack

        @Deprecated
        public static CLImageDesc.Buffer callocStack​(int capacity,
                                                     org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
      • malloc

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

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

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

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

        public static int nimage_type​(long struct)
        Unsafe version of image_type().
      • nimage_width

        public static long nimage_width​(long struct)
        Unsafe version of image_width().
      • nimage_height

        public static long nimage_height​(long struct)
        Unsafe version of image_height().
      • nimage_depth

        public static long nimage_depth​(long struct)
        Unsafe version of image_depth().
      • nimage_array_size

        public static long nimage_array_size​(long struct)
        Unsafe version of image_array_size().
      • nimage_row_pitch

        public static long nimage_row_pitch​(long struct)
        Unsafe version of image_row_pitch().
      • nimage_slice_pitch

        public static long nimage_slice_pitch​(long struct)
        Unsafe version of image_slice_pitch().
      • nnum_mip_levels

        public static int nnum_mip_levels​(long struct)
        Unsafe version of num_mip_levels().
      • nnum_samples

        public static int nnum_samples​(long struct)
        Unsafe version of num_samples().
      • nbuffer

        public static long nbuffer​(long struct)
        Unsafe version of buffer().
      • nmem_object

        public static long nmem_object​(long struct)
        Unsafe version of mem_object().
      • nimage_type

        public static void nimage_type​(long struct,
                                       int value)
        Unsafe version of image_type.
      • nimage_width

        public static void nimage_width​(long struct,
                                        long value)
        Unsafe version of image_width.
      • nimage_height

        public static void nimage_height​(long struct,
                                         long value)
        Unsafe version of image_height.
      • nimage_depth

        public static void nimage_depth​(long struct,
                                        long value)
        Unsafe version of image_depth.
      • nimage_array_size

        public static void nimage_array_size​(long struct,
                                             long value)
        Unsafe version of image_array_size.
      • nimage_row_pitch

        public static void nimage_row_pitch​(long struct,
                                            long value)
        Unsafe version of image_row_pitch.
      • nimage_slice_pitch

        public static void nimage_slice_pitch​(long struct,
                                              long value)
        Unsafe version of image_slice_pitch.
      • nnum_mip_levels

        public static void nnum_mip_levels​(long struct,
                                           int value)
        Unsafe version of num_mip_levels.
      • nnum_samples

        public static void nnum_samples​(long struct,
                                        int value)
        Unsafe version of num_samples.
      • nbuffer

        public static void nbuffer​(long struct,
                                   long value)
        Unsafe version of buffer.
      • nmem_object

        public static void nmem_object​(long struct,
                                       long value)
        Unsafe version of mem_object.