From df3103622b7de05f4e35b22a2c94b4a46eab4efc Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 14 Nov 2018 13:16:56 +0000 Subject: COMPMID-1088: Use IMemoryRegion in interfaces where possible -Simplifies import memory interface -Changes the used of void** handles with appropriate interfaces. Change-Id: I5918c855c11f46352058864623336b352162a4b7 --- src/core/CL/OpenCL.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/core/CL/OpenCL.cpp') diff --git a/src/core/CL/OpenCL.cpp b/src/core/CL/OpenCL.cpp index 486bb6a1bd..6725f36a5d 100644 --- a/src/core/CL/OpenCL.cpp +++ b/src/core/CL/OpenCL.cpp @@ -106,6 +106,7 @@ bool CLSymbols::load(const std::string &library) LOAD_FUNCTION_PTR(clReleaseMemObject, handle); LOAD_FUNCTION_PTR(clGetDeviceInfo, handle); LOAD_FUNCTION_PTR(clGetDeviceIDs, handle); + LOAD_FUNCTION_PTR(clGetMemObjectInfo, handle); LOAD_FUNCTION_PTR(clRetainEvent, handle); LOAD_FUNCTION_PTR(clGetPlatformIDs, handle); LOAD_FUNCTION_PTR(clGetKernelWorkGroupInfo, handle); @@ -796,6 +797,24 @@ cl_int clGetDeviceInfo(cl_device_id device, } } +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) +{ + arm_compute::CLSymbols::get().load_default(); + auto func = arm_compute::CLSymbols::get().clGetMemObjectInfo_ptr; + if(func != nullptr) + { + return func(memobj, param_name, param_value_size, param_value, param_value_size_ret); + } + else + { + return CL_OUT_OF_RESOURCES; + } +} + cl_int clRetainEvent(cl_event event) { arm_compute::CLSymbols::get().load_default(); -- cgit v1.2.1