cl.hpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //---------------------------------------------------------------------------//
  2. // Copyright (c) 2013 Kyle Lutz <[email protected]>
  3. //
  4. // Distributed under the Boost Software License, Version 1.0
  5. // See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt
  7. //
  8. // See http://boostorg.github.com/compute for more information.
  9. //---------------------------------------------------------------------------//
  10. #ifndef BOOST_COMPUTE_CL_HPP
  11. #define BOOST_COMPUTE_CL_HPP
  12. #include <boost/compute/detail/cl_versions.hpp>
  13. #if defined(__APPLE__)
  14. #include <OpenCL/cl.h>
  15. #else
  16. #include <CL/cl.h>
  17. #endif
  18. // select what OpenCL core API versions to use
  19. #if defined(CL_VERSION_1_0)
  20. # define BOOST_COMPUTE_CL_VERSION_1_0
  21. #endif
  22. #if defined(CL_VERSION_1_1)
  23. # if !defined(BOOST_COMPUTE_MAX_CL_VERSION) || BOOST_COMPUTE_MAX_CL_VERSION >= 101
  24. # define BOOST_COMPUTE_CL_VERSION_1_1
  25. # endif
  26. #endif
  27. #if defined(CL_VERSION_1_2)
  28. # if !defined(BOOST_COMPUTE_MAX_CL_VERSION) || BOOST_COMPUTE_MAX_CL_VERSION >= 102
  29. # define BOOST_COMPUTE_CL_VERSION_1_2
  30. # endif
  31. #endif
  32. #if defined(CL_VERSION_2_0)
  33. # if !defined(BOOST_COMPUTE_MAX_CL_VERSION) || BOOST_COMPUTE_MAX_CL_VERSION >= 200
  34. # define BOOST_COMPUTE_CL_VERSION_2_0
  35. # endif
  36. #endif
  37. #if defined(CL_VERSION_2_1)
  38. # if !defined(BOOST_COMPUTE_MAX_CL_VERSION) || BOOST_COMPUTE_MAX_CL_VERSION >= 201
  39. # define BOOST_COMPUTE_CL_VERSION_2_1
  40. # endif
  41. #endif
  42. #if defined(CL_VERSION_2_2)
  43. # if !defined(BOOST_COMPUTE_MAX_CL_VERSION) || BOOST_COMPUTE_MAX_CL_VERSION >= 202
  44. # define BOOST_COMPUTE_CL_VERSION_2_2
  45. # endif
  46. #endif
  47. #endif // BOOST_COMPUTE_CL_HPP