Exemple #1
0
 public static int clEnqueueWriteBufferRect(
     CLCommandQueue command_queue,
     CLMem buffer,
     int blocking_write,
     PointerBuffer buffer_offset,
     PointerBuffer host_offset,
     PointerBuffer region,
     long buffer_row_pitch,
     long buffer_slice_pitch,
     long host_row_pitch,
     long host_slice_pitch,
     ShortBuffer ptr,
     PointerBuffer event_wait_list,
     PointerBuffer event) {
   long function_pointer = CLCapabilities.clEnqueueWriteBufferRect;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkBuffer(buffer_offset, 3);
   BufferChecks.checkBuffer(host_offset, 3);
   BufferChecks.checkBuffer(region, 3);
   BufferChecks.checkBuffer(
       ptr,
       CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch));
   if (event_wait_list != null) BufferChecks.checkDirect(event_wait_list);
   if (event != null) BufferChecks.checkBuffer(event, 1);
   int __result =
       nclEnqueueWriteBufferRect(
           command_queue.getPointer(),
           buffer.getPointer(),
           blocking_write,
           MemoryUtil.getAddress(buffer_offset),
           MemoryUtil.getAddress(host_offset),
           MemoryUtil.getAddress(region),
           buffer_row_pitch,
           buffer_slice_pitch,
           host_row_pitch,
           host_slice_pitch,
           MemoryUtil.getAddress(ptr),
           (event_wait_list == null ? 0 : event_wait_list.remaining()),
           MemoryUtil.getAddressSafe(event_wait_list),
           MemoryUtil.getAddressSafe(event),
           function_pointer);
   if (__result == CL10.CL_SUCCESS) command_queue.registerCLEvent(event);
   return __result;
 }
Exemple #2
0
 public static int clEnqueueCopyBufferRect(
     CLCommandQueue command_queue,
     CLMem src_buffer,
     CLMem dst_buffer,
     PointerBuffer src_origin,
     PointerBuffer dst_origin,
     PointerBuffer region,
     long src_row_pitch,
     long src_slice_pitch,
     long dst_row_pitch,
     long dst_slice_pitch,
     PointerBuffer event_wait_list,
     PointerBuffer event) {
   long function_pointer = CLCapabilities.clEnqueueCopyBufferRect;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkBuffer(src_origin, 3);
   BufferChecks.checkBuffer(dst_origin, 3);
   BufferChecks.checkBuffer(region, 3);
   if (event_wait_list != null) BufferChecks.checkDirect(event_wait_list);
   if (event != null) BufferChecks.checkBuffer(event, 1);
   int __result =
       nclEnqueueCopyBufferRect(
           command_queue.getPointer(),
           src_buffer.getPointer(),
           dst_buffer.getPointer(),
           MemoryUtil.getAddress(src_origin),
           MemoryUtil.getAddress(dst_origin),
           MemoryUtil.getAddress(region),
           src_row_pitch,
           src_slice_pitch,
           dst_row_pitch,
           dst_slice_pitch,
           (event_wait_list == null ? 0 : event_wait_list.remaining()),
           MemoryUtil.getAddressSafe(event_wait_list),
           MemoryUtil.getAddressSafe(event),
           function_pointer);
   if (__result == CL10.CL_SUCCESS) command_queue.registerCLEvent(event);
   return __result;
 }