Compute Library
 22.11
OpenCL.cpp File Reference
#include "arm_compute/core/CL/OpenCL.h"
#include "arm_compute/core/Error.h"
#include <dlfcn.h>
#include <iostream>

Go to the source code of this file.

Namespaces

 arm_compute
 Copyright (c) 2017-2022 Arm Limited.
 

Macros

#define LOAD_FUNCTION_PTR(func_name, handle)   func_name##_ptr = reinterpret_cast<decltype(func_name) *>(dlsym(handle, #func_name));
 

Functions

bool opencl_is_available ()
 Check if OpenCL is available. More...
 
cl_int clEnqueueMarker (cl_command_queue command_queue, cl_event *event)
 
cl_int clWaitForEvents (cl_uint num_events, const cl_event *event_list)
 
cl_int clEnqueueSVMMap (cl_command_queue command_queue, cl_bool blocking_map, cl_map_flags flags, void *svm_ptr, size_t size, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event)
 
cl_int clEnqueueSVMUnmap (cl_command_queue command_queue, void *svm_ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event)
 
void * clSVMAlloc (cl_context context, cl_svm_mem_flags_arm flags, size_t size, cl_uint alignment)
 
void clSVMFree (cl_context context, void *svm_pointer)
 
cl_int clGetContextInfo (cl_context context, cl_context_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
 
cl_command_queue clCreateCommandQueue (cl_context context, cl_device_id device, cl_command_queue_properties properties, cl_int *errcode_ret)
 
cl_command_queue clCreateCommandQueueWithProperties (cl_context context, cl_device_id device, const cl_queue_properties *properties, cl_int *errcode_ret)
 
cl_context clCreateContext (const cl_context_properties *properties, cl_uint num_devices, const cl_device_id *devices, void(*pfn_notify)(const char *, const void *, size_t, void *), void *user_data, cl_int *errcode_ret)
 
cl_context clCreateContextFromType (const cl_context_properties *properties, cl_device_type device_type, void(*pfn_notify)(const char *, const void *, size_t, void *), void *user_data, cl_int *errcode_ret)
 
cl_int clBuildProgram (cl_program program, cl_uint num_devices, const cl_device_id *device_list, const char *options, void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data), void *user_data)
 
cl_int clEnqueueNDRangeKernel (cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, const size_t *global_work_offset, const size_t *global_work_size, const size_t *local_work_size, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event)
 
cl_int clSetKernelArg (cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void *arg_value)
 
cl_int clRetainMemObject (cl_mem memobj)
 
cl_int clReleaseMemObject (cl_mem memobj)
 
cl_int clEnqueueUnmapMemObject (cl_command_queue command_queue, cl_mem memobj, void *mapped_ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event)
 
cl_int clRetainCommandQueue (cl_command_queue command_queue)
 
cl_int clReleaseContext (cl_context context)
 
cl_int clReleaseEvent (cl_event event)
 
cl_int clEnqueueWriteBuffer (cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, size_t offset, size_t size, const void *ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event)
 
cl_int clEnqueueReadBuffer (cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, size_t offset, size_t size, void *ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event)
 
cl_int clGetProgramBuildInfo (cl_program program, cl_device_id device, cl_program_build_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
 
cl_int clRetainProgram (cl_program program)
 
void * clEnqueueMapBuffer (cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map, cl_map_flags map_flags, size_t offset, size_t size, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event, cl_int *errcode_ret)
 
cl_int clReleaseCommandQueue (cl_command_queue command_queue)
 
cl_program clCreateProgramWithBinary (cl_context context, cl_uint num_devices, const cl_device_id *device_list, const size_t *lengths, const unsigned char **binaries, cl_int *binary_status, cl_int *errcode_ret)
 
cl_int clRetainContext (cl_context context)
 
cl_int clReleaseProgram (cl_program program)
 
cl_int clFlush (cl_command_queue command_queue)
 
cl_int clFinish (cl_command_queue command_queue)
 
cl_int clGetProgramInfo (cl_program program, cl_program_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
 
cl_kernel clCreateKernel (cl_program program, const char *kernel_name, cl_int *errcode_ret)
 
cl_int clRetainKernel (cl_kernel kernel)
 
cl_mem clCreateBuffer (cl_context context, cl_mem_flags flags, size_t size, void *host_ptr, cl_int *errcode_ret)
 
cl_program clCreateProgramWithSource (cl_context context, cl_uint count, const char **strings, const size_t *lengths, cl_int *errcode_ret)
 
cl_int clReleaseKernel (cl_kernel kernel)
 
cl_int clGetDeviceIDs (cl_platform_id platform, cl_device_type device_type, cl_uint num_entries, cl_device_id *devices, cl_uint *num_devices)
 
cl_int clGetDeviceInfo (cl_device_id device, cl_device_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
 
cl_int clGetMemObjectInfo (cl_mem memobj, cl_mem_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
 
cl_int clRetainEvent (cl_event event)
 
cl_int clGetPlatformInfo (cl_platform_id platform, cl_platform_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
 
cl_int clGetPlatformIDs (cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms)
 
cl_int clGetKernelWorkGroupInfo (cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
 
cl_int clGetCommandQueueInfo (cl_command_queue command_queue, cl_command_queue_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
 
cl_int clGetKernelInfo (cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
 
cl_int clGetEventProfilingInfo (cl_event event, cl_profiling_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
 
cl_mem clCreateImage (cl_context context, cl_mem_flags flags, const cl_image_format *image_format, const cl_image_desc *image_desc, void *host_ptr, cl_int *errcode_ret)
 
cl_int clSetKernelExecInfo (cl_kernel kernel, cl_kernel_exec_info param_name, size_t param_value_size, const void *param_value)
 
cl_mem clImportMemoryARM (cl_context context, cl_mem_flags flags, const cl_import_properties_arm *properties, void *memory, size_t size, cl_int *errcode_ret)
 

Macro Definition Documentation

◆ LOAD_FUNCTION_PTR

#define LOAD_FUNCTION_PTR (   func_name,
  handle 
)    func_name##_ptr = reinterpret_cast<decltype(func_name) *>(dlsym(handle, #func_name));

Referenced by CLSymbols::load().

Function Documentation

◆ clBuildProgram()

cl_int clBuildProgram ( cl_program  program,
cl_uint  num_devices,
const cl_device_id *  device_list,
const char *  options,
void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data)  ,
void *  user_data 
)

Definition at line 386 of file OpenCL.cpp.

References CLSymbols::clBuildProgram_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

393 {
396  if(func != nullptr)
397  {
398  return func(program, num_devices, device_list, options, pfn_notify, user_data);
399  }
400  else
401  {
402  return CL_OUT_OF_RESOURCES;
403  }
404 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clBuildProgram)> clBuildProgram_ptr
Definition: OpenCL.h:98
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clCreateBuffer()

cl_mem clCreateBuffer ( cl_context  context,
cl_mem_flags  flags,
size_t  size,
void *  host_ptr,
cl_int *  errcode_ret 
)

Definition at line 793 of file OpenCL.cpp.

References CLSymbols::clCreateBuffer_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLBufferAllocator::allocate(), and CLSymbols::load().

799 {
802  if(func != nullptr)
803  {
804  return func(context, flags, size, host_ptr, errcode_ret);
805  }
806  else
807  {
808  if(errcode_ret != nullptr)
809  {
810  *errcode_ret = CL_OUT_OF_RESOURCES;
811  }
812  return nullptr;
813  }
814 }
std::function< decltype(clCreateBuffer)> clCreateBuffer_ptr
Definition: OpenCL.h:103
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clCreateCommandQueue()

cl_command_queue clCreateCommandQueue ( cl_context  context,
cl_device_id  device,
cl_command_queue_properties  properties,
cl_int *  errcode_ret 
)

Definition at line 314 of file OpenCL.cpp.

References CLSymbols::clCreateCommandQueue_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

318 {
321  if(func != nullptr)
322  {
323  return func(context, device, properties, errcode_ret);
324  }
325  else
326  {
327  return nullptr;
328  }
329 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clCreateCommandQueue)> clCreateCommandQueue_ptr
Definition: OpenCL.h:95
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clCreateCommandQueueWithProperties()

cl_command_queue clCreateCommandQueueWithProperties ( cl_context  context,
cl_device_id  device,
const cl_queue_properties *  properties,
cl_int *  errcode_ret 
)

Definition at line 331 of file OpenCL.cpp.

References CLSymbols::clCreateCommandQueueWithProperties_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load(), and arm_compute::test::validation::TEST_CASE().

335 {
338  if(func != nullptr)
339  {
340  return func(context, device, properties, errcode_ret);
341  }
342  else
343  {
344  return nullptr;
345  }
346 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clCreateCommandQueueWithProperties)> clCreateCommandQueueWithProperties_ptr
Definition: OpenCL.h:96
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clCreateContext()

cl_context clCreateContext ( const cl_context_properties *  properties,
cl_uint  num_devices,
const cl_device_id *  devices,
void(*)(const char *, const void *, size_t, void *)  pfn_notify,
void *  user_data,
cl_int *  errcode_ret 
)

Definition at line 348 of file OpenCL.cpp.

References CLSymbols::clCreateContext_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

355 {
358  if(func != nullptr)
359  {
360  return func(properties, num_devices, devices, pfn_notify, user_data, errcode_ret);
361  }
362  else
363  {
364  return nullptr;
365  }
366 }
std::function< decltype(clCreateContext)> clCreateContext_ptr
Definition: OpenCL.h:93
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clCreateContextFromType()

cl_context clCreateContextFromType ( const cl_context_properties *  properties,
cl_device_type  device_type,
void(*)(const char *, const void *, size_t, void *)  pfn_notify,
void *  user_data,
cl_int *  errcode_ret 
)

Definition at line 368 of file OpenCL.cpp.

References CLSymbols::clCreateContextFromType_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

373 {
376  if(func != nullptr)
377  {
378  return func(properties, device_type, pfn_notify, user_data, errcode_ret);
379  }
380  else
381  {
382  return nullptr;
383  }
384 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45
std::function< decltype(clCreateContextFromType)> clCreateContextFromType_ptr
Definition: OpenCL.h:94

◆ clCreateImage()

cl_mem clCreateImage ( cl_context  context,
cl_mem_flags  flags,
const cl_image_format *  image_format,
const cl_image_desc *  image_desc,
void *  host_ptr,
cl_int *  errcode_ret 
)

Definition at line 1031 of file OpenCL.cpp.

References CLSymbols::clCreateImage_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by arm_compute::create_image2d_from_buffer(), and CLSymbols::load().

1037 {
1040  if(func != nullptr)
1041  {
1042  return func(context, flags, image_format, image_desc, host_ptr, errcode_ret);
1043  }
1044  else
1045  {
1046  if(errcode_ret != nullptr)
1047  {
1048  *errcode_ret = CL_OUT_OF_RESOURCES;
1049  }
1050  return nullptr;
1051  }
1052 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clCreateImage)> clCreateImage_ptr
Definition: OpenCL.h:140
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clCreateKernel()

cl_kernel clCreateKernel ( cl_program  program,
const char *  kernel_name,
cl_int *  errcode_ret 
)

Definition at line 758 of file OpenCL.cpp.

References CLSymbols::clCreateKernel_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

762 {
765  if(func != nullptr)
766  {
767  return func(program, kernel_name, errcode_ret);
768  }
769  else
770  {
771  if(errcode_ret != nullptr)
772  {
773  *errcode_ret = CL_OUT_OF_RESOURCES;
774  }
775  return nullptr;
776  }
777 }
std::function< decltype(clCreateKernel)> clCreateKernel_ptr
Definition: OpenCL.h:105
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::string kernel_name
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clCreateProgramWithBinary()

cl_program clCreateProgramWithBinary ( cl_context  context,
cl_uint  num_devices,
const cl_device_id *  device_list,
const size_t *  lengths,
const unsigned char **  binaries,
cl_int *  binary_status,
cl_int *  errcode_ret 
)

Definition at line 658 of file OpenCL.cpp.

References CLSymbols::clCreateProgramWithBinary_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

666 {
669  if(func != nullptr)
670  {
671  return func(context, num_devices, device_list, lengths, binaries, binary_status, errcode_ret);
672  }
673  else
674  {
675  if(errcode_ret != nullptr)
676  {
677  *errcode_ret = CL_OUT_OF_RESOURCES;
678  }
679  return nullptr;
680  }
681 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clCreateProgramWithBinary)> clCreateProgramWithBinary_ptr
Definition: OpenCL.h:111
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clCreateProgramWithSource()

cl_program clCreateProgramWithSource ( cl_context  context,
cl_uint  count,
const char **  strings,
const size_t *  lengths,
cl_int *  errcode_ret 
)

Definition at line 816 of file OpenCL.cpp.

References CLSymbols::clCreateProgramWithSource_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

822 {
825  if(func != nullptr)
826  {
827  return func(context, count, strings, lengths, errcode_ret);
828  }
829  else
830  {
831  if(errcode_ret != nullptr)
832  {
833  *errcode_ret = CL_OUT_OF_RESOURCES;
834  }
835  return nullptr;
836  }
837 }
std::function< decltype(clCreateProgramWithSource)> clCreateProgramWithSource_ptr
Definition: OpenCL.h:102
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clEnqueueMapBuffer()

void* clEnqueueMapBuffer ( cl_command_queue  command_queue,
cl_mem  buffer,
cl_bool  blocking_map,
cl_map_flags  map_flags,
size_t  offset,
size_t  size,
cl_uint  num_events_in_wait_list,
const cl_event *  event_wait_list,
cl_event *  event,
cl_int *  errcode_ret 
)

Definition at line 616 of file OpenCL.cpp.

References CLSymbols::clEnqueueMapBuffer_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

627 {
630  if(func != nullptr)
631  {
632  return func(command_queue, buffer, blocking_map, map_flags, offset, size, num_events_in_wait_list, event_wait_list, event, errcode_ret);
633  }
634  else
635  {
636  if(errcode_ret != nullptr)
637  {
638  *errcode_ret = CL_OUT_OF_RESOURCES;
639  }
640  return nullptr;
641  }
642 }
__global uchar * offset(const Image *img, int x, int y)
Get the pointer position of a Image.
Definition: helpers.h:1084
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clEnqueueMapBuffer)> clEnqueueMapBuffer_ptr
Definition: OpenCL.h:113
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clEnqueueMarker()

cl_int clEnqueueMarker ( cl_command_queue  command_queue,
cl_event *  event 
)

Definition at line 212 of file OpenCL.cpp.

References CLSymbols::clEnqueueMarker_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

214 {
217  if(func != nullptr)
218  {
219  return func(command_queue, event);
220  }
221  else
222  {
223  return CL_OUT_OF_RESOURCES;
224  }
225 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clEnqueueMarker)> clEnqueueMarker_ptr
Definition: OpenCL.h:138
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clEnqueueNDRangeKernel()

cl_int clEnqueueNDRangeKernel ( cl_command_queue  command_queue,
cl_kernel  kernel,
cl_uint  work_dim,
const size_t *  global_work_offset,
const size_t *  global_work_size,
const size_t *  local_work_size,
cl_uint  num_events_in_wait_list,
const cl_event *  event_wait_list,
cl_event *  event 
)

Definition at line 406 of file OpenCL.cpp.

References CLSymbols::clEnqueueNDRangeKernel_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

416 {
419  if(func != nullptr)
420  {
421  return func(command_queue, kernel, work_dim, global_work_offset, global_work_size, local_work_size, num_events_in_wait_list, event_wait_list, event);
422  }
423  else
424  {
425  return CL_OUT_OF_RESOURCES;
426  }
427 }
std::function< decltype(clEnqueueNDRangeKernel)> clEnqueueNDRangeKernel_ptr
Definition: OpenCL.h:99
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clEnqueueReadBuffer()

cl_int clEnqueueReadBuffer ( cl_command_queue  command_queue,
cl_mem  buffer,
cl_bool  blocking_read,
size_t  offset,
size_t  size,
void *  ptr,
cl_uint  num_events_in_wait_list,
const cl_event *  event_wait_list,
cl_event *  event 
)

Definition at line 559 of file OpenCL.cpp.

References CLSymbols::clEnqueueReadBuffer_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

569 {
572  if(func != nullptr)
573  {
574  return func(command_queue, buffer, blocking_read, offset, size, ptr, num_events_in_wait_list, event_wait_list, event);
575  }
576  else
577  {
578  return CL_OUT_OF_RESOURCES;
579  }
580 }
__global uchar * offset(const Image *img, int x, int y)
Get the pointer position of a Image.
Definition: helpers.h:1084
std::function< decltype(clEnqueueReadBuffer)> clEnqueueReadBuffer_ptr
Definition: OpenCL.h:116
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clEnqueueSVMMap()

cl_int clEnqueueSVMMap ( cl_command_queue  command_queue,
cl_bool  blocking_map,
cl_map_flags  flags,
void *  svm_ptr,
size_t  size,
cl_uint  num_events_in_wait_list,
const cl_event *  event_wait_list,
cl_event *  event 
)

Definition at line 242 of file OpenCL.cpp.

References CLSymbols::clEnqueueSVMMap_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load(), and CLCoarseSVMMemoryRegion::map().

244 {
247  if(func != nullptr)
248  {
249  return func(command_queue, blocking_map, flags, svm_ptr, size, num_events_in_wait_list, event_wait_list, event);
250  }
251  else
252  {
253  return CL_OUT_OF_RESOURCES;
254  }
255 }
std::function< decltype(clEnqueueSVMMap)> clEnqueueSVMMap_ptr
Definition: OpenCL.h:136
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clEnqueueSVMUnmap()

cl_int clEnqueueSVMUnmap ( cl_command_queue  command_queue,
void *  svm_ptr,
cl_uint  num_events_in_wait_list,
const cl_event *  event_wait_list,
cl_event *  event 
)

Definition at line 257 of file OpenCL.cpp.

References CLSymbols::clEnqueueSVMUnmap_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load(), and CLCoarseSVMMemoryRegion::unmap().

259 {
262  if(func != nullptr)
263  {
264  return func(command_queue, svm_ptr, num_events_in_wait_list, event_wait_list, event);
265  }
266  else
267  {
268  return CL_OUT_OF_RESOURCES;
269  }
270 }
std::function< decltype(clEnqueueSVMUnmap)> clEnqueueSVMUnmap_ptr
Definition: OpenCL.h:137
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clEnqueueUnmapMemObject()

cl_int clEnqueueUnmapMemObject ( cl_command_queue  command_queue,
cl_mem  memobj,
void *  mapped_ptr,
cl_uint  num_events_in_wait_list,
const cl_event *  event_wait_list,
cl_event *  event 
)

Definition at line 475 of file OpenCL.cpp.

References CLSymbols::clEnqueueUnmapMemObject_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

482 {
485  if(func != nullptr)
486  {
487  return func(command_queue, memobj, mapped_ptr, num_events_in_wait_list, event_wait_list, event);
488  }
489  else
490  {
491  return CL_OUT_OF_RESOURCES;
492  }
493 }
std::function< decltype(clEnqueueUnmapMemObject)> clEnqueueUnmapMemObject_ptr
Definition: OpenCL.h:121
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clEnqueueWriteBuffer()

cl_int clEnqueueWriteBuffer ( cl_command_queue  command_queue,
cl_mem  buffer,
cl_bool  blocking_write,
size_t  offset,
size_t  size,
const void *  ptr,
cl_uint  num_events_in_wait_list,
const cl_event *  event_wait_list,
cl_event *  event 
)

Definition at line 536 of file OpenCL.cpp.

References CLSymbols::clEnqueueWriteBuffer_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

546 {
549  if(func != nullptr)
550  {
551  return func(command_queue, buffer, blocking_write, offset, size, ptr, num_events_in_wait_list, event_wait_list, event);
552  }
553  else
554  {
555  return CL_OUT_OF_RESOURCES;
556  }
557 }
__global uchar * offset(const Image *img, int x, int y)
Get the pointer position of a Image.
Definition: helpers.h:1084
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clEnqueueWriteBuffer)> clEnqueueWriteBuffer_ptr
Definition: OpenCL.h:117
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clFinish()

cl_int clFinish ( cl_command_queue  command_queue)

Definition at line 725 of file OpenCL.cpp.

References CLSymbols::clFinish_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load(), CLFineSVMMemoryRegion::map(), and CLBufferMemoryRegion::unmap().

726 {
729  if(func != nullptr)
730  {
731  return func(command_queue);
732  }
733  else
734  {
735  return CL_OUT_OF_RESOURCES;
736  }
737 }
std::function< decltype(clFinish)> clFinish_ptr
Definition: OpenCL.h:108
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clFlush()

cl_int clFlush ( cl_command_queue  command_queue)

Definition at line 711 of file OpenCL.cpp.

References CLSymbols::clFlush_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

712 {
715  if(func != nullptr)
716  {
717  return func(command_queue);
718  }
719  else
720  {
721  return CL_OUT_OF_RESOURCES;
722  }
723 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clFlush)> clFlush_ptr
Definition: OpenCL.h:107
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clGetCommandQueueInfo()

cl_int clGetCommandQueueInfo ( cl_command_queue  command_queue,
cl_command_queue_info  param_name,
size_t  param_value_size,
void *  param_value,
size_t *  param_value_size_ret 
)

Definition at line 974 of file OpenCL.cpp.

References CLSymbols::clGetCommandQueueInfo_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

979 {
982  if(func != nullptr)
983  {
984  return func(command_queue, param_name, param_value_size, param_value, param_value_size_ret);
985  }
986  else
987  {
988  return CL_OUT_OF_RESOURCES;
989  }
990 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clGetCommandQueueInfo)> clGetCommandQueueInfo_ptr
Definition: OpenCL.h:131
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clGetContextInfo()

cl_int clGetContextInfo ( cl_context  context,
cl_context_info  param_name,
size_t  param_value_size,
void *  param_value,
size_t *  param_value_size_ret 
)

Definition at line 296 of file OpenCL.cpp.

References CLSymbols::clGetContextInfo_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

301 {
304  if(func != nullptr)
305  {
306  return func(context, param_name, param_value_size, param_value, param_value_size_ret);
307  }
308  else
309  {
310  return CL_OUT_OF_RESOURCES;
311  }
312 }
std::function< decltype(clGetContextInfo)> clGetContextInfo_ptr
Definition: OpenCL.h:97
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clGetDeviceIDs()

cl_int clGetDeviceIDs ( cl_platform_id  platform,
cl_device_type  device_type,
cl_uint  num_entries,
cl_device_id *  devices,
cl_uint *  num_devices 
)

Definition at line 853 of file OpenCL.cpp.

References CLSymbols::clGetDeviceIDs_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

858 {
861  if(func != nullptr)
862  {
863  return func(platform, device_type, num_entries, devices, num_devices);
864  }
865  else
866  {
867  return CL_OUT_OF_RESOURCES;
868  }
869 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clGetDeviceIDs)> clGetDeviceIDs_ptr
Definition: OpenCL.h:125
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clGetDeviceInfo()

cl_int clGetDeviceInfo ( cl_device_id  device,
cl_device_info  param_name,
size_t  param_value_size,
void *  param_value,
size_t *  param_value_size_ret 
)

Definition at line 871 of file OpenCL.cpp.

References CLSymbols::clGetDeviceInfo_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by arm_compute::get_cl_image_pitch_alignment(), arm_compute::get_cl_non_uniform_work_group_supported(), arm_compute::get_wbsm_support_info(), and CLSymbols::load().

876 {
879  if(func != nullptr)
880  {
881  return func(device, param_name, param_value_size, param_value, param_value_size_ret);
882  }
883  else
884  {
885  return CL_OUT_OF_RESOURCES;
886  }
887 }
std::function< decltype(clGetDeviceInfo)> clGetDeviceInfo_ptr
Definition: OpenCL.h:124
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clGetEventProfilingInfo()

cl_int clGetEventProfilingInfo ( cl_event  event,
cl_profiling_info  param_name,
size_t  param_value_size,
void *  param_value,
size_t *  param_value_size_ret 
)

Definition at line 1012 of file OpenCL.cpp.

References CLSymbols::clGetEventProfilingInfo_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

1017 {
1020  if(func != nullptr)
1021  {
1022  return func(event, param_name, param_value_size, param_value, param_value_size_ret);
1023  }
1024  else
1025  {
1026  return CL_OUT_OF_RESOURCES;
1027  }
1028 }
std::function< decltype(clGetEventProfilingInfo)> clGetEventProfilingInfo_ptr
Definition: OpenCL.h:133
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clGetKernelInfo()

cl_int clGetKernelInfo ( cl_kernel  kernel,
cl_kernel_info  param_name,
size_t  param_value_size,
void *  param_value,
size_t *  param_value_size_ret 
)

Definition at line 993 of file OpenCL.cpp.

References CLSymbols::clGetKernelInfo_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

998 {
1001  if(func != nullptr)
1002  {
1003  return func(kernel, param_name, param_value_size, param_value, param_value_size_ret);
1004  }
1005  else
1006  {
1007  return CL_OUT_OF_RESOURCES;
1008  }
1009 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clGetKernelInfo)> clGetKernelInfo_ptr
Definition: OpenCL.h:132
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clGetKernelWorkGroupInfo()

cl_int clGetKernelWorkGroupInfo ( cl_kernel  kernel,
cl_device_id  device,
cl_kernel_work_group_info  param_name,
size_t  param_value_size,
void *  param_value,
size_t *  param_value_size_ret 
)

Definition at line 954 of file OpenCL.cpp.

References CLSymbols::clGetKernelWorkGroupInfo_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

960 {
963  if(func != nullptr)
964  {
965  return func(kernel, device, param_name, param_value_size, param_value, param_value_size_ret);
966  }
967  else
968  {
969  return CL_OUT_OF_RESOURCES;
970  }
971 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clGetKernelWorkGroupInfo)> clGetKernelWorkGroupInfo_ptr
Definition: OpenCL.h:130
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clGetMemObjectInfo()

cl_int clGetMemObjectInfo ( cl_mem  memobj,
cl_mem_info  param_name,
size_t  param_value_size,
void *  param_value,
size_t *  param_value_size_ret 
)

Definition at line 889 of file OpenCL.cpp.

References CLSymbols::clGetMemObjectInfo_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

894 {
897  if(func != nullptr)
898  {
899  return func(memobj, param_name, param_value_size, param_value, param_value_size_ret);
900  }
901  else
902  {
903  return CL_OUT_OF_RESOURCES;
904  }
905 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clGetMemObjectInfo)> clGetMemObjectInfo_ptr
Definition: OpenCL.h:126
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clGetPlatformIDs()

cl_int clGetPlatformIDs ( cl_uint  num_entries,
cl_platform_id *  platforms,
cl_uint *  num_platforms 
)

Definition at line 939 of file OpenCL.cpp.

References CLSymbols::clGetPlatformIDs_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load(), and arm_compute::opencl_is_available().

940 {
943  if(func != nullptr)
944  {
945  return func(num_entries, platforms, num_platforms);
946  }
947  else
948  {
949  return CL_OUT_OF_RESOURCES;
950  }
951 }
std::function< decltype(clGetPlatformIDs)> clGetPlatformIDs_ptr
Definition: OpenCL.h:129
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clGetPlatformInfo()

cl_int clGetPlatformInfo ( cl_platform_id  platform,
cl_platform_info  param_name,
size_t  param_value_size,
void *  param_value,
size_t *  param_value_size_ret 
)

Definition at line 921 of file OpenCL.cpp.

References CLSymbols::clGetPlatformInfo_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

926 {
929  if(func != nullptr)
930  {
931  return func(platform, param_name, param_value_size, param_value, param_value_size_ret);
932  }
933  else
934  {
935  return CL_OUT_OF_RESOURCES;
936  }
937 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clGetPlatformInfo)> clGetPlatformInfo_ptr
Definition: OpenCL.h:128
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clGetProgramBuildInfo()

cl_int clGetProgramBuildInfo ( cl_program  program,
cl_device_id  device,
cl_program_build_info  param_name,
size_t  param_value_size,
void *  param_value,
size_t *  param_value_size_ret 
)

Definition at line 582 of file OpenCL.cpp.

References CLSymbols::clGetProgramBuildInfo_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

589 {
592  if(func != nullptr)
593  {
594  return func(program, device, param_name, param_value_size, param_value, param_value_size_ret);
595  }
596  else
597  {
598  return CL_OUT_OF_RESOURCES;
599  }
600 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clGetProgramBuildInfo)> clGetProgramBuildInfo_ptr
Definition: OpenCL.h:115
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clGetProgramInfo()

cl_int clGetProgramInfo ( cl_program  program,
cl_program_info  param_name,
size_t  param_value_size,
void *  param_value,
size_t *  param_value_size_ret 
)

Definition at line 739 of file OpenCL.cpp.

References CLSymbols::clGetProgramInfo_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

745 {
748  if(func != nullptr)
749  {
750  return func(program, param_name, param_value_size, param_value, param_value_size_ret);
751  }
752  else
753  {
754  return CL_OUT_OF_RESOURCES;
755  }
756 }
std::function< decltype(clGetProgramInfo)> clGetProgramInfo_ptr
Definition: OpenCL.h:106
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clImportMemoryARM()

cl_mem clImportMemoryARM ( cl_context  context,
cl_mem_flags  flags,
const cl_import_properties_arm *  properties,
void *  memory,
size_t  size,
cl_int *  errcode_ret 
)

Definition at line 1072 of file OpenCL.cpp.

References CLSymbols::clImportMemoryARM_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

1078 {
1081  if(func != nullptr)
1082  {
1083  return func(context, flags, properties, memory, size, errcode_ret);
1084  }
1085  else
1086  {
1087  if(errcode_ret != nullptr)
1088  {
1089  *errcode_ret = CL_OUT_OF_RESOURCES;
1090  }
1091  return nullptr;
1092  }
1093 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clImportMemoryARM)> clImportMemoryARM_ptr
Definition: OpenCL.h:144
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clReleaseCommandQueue()

cl_int clReleaseCommandQueue ( cl_command_queue  command_queue)

Definition at line 644 of file OpenCL.cpp.

References CLSymbols::clReleaseCommandQueue_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load(), and arm_compute::test::validation::TEST_CASE().

645 {
648  if(func != nullptr)
649  {
650  return func(command_queue);
651  }
652  else
653  {
654  return CL_OUT_OF_RESOURCES;
655  }
656 }
std::function< decltype(clReleaseCommandQueue)> clReleaseCommandQueue_ptr
Definition: OpenCL.h:112
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clReleaseContext()

cl_int clReleaseContext ( cl_context  context)

Definition at line 509 of file OpenCL.cpp.

References CLSymbols::clReleaseContext_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

510 {
513  if(func != nullptr)
514  {
515  return func(context);
516  }
517  else
518  {
519  return CL_OUT_OF_RESOURCES;
520  }
521 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45
std::function< decltype(clReleaseContext)> clReleaseContext_ptr
Definition: OpenCL.h:119

◆ clReleaseEvent()

cl_int clReleaseEvent ( cl_event  event)

Definition at line 522 of file OpenCL.cpp.

References CLSymbols::clReleaseEvent_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

523 {
526  if(func != nullptr)
527  {
528  return func(event);
529  }
530  else
531  {
532  return CL_OUT_OF_RESOURCES;
533  }
534 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clReleaseEvent)> clReleaseEvent_ptr
Definition: OpenCL.h:118
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clReleaseKernel()

cl_int clReleaseKernel ( cl_kernel  kernel)

Definition at line 839 of file OpenCL.cpp.

References CLSymbols::clReleaseKernel_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

840 {
843  if(func != nullptr)
844  {
845  return func(kernel);
846  }
847  else
848  {
849  return CL_OUT_OF_RESOURCES;
850  }
851 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45
std::function< decltype(clReleaseKernel)> clReleaseKernel_ptr
Definition: OpenCL.h:101

◆ clReleaseMemObject()

cl_int clReleaseMemObject ( cl_mem  memobj)

Definition at line 461 of file OpenCL.cpp.

References CLSymbols::clReleaseMemObject_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLBufferAllocator::free(), and CLSymbols::load().

462 {
465  if(func != nullptr)
466  {
467  return func(memobj);
468  }
469  else
470  {
471  return CL_OUT_OF_RESOURCES;
472  }
473 }
std::function< decltype(clReleaseMemObject)> clReleaseMemObject_ptr
Definition: OpenCL.h:123
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clReleaseProgram()

cl_int clReleaseProgram ( cl_program  program)

Definition at line 697 of file OpenCL.cpp.

References CLSymbols::clReleaseProgram_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

698 {
701  if(func != nullptr)
702  {
703  return func(program);
704  }
705  else
706  {
707  return CL_OUT_OF_RESOURCES;
708  }
709 }
std::function< decltype(clReleaseProgram)> clReleaseProgram_ptr
Definition: OpenCL.h:109
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clRetainCommandQueue()

cl_int clRetainCommandQueue ( cl_command_queue  command_queue)

Definition at line 495 of file OpenCL.cpp.

References CLSymbols::clRetainCommandQueue_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

496 {
499  if(func != nullptr)
500  {
501  return func(command_queue);
502  }
503  else
504  {
505  return CL_OUT_OF_RESOURCES;
506  }
507 }
std::function< decltype(clRetainCommandQueue)> clRetainCommandQueue_ptr
Definition: OpenCL.h:120
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clRetainContext()

cl_int clRetainContext ( cl_context  context)

Definition at line 683 of file OpenCL.cpp.

References CLSymbols::clRetainContext_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

684 {
687  if(func != nullptr)
688  {
689  return func(context);
690  }
691  else
692  {
693  return CL_OUT_OF_RESOURCES;
694  }
695 }
std::function< decltype(clRetainContext)> clRetainContext_ptr
Definition: OpenCL.h:110
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clRetainEvent()

cl_int clRetainEvent ( cl_event  event)

Definition at line 907 of file OpenCL.cpp.

References CLSymbols::clRetainEvent_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLTuner::add_tuning_params(), CLSymbols::load(), and OpenCLClock< output_timestamps >::test_start().

908 {
911  if(func != nullptr)
912  {
913  return func(event);
914  }
915  else
916  {
917  return CL_OUT_OF_RESOURCES;
918  }
919 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clRetainEvent)> clRetainEvent_ptr
Definition: OpenCL.h:127
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clRetainKernel()

cl_int clRetainKernel ( cl_kernel  kernel)

Definition at line 779 of file OpenCL.cpp.

References CLSymbols::clRetainKernel_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

780 {
783  if(func != nullptr)
784  {
785  return func(kernel);
786  }
787  else
788  {
789  return CL_OUT_OF_RESOURCES;
790  }
791 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clRetainKernel)> clRetainKernel_ptr
Definition: OpenCL.h:104
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clRetainMemObject()

cl_int clRetainMemObject ( cl_mem  memobj)

Definition at line 447 of file OpenCL.cpp.

References CLSymbols::clRetainMemObject_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

448 {
451  if(func != nullptr)
452  {
453  return func(memobj);
454  }
455  else
456  {
457  return CL_OUT_OF_RESOURCES;
458  }
459 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clRetainMemObject)> clRetainMemObject_ptr
Definition: OpenCL.h:122
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clRetainProgram()

cl_int clRetainProgram ( cl_program  program)

Definition at line 602 of file OpenCL.cpp.

References CLSymbols::clRetainProgram_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

603 {
606  if(func != nullptr)
607  {
608  return func(program);
609  }
610  else
611  {
612  return CL_OUT_OF_RESOURCES;
613  }
614 }
std::function< decltype(clRetainProgram)> clRetainProgram_ptr
Definition: OpenCL.h:114
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clSetKernelArg()

cl_int clSetKernelArg ( cl_kernel  kernel,
cl_uint  arg_index,
size_t  arg_size,
const void *  arg_value 
)

Definition at line 429 of file OpenCL.cpp.

References CLSymbols::clSetKernelArg_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

434 {
437  if(func != nullptr)
438  {
439  return func(kernel, arg_index, arg_size, arg_value);
440  }
441  else
442  {
443  return CL_OUT_OF_RESOURCES;
444  }
445 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clSetKernelArg)> clSetKernelArg_ptr
Definition: OpenCL.h:100
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clSetKernelExecInfo()

cl_int clSetKernelExecInfo ( cl_kernel  kernel,
cl_kernel_exec_info  param_name,
size_t  param_value_size,
const void *  param_value 
)

Definition at line 1054 of file OpenCL.cpp.

References CLSymbols::clSetKernelExecInfo_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load(), and arm_compute::set_wbsm().

1058 {
1061  if(func != nullptr)
1062  {
1063  return func(kernel, param_name, param_value_size, param_value);
1064  }
1065  else
1066  {
1067  return CL_OUT_OF_RESOURCES;
1068  }
1069 }
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
std::function< decltype(clSetKernelExecInfo)> clSetKernelExecInfo_ptr
Definition: OpenCL.h:141
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clSVMAlloc()

void* clSVMAlloc ( cl_context  context,
cl_svm_mem_flags_arm  flags,
size_t  size,
cl_uint  alignment 
)

Definition at line 272 of file OpenCL.cpp.

References CLSymbols::clSVMAlloc_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load(), and CLBufferMemoryRegion::unmap().

273 {
276  if(func != nullptr)
277  {
278  return func(context, flags, size, alignment);
279  }
280  else
281  {
282  return nullptr;
283  }
284 }
std::function< decltype(clSVMAlloc)> clSVMAlloc_ptr
Definition: OpenCL.h:134
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clSVMFree()

void clSVMFree ( cl_context  context,
void *  svm_pointer 
)

Definition at line 286 of file OpenCL.cpp.

References CLSymbols::clSVMFree_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load(), and CLBufferMemoryRegion::unmap().

287 {
290  if(func != nullptr)
291  {
292  func(context, svm_pointer);
293  }
294 }
std::function< decltype(clSVMFree)> clSVMFree_ptr
Definition: OpenCL.h:135
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clWaitForEvents()

cl_int clWaitForEvents ( cl_uint  num_events,
const cl_event *  event_list 
)

Definition at line 227 of file OpenCL.cpp.

References CLSymbols::clWaitForEvents_ptr, CLSymbols::get(), and CLSymbols::load_default().

Referenced by CLSymbols::load().

229 {
232  if(func != nullptr)
233  {
234  return func(num_events, event_list);
235  }
236  else
237  {
238  return CL_OUT_OF_RESOURCES;
239  }
240 }
std::function< decltype(clWaitForEvents)> clWaitForEvents_ptr
Definition: OpenCL.h:139
bool load_default()
Load symbols from any of the default OpenCL library names.
Definition: OpenCL.cpp:51
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45