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_FUNCTIONAL_MACROS_HPP
12 #define BOOST_COMPUTE_FUNCTIONAL_MACROS_HPP
14 #include <boost/preprocessor/cat.hpp>
15 #include <boost/preprocessor/stringize.hpp>
17 #include <boost/compute/function.hpp>
19 #define BOOST_COMPUTE_DECLARE_BUILTIN_FUNCTION(name, signature, template_args) \
20 template<template_args> \
21 class name : public function<signature> \
24 (name)() : function<signature>(BOOST_PP_STRINGIZE(name)) { } \
27 #define BOOST_COMPUTE_DECLARE_BUILTIN_FUNCTION_UNDERSCORE(name, signature, template_args) \
28 template<template_args> \
29 class BOOST_PP_CAT(name, _) : public function<signature> \
32 BOOST_PP_CAT(name, _)() : function<signature>(BOOST_PP_STRINGIZE(name)) { } \
35 #endif // BOOST_COMPUTE_FUNCTIONAL_MACROS_HPP