aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/OpenCL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/CL/OpenCL.cpp')
-rw-r--r--src/core/CL/OpenCL.cpp15
1 files changed, 15 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;
+ }
+}