29package com.jogamp.opencl;
31import com.jogamp.common.nio.Buffers;
32import com.jogamp.opencl.llb.CL;
33import java.nio.Buffer;
34import java.nio.IntBuffer;
36import static com.jogamp.opencl.llb.CL.*;
37import static com.jogamp.opencl.CLException.*;
62 final IntBuffer err = Buffers.newDirectIntBuffer(1);
64 if(isHostPointerFlag(flags)) {
65 host_ptr = directBuffer;
68 checkForError(err.get(),
"can not create 2d image");
74 public <T extends Buffer> CLImage3d<T> cloneWith(
final T directBuffer) {
82 return (
int)imageInfo.
getLong(CL_IMAGE_SLICE_PITCH);
94 return "CLImage3d [id: " + ID+
" width: "+
width+
" height: "+
height+
" depth: "+
depth+
"]";
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 getSlicePitch()
Returns the size in bytes of a 2D slice of this 3D image.
int getDepth()
Returns the depth of this image in pixels.
CLImage3d(final CLContext context, final B directBuffer, final CLImageFormat format, final CLImageInfoAccessor accessor, final int width, final int height, final int depth, final long id, final int flags)
final long ID
The OpenCL object handle.
final long getLong(final int key)
Returns the long value for the given key.
Java bindings to OpenCL, the Open Computing Language.
long clCreateImage3D(long context, long flags, CLImageFormatImpl image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, Buffer host_ptr, IntBuffer errcode_ret)
Interface to C language function: cl_mem {@native clCreateImage3D}(cl_context context,...