Skip to content

Commit

Permalink
Replace uses of CL_EXT_{PRE,SUF}FIX* with CL_API_{PRE,SUF}FIX*
Browse files Browse the repository at this point in the history
See KhronosGroup/OpenCL-Headers#153 for the
discussion.

Signed-off-by: Kévin Petit <[email protected]>
  • Loading branch information
kpet committed Feb 16, 2021
1 parent 74fb49b commit a3c3e62
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions include/CL/opencl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,19 +548,19 @@

// Define deprecated prefixes and suffixes to ensure compilation
// in case they are not pre-defined
#if !defined(CL_EXT_PREFIX__VERSION_1_1_DEPRECATED)
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
#endif // #if !defined(CL_EXT_PREFIX__VERSION_1_1_DEPRECATED)
#if !defined(CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED)
#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
#endif // #if !defined(CL_EXT_PREFIX__VERSION_1_1_DEPRECATED)

#if !defined(CL_EXT_PREFIX__VERSION_1_2_DEPRECATED)
#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
#endif // #if !defined(CL_EXT_PREFIX__VERSION_1_2_DEPRECATED)
#if !defined(CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED)
#define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
#endif // #if !defined(CL_EXT_PREFIX__VERSION_1_2_DEPRECATED)
#if !defined(CL_API_PREFIX__VERSION_1_1_DEPRECATED)
#define CL_API_PREFIX__VERSION_1_1_DEPRECATED
#endif // #if !defined(CL_API_PREFIX__VERSION_1_1_DEPRECATED)
#if !defined(CL_API_SUFFIX__VERSION_1_1_DEPRECATED)
#define CL_API_SUFFIX__VERSION_1_1_DEPRECATED
#endif // #if !defined(CL_API_PREFIX__VERSION_1_1_DEPRECATED)

#if !defined(CL_API_PREFIX__VERSION_1_2_DEPRECATED)
#define CL_API_PREFIX__VERSION_1_2_DEPRECATED
#endif // #if !defined(CL_API_PREFIX__VERSION_1_2_DEPRECATED)
#if !defined(CL_API_SUFFIX__VERSION_1_2_DEPRECATED)
#define CL_API_SUFFIX__VERSION_1_2_DEPRECATED
#endif // #if !defined(CL_API_PREFIX__VERSION_1_2_DEPRECATED)

#if !defined(CL_CALLBACK)
#define CL_CALLBACK
Expand Down Expand Up @@ -2350,7 +2350,7 @@ class Device : public detail::Wrapper<cl_device_id>
const cl_device_partition_property_ext * /* properties */,
cl_uint /*num_entries*/,
cl_device_id * /*out_devices*/,
cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
cl_uint * /*num_devices*/ ) CL_API_SUFFIX__VERSION_1_1;

static PFN_clCreateSubDevicesEXT pfn_clCreateSubDevicesEXT = NULL;
CL_HPP_INIT_CL_EXT_FCN_PTR_(clCreateSubDevicesEXT);
Expand Down Expand Up @@ -2760,8 +2760,8 @@ CL_HPP_DEFINE_STATIC_MEMBER_ cl_int Platform::default_error_ = CL_SUCCESS;
* Unload the OpenCL compiler.
* \note Deprecated for OpenCL 1.2. Use Platform::unloadCompiler instead.
*/
inline CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int
UnloadCompiler() CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
inline CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int
UnloadCompiler() CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
inline cl_int
UnloadCompiler()
{
Expand Down Expand Up @@ -4977,7 +4977,7 @@ class Image2D : public Image
* \see Memory
* \note Deprecated for OpenCL 1.2. Please use ImageGL instead.
*/
class CL_EXT_PREFIX__VERSION_1_1_DEPRECATED Image2DGL : public Image2D
class CL_API_PREFIX__VERSION_1_1_DEPRECATED Image2DGL : public Image2D
{
public:
/*! \brief Constructs an Image2DGL in a specified context, from a given
Expand Down Expand Up @@ -5060,7 +5060,7 @@ class CL_EXT_PREFIX__VERSION_1_1_DEPRECATED Image2DGL : public Image2D
return *this;
}

} CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
} CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
#endif // CL_USE_DEPRECATED_OPENCL_1_1_APIS

#if CL_HPP_TARGET_OPENCL_VERSION >= 120
Expand Down Expand Up @@ -6866,9 +6866,9 @@ class Program : public detail::Wrapper<cl_program>
* on a callback stack associated with program. The registered user callback
* functions are called in the reverse order in which they were registered.
*/
CL_EXT_PREFIX__VERSION_2_2_DEPRECATED cl_int setReleaseCallback(
CL_API_PREFIX__VERSION_2_2_DEPRECATED cl_int setReleaseCallback(
void (CL_CALLBACK * pfn_notify)(cl_program program, void * user_data),
void * user_data = NULL) CL_EXT_SUFFIX__VERSION_2_2_DEPRECATED
void * user_data = NULL) CL_API_SUFFIX__VERSION_2_2_DEPRECATED
{
return detail::errHandler(
::clSetProgramReleaseCallback(
Expand Down Expand Up @@ -8573,10 +8573,10 @@ class CommandQueue : public detail::Wrapper<cl_command_queue>
}

#if defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS)
CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_int enqueueTask(
CL_API_PREFIX__VERSION_1_2_DEPRECATED cl_int enqueueTask(
const Kernel& kernel,
const vector<Event>* events = NULL,
Event* event = NULL) const CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
Event* event = NULL) const CL_API_SUFFIX__VERSION_1_2_DEPRECATED
{
cl_event tmp;
cl_int err = detail::errHandler(
Expand Down Expand Up @@ -8633,8 +8633,8 @@ class CommandQueue : public detail::Wrapper<cl_command_queue>
* Deprecated APIs for 1.2
*/
#if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS)
CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
cl_int enqueueMarker(Event* event = NULL) const CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
CL_API_PREFIX__VERSION_1_1_DEPRECATED
cl_int enqueueMarker(Event* event = NULL) const CL_API_SUFFIX__VERSION_1_1_DEPRECATED
{
cl_event tmp;
cl_int err = detail::errHandler(
Expand All @@ -8649,8 +8649,8 @@ class CommandQueue : public detail::Wrapper<cl_command_queue>
return err;
}

CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
cl_int enqueueWaitForEvents(const vector<Event>& events) const CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
CL_API_PREFIX__VERSION_1_1_DEPRECATED
cl_int enqueueWaitForEvents(const vector<Event>& events) const CL_API_SUFFIX__VERSION_1_1_DEPRECATED
{
return detail::errHandler(
::clEnqueueWaitForEvents(
Expand Down Expand Up @@ -8786,8 +8786,8 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL *PFN_clEnqueueReleaseD3D10ObjectsKHR)(
* Deprecated APIs for 1.2
*/
#if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS)
CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
cl_int enqueueBarrier() const CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
CL_API_PREFIX__VERSION_1_1_DEPRECATED
cl_int enqueueBarrier() const CL_API_SUFFIX__VERSION_1_1_DEPRECATED
{
return detail::errHandler(
::clEnqueueBarrier(object_),
Expand Down

0 comments on commit a3c3e62

Please sign in to comment.