diff options
author | steniu01 <steven.niu@arm.com> | 2017-09-27 17:00:11 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | f01f9de88c8bced98387e0c735de3c1fb27a031f (patch) | |
tree | 365e714f44c46ae854b979cbfa58d17f1b19b504 /src/core/CL | |
parent | 4bd2cb8aec96de89eb9cf652b83298bf89486bca (diff) | |
download | ComputeLibrary-f01f9de88c8bced98387e0c735de3c1fb27a031f.tar.gz |
COMPMID-545 add CL printf support
Change-Id: I685a68e7bc8d2cdff19851d839f244206b3d5790
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/89391
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'src/core/CL')
-rw-r--r-- | src/core/CL/OpenCL.cpp | 15 | ||||
-rw-r--r-- | src/core/CL/cl_kernels/helpers.h | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/core/CL/OpenCL.cpp b/src/core/CL/OpenCL.cpp index 1d04f397fd..cc2391977b 100644 --- a/src/core/CL/OpenCL.cpp +++ b/src/core/CL/OpenCL.cpp @@ -100,6 +100,7 @@ bool CLSymbols::load(const std::string &library) clGetDeviceInfo = reinterpret_cast<clGetDeviceInfo_func>(dlsym(handle, "clGetDeviceInfo")); clGetDeviceIDs = reinterpret_cast<clGetDeviceIDs_func>(dlsym(handle, "clGetDeviceIDs")); clRetainEvent = reinterpret_cast<clRetainEvent_func>(dlsym(handle, "clRetainEvent")); + clGetPlatformIDs = reinterpret_cast<clGetPlatformIDs_func>(dlsym(handle, "clGetPlatformIDs")); dlclose(handle); @@ -632,3 +633,17 @@ cl_int clRetainEvent(cl_event event) return CL_OUT_OF_RESOURCES; } } + +cl_int clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms) +{ + arm_compute::CLSymbols::get().load_default(); + auto func = arm_compute::CLSymbols::get().clGetPlatformIDs; + if(func != nullptr) + { + return func(num_entries, platforms, num_platforms); + } + else + { + return CL_OUT_OF_RESOURCES; + } +} diff --git a/src/core/CL/cl_kernels/helpers.h b/src/core/CL/cl_kernels/helpers.h index 68af64e344..4421e74816 100644 --- a/src/core/CL/cl_kernels/helpers.h +++ b/src/core/CL/cl_kernels/helpers.h @@ -25,6 +25,9 @@ #define ARM_COMPUTE_HELPER_H #pragma OPENCL EXTENSION cl_khr_fp16 : enable +#if defined(ARM_COMPUTE_DEBUG_ENABLED) +#pragma OPENCL EXTENSION cl_arm_printf : enable +#endif // defined(ARM_COMPUTE_DEBUG_ENABLED) #define EXPAND(x) x |