1 //---------------------------------------------------------------------------//
2 // Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
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 
11 #ifndef BOOST_COMPUTE_CL_HPP
12 #define BOOST_COMPUTE_CL_HPP
13 
14 #include <boost/compute/detail/cl_versions.hpp>
15 
16 #if defined(__APPLE__)
17 #include <OpenCL/cl.h>
18 #else
19 #include <CL/cl.h>
20 #endif
21 
22 // select what OpenCL core API versions to use
23 #if defined(CL_VERSION_1_0)
24 #  define BOOST_COMPUTE_CL_VERSION_1_0
25 #endif
26 #if defined(CL_VERSION_1_1)
27 #  if !defined(BOOST_COMPUTE_MAX_CL_VERSION) || BOOST_COMPUTE_MAX_CL_VERSION >= 101
28 #    define BOOST_COMPUTE_CL_VERSION_1_1
29 #  endif
30 #endif
31 #if defined(CL_VERSION_1_2)
32 #  if !defined(BOOST_COMPUTE_MAX_CL_VERSION) || BOOST_COMPUTE_MAX_CL_VERSION >= 102
33 #    define BOOST_COMPUTE_CL_VERSION_1_2
34 #  endif
35 #endif
36 #if defined(CL_VERSION_2_0)
37 #  if !defined(BOOST_COMPUTE_MAX_CL_VERSION) || BOOST_COMPUTE_MAX_CL_VERSION >= 200
38 #    define BOOST_COMPUTE_CL_VERSION_2_0
39 #  endif
40 #endif
41 #if defined(CL_VERSION_2_1)
42 #  if !defined(BOOST_COMPUTE_MAX_CL_VERSION) || BOOST_COMPUTE_MAX_CL_VERSION >= 201
43 #    define BOOST_COMPUTE_CL_VERSION_2_1
44 #  endif
45 #endif
46 #if defined(CL_VERSION_2_2)
47 #  if !defined(BOOST_COMPUTE_MAX_CL_VERSION) || BOOST_COMPUTE_MAX_CL_VERSION >= 202
48 #    define BOOST_COMPUTE_CL_VERSION_2_2
49 #  endif
50 #endif
51 
52 #endif // BOOST_COMPUTE_CL_HPP
53