diff options
author | Gil Pitney <gil.pitney@linaro.org> | 2016-06-10 23:18:27 +0000 |
---|---|---|
committer | Gil Pitney <gil.pitney@linaro.org> | 2016-06-29 22:40:58 +0000 |
commit | 52496644a788f2118ed2de7e99f3d184d3d70ca8 (patch) | |
tree | a7cdfd2213da21a4f597a98bb3f31dcb7c73ddb7 /src/api/api_platform.cpp | |
parent | d10b2c2df4655afc8ecd00d6b9afc4aa634b0e83 (diff) |
Merge of select changes from TI OpenCL 01.01.08.03 from git.ti.com/ti-opencl/hostTI_01_01_08_03_Merge
Including:
- Use of the Loki library v 0.1.7 for C++ Singleton implementation.
- Updated Platform object to be a Singleton class instance.
- Better handling of MemObject management with concurrent threads.
- Events: added CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST error code.
- MapImageEvent() fixes.
- KernelEvent() fixes around retaining/releasing objects.
- CopyBufferRectEvent() fixes.
- ReadWriteBufferRectEvent() fixes.
Revalidating Shamrock with these changes resulted in 12 more Khronos
conformance tests passing in test_basic, test_buffers, and test_events,
and no regressions.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Diffstat (limited to 'src/api/api_platform.cpp')
-rw-r--r-- | src/api/api_platform.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/api_platform.cpp b/src/api/api_platform.cpp index eb562a8..ccbbadf 100644 --- a/src/api/api_platform.cpp +++ b/src/api/api_platform.cpp @@ -52,7 +52,7 @@ clGetPlatformIDs(cl_uint num_entries, /*------------------------------------------------------------------------- * Only one "default" platform *------------------------------------------------------------------------*/ - if (platforms != 0) *platforms = &the_platform; + if (platforms != 0) *platforms = (cl_platform_id) &the_platform::Instance(); return CL_SUCCESS; } @@ -70,7 +70,7 @@ clGetPlatformInfo(cl_platform_id platform, /*------------------------------------------------------------------------- * NULL or what is returned by clGetPlatformIDs, that's to say also NULL *------------------------------------------------------------------------*/ - if (platform != &the_platform) return CL_INVALID_PLATFORM; + if (platform != (cl_platform_id) &the_platform::Instance()) return CL_INVALID_PLATFORM; return platform->info(param_name, param_value_size, param_value, param_value_size_ret); @@ -93,7 +93,7 @@ void * clGetExtensionFunctionAddress(const char *funcname) void * clGetExtensionFunctionAddressForPlatform(cl_platform_id platform, const char *funcname) { - if (platform != &the_platform) return NULL; + if (platform != (cl_platform_id) &the_platform::Instance()) return NULL; return clGetExtensionFunctionAddress(funcname); } |