Uses of Class
org.jocl.Pointer
-
Uses of Pointer in org.jocl
Modifier and TypeFieldDescriptionprivate static Map<WeakReference<ByteBuffer>, Pointer> A map from Weak references to aligned ByteBuffers that have been allocated withCL.allocateAligned(int, int)to pointers that contain the native memory address of the respective buffer.Modifier and TypeMethodDescriptionstatic PointerCL.clSVMAlloc(cl_context context, long flags, long size, int alignment) Allocates a shared virtual memory (SVM) buffer that can be shared by the host and all devices in an OpenCL context that support shared virtual memory.private static PointerCL.clSVMAllocNative(cl_context context, long flags, long size, int alignment) private static PointerPointer.computePointer(ByteBuffer buffer) Creates a new Pointer to the given buffer, taking into account the position and array offset of the given buffer.private static PointerPointer.computePointer(DoubleBuffer buffer) Creates a new Pointer to the given buffer, taking into account the position and array offset of the given buffer.private static PointerPointer.computePointer(FloatBuffer buffer) Creates a new Pointer to the given buffer, taking into account the position and array offset of the given buffer.private static PointerPointer.computePointer(IntBuffer buffer) Creates a new Pointer to the given buffer, taking into account the position and array offset of the given buffer.private static PointerPointer.computePointer(LongBuffer buffer) Creates a new Pointer to the given buffer, taking into account the position and array offset of the given buffer.private static PointerPointer.computePointer(ShortBuffer buffer) Creates a new Pointer to the given buffer, taking into account the position and array offset of the given buffer.static PointerPointer.to(byte[] values) Creates a new Pointer to the given values.static PointerPointer.to(char[] values) Creates a new Pointer to the given values.static PointerPointer.to(double[] values) Creates a new Pointer to the given values.static PointerPointer.to(float[] values) Creates a new Pointer to the given values.static PointerPointer.to(int[] values) Creates a new Pointer to the given values.static PointerPointer.to(long[] values) Creates a new Pointer to the given values.static PointerPointer.to(short[] values) Creates a new Pointer to the given values.static PointerNOTE: This method does not take into account the position and array offset of the given buffer.static PointerPointer.to(NativePointerObject pointer) Creates a new Pointer to the given Pointer.static PointerPointer.to(NativePointerObject... pointers) Creates a new Pointer to the given Pointers.static PointerCreates a new Pointer to the given buffer.
Note that this method takes into account the array offset and position of the given buffer, in contrast to thePointer.to(Buffer)method.Pointer.withByteOffset(long byteOffset) Returns a new pointer with an offset of the given number of bytesModifier and TypeMethodDescriptionprivate static ByteBufferCL.allocateAlignedNative(int size, int alignment, Pointer pointer) static cl_memCL.clCreateBuffer(cl_context context, long flags, long size, Pointer host_ptr, int[] errcode_ret) Creates a buffer object.private static cl_memCL.clCreateBufferNative(cl_context context, long flags, long size, Pointer host_ptr, int[] errcode_ret) static cl_memCL.clCreateImage(cl_context context, long flags, cl_image_format image_format, cl_image_desc image_desc, Pointer host_ptr, int[] errcode_ret) Creates a 1D image, 1D image buffer, 1D image array, 2D image, 2D image array or 3D image object.static cl_memCL.clCreateImage2D(cl_context context, long flags, cl_image_format[] image_format, long image_width, long image_height, long image_row_pitch, Pointer host_ptr, int[] errcode_ret) Deprecated.private static cl_memCL.clCreateImage2DNative(cl_context context, long flags, cl_image_format[] image_format, long image_width, long image_height, long image_row_pitch, Pointer host_ptr, int[] errcode_ret) static cl_memCL.clCreateImage3D(cl_context context, long flags, cl_image_format[] image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, Pointer host_ptr, int[] errcode_ret) Deprecated.As of OpenCL 1.2 and replaced byCL.clCreateImage(cl_context, long, cl_image_format, cl_image_desc, Pointer, int[])private static cl_memCL.clCreateImage3DNative(cl_context context, long flags, cl_image_format[] image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, Pointer host_ptr, int[] errcode_ret) private static cl_memCL.clCreateImageNative(cl_context context, long flags, cl_image_format image_format, cl_image_desc image_desc, Pointer host_ptr, int[] errcode_ret) static cl_memCL.clCreateSubBuffer(cl_mem buffer, long flags, int buffer_create_type, Pointer buffer_create_info, int[] errcode_ret) Deprecated.The buffer_create_info that has to be passed to this function is specific for the underlying architecture (32/64 bit).private static cl_memCL.clCreateSubBufferNative(cl_mem buffer, long flags, int buffer_create_type, Pointer buffer_create_info, int[] errcode_ret) static intCL.clEnqueueFillBuffer(cl_command_queue command_queue, cl_mem buffer, Pointer pattern, long pattern_size, long offset, long size, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) Enqueues a command to fill a buffer object with a pattern of a given pattern size.private static intCL.clEnqueueFillBufferNative(cl_command_queue command_queue, cl_mem buffer, Pointer pattern, long pattern_size, long offset, long size, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) static intCL.clEnqueueFillImage(cl_command_queue command_queue, cl_mem image, Pointer fill_color, long[] origin, long[] region, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) Enqueues a command to fill an image object with a specified color.private static intCL.clEnqueueFillImageNative(cl_command_queue command_queue, cl_mem image, Pointer fill_color, long[] origin, long[] region, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) static intCL.clEnqueueNativeKernel(cl_command_queue command_queue, EnqueueNativeKernelFunction user_func, Object args, long cb_args, int num_mem_objects, cl_mem[] mem_list, Pointer[] args_mem_loc, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) Enqueues a command to execute a native C/C++ function not compiled using the OpenCL compiler.private static intCL.clEnqueueNativeKernelNative(cl_command_queue command_queue, EnqueueNativeKernelFunction user_func, Object args, long cb_args, int num_mem_objects, cl_mem[] mem_list, Pointer[] args_mem_loc, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) static intCL.clEnqueueReadBuffer(cl_command_queue command_queue, cl_mem buffer, boolean blocking_read, long offset, long cb, Pointer ptr, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) Enqueue commands to read from a buffer object to host memory.private static intCL.clEnqueueReadBufferNative(cl_command_queue command_queue, cl_mem buffer, boolean blocking_read, long offset, long cb, Pointer ptr, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) static intCL.clEnqueueReadBufferRect(cl_command_queue command_queue, cl_mem buffer, boolean blocking_read, long[] buffer_offset, long[] host_offset, long[] region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, Pointer ptr, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) Enqueue commands to read from a rectangular region from a buffer object to host memory.private static intCL.clEnqueueReadBufferRectNative(cl_command_queue command_queue, cl_mem buffer, boolean blocking_read, long[] buffer_offset, long[] host_offset, long[] region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, Pointer ptr, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) static intCL.clEnqueueReadImage(cl_command_queue command_queue, cl_mem image, boolean blocking_read, long[] origin, long[] region, long row_pitch, long slice_pitch, Pointer ptr, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) Enqueues a command to read from a 2D or 3D image object to host memory.private static intCL.clEnqueueReadImageNative(cl_command_queue command_queue, cl_mem image, boolean blocking_read, long[] origin, long[] region, long row_pitch, long slice_pitch, Pointer ptr, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) static intCL.clEnqueueSVMFree(cl_command_queue command_queue, int num_svm_pointers, Pointer[] svm_pointers, SVMFreeFunction pfn_free_func, Object user_data, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) Enqueues a command to free the shared virtual memory allocated using clSVMAlloc or a shared system memory pointer.private static intCL.clEnqueueSVMFreeNative(cl_command_queue command_queue, int num_svm_pointers, Pointer[] svm_pointers, SVMFreeFunction pfn_free_func, Object user_data, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) static intCL.clEnqueueSVMMap(cl_command_queue command_queue, boolean blocking_map, long flags, Pointer svm_ptr, long size, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) Enqueues a command that will allow the host to update a region of a SVM buffer.private static intCL.clEnqueueSVMMapNative(cl_command_queue command_queue, boolean blocking_map, long flags, Pointer svm_ptr, long size, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) static intCL.clEnqueueSVMMemcpy(cl_command_queue command_queue, boolean blocking_copy, Pointer dst_ptr, Pointer src_ptr, long size, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) Enqueues a command to do a memcpy operation.private static intCL.clEnqueueSVMMemcpyNative(cl_command_queue command_queue, boolean blocking_copy, Pointer dst_ptr, Pointer src_ptr, long size, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) static intCL.clEnqueueSVMMemFill(cl_command_queue command_queue, Pointer svm_ptr, Pointer pattern, long pattern_size, long size, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) Enqueues a command to fill a region in memory with a pattern of a given pattern size.private static intCL.clEnqueueSVMMemFillNative(cl_command_queue command_queue, Pointer svm_ptr, Pointer pattern, long pattern_size, long size, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) static intCL.clEnqueueSVMUnmap(cl_command_queue command_queue, Pointer svm_ptr, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) Enqueues a command to indicate that the host has completed updating the region given bysvm_ptrand which was specified in a previous call to clEnqueueSVMMap.private static intCL.clEnqueueSVMUnmapNative(cl_command_queue command_queue, Pointer svm_ptr, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) static intCL.clEnqueueWriteBuffer(cl_command_queue command_queue, cl_mem buffer, boolean blocking_write, long offset, long cb, Pointer ptr, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) Enqueue commands to write to a buffer object from host memory.private static intCL.clEnqueueWriteBufferNative(cl_command_queue command_queue, cl_mem buffer, boolean blocking_write, long offset, long cb, Pointer ptr, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) static intCL.clEnqueueWriteBufferRect(cl_command_queue command_queue, cl_mem buffer, boolean blocking_write, long[] buffer_offset, long[] host_offset, long[] region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, Pointer ptr, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) Enqueue commands to write a rectangular region to a buffer object from host memory.private static intCL.clEnqueueWriteBufferRectNative(cl_command_queue command_queue, cl_mem buffer, boolean blocking_write, long[] buffer_offset, long[] host_offset, long[] region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, Pointer ptr, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) static intCL.clEnqueueWriteImage(cl_command_queue command_queue, cl_mem image, boolean blocking_write, long[] origin, long[] region, long input_row_pitch, long input_slice_pitch, Pointer ptr, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) Enqueues a command to write to a 2D or 3D image object from host memory.private static intCL.clEnqueueWriteImageNative(cl_command_queue command_queue, cl_mem image, boolean blocking_write, long[] origin, long[] region, long input_row_pitch, long input_slice_pitch, Pointer ptr, int num_events_in_wait_list, cl_event[] event_wait_list, cl_event event) static intCL.clGetCommandQueueInfo(cl_command_queue command_queue, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Query information about a command-queue.private static intCL.clGetCommandQueueInfoNative(cl_command_queue command_queue, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetContextInfo(cl_context context, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Query information about a context.private static intCL.clGetContextInfoNative(cl_context context, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetDeviceInfo(cl_device_id device, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Get information about an OpenCL device.private static intCL.clGetDeviceInfoNative(cl_device_id device, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetEventInfo(cl_event event, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Returns information about the event object.private static intCL.clGetEventInfoNative(cl_event event, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetEventProfilingInfo(cl_event event, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Returns profiling information for the command associated with event if profiling is enabled.private static intCL.clGetEventProfilingInfoNative(cl_event event, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetGLContextInfoAPPLE(cl_context context, long platform_gl_ctx, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Apple extension for retrieving OpenGL context information for a CL context.private static intCL.clGetGLContextInfoAPPLENative(cl_context context, long platform_gl_ctx, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetGLTextureInfo(cl_mem memobj, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Returns additional information about the GL texture object associated with a memory object.private static intCL.clGetGLTextureInfoNative(cl_mem memobj, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetImageInfo(cl_mem image, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Get information specific to an image object.private static intCL.clGetImageInfoNative(cl_mem image, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetKernelArgInfo(cl_kernel kernel, int arg_indx, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Returns information about the arguments of a kernel.private static intCL.clGetKernelArgInfoNative(cl_kernel kernel, int arg_indx, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetKernelInfo(cl_kernel kernel, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Returns information about the kernel object.private static intCL.clGetKernelInfoNative(cl_kernel kernel, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetKernelWorkGroupInfo(cl_kernel kernel, cl_device_id device, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Returns information about the kernel object that may be specific to a device.private static intCL.clGetKernelWorkGroupInfoNative(cl_kernel kernel, cl_device_id device, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetMemObjectInfo(cl_mem memobj, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Used to get information that is common to all memory objects (buffer and image objects).private static intCL.clGetMemObjectInfoNative(cl_mem memobj, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetPipeInfo(cl_mem pipe, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Get information specific to a pipe object created with clCreatePipe.private static intCL.clGetPipeInfoNative(cl_mem pipe, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetPlatformInfo(cl_platform_id platform, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Get specific information about the OpenCL platform.private static intCL.clGetPlatformInfoNative(cl_platform_id platform, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetProgramBuildInfo(cl_program program, cl_device_id device, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Returns build information for each device in the program object.private static intCL.clGetProgramBuildInfoNative(cl_program program, cl_device_id device, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetProgramInfo(cl_program program, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Returns information about the program object.private static intCL.clGetProgramInfoNative(cl_program program, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clGetSamplerInfo(cl_sampler sampler, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) Returns information about the sampler object.private static intCL.clGetSamplerInfoNative(cl_sampler sampler, int param_name, long param_value_size, Pointer param_value, long[] param_value_size_ret) static intCL.clSetKernelArg(cl_kernel kernel, int arg_index, long arg_size, Pointer arg_value) Used to set the argument value for a specific argument of a kernel.private static intCL.clSetKernelArgNative(cl_kernel kernel, int arg_index, long arg_size, Pointer arg_value) static intCL.clSetKernelArgSVMPointer(cl_kernel kernel, int arg_index, Pointer arg_value) Used to set a SVM pointer as the argument value for a specific argument of a kernel.private static intCL.clSetKernelArgSVMPointerNative(cl_kernel kernel, int arg_index, Pointer arg_value) static intCL.clSetKernelExecInfo(cl_kernel kernel, int param_name, long param_value_size, Pointer param_value) Used to pass additional information other than argument values to a kernel.private static intCL.clSetKernelExecInfoNative(cl_kernel kernel, int param_name, long param_value_size, Pointer param_value) static voidCL.clSVMFree(cl_context context, Pointer svm_pointer) Frees a shared virtual memory buffer allocated using clSVMAlloc.private static voidCL.clSVMFreeNative(cl_context context, Pointer svm_pointer) private static voidCL.freeAlignedNative(Pointer pointer) This method will free the memory of an aligned ByteBuffer which was allocated withCL.allocateAligned(int, int).voidThe function that will be called.voidSVMFreeFunction.function(cl_command_queue queue, int num_svm_pointers, Pointer[] svm_pointers, Object user_data) The function that will be calledprivate static voidCL.validateHostPointerFlags(long flags, Pointer pointer)
CL.clCreateImage(cl_context, long, cl_image_format, cl_image_desc, Pointer, int[])