Compute Library
 22.05
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 352 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

359 {
362  if(func != nullptr)
363  {
364  return func(program, num_devices, device_list, options, pfn_notify, user_data);
365  }
366  else
367  {
368  return CL_OUT_OF_RESOURCES;
369  }
370 }
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:97
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 759 of file OpenCL.cpp.

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

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

765 {
768  if(func != nullptr)
769  {
770  return func(context, flags, size, host_ptr, errcode_ret);
771  }
772  else
773  {
774  if(errcode_ret != nullptr)
775  {
776  *errcode_ret = CL_OUT_OF_RESOURCES;
777  }
778  return nullptr;
779  }
780 }
std::function< decltype(clCreateBuffer)> clCreateBuffer_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

◆ clCreateCommandQueue()

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

Definition at line 280 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

284 {
287  if(func != nullptr)
288  {
289  return func(context, device, properties, errcode_ret);
290  }
291  else
292  {
293  return nullptr;
294  }
295 }
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:94
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 297 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().

301 {
304  if(func != nullptr)
305  {
306  return func(context, device, properties, errcode_ret);
307  }
308  else
309  {
310  return nullptr;
311  }
312 }
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:95
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 314 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

321 {
324  if(func != nullptr)
325  {
326  return func(properties, num_devices, devices, pfn_notify, user_data, errcode_ret);
327  }
328  else
329  {
330  return nullptr;
331  }
332 }
std::function< decltype(clCreateContext)> clCreateContext_ptr
Definition: OpenCL.h:92
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 334 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

339 {
342  if(func != nullptr)
343  {
344  return func(properties, device_type, pfn_notify, user_data, errcode_ret);
345  }
346  else
347  {
348  return nullptr;
349  }
350 }
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:93

◆ 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 997 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().

1003 {
1006  if(func != nullptr)
1007  {
1008  return func(context, flags, image_format, image_desc, host_ptr, errcode_ret);
1009  }
1010  else
1011  {
1012  if(errcode_ret != nullptr)
1013  {
1014  *errcode_ret = CL_OUT_OF_RESOURCES;
1015  }
1016  return nullptr;
1017  }
1018 }
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:139
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 724 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

728 {
731  if(func != nullptr)
732  {
733  return func(program, kernel_name, errcode_ret);
734  }
735  else
736  {
737  if(errcode_ret != nullptr)
738  {
739  *errcode_ret = CL_OUT_OF_RESOURCES;
740  }
741  return nullptr;
742  }
743 }
std::function< decltype(clCreateKernel)> clCreateKernel_ptr
Definition: OpenCL.h:104
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 624 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

632 {
635  if(func != nullptr)
636  {
637  return func(context, num_devices, device_list, lengths, binaries, binary_status, errcode_ret);
638  }
639  else
640  {
641  if(errcode_ret != nullptr)
642  {
643  *errcode_ret = CL_OUT_OF_RESOURCES;
644  }
645  return nullptr;
646  }
647 }
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:110
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 782 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

788 {
791  if(func != nullptr)
792  {
793  return func(context, count, strings, lengths, errcode_ret);
794  }
795  else
796  {
797  if(errcode_ret != nullptr)
798  {
799  *errcode_ret = CL_OUT_OF_RESOURCES;
800  }
801  return nullptr;
802  }
803 }
std::function< decltype(clCreateProgramWithSource)> clCreateProgramWithSource_ptr
Definition: OpenCL.h:101
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 582 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

593 {
596  if(func != nullptr)
597  {
598  return func(command_queue, buffer, blocking_map, map_flags, offset, size, num_events_in_wait_list, event_wait_list, event, errcode_ret);
599  }
600  else
601  {
602  if(errcode_ret != nullptr)
603  {
604  *errcode_ret = CL_OUT_OF_RESOURCES;
605  }
606  return nullptr;
607  }
608 }
__global uchar * offset(const Image *img, int x, int y)
Get the pointer position of a Image.
Definition: helpers.h:1083
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:112
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 178 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

180 {
183  if(func != nullptr)
184  {
185  return func(command_queue, event);
186  }
187  else
188  {
189  return CL_OUT_OF_RESOURCES;
190  }
191 }
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:137
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 372 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

382 {
385  if(func != nullptr)
386  {
387  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);
388  }
389  else
390  {
391  return CL_OUT_OF_RESOURCES;
392  }
393 }
std::function< decltype(clEnqueueNDRangeKernel)> clEnqueueNDRangeKernel_ptr
Definition: OpenCL.h:98
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 525 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

535 {
538  if(func != nullptr)
539  {
540  return func(command_queue, buffer, blocking_read, offset, size, ptr, num_events_in_wait_list, event_wait_list, event);
541  }
542  else
543  {
544  return CL_OUT_OF_RESOURCES;
545  }
546 }
__global uchar * offset(const Image *img, int x, int y)
Get the pointer position of a Image.
Definition: helpers.h:1083
std::function< decltype(clEnqueueReadBuffer)> clEnqueueReadBuffer_ptr
Definition: OpenCL.h:115
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 208 of file OpenCL.cpp.

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

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

210 {
213  if(func != nullptr)
214  {
215  return func(command_queue, blocking_map, flags, svm_ptr, size, num_events_in_wait_list, event_wait_list, event);
216  }
217  else
218  {
219  return CL_OUT_OF_RESOURCES;
220  }
221 }
std::function< decltype(clEnqueueSVMMap)> clEnqueueSVMMap_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

◆ 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 223 of file OpenCL.cpp.

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

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

225 {
228  if(func != nullptr)
229  {
230  return func(command_queue, svm_ptr, num_events_in_wait_list, event_wait_list, event);
231  }
232  else
233  {
234  return CL_OUT_OF_RESOURCES;
235  }
236 }
std::function< decltype(clEnqueueSVMUnmap)> clEnqueueSVMUnmap_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

◆ 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 441 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

448 {
451  if(func != nullptr)
452  {
453  return func(command_queue, memobj, mapped_ptr, num_events_in_wait_list, event_wait_list, event);
454  }
455  else
456  {
457  return CL_OUT_OF_RESOURCES;
458  }
459 }
std::function< decltype(clEnqueueUnmapMemObject)> clEnqueueUnmapMemObject_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

◆ 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 502 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

512 {
515  if(func != nullptr)
516  {
517  return func(command_queue, buffer, blocking_write, offset, size, ptr, num_events_in_wait_list, event_wait_list, event);
518  }
519  else
520  {
521  return CL_OUT_OF_RESOURCES;
522  }
523 }
__global uchar * offset(const Image *img, int x, int y)
Get the pointer position of a Image.
Definition: helpers.h:1083
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:116
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 691 of file OpenCL.cpp.

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

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

692 {
695  if(func != nullptr)
696  {
697  return func(command_queue);
698  }
699  else
700  {
701  return CL_OUT_OF_RESOURCES;
702  }
703 }
std::function< decltype(clFinish)> clFinish_ptr
Definition: OpenCL.h:107
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 677 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

678 {
681  if(func != nullptr)
682  {
683  return func(command_queue);
684  }
685  else
686  {
687  return CL_OUT_OF_RESOURCES;
688  }
689 }
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:106
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 940 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

945 {
948  if(func != nullptr)
949  {
950  return func(command_queue, param_name, param_value_size, param_value, param_value_size_ret);
951  }
952  else
953  {
954  return CL_OUT_OF_RESOURCES;
955  }
956 }
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:130
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 262 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

267 {
270  if(func != nullptr)
271  {
272  return func(context, param_name, param_value_size, param_value, param_value_size_ret);
273  }
274  else
275  {
276  return CL_OUT_OF_RESOURCES;
277  }
278 }
std::function< decltype(clGetContextInfo)> clGetContextInfo_ptr
Definition: OpenCL.h:96
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 819 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

824 {
827  if(func != nullptr)
828  {
829  return func(platform, device_type, num_entries, devices, num_devices);
830  }
831  else
832  {
833  return CL_OUT_OF_RESOURCES;
834  }
835 }
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:124
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 837 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_wbsm_support_info(), and CLSymbols::load().

842 {
845  if(func != nullptr)
846  {
847  return func(device, param_name, param_value_size, param_value, param_value_size_ret);
848  }
849  else
850  {
851  return CL_OUT_OF_RESOURCES;
852  }
853 }
std::function< decltype(clGetDeviceInfo)> clGetDeviceInfo_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

◆ 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 978 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

983 {
986  if(func != nullptr)
987  {
988  return func(event, param_name, param_value_size, param_value, param_value_size_ret);
989  }
990  else
991  {
992  return CL_OUT_OF_RESOURCES;
993  }
994 }
std::function< decltype(clGetEventProfilingInfo)> clGetEventProfilingInfo_ptr
Definition: OpenCL.h:132
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 959 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

964 {
967  if(func != nullptr)
968  {
969  return func(kernel, param_name, param_value_size, param_value, param_value_size_ret);
970  }
971  else
972  {
973  return CL_OUT_OF_RESOURCES;
974  }
975 }
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:131
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 920 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

926 {
929  if(func != nullptr)
930  {
931  return func(kernel, device, 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(clGetKernelWorkGroupInfo)> clGetKernelWorkGroupInfo_ptr
Definition: OpenCL.h:129
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 855 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

860 {
863  if(func != nullptr)
864  {
865  return func(memobj, param_name, param_value_size, param_value, param_value_size_ret);
866  }
867  else
868  {
869  return CL_OUT_OF_RESOURCES;
870  }
871 }
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:125
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 905 of file OpenCL.cpp.

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

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

906 {
909  if(func != nullptr)
910  {
911  return func(num_entries, platforms, num_platforms);
912  }
913  else
914  {
915  return CL_OUT_OF_RESOURCES;
916  }
917 }
std::function< decltype(clGetPlatformIDs)> clGetPlatformIDs_ptr
Definition: OpenCL.h:128
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 887 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

892 {
895  if(func != nullptr)
896  {
897  return func(platform, param_name, param_value_size, param_value, param_value_size_ret);
898  }
899  else
900  {
901  return CL_OUT_OF_RESOURCES;
902  }
903 }
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:127
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 548 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

555 {
558  if(func != nullptr)
559  {
560  return func(program, device, param_name, param_value_size, param_value, param_value_size_ret);
561  }
562  else
563  {
564  return CL_OUT_OF_RESOURCES;
565  }
566 }
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:114
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 705 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

711 {
714  if(func != nullptr)
715  {
716  return func(program, param_name, param_value_size, param_value, param_value_size_ret);
717  }
718  else
719  {
720  return CL_OUT_OF_RESOURCES;
721  }
722 }
std::function< decltype(clGetProgramInfo)> clGetProgramInfo_ptr
Definition: OpenCL.h:105
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 1038 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

1044 {
1047  if(func != nullptr)
1048  {
1049  return func(context, flags, properties, memory, size, errcode_ret);
1050  }
1051  else
1052  {
1053  if(errcode_ret != nullptr)
1054  {
1055  *errcode_ret = CL_OUT_OF_RESOURCES;
1056  }
1057  return nullptr;
1058  }
1059 }
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:143
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 610 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().

611 {
614  if(func != nullptr)
615  {
616  return func(command_queue);
617  }
618  else
619  {
620  return CL_OUT_OF_RESOURCES;
621  }
622 }
std::function< decltype(clReleaseCommandQueue)> clReleaseCommandQueue_ptr
Definition: OpenCL.h:111
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 475 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

476 {
479  if(func != nullptr)
480  {
481  return func(context);
482  }
483  else
484  {
485  return CL_OUT_OF_RESOURCES;
486  }
487 }
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:118

◆ clReleaseEvent()

cl_int clReleaseEvent ( cl_event  event)

Definition at line 488 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

489 {
492  if(func != nullptr)
493  {
494  return func(event);
495  }
496  else
497  {
498  return CL_OUT_OF_RESOURCES;
499  }
500 }
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:117
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clReleaseKernel()

cl_int clReleaseKernel ( cl_kernel  kernel)

Definition at line 805 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

806 {
809  if(func != nullptr)
810  {
811  return func(kernel);
812  }
813  else
814  {
815  return CL_OUT_OF_RESOURCES;
816  }
817 }
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:100

◆ clReleaseMemObject()

cl_int clReleaseMemObject ( cl_mem  memobj)

Definition at line 427 of file OpenCL.cpp.

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

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

428 {
431  if(func != nullptr)
432  {
433  return func(memobj);
434  }
435  else
436  {
437  return CL_OUT_OF_RESOURCES;
438  }
439 }
std::function< decltype(clReleaseMemObject)> clReleaseMemObject_ptr
Definition: OpenCL.h:122
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 663 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

664 {
667  if(func != nullptr)
668  {
669  return func(program);
670  }
671  else
672  {
673  return CL_OUT_OF_RESOURCES;
674  }
675 }
std::function< decltype(clReleaseProgram)> clReleaseProgram_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

◆ clRetainCommandQueue()

cl_int clRetainCommandQueue ( cl_command_queue  command_queue)

Definition at line 461 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

462 {
465  if(func != nullptr)
466  {
467  return func(command_queue);
468  }
469  else
470  {
471  return CL_OUT_OF_RESOURCES;
472  }
473 }
std::function< decltype(clRetainCommandQueue)> clRetainCommandQueue_ptr
Definition: OpenCL.h:119
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 649 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

650 {
653  if(func != nullptr)
654  {
655  return func(context);
656  }
657  else
658  {
659  return CL_OUT_OF_RESOURCES;
660  }
661 }
std::function< decltype(clRetainContext)> clRetainContext_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

◆ clRetainEvent()

cl_int clRetainEvent ( cl_event  event)

Definition at line 873 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().

874 {
877  if(func != nullptr)
878  {
879  return func(event);
880  }
881  else
882  {
883  return CL_OUT_OF_RESOURCES;
884  }
885 }
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:126
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clRetainKernel()

cl_int clRetainKernel ( cl_kernel  kernel)

Definition at line 745 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

746 {
749  if(func != nullptr)
750  {
751  return func(kernel);
752  }
753  else
754  {
755  return CL_OUT_OF_RESOURCES;
756  }
757 }
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:103
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clRetainMemObject()

cl_int clRetainMemObject ( cl_mem  memobj)

Definition at line 413 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

414 {
417  if(func != nullptr)
418  {
419  return func(memobj);
420  }
421  else
422  {
423  return CL_OUT_OF_RESOURCES;
424  }
425 }
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:121
static CLSymbols & get()
Get the static instance of CLSymbols.
Definition: OpenCL.cpp:45

◆ clRetainProgram()

cl_int clRetainProgram ( cl_program  program)

Definition at line 568 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

569 {
572  if(func != nullptr)
573  {
574  return func(program);
575  }
576  else
577  {
578  return CL_OUT_OF_RESOURCES;
579  }
580 }
std::function< decltype(clRetainProgram)> clRetainProgram_ptr
Definition: OpenCL.h:113
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 395 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

400 {
403  if(func != nullptr)
404  {
405  return func(kernel, arg_index, arg_size, arg_value);
406  }
407  else
408  {
409  return CL_OUT_OF_RESOURCES;
410  }
411 }
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:99
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 1020 of file OpenCL.cpp.

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

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

1024 {
1027  if(func != nullptr)
1028  {
1029  return func(kernel, param_name, param_value_size, param_value);
1030  }
1031  else
1032  {
1033  return CL_OUT_OF_RESOURCES;
1034  }
1035 }
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:140
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 238 of file OpenCL.cpp.

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

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

239 {
242  if(func != nullptr)
243  {
244  return func(context, flags, size, alignment);
245  }
246  else
247  {
248  return nullptr;
249  }
250 }
std::function< decltype(clSVMAlloc)> clSVMAlloc_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

◆ clSVMFree()

void clSVMFree ( cl_context  context,
void *  svm_pointer 
)

Definition at line 252 of file OpenCL.cpp.

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

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

253 {
256  if(func != nullptr)
257  {
258  func(context, svm_pointer);
259  }
260 }
std::function< decltype(clSVMFree)> clSVMFree_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

◆ clWaitForEvents()

cl_int clWaitForEvents ( cl_uint  num_events,
const cl_event *  event_list 
)

Definition at line 193 of file OpenCL.cpp.

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

Referenced by CLSymbols::load().

195 {
198  if(func != nullptr)
199  {
200  return func(num_events, event_list);
201  }
202  else
203  {
204  return CL_OUT_OF_RESOURCES;
205  }
206 }
std::function< decltype(clWaitForEvents)> clWaitForEvents_ptr
Definition: OpenCL.h:138
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