Skip to content

Commit

Permalink
guard the deprecated function clSetProgramReleaseCallback (KhronosGro…
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug authored Oct 28, 2020
1 parent 2967d09 commit cf3a8c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/CL/opencl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6795,6 +6795,7 @@ class Program : public detail::Wrapper<cl_program>
}

#if CL_HPP_TARGET_OPENCL_VERSION >= 220
#if defined(CL_USE_DEPRECATED_OPENCL_2_2_APIS)
/*! \brief Registers a callback function to be called when destructors for
* program scope global variables are complete and before the
* program is released.
Expand All @@ -6805,9 +6806,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_int setReleaseCallback(
CL_EXT_PREFIX__VERSION_2_2_DEPRECATED cl_int setReleaseCallback(
void (CL_CALLBACK * pfn_notify)(cl_program program, void * user_data),
void * user_data = NULL)
void * user_data = NULL) CL_EXT_SUFFIX__VERSION_2_2_DEPRECATED
{
return detail::errHandler(
::clSetProgramReleaseCallback(
Expand All @@ -6816,6 +6817,7 @@ class Program : public detail::Wrapper<cl_program>
user_data),
__SET_PROGRAM_RELEASE_CALLBACK_ERR);
}
#endif // #if defined(CL_USE_DEPRECATED_OPENCL_2_2_APIS)

/*! \brief Sets a SPIR-V specialization constant.
*
Expand Down

0 comments on commit cf3a8c6

Please sign in to comment.