23.08
|
Class for loading OpenCL symbols. More...
#include <OpenCL.h>
Public Member Functions | |
CLSymbols () noexcept(false) | |
Default Constructor. More... | |
void | load_symbols (void *handle) |
Load OpenCL symbols from handle. More... | |
bool | load (const std::vector< std::string > &libraries_filenames, bool use_loader=false) |
This method attempts to load the OpenCL symbols from the first available library from the provided OpenCL libraries. More... | |
bool | load_default () |
Load symbols from any of the default OpenCL library names. More... | |
Static Public Member Functions | |
static CLSymbols & | get () |
Get the static instance of CLSymbols. More... | |
Data Fields | |
std::function< decltype(clCreateContext)> | clCreateContext_ptr = nullptr |
std::function< decltype(clCreateContextFromType)> | clCreateContextFromType_ptr = nullptr |
std::function< decltype(clCreateCommandQueue)> | clCreateCommandQueue_ptr = nullptr |
std::function< decltype(clCreateCommandQueueWithProperties)> | clCreateCommandQueueWithProperties_ptr = nullptr |
std::function< decltype(clGetContextInfo)> | clGetContextInfo_ptr = nullptr |
std::function< decltype(clBuildProgram)> | clBuildProgram_ptr = nullptr |
std::function< decltype(clEnqueueNDRangeKernel)> | clEnqueueNDRangeKernel_ptr = nullptr |
std::function< decltype(clSetKernelArg)> | clSetKernelArg_ptr = nullptr |
std::function< decltype(clReleaseKernel)> | clReleaseKernel_ptr = nullptr |
std::function< decltype(clCreateProgramWithSource)> | clCreateProgramWithSource_ptr = nullptr |
std::function< decltype(clCreateBuffer)> | clCreateBuffer_ptr = nullptr |
std::function< decltype(clRetainKernel)> | clRetainKernel_ptr = nullptr |
std::function< decltype(clCreateKernel)> | clCreateKernel_ptr = nullptr |
std::function< decltype(clGetProgramInfo)> | clGetProgramInfo_ptr = nullptr |
std::function< decltype(clFlush)> | clFlush_ptr = nullptr |
std::function< decltype(clFinish)> | clFinish_ptr = nullptr |
std::function< decltype(clReleaseProgram)> | clReleaseProgram_ptr = nullptr |
std::function< decltype(clRetainContext)> | clRetainContext_ptr = nullptr |
std::function< decltype(clCreateProgramWithBinary)> | clCreateProgramWithBinary_ptr = nullptr |
std::function< decltype(clReleaseCommandQueue)> | clReleaseCommandQueue_ptr = nullptr |
std::function< decltype(clEnqueueMapBuffer)> | clEnqueueMapBuffer_ptr = nullptr |
std::function< decltype(clRetainProgram)> | clRetainProgram_ptr = nullptr |
std::function< decltype(clGetProgramBuildInfo)> | clGetProgramBuildInfo_ptr = nullptr |
std::function< decltype(clEnqueueReadBuffer)> | clEnqueueReadBuffer_ptr = nullptr |
std::function< decltype(clEnqueueWriteBuffer)> | clEnqueueWriteBuffer_ptr = nullptr |
std::function< decltype(clReleaseEvent)> | clReleaseEvent_ptr = nullptr |
std::function< decltype(clReleaseContext)> | clReleaseContext_ptr = nullptr |
std::function< decltype(clRetainCommandQueue)> | clRetainCommandQueue_ptr = nullptr |
std::function< decltype(clEnqueueUnmapMemObject)> | clEnqueueUnmapMemObject_ptr = nullptr |
std::function< decltype(clRetainMemObject)> | clRetainMemObject_ptr = nullptr |
std::function< decltype(clReleaseMemObject)> | clReleaseMemObject_ptr = nullptr |
std::function< decltype(clGetDeviceInfo)> | clGetDeviceInfo_ptr = nullptr |
std::function< decltype(clGetDeviceIDs)> | clGetDeviceIDs_ptr = nullptr |
std::function< decltype(clGetMemObjectInfo)> | clGetMemObjectInfo_ptr = nullptr |
std::function< decltype(clRetainEvent)> | clRetainEvent_ptr = nullptr |
std::function< decltype(clGetPlatformInfo)> | clGetPlatformInfo_ptr = nullptr |
std::function< decltype(clGetPlatformIDs)> | clGetPlatformIDs_ptr = nullptr |
std::function< decltype(clGetKernelWorkGroupInfo)> | clGetKernelWorkGroupInfo_ptr = nullptr |
std::function< decltype(clGetCommandQueueInfo)> | clGetCommandQueueInfo_ptr = nullptr |
std::function< decltype(clGetKernelInfo)> | clGetKernelInfo_ptr = nullptr |
std::function< decltype(clGetEventProfilingInfo)> | clGetEventProfilingInfo_ptr = nullptr |
std::function< decltype(clSVMAlloc)> | clSVMAlloc_ptr = nullptr |
std::function< decltype(clSVMFree)> | clSVMFree_ptr = nullptr |
std::function< decltype(clEnqueueSVMMap)> | clEnqueueSVMMap_ptr = nullptr |
std::function< decltype(clEnqueueSVMUnmap)> | clEnqueueSVMUnmap_ptr = nullptr |
std::function< decltype(clEnqueueMarker)> | clEnqueueMarker_ptr = nullptr |
std::function< decltype(clWaitForEvents)> | clWaitForEvents_ptr = nullptr |
std::function< decltype(clCreateImage)> | clCreateImage_ptr = nullptr |
std::function< decltype(clSetKernelExecInfo)> | clSetKernelExecInfo_ptr = nullptr |
std::function< decltype(clImportMemoryARM)> | clImportMemoryARM_ptr = nullptr |
|
noexcept |
Default Constructor.
Definition at line 39 of file OpenCL.cpp.
|
static |
Get the static instance of CLSymbols.
Definition at line 47 of file OpenCL.cpp.
Referenced by clBuildProgram(), clCreateBuffer(), clCreateCommandQueue(), clCreateCommandQueueWithProperties(), clCreateContext(), clCreateContextFromType(), clCreateImage(), clCreateKernel(), clCreateProgramWithBinary(), clCreateProgramWithSource(), clEnqueueMapBuffer(), clEnqueueMarker(), clEnqueueNDRangeKernel(), clEnqueueReadBuffer(), clEnqueueSVMMap(), clEnqueueSVMUnmap(), clEnqueueUnmapMemObject(), clEnqueueWriteBuffer(), clFinish(), clFlush(), clGetCommandQueueInfo(), clGetContextInfo(), clGetDeviceIDs(), clGetDeviceInfo(), clGetEventProfilingInfo(), clGetKernelInfo(), clGetKernelWorkGroupInfo(), clGetMemObjectInfo(), clGetPlatformIDs(), clGetPlatformInfo(), clGetProgramBuildInfo(), clGetProgramInfo(), clImportMemoryARM(), clReleaseCommandQueue(), clReleaseContext(), clReleaseEvent(), clReleaseKernel(), clReleaseMemObject(), clReleaseProgram(), clRetainCommandQueue(), clRetainContext(), clRetainEvent(), clRetainKernel(), clRetainMemObject(), clRetainProgram(), clSetKernelArg(), clSetKernelExecInfo(), clSVMAlloc(), clSVMFree(), clWaitForEvents(), arm_compute::opencl_is_available(), OpenCLMemoryUsage::test_start(), OpenCLClock< output_timestamps >::test_start(), OpenCLMemoryUsage::test_stop(), and OpenCLClock< output_timestamps >::test_stop().
bool load | ( | const std::vector< std::string > & | libraries_filenames, |
bool | use_loader = false |
||
) |
This method attempts to load the OpenCL symbols from the first available library from the provided OpenCL libraries.
[in] | libraries_filenames | Vector containing the filenames of the libraries to be loaded. |
[in] | use_loader | Use symbol loader function loadOpenCLPointer. |
Definition at line 98 of file OpenCL.cpp.
References clBuildProgram(), clCreateBuffer(), clCreateCommandQueue(), clCreateCommandQueueWithProperties(), clCreateContext(), clCreateContextFromType(), clCreateImage(), clCreateKernel(), clCreateProgramWithBinary(), clCreateProgramWithSource(), clEnqueueMapBuffer(), clEnqueueMarker(), clEnqueueNDRangeKernel(), clEnqueueReadBuffer(), clEnqueueSVMMap(), clEnqueueSVMUnmap(), clEnqueueUnmapMemObject(), clEnqueueWriteBuffer(), clFinish(), clFlush(), clGetCommandQueueInfo(), clGetContextInfo(), clGetDeviceIDs(), clGetDeviceInfo(), clGetEventProfilingInfo(), clGetKernelInfo(), clGetKernelWorkGroupInfo(), clGetMemObjectInfo(), clGetPlatformIDs(), clGetPlatformInfo(), clGetProgramBuildInfo(), clGetProgramInfo(), clImportMemoryARM(), clReleaseCommandQueue(), clReleaseContext(), clReleaseEvent(), clReleaseKernel(), clReleaseMemObject(), clReleaseProgram(), clRetainCommandQueue(), clRetainContext(), clRetainEvent(), clRetainKernel(), clRetainMemObject(), clRetainProgram(), clSetKernelArg(), clSetKernelExecInfo(), clSVMAlloc(), clSVMFree(), clWaitForEvents(), LOAD_FUNCTION_PTR, and name.
Referenced by CLSymbols::load_default().
bool load_default | ( | ) |
Load symbols from any of the default OpenCL library names.
If all the default libraries could not be loaded, this method will print a warning message and return false.
Definition at line 53 of file OpenCL.cpp.
References ARM_COMPUTE_ERROR_ON_MSG, CLSymbols::clBuildProgram_ptr, arm_compute::utility::for_each(), CLSymbols::load(), and arm_compute::test::validation::ss().
Referenced by clBuildProgram(), clCreateBuffer(), clCreateCommandQueue(), clCreateCommandQueueWithProperties(), clCreateContext(), clCreateContextFromType(), clCreateImage(), clCreateKernel(), clCreateProgramWithBinary(), clCreateProgramWithSource(), clEnqueueMapBuffer(), clEnqueueMarker(), clEnqueueNDRangeKernel(), clEnqueueReadBuffer(), clEnqueueSVMMap(), clEnqueueSVMUnmap(), clEnqueueUnmapMemObject(), clEnqueueWriteBuffer(), clFinish(), clFlush(), clGetCommandQueueInfo(), clGetContextInfo(), clGetDeviceIDs(), clGetDeviceInfo(), clGetEventProfilingInfo(), clGetKernelInfo(), clGetKernelWorkGroupInfo(), clGetMemObjectInfo(), clGetPlatformIDs(), clGetPlatformInfo(), clGetProgramBuildInfo(), clGetProgramInfo(), clImportMemoryARM(), clReleaseCommandQueue(), clReleaseContext(), clReleaseEvent(), clReleaseKernel(), clReleaseMemObject(), clReleaseProgram(), clRetainCommandQueue(), clRetainContext(), clRetainEvent(), clRetainKernel(), clRetainMemObject(), clRetainProgram(), CLRuntimeContext::CLRuntimeContext(), clSetKernelArg(), clSetKernelExecInfo(), clSVMAlloc(), clSVMFree(), clWaitForEvents(), and arm_compute::opencl_is_available().
void load_symbols | ( | void * | handle | ) |
Load OpenCL symbols from handle.
[in] | handle | Handle to load symbols from |
std::function<decltype( clBuildProgram )> clBuildProgram_ptr = nullptr |
Definition at line 99 of file OpenCL.h.
Referenced by clBuildProgram(), CLSymbols::load_default(), and arm_compute::opencl_is_available().
std::function<decltype( clCreateBuffer )> clCreateBuffer_ptr = nullptr |
Definition at line 104 of file OpenCL.h.
Referenced by clCreateBuffer(), OpenCLMemoryUsage::test_start(), and OpenCLMemoryUsage::test_stop().
std::function<decltype( clCreateCommandQueue )> clCreateCommandQueue_ptr = nullptr |
Definition at line 96 of file OpenCL.h.
Referenced by clCreateCommandQueue().
std::function<decltype( clCreateCommandQueueWithProperties )> clCreateCommandQueueWithProperties_ptr = nullptr |
Definition at line 97 of file OpenCL.h.
Referenced by clCreateCommandQueueWithProperties().
std::function<decltype( clCreateContext )> clCreateContext_ptr = nullptr |
Definition at line 94 of file OpenCL.h.
Referenced by clCreateContext().
std::function<decltype( clCreateContextFromType )> clCreateContextFromType_ptr = nullptr |
Definition at line 95 of file OpenCL.h.
Referenced by clCreateContextFromType().
std::function<decltype( clCreateImage )> clCreateImage_ptr = nullptr |
Definition at line 141 of file OpenCL.h.
Referenced by clCreateImage().
std::function<decltype( clCreateKernel )> clCreateKernel_ptr = nullptr |
Definition at line 106 of file OpenCL.h.
Referenced by clCreateKernel().
std::function<decltype( clCreateProgramWithBinary )> clCreateProgramWithBinary_ptr = nullptr |
Definition at line 112 of file OpenCL.h.
Referenced by clCreateProgramWithBinary().
std::function<decltype( clCreateProgramWithSource )> clCreateProgramWithSource_ptr = nullptr |
Definition at line 103 of file OpenCL.h.
Referenced by clCreateProgramWithSource().
std::function<decltype( clEnqueueMapBuffer )> clEnqueueMapBuffer_ptr = nullptr |
Definition at line 114 of file OpenCL.h.
Referenced by clEnqueueMapBuffer().
std::function<decltype( clEnqueueMarker )> clEnqueueMarker_ptr = nullptr |
Definition at line 139 of file OpenCL.h.
Referenced by clEnqueueMarker().
std::function<decltype( clEnqueueNDRangeKernel )> clEnqueueNDRangeKernel_ptr = nullptr |
Definition at line 100 of file OpenCL.h.
Referenced by clEnqueueNDRangeKernel(), OpenCLClock< output_timestamps >::test_start(), and OpenCLClock< output_timestamps >::test_stop().
std::function<decltype( clEnqueueReadBuffer )> clEnqueueReadBuffer_ptr = nullptr |
Definition at line 117 of file OpenCL.h.
Referenced by clEnqueueReadBuffer().
std::function<decltype( clEnqueueSVMMap )> clEnqueueSVMMap_ptr = nullptr |
Definition at line 137 of file OpenCL.h.
Referenced by clEnqueueSVMMap().
std::function<decltype( clEnqueueSVMUnmap )> clEnqueueSVMUnmap_ptr = nullptr |
Definition at line 138 of file OpenCL.h.
Referenced by clEnqueueSVMUnmap().
std::function<decltype( clEnqueueUnmapMemObject )> clEnqueueUnmapMemObject_ptr = nullptr |
Definition at line 122 of file OpenCL.h.
Referenced by clEnqueueUnmapMemObject().
std::function<decltype( clEnqueueWriteBuffer )> clEnqueueWriteBuffer_ptr = nullptr |
Definition at line 118 of file OpenCL.h.
Referenced by clEnqueueWriteBuffer().
std::function<decltype( clFinish )> clFinish_ptr = nullptr |
Definition at line 109 of file OpenCL.h.
Referenced by clFinish().
std::function<decltype( clFlush )> clFlush_ptr = nullptr |
std::function<decltype( clGetCommandQueueInfo )> clGetCommandQueueInfo_ptr = nullptr |
Definition at line 132 of file OpenCL.h.
Referenced by clGetCommandQueueInfo().
std::function<decltype( clGetContextInfo )> clGetContextInfo_ptr = nullptr |
Definition at line 98 of file OpenCL.h.
Referenced by clGetContextInfo().
std::function<decltype( clGetDeviceIDs )> clGetDeviceIDs_ptr = nullptr |
Definition at line 126 of file OpenCL.h.
Referenced by clGetDeviceIDs().
std::function<decltype( clGetDeviceInfo )> clGetDeviceInfo_ptr = nullptr |
Definition at line 125 of file OpenCL.h.
Referenced by clGetDeviceInfo().
std::function<decltype( clGetEventProfilingInfo )> clGetEventProfilingInfo_ptr = nullptr |
Definition at line 134 of file OpenCL.h.
Referenced by clGetEventProfilingInfo().
std::function<decltype( clGetKernelInfo )> clGetKernelInfo_ptr = nullptr |
Definition at line 133 of file OpenCL.h.
Referenced by clGetKernelInfo().
std::function<decltype( clGetKernelWorkGroupInfo )> clGetKernelWorkGroupInfo_ptr = nullptr |
Definition at line 131 of file OpenCL.h.
Referenced by clGetKernelWorkGroupInfo().
std::function<decltype( clGetMemObjectInfo )> clGetMemObjectInfo_ptr = nullptr |
Definition at line 127 of file OpenCL.h.
Referenced by clGetMemObjectInfo().
std::function<decltype( clGetPlatformIDs )> clGetPlatformIDs_ptr = nullptr |
Definition at line 130 of file OpenCL.h.
Referenced by clGetPlatformIDs().
std::function<decltype( clGetPlatformInfo )> clGetPlatformInfo_ptr = nullptr |
Definition at line 129 of file OpenCL.h.
Referenced by clGetPlatformInfo().
std::function<decltype( clGetProgramBuildInfo )> clGetProgramBuildInfo_ptr = nullptr |
Definition at line 116 of file OpenCL.h.
Referenced by clGetProgramBuildInfo().
std::function<decltype( clGetProgramInfo )> clGetProgramInfo_ptr = nullptr |
Definition at line 107 of file OpenCL.h.
Referenced by clGetProgramInfo().
std::function<decltype( clImportMemoryARM )> clImportMemoryARM_ptr = nullptr |
Definition at line 145 of file OpenCL.h.
Referenced by clImportMemoryARM().
std::function<decltype( clReleaseCommandQueue )> clReleaseCommandQueue_ptr = nullptr |
Definition at line 113 of file OpenCL.h.
Referenced by clReleaseCommandQueue().
std::function<decltype( clReleaseContext )> clReleaseContext_ptr = nullptr |
Definition at line 120 of file OpenCL.h.
Referenced by clReleaseContext().
std::function<decltype( clReleaseEvent )> clReleaseEvent_ptr = nullptr |
Definition at line 119 of file OpenCL.h.
Referenced by clReleaseEvent().
std::function<decltype( clReleaseKernel )> clReleaseKernel_ptr = nullptr |
Definition at line 102 of file OpenCL.h.
Referenced by clReleaseKernel().
std::function<decltype( clReleaseMemObject )> clReleaseMemObject_ptr = nullptr |
Definition at line 124 of file OpenCL.h.
Referenced by clReleaseMemObject(), OpenCLMemoryUsage::test_start(), and OpenCLMemoryUsage::test_stop().
std::function<decltype( clReleaseProgram )> clReleaseProgram_ptr = nullptr |
Definition at line 110 of file OpenCL.h.
Referenced by clReleaseProgram().
std::function<decltype( clRetainCommandQueue )> clRetainCommandQueue_ptr = nullptr |
Definition at line 121 of file OpenCL.h.
Referenced by clRetainCommandQueue().
std::function<decltype( clRetainContext )> clRetainContext_ptr = nullptr |
Definition at line 111 of file OpenCL.h.
Referenced by clRetainContext().
std::function<decltype( clRetainEvent )> clRetainEvent_ptr = nullptr |
Definition at line 128 of file OpenCL.h.
Referenced by clRetainEvent().
std::function<decltype( clRetainKernel )> clRetainKernel_ptr = nullptr |
Definition at line 105 of file OpenCL.h.
Referenced by clRetainKernel().
std::function<decltype( clRetainMemObject )> clRetainMemObject_ptr = nullptr |
Definition at line 123 of file OpenCL.h.
Referenced by clRetainMemObject(), OpenCLMemoryUsage::test_start(), and OpenCLMemoryUsage::test_stop().
std::function<decltype( clRetainProgram )> clRetainProgram_ptr = nullptr |
Definition at line 115 of file OpenCL.h.
Referenced by clRetainProgram().
std::function<decltype( clSetKernelArg )> clSetKernelArg_ptr = nullptr |
Definition at line 101 of file OpenCL.h.
Referenced by clSetKernelArg().
std::function<decltype( clSetKernelExecInfo )> clSetKernelExecInfo_ptr = nullptr |
Definition at line 142 of file OpenCL.h.
Referenced by clSetKernelExecInfo().
std::function<decltype( clSVMAlloc )> clSVMAlloc_ptr = nullptr |
Definition at line 135 of file OpenCL.h.
Referenced by clSVMAlloc(), OpenCLMemoryUsage::test_start(), and OpenCLMemoryUsage::test_stop().
std::function<decltype( clSVMFree )> clSVMFree_ptr = nullptr |
Definition at line 136 of file OpenCL.h.
Referenced by clSVMFree(), OpenCLMemoryUsage::test_start(), and OpenCLMemoryUsage::test_stop().
std::function<decltype( clWaitForEvents )> clWaitForEvents_ptr = nullptr |
Definition at line 140 of file OpenCL.h.
Referenced by clWaitForEvents().