diff --git a/projects/clr/opencl/amdocl/CMakeLists.txt b/projects/clr/opencl/amdocl/CMakeLists.txt index b2126b2110..140e294e18 100644 --- a/projects/clr/opencl/amdocl/CMakeLists.txt +++ b/projects/clr/opencl/amdocl/CMakeLists.txt @@ -64,7 +64,6 @@ add_library(amdocl64_obj OBJECT cl_svm.cpp cl_sampler.cpp cl_thread_trace_amd.cpp - cl_object.cpp cl_counter.cpp cl_d3d10.cpp cl_d3d9.cpp diff --git a/projects/clr/opencl/amdocl/cl_common.hpp b/projects/clr/opencl/amdocl/cl_common.hpp index a933640b30..8b71cc6d24 100644 --- a/projects/clr/opencl/amdocl/cl_common.hpp +++ b/projects/clr/opencl/amdocl/cl_common.hpp @@ -114,24 +114,6 @@ cl_int clEnqueueReleaseExtObjectsAMD(cl_command_queue command_queue, extern "C" { -extern CL_API_ENTRY cl_key_amd CL_API_CALL -clCreateKeyAMD( - cl_platform_id platform, - void (CL_CALLBACK * destructor)( void * ), - cl_int * errcode_ret); - -extern CL_API_ENTRY cl_int CL_API_CALL -clObjectGetValueForKeyAMD( - void * object, - cl_key_amd key, - void ** ret_val); - -extern CL_API_ENTRY cl_int CL_API_CALL -clObjectSetValueForKeyAMD( - void * object, - cl_key_amd key, - void * value); - #if defined(CL_VERSION_1_1) extern CL_API_ENTRY cl_int CL_API_CALL clSetCommandQueueProperty( diff --git a/projects/clr/opencl/amdocl/cl_context.cpp b/projects/clr/opencl/amdocl/cl_context.cpp index 9603d9160d..c1236a7096 100644 --- a/projects/clr/opencl/amdocl/cl_context.cpp +++ b/projects/clr/opencl/amdocl/cl_context.cpp @@ -485,7 +485,6 @@ CL_API_ENTRY void* CL_API_CALL clGetExtensionFunctionAddress(const char* func_na CL_EXTENSION_ENTRYPOINT_CHECK(clCreateFromD3D10Texture3DKHR); CL_EXTENSION_ENTRYPOINT_CHECK(clCreateFromDX9MediaSurfaceKHR); #endif //_WIN32 - CL_EXTENSION_ENTRYPOINT_CHECK(clCreateKeyAMD); CL_EXTENSION_ENTRYPOINT_CHECK(clConvertImageAMD); CL_EXTENSION_ENTRYPOINT_CHECK(clCreateBufferFromImageAMD); #if defined(cl_khr_il_program) || defined(CL_VERSION_2_1) @@ -574,10 +573,6 @@ CL_API_ENTRY void* CL_API_CALL clGetExtensionFunctionAddress(const char* func_na case 'I': CL_EXTENSION_ENTRYPOINT_CHECK(clIcdGetPlatformIDsKHR); break; - case 'O': - CL_EXTENSION_ENTRYPOINT_CHECK(clObjectGetValueForKeyAMD); - CL_EXTENSION_ENTRYPOINT_CHECK(clObjectSetValueForKeyAMD); - break; case 'R': CL_EXTENSION_ENTRYPOINT_CHECK(clReleasePerfCounterAMD); CL_EXTENSION_ENTRYPOINT_CHECK(clRetainPerfCounterAMD); diff --git a/projects/clr/opencl/amdocl/cl_device.cpp b/projects/clr/opencl/amdocl/cl_device.cpp index bc4cd26e1c..84b022e3ba 100644 --- a/projects/clr/opencl/amdocl/cl_device.cpp +++ b/projects/clr/opencl/amdocl/cl_device.cpp @@ -142,10 +142,6 @@ RUNTIME_ENTRY(cl_int, clGetPlatformInfo, case CL_PLATFORM_ICD_SUFFIX_KHR: value = "AMD"; break; - case CL_PLATFORM_MAX_KEYS_AMD: { - size_t max_keys = OCL_MAX_KEYS; - return amd::clGetInfo(max_keys, param_value_size, param_value, param_value_size_ret); - } case CL_PLATFORM_HOST_TIMER_RESOLUTION: { cl_ulong resolution = (cl_ulong)amd::Os::timerResolutionNanos(); return amd::clGetInfo(resolution, param_value_size, param_value, param_value_size_ret); diff --git a/projects/clr/opencl/amdocl/cl_object.cpp b/projects/clr/opencl/amdocl/cl_object.cpp deleted file mode 100644 index 9c956aa7c9..0000000000 --- a/projects/clr/opencl/amdocl/cl_object.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (c) 2010-present Advanced Micro Devices, Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. */ - -#include "cl_common.hpp" - -RUNTIME_ENTRY_RET(cl_key_amd, clCreateKeyAMD, - (cl_platform_id platform, void(CL_CALLBACK* destructor)(void*), - cl_int* errcode_ret)) { - cl_key_amd key = amd::ObjectMetadata::createKey(destructor); - - *not_null(errcode_ret) = amd::ObjectMetadata::check(key) ? CL_SUCCESS : CL_OUT_OF_RESOURCES; - - return key; -} -RUNTIME_EXIT - -RUNTIME_ENTRY(cl_int, clObjectGetValueForKeyAMD, (void* object, cl_key_amd key, void** ret_val)) { - if (ret_val == NULL) { - return CL_INVALID_VALUE; - } - *ret_val = NULL; - - if (!amd::RuntimeObject::isValidHandle(object)) { - return CL_INVALID_OBJECT_AMD; - } - if (!amd::ObjectMetadata::check(key)) { - return CL_INVALID_KEY_AMD; - } - - amd::ObjectMetadata& metadata = - amd::RuntimeObject::fromHandle(object)->metadata(); - - void* value = metadata.getValueForKey(key); - if (value == NULL) { - return CL_INVALID_KEY_AMD; - } - - *ret_val = value; - return CL_SUCCESS; -} -RUNTIME_EXIT - -RUNTIME_ENTRY(cl_int, clObjectSetValueForKeyAMD, (void* object, cl_key_amd key, void* value)) { - if (!amd::RuntimeObject::isValidHandle(object)) { - return CL_INVALID_OBJECT_AMD; - } - if (!amd::ObjectMetadata::check(key)) { - return CL_INVALID_KEY_AMD; - } - if (value == NULL) { - return CL_INVALID_VALUE; - } - - amd::ObjectMetadata& metadata = - amd::RuntimeObject::fromHandle(object)->metadata(); - - metadata.setValueForKey(key, value); - return CL_SUCCESS; -} -RUNTIME_EXIT diff --git a/projects/clr/opencl/khronos/headers/opencl1.2/CL/cl_ext.h b/projects/clr/opencl/khronos/headers/opencl1.2/CL/cl_ext.h index 694fa15976..5b3cb5e1e1 100644 --- a/projects/clr/opencl/khronos/headers/opencl1.2/CL/cl_ext.h +++ b/projects/clr/opencl/khronos/headers/opencl1.2/CL/cl_ext.h @@ -375,32 +375,6 @@ typedef CL_API_ENTRY cl_program (CL_API_CALL * clCreateProgramWithAssemblyAMD_fn /* cl_kernel_exec_info for DVR DOPP texture support */ #define CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD 0x4120 #define CL_KERNEL_EXEC_INFO_PFPA_VCOP_AMD 0x4121 - -/************************* -* cl_amd_object_metadata * -**************************/ -#define cl_amd_object_metadata 1 - -typedef size_t cl_key_amd; - -#define CL_INVALID_OBJECT_AMD 0x403A -#define CL_INVALID_KEY_AMD 0x403B -#define CL_PLATFORM_MAX_KEYS_AMD 0x403C - -typedef CL_API_ENTRY cl_key_amd (CL_API_CALL * clCreateKeyAMD_fn)( - cl_platform_id /* platform */, - void (CL_CALLBACK * /* destructor */)( void* /* old_value */), - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; - -typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectGetValueForKeyAMD_fn)( - void * /* object */, - cl_key_amd /* key */, - void ** /* ret_val */) CL_API_SUFFIX__VERSION_1_1; - -typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectSetValueForKeyAMD_fn)( - void * /* object */, - cl_key_amd /* key */, - void * /* value */) CL_API_SUFFIX__VERSION_1_1; // /********************************* diff --git a/projects/clr/opencl/khronos/headers/opencl2.0/CL/cl_ext.h b/projects/clr/opencl/khronos/headers/opencl2.0/CL/cl_ext.h index 145ced3781..dfa4130694 100644 --- a/projects/clr/opencl/khronos/headers/opencl2.0/CL/cl_ext.h +++ b/projects/clr/opencl/khronos/headers/opencl2.0/CL/cl_ext.h @@ -409,32 +409,6 @@ typedef CL_API_ENTRY cl_mem /* cl_kernel_exec_info for DVR DOPP texture support */ #define CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD 0x4120 #define CL_KERNEL_EXEC_INFO_PFPA_VCOP_AMD 0x4121 - -/************************* -* cl_amd_object_metadata * -**************************/ -#define cl_amd_object_metadata 1 - -typedef size_t cl_key_amd; - -#define CL_INVALID_OBJECT_AMD 0x403A -#define CL_INVALID_KEY_AMD 0x403B -#define CL_PLATFORM_MAX_KEYS_AMD 0x403C - -typedef CL_API_ENTRY cl_key_amd (CL_API_CALL * clCreateKeyAMD_fn)( - cl_platform_id /* platform */, - void (CL_CALLBACK * /* destructor */)( void* /* old_value */), - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; - -typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectGetValueForKeyAMD_fn)( - void * /* object */, - cl_key_amd /* key */, - void ** /* ret_val */) CL_API_SUFFIX__VERSION_1_1; - -typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectSetValueForKeyAMD_fn)( - void * /* object */, - cl_key_amd /* key */, - void * /* value */) CL_API_SUFFIX__VERSION_1_1; // /********************************* diff --git a/projects/clr/opencl/khronos/headers/opencl2.1/CL/cl_ext.h b/projects/clr/opencl/khronos/headers/opencl2.1/CL/cl_ext.h index 04eee6ebe9..219a8cbfbb 100644 --- a/projects/clr/opencl/khronos/headers/opencl2.1/CL/cl_ext.h +++ b/projects/clr/opencl/khronos/headers/opencl2.1/CL/cl_ext.h @@ -390,32 +390,6 @@ typedef CL_API_ENTRY cl_mem /* cl_kernel_exec_info for DVR DOPP texture support */ #define CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD 0x4120 #define CL_KERNEL_EXEC_INFO_PFPA_VCOP_AMD 0x4121 - -/************************* -* cl_amd_object_metadata * -**************************/ -#define cl_amd_object_metadata 1 - -typedef size_t cl_key_amd; - -#define CL_INVALID_OBJECT_AMD 0x403A -#define CL_INVALID_KEY_AMD 0x403B -#define CL_PLATFORM_MAX_KEYS_AMD 0x403C - -typedef CL_API_ENTRY cl_key_amd (CL_API_CALL * clCreateKeyAMD_fn)( - cl_platform_id /* platform */, - void (CL_CALLBACK * /* destructor */)( void* /* old_value */), - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; - -typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectGetValueForKeyAMD_fn)( - void * /* object */, - cl_key_amd /* key */, - void ** /* ret_val */) CL_API_SUFFIX__VERSION_1_1; - -typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectSetValueForKeyAMD_fn)( - void * /* object */, - cl_key_amd /* key */, - void * /* value */) CL_API_SUFFIX__VERSION_1_1; // /********************************* diff --git a/projects/clr/opencl/khronos/headers/opencl2.2/CL/cl_ext.h b/projects/clr/opencl/khronos/headers/opencl2.2/CL/cl_ext.h index e14296a095..64634569fb 100644 --- a/projects/clr/opencl/khronos/headers/opencl2.2/CL/cl_ext.h +++ b/projects/clr/opencl/khronos/headers/opencl2.2/CL/cl_ext.h @@ -390,32 +390,6 @@ typedef CL_API_ENTRY cl_mem /* cl_kernel_exec_info for DVR DOPP texture support */ #define CL_KERNEL_EXEC_INFO_NEW_VCOP_AMD 0x4120 #define CL_KERNEL_EXEC_INFO_PFPA_VCOP_AMD 0x4121 - -/************************* -* cl_amd_object_metadata * -**************************/ -#define cl_amd_object_metadata 1 - -typedef size_t cl_key_amd; - -#define CL_INVALID_OBJECT_AMD 0x403A -#define CL_INVALID_KEY_AMD 0x403B -#define CL_PLATFORM_MAX_KEYS_AMD 0x403C - -typedef CL_API_ENTRY cl_key_amd (CL_API_CALL * clCreateKeyAMD_fn)( - cl_platform_id /* platform */, - void (CL_CALLBACK * /* destructor */)( void* /* old_value */), - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; - -typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectGetValueForKeyAMD_fn)( - void * /* object */, - cl_key_amd /* key */, - void ** /* ret_val */) CL_API_SUFFIX__VERSION_1_1; - -typedef CL_API_ENTRY cl_int (CL_API_CALL * clObjectSetValueForKeyAMD_fn)( - void * /* object */, - cl_key_amd /* key */, - void * /* value */) CL_API_SUFFIX__VERSION_1_1; // /*********************************