29package com.jogamp.opencl;
31import com.jogamp.common.nio.PointerBuffer;
32import com.jogamp.opencl.impl.CLTLInfoAccessor;
33import com.jogamp.opencl.llb.CL;
34import java.nio.Buffer;
36import static com.jogamp.opencl.llb.CL.*;
52 this(context, directBuffer,
format, createAccessor(context,
id),
width,
height, id, flags);
56 super(context, directBuffer,
getSizeImpl(context,
id),
id, flags);
57 this.imageInfo = accessor;
63 private static CLImageInfoAccessor createAccessor(
final CLContext context,
final long id) {
84 return (
int)imageInfo.
getLong(CL_IMAGE_ELEMENT_SIZE);
91 return (
int)imageInfo.
getLong(CL_IMAGE_ROW_PITCH);
111 private final long id;
119 public int getInfo(
final int name,
final long valueSize,
final Buffer value,
final PointerBuffer valueSizeRet) {
120 return cl.
clGetImageInfo(
id, name, valueSize, value, valueSizeRet);
CLContext is responsible for managing objects such as command-queues, memory, program and kernel obje...
CLPlatform getPlatform()
Returns the CLPlatform this context is running on.
int getInfo(final int name, final long valueSize, final Buffer value, final PointerBuffer valueSizeRet)
CLImageInfoAccessor(final CL cl, final long id)
CLImageFormat getFormat()
Returns the image format descriptor specified when image was created.
static CLImageFormat createUninitializedImageFormat()
CLImage(final CLContext context, final B directBuffer, final CLImageFormat format, final CLImageInfoAccessor accessor, final int width, final int height, final long id, final int flags)
int getElementSize()
Returns the size of each element of the image memory object given by image.
int getWidth()
Returns width of this image in pixels.
int getRowPitch()
Returns the size in bytes of a row of elements of the image object given by image.
int getHeight()
Returns the height of this image in pixels.
CLImage(final CLContext context, final B directBuffer, final CLImageFormat format, final int width, final int height, final long id, final int flags)
Common superclass for all OpenCL memory types.
static long getSizeImpl(final CLContext context, final long id)
Internal utility for common OpenCL clGetFooInfo calls.
final long getLong(final int key)
Returns the long value for the given key.
Java bindings to OpenCL, the Open Computing Language.
int clGetImageInfo(long image, int param_name, long param_value_size, Buffer param_value, PointerBuffer param_value_size_ret)
Interface to C language function: cl_int {@native clGetImageInfo}(cl_mem image, cl_image_info param...