1 //---------------------------------------------------------------------------//
2 // Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
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
8 // See http://boostorg.github.com/compute for more information.
9 //---------------------------------------------------------------------------//
11 #ifndef BOOST_COMPUTE_CONFIG_HPP
12 #define BOOST_COMPUTE_CONFIG_HPP
14 #include <boost/config.hpp>
15 #include <boost/version.hpp>
16 #include <boost/compute/cl.hpp>
18 // check for minimum required boost version
19 #if BOOST_VERSION < 105400
20 #error Boost.Compute requires Boost version 1.54 or later
23 // the BOOST_COMPUTE_NO_VARIADIC_TEMPLATES macro is defined
24 // if the compiler does not *fully* support variadic templates
25 #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || \
26 (defined(__GNUC__) && !defined(__clang__) && \
27 __GNUC__ == 4 && __GNUC_MINOR__ <= 6)
28 #define BOOST_COMPUTE_NO_VARIADIC_TEMPLATES
29 #endif // BOOST_NO_CXX11_VARIADIC_TEMPLATES
31 // the BOOST_COMPUTE_NO_STD_TUPLE macro is defined if the
32 // compiler/stdlib does not support std::tuple
33 #if defined(BOOST_NO_CXX11_HDR_TUPLE) || \
34 defined(BOOST_COMPUTE_NO_VARIADIC_TEMPLATES)
35 #define BOOST_COMPUTE_NO_STD_TUPLE
36 #endif // BOOST_NO_CXX11_HDR_TUPLE
38 // defines BOOST_COMPUTE_CL_CALLBACK to the value of CL_CALLBACK
39 // if it is defined (it was added in OpenCL 1.1). this is used to
40 // annotate certain callback functions registered with OpenCL
42 # define BOOST_COMPUTE_CL_CALLBACK CL_CALLBACK
44 # define BOOST_COMPUTE_CL_CALLBACK
47 // Maximum number of iterators acceptable for make_zip_iterator
48 #ifndef BOOST_COMPUTE_MAX_ARITY
49 // should be no more than max boost::tuple size (10 by default)
50 # define BOOST_COMPUTE_MAX_ARITY 10
53 #if !defined(BOOST_COMPUTE_DOXYGEN_INVOKED) && \
54 defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
55 # define BOOST_COMPUTE_NO_RVALUE_REFERENCES
56 #endif // BOOST_NO_CXX11_RVALUE_REFERENCES
58 #if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
59 # define BOOST_COMPUTE_NO_HDR_INITIALIZER_LIST
60 #endif // BOOST_NO_CXX11_HDR_INITIALIZER_LIST
62 #if defined(BOOST_NO_CXX11_HDR_CHRONO)
63 # define BOOST_COMPUTE_NO_HDR_CHRONO
64 #endif // BOOST_NO_CXX11_HDR_CHRONO
66 #endif // BOOST_COMPUTE_CONFIG_HPP