1234567891011121314151617181920212223242526272829303132333435 |
- #ifndef BOOST_COMPUTE_FUNCTIONAL_MACROS_HPP
- #define BOOST_COMPUTE_FUNCTIONAL_MACROS_HPP
- #include <boost/preprocessor/cat.hpp>
- #include <boost/preprocessor/stringize.hpp>
- #include <boost/compute/function.hpp>
- #define BOOST_COMPUTE_DECLARE_BUILTIN_FUNCTION(name, signature, template_args) \
- template<template_args> \
- class name : public function<signature> \
- { \
- public: \
- (name)() : function<signature>(BOOST_PP_STRINGIZE(name)) { } \
- };
- #define BOOST_COMPUTE_DECLARE_BUILTIN_FUNCTION_UNDERSCORE(name, signature, template_args) \
- template<template_args> \
- class BOOST_PP_CAT(name, _) : public function<signature> \
- { \
- public: \
- BOOST_PP_CAT(name, _)() : function<signature>(BOOST_PP_STRINGIZE(name)) { } \
- };
- #endif
|