COMPMID-417 - Added clFinish to CLSymbols
Change-Id: If3ee89d91f105489c766b9e714fdf72da8fbfe78
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/83664
Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
diff --git a/src/core/CL/OpenCL.cpp b/src/core/CL/OpenCL.cpp
index 4eba709..085e186 100644
--- a/src/core/CL/OpenCL.cpp
+++ b/src/core/CL/OpenCL.cpp
@@ -81,6 +81,7 @@
clCreateKernel = reinterpret_cast<clCreateKernel_func>(dlsym(handle, "clCreateKernel"));
clGetProgramInfo = reinterpret_cast<clGetProgramInfo_func>(dlsym(handle, "clGetProgramInfo"));
clFlush = reinterpret_cast<clFlush_func>(dlsym(handle, "clFlush"));
+ clFinish = reinterpret_cast<clFinish_func>(dlsym(handle, "clFinish"));
clReleaseProgram = reinterpret_cast<clReleaseProgram_func>(dlsym(handle, "clReleaseProgram"));
clRetainContext = reinterpret_cast<clRetainContext_func>(dlsym(handle, "clRetainContext"));
clCreateProgramWithBinary = reinterpret_cast<clCreateProgramWithBinary_func>(dlsym(handle, "clCreateProgramWithBinary"));
@@ -438,6 +439,20 @@
}
}
+cl_int clFinish(cl_command_queue command_queue)
+{
+ arm_compute::CLSymbols::get().load_default();
+ auto func = arm_compute::CLSymbols::get().clFinish;
+ if(func != nullptr)
+ {
+ return func(command_queue);
+ }
+ else
+ {
+ return CL_OUT_OF_RESOURCES;
+ }
+}
+
cl_int clGetProgramInfo(
cl_program program,
cl_program_info param_name,