Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:03

0001 //---------------------------------------------------------------------------//
0002 // Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
0003 //
0004 // Distributed under the Boost Software License, Version 1.0
0005 // See accompanying file LICENSE_1_0.txt or copy at
0006 // http://www.boost.org/LICENSE_1_0.txt
0007 //
0008 // See http://boostorg.github.com/compute for more information.
0009 //---------------------------------------------------------------------------//
0010 
0011 #ifndef BOOST_COMPUTE_LAMBDA_FUNCTIONAL_HPP
0012 #define BOOST_COMPUTE_LAMBDA_FUNCTIONAL_HPP
0013 
0014 #include <boost/tuple/tuple.hpp>
0015 #include <boost/lexical_cast.hpp>
0016 
0017 #include <boost/proto/core.hpp>
0018 #include <boost/preprocessor/cat.hpp>
0019 #include <boost/preprocessor/stringize.hpp>
0020 
0021 #include <boost/compute/functional/get.hpp>
0022 #include <boost/compute/lambda/result_of.hpp>
0023 #include <boost/compute/lambda/placeholder.hpp>
0024 
0025 #include <boost/compute/types/fundamental.hpp>
0026 #include <boost/compute/type_traits/scalar_type.hpp>
0027 #include <boost/compute/type_traits/vector_size.hpp>
0028 #include <boost/compute/type_traits/make_vector_type.hpp>
0029 
0030 namespace boost {
0031 namespace compute {
0032 namespace lambda {
0033 
0034 namespace mpl = boost::mpl;
0035 namespace proto = boost::proto;
0036 
0037 // wraps a unary boolean function whose result type is an int_ when the argument
0038 // type is a scalar, and intN_ if the argument type is a vector of size N
0039 #define BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_UNARY_FUNCTION(name) \
0040     namespace detail { \
0041         struct BOOST_PP_CAT(name, _func) \
0042         { \
0043             template<class Expr, class Args> \
0044             struct lambda_result \
0045             { \
0046                 typedef typename proto::result_of::child_c<Expr, 1>::type Arg; \
0047                 typedef typename ::boost::compute::lambda::result_of<Arg, Args>::type result_type; \
0048                 typedef typename ::boost::compute::make_vector_type< \
0049                     ::boost::compute::int_, \
0050                     ::boost::compute::vector_size<result_type>::value \
0051                 >::type type; \
0052             }; \
0053             \
0054             template<class Context, class Arg> \
0055             static void apply(Context &ctx, const Arg &arg) \
0056             { \
0057                 ctx.stream << #name << "("; \
0058                 proto::eval(arg, ctx); \
0059                 ctx.stream << ")"; \
0060             } \
0061         }; \
0062     } \
0063     template<class Arg> \
0064     inline typename proto::result_of::make_expr< \
0065         proto::tag::function, BOOST_PP_CAT(detail::name, _func), const Arg& \
0066     >::type const \
0067     name(const Arg &arg) \
0068     { \
0069         return proto::make_expr<proto::tag::function>( \
0070             BOOST_PP_CAT(detail::name, _func)(), ::boost::ref(arg) \
0071         ); \
0072     }
0073 
0074 // wraps a unary function whose return type is the same as the argument type
0075 #define BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(name) \
0076     namespace detail { \
0077         struct BOOST_PP_CAT(name, _func) \
0078         { \
0079             template<class Expr, class Args> \
0080             struct lambda_result \
0081             { \
0082                 typedef typename proto::result_of::child_c<Expr, 1>::type Arg1; \
0083                 typedef typename ::boost::compute::lambda::result_of<Arg1, Args>::type type; \
0084             }; \
0085             \
0086             template<class Context, class Arg> \
0087             static void apply(Context &ctx, const Arg &arg) \
0088             { \
0089                 ctx.stream << #name << "("; \
0090                 proto::eval(arg, ctx); \
0091                 ctx.stream << ")"; \
0092             } \
0093         }; \
0094     } \
0095     template<class Arg> \
0096     inline typename proto::result_of::make_expr< \
0097         proto::tag::function, BOOST_PP_CAT(detail::name, _func), const Arg& \
0098     >::type const \
0099     name(const Arg &arg) \
0100     { \
0101         return proto::make_expr<proto::tag::function>( \
0102             BOOST_PP_CAT(detail::name, _func)(), ::boost::ref(arg) \
0103         ); \
0104     }
0105 
0106 // wraps a unary function whose result type is the scalar type of the first argument
0107 #define BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_ST(name) \
0108     namespace detail { \
0109         struct BOOST_PP_CAT(name, _func) \
0110         { \
0111             template<class Expr, class Args> \
0112             struct lambda_result \
0113             { \
0114                 typedef typename proto::result_of::child_c<Expr, 1>::type Arg; \
0115                 typedef typename ::boost::compute::lambda::result_of<Arg, Args>::type result_type; \
0116                 typedef typename ::boost::compute::scalar_type<result_type>::type type; \
0117             }; \
0118             \
0119             template<class Context, class Arg> \
0120             static void apply(Context &ctx, const Arg &arg) \
0121             { \
0122                 ctx.stream << #name << "("; \
0123                 proto::eval(arg, ctx); \
0124                 ctx.stream << ")"; \
0125             } \
0126         }; \
0127     } \
0128     template<class Arg> \
0129     inline typename proto::result_of::make_expr< \
0130         proto::tag::function, BOOST_PP_CAT(detail::name, _func), const Arg& \
0131     >::type const \
0132     name(const Arg &arg) \
0133     { \
0134         return proto::make_expr<proto::tag::function>( \
0135             BOOST_PP_CAT(detail::name, _func)(), ::boost::ref(arg) \
0136         ); \
0137     }
0138 
0139 // wraps a binary boolean function whose result type is an int_ when the first
0140 // argument type is a scalar, and intN_ if the first argument type is a vector
0141 // of size N
0142 #define BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_BINARY_FUNCTION(name) \
0143     namespace detail { \
0144         struct BOOST_PP_CAT(name, _func) \
0145         { \
0146             template<class Expr, class Args> \
0147             struct lambda_result \
0148             { \
0149                 typedef typename proto::result_of::child_c<Expr, 1>::type Arg1; \
0150                 typedef typename ::boost::compute::make_vector_type< \
0151                     ::boost::compute::int_, \
0152                     ::boost::compute::vector_size<Arg1>::value \
0153                 >::type type; \
0154             }; \
0155             \
0156             template<class Context, class Arg1, class Arg2> \
0157             static void apply(Context &ctx, const Arg1 &arg1, const Arg2 &arg2) \
0158             { \
0159                 ctx.stream << #name << "("; \
0160                 proto::eval(arg1, ctx); \
0161                 ctx.stream << ", "; \
0162                 proto::eval(arg2, ctx); \
0163                 ctx.stream << ")"; \
0164             } \
0165         }; \
0166     } \
0167     template<class Arg1, class Arg2> \
0168     inline typename proto::result_of::make_expr< \
0169         proto::tag::function, BOOST_PP_CAT(detail::name, _func), const Arg1&, const Arg2& \
0170     >::type const \
0171     name(const Arg1 &arg1, const Arg2 &arg2) \
0172     { \
0173         return proto::make_expr<proto::tag::function>( \
0174             BOOST_PP_CAT(detail::name, _func)(), ::boost::ref(arg1), ::boost::ref(arg2) \
0175         ); \
0176     }
0177 
0178 // wraps a binary function whose result type is the type of the first argument
0179 #define BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(name) \
0180     namespace detail { \
0181         struct BOOST_PP_CAT(name, _func) \
0182         { \
0183             template<class Expr, class Args> \
0184             struct lambda_result \
0185             { \
0186                 typedef typename proto::result_of::child_c<Expr, 1>::type Arg1; \
0187                 typedef typename ::boost::compute::lambda::result_of<Arg1, Args>::type type; \
0188             }; \
0189             \
0190             template<class Context, class Arg1, class Arg2> \
0191             static void apply(Context &ctx, const Arg1 &arg1, const Arg2 &arg2) \
0192             { \
0193                 ctx.stream << #name << "("; \
0194                 proto::eval(arg1, ctx); \
0195                 ctx.stream << ", "; \
0196                 proto::eval(arg2, ctx); \
0197                 ctx.stream << ")"; \
0198             } \
0199         }; \
0200     } \
0201     template<class Arg1, class Arg2> \
0202     inline typename proto::result_of::make_expr< \
0203         proto::tag::function, BOOST_PP_CAT(detail::name, _func), const Arg1&, const Arg2& \
0204     >::type const \
0205     name(const Arg1 &arg1, const Arg2 &arg2) \
0206     { \
0207         return proto::make_expr<proto::tag::function>( \
0208             BOOST_PP_CAT(detail::name, _func)(), ::boost::ref(arg1), ::boost::ref(arg2) \
0209         ); \
0210     }
0211 
0212 // wraps a binary function whose result type is the type of the second argument
0213 #define BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION_2(name) \
0214     namespace detail { \
0215         struct BOOST_PP_CAT(name, _func) \
0216         { \
0217             template<class Expr, class Args> \
0218             struct lambda_result \
0219             { \
0220                 typedef typename proto::result_of::child_c<Expr, 2>::type Arg2; \
0221                 typedef typename ::boost::compute::lambda::result_of<Arg2, Args>::type type; \
0222             }; \
0223             \
0224             template<class Context, class Arg1, class Arg2> \
0225             static void apply(Context &ctx, const Arg1 &arg1, const Arg2 &arg2) \
0226             { \
0227                 ctx.stream << #name << "("; \
0228                 proto::eval(arg1, ctx); \
0229                 ctx.stream << ", "; \
0230                 proto::eval(arg2, ctx); \
0231                 ctx.stream << ")"; \
0232             } \
0233         }; \
0234     } \
0235     template<class Arg1, class Arg2> \
0236     inline typename proto::result_of::make_expr< \
0237         proto::tag::function, BOOST_PP_CAT(detail::name, _func), const Arg1&, const Arg2& \
0238     >::type const \
0239     name(const Arg1 &arg1, const Arg2 &arg2) \
0240     { \
0241         return proto::make_expr<proto::tag::function>( \
0242             BOOST_PP_CAT(detail::name, _func)(), ::boost::ref(arg1), ::boost::ref(arg2) \
0243         ); \
0244     }
0245 
0246 // wraps a binary function who's result type is the scalar type of the first argument
0247 #define BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION_ST(name) \
0248     namespace detail { \
0249         struct BOOST_PP_CAT(name, _func) \
0250         { \
0251             template<class Expr, class Args> \
0252             struct lambda_result \
0253             { \
0254                 typedef typename proto::result_of::child_c<Expr, 1>::type Arg1; \
0255                 typedef typename ::boost::compute::lambda::result_of<Arg1, Args>::type result_type; \
0256                 typedef typename ::boost::compute::scalar_type<result_type>::type type; \
0257             }; \
0258             \
0259             template<class Context, class Arg1, class Arg2> \
0260             static void apply(Context &ctx, const Arg1 &arg1, const Arg2 &arg2) \
0261             { \
0262                 ctx.stream << #name << "("; \
0263                 proto::eval(arg1, ctx); \
0264                 ctx.stream << ", "; \
0265                 proto::eval(arg2, ctx); \
0266                 ctx.stream << ")"; \
0267             } \
0268         }; \
0269     } \
0270     template<class Arg1, class Arg2> \
0271     inline typename proto::result_of::make_expr< \
0272         proto::tag::function, BOOST_PP_CAT(detail::name, _func), const Arg1&, const Arg2& \
0273     >::type const \
0274     name(const Arg1 &arg1, const Arg2 &arg2) \
0275     { \
0276         return proto::make_expr<proto::tag::function>( \
0277             BOOST_PP_CAT(detail::name, _func)(), ::boost::ref(arg1), ::boost::ref(arg2) \
0278         ); \
0279     }
0280 
0281 // wraps a binary function whose result type is the type of the first argument
0282 // and the second argument is a pointer
0283 #define BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION_PTR(name) \
0284     namespace detail { \
0285         struct BOOST_PP_CAT(name, _func) \
0286         { \
0287             template<class Expr, class Args> \
0288             struct lambda_result \
0289             { \
0290                 typedef typename proto::result_of::child_c<Expr, 1>::type Arg1; \
0291                 typedef typename ::boost::compute::lambda::result_of<Arg1, Args>::type type; \
0292             }; \
0293             \
0294             template<class Context, class Arg1, class Arg2> \
0295             static void apply(Context &ctx, const Arg1 &arg1, const Arg2 &arg2) \
0296             { \
0297                 ctx.stream << #name << "("; \
0298                 proto::eval(arg1, ctx); \
0299                 ctx.stream << ", &"; \
0300                 proto::eval(arg2, ctx); \
0301                 ctx.stream << ")"; \
0302             } \
0303         }; \
0304     } \
0305     template<class Arg1, class Arg2> \
0306     inline typename proto::result_of::make_expr< \
0307         proto::tag::function, BOOST_PP_CAT(detail::name, _func), const Arg1&, const Arg2& \
0308     >::type const \
0309     name(const Arg1 &arg1, const Arg2 &arg2) \
0310     { \
0311         return proto::make_expr<proto::tag::function>( \
0312             BOOST_PP_CAT(detail::name, _func)(), ::boost::ref(arg1), ::boost::ref(arg2) \
0313         ); \
0314     }
0315 
0316 // wraps a ternary function
0317 #define BOOST_COMPUTE_LAMBDA_WRAP_TERNARY_FUNCTION(name) \
0318     namespace detail { \
0319         struct BOOST_PP_CAT(name, _func) \
0320         { \
0321             template<class Expr, class Args> \
0322             struct lambda_result \
0323             { \
0324                 typedef typename proto::result_of::child_c<Expr, 1>::type Arg1; \
0325                 typedef typename ::boost::compute::lambda::result_of<Arg1, Args>::type type; \
0326             }; \
0327             \
0328             template<class Context, class Arg1, class Arg2, class Arg3> \
0329             static void apply(Context &ctx, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) \
0330             { \
0331                 ctx.stream << #name << "("; \
0332                 proto::eval(arg1, ctx); \
0333                 ctx.stream << ", "; \
0334                 proto::eval(arg2, ctx); \
0335                 ctx.stream << ", "; \
0336                 proto::eval(arg3, ctx); \
0337                 ctx.stream << ")"; \
0338             } \
0339         }; \
0340     } \
0341     template<class Arg1, class Arg2, class Arg3> \
0342     inline typename proto::result_of::make_expr< \
0343         proto::tag::function, BOOST_PP_CAT(detail::name, _func), const Arg1&, const Arg2&, const Arg3& \
0344     >::type const \
0345     name(const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) \
0346     { \
0347         return proto::make_expr<proto::tag::function>( \
0348             BOOST_PP_CAT(detail::name, _func)(), ::boost::ref(arg1), ::boost::ref(arg2), ::boost::ref(arg3) \
0349         ); \
0350     }
0351 
0352 // wraps a ternary function whose result type is the type of the third argument
0353 #define BOOST_COMPUTE_LAMBDA_WRAP_TERNARY_FUNCTION_3(name) \
0354     namespace detail { \
0355         struct BOOST_PP_CAT(name, _func) \
0356         { \
0357             template<class Expr, class Args> \
0358             struct lambda_result \
0359             { \
0360                 typedef typename proto::result_of::child_c<Expr, 3>::type Arg3; \
0361                 typedef typename ::boost::compute::lambda::result_of<Arg3, Args>::type type; \
0362             }; \
0363             \
0364             template<class Context, class Arg1, class Arg2, class Arg3> \
0365             static void apply(Context &ctx, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) \
0366             { \
0367                 ctx.stream << #name << "("; \
0368                 proto::eval(arg1, ctx); \
0369                 ctx.stream << ", "; \
0370                 proto::eval(arg2, ctx); \
0371                 ctx.stream << ", "; \
0372                 proto::eval(arg3, ctx); \
0373                 ctx.stream << ")"; \
0374             } \
0375         }; \
0376     } \
0377     template<class Arg1, class Arg2, class Arg3> \
0378     inline typename proto::result_of::make_expr< \
0379         proto::tag::function, BOOST_PP_CAT(detail::name, _func), const Arg1&, const Arg2&, const Arg3& \
0380     >::type const \
0381     name(const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) \
0382     { \
0383         return proto::make_expr<proto::tag::function>( \
0384             BOOST_PP_CAT(detail::name, _func)(), ::boost::ref(arg1), ::boost::ref(arg2), ::boost::ref(arg3) \
0385         ); \
0386     }
0387 
0388 // wraps a ternary function whose result type is the type of the first argument
0389 // and the third argument of the function is a pointer
0390 #define BOOST_COMPUTE_LAMBDA_WRAP_TERNARY_FUNCTION_PTR(name) \
0391     namespace detail { \
0392         struct BOOST_PP_CAT(name, _func) \
0393         { \
0394             template<class Expr, class Args> \
0395             struct lambda_result \
0396             { \
0397                 typedef typename proto::result_of::child_c<Expr, 3>::type Arg3; \
0398                 typedef typename ::boost::compute::lambda::result_of<Arg3, Args>::type type; \
0399             }; \
0400             \
0401             template<class Context, class Arg1, class Arg2, class Arg3> \
0402             static void apply(Context &ctx, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) \
0403             { \
0404                 ctx.stream << #name << "("; \
0405                 proto::eval(arg1, ctx); \
0406                 ctx.stream << ", "; \
0407                 proto::eval(arg2, ctx); \
0408                 ctx.stream << ", &"; \
0409                 proto::eval(arg3, ctx); \
0410                 ctx.stream << ")"; \
0411             } \
0412         }; \
0413     } \
0414     template<class Arg1, class Arg2, class Arg3> \
0415     inline typename proto::result_of::make_expr< \
0416         proto::tag::function, BOOST_PP_CAT(detail::name, _func), const Arg1&, const Arg2&, const Arg3& \
0417     >::type const \
0418     name(const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) \
0419     { \
0420         return proto::make_expr<proto::tag::function>( \
0421             BOOST_PP_CAT(detail::name, _func)(), ::boost::ref(arg1), ::boost::ref(arg2), ::boost::ref(arg3) \
0422         ); \
0423     }
0424 
0425 // Common Built-In Functions
0426 BOOST_COMPUTE_LAMBDA_WRAP_TERNARY_FUNCTION(clamp)
0427 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(degrees)
0428 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(min)
0429 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(max)
0430 BOOST_COMPUTE_LAMBDA_WRAP_TERNARY_FUNCTION(mix)
0431 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(radians)
0432 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(sign)
0433 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION_2(step)
0434 BOOST_COMPUTE_LAMBDA_WRAP_TERNARY_FUNCTION_3(smoothstep)
0435 
0436 // Geometric Built-In Functions
0437 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(cross)
0438 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION_ST(dot)
0439 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION_ST(distance)
0440 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_ST(length)
0441 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(normalize)
0442 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION_ST(fast_distance)
0443 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_ST(fast_length)
0444 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(fast_normalize)
0445 
0446 // Integer Built-In Functions
0447 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(abs)
0448 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(abs_diff)
0449 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(add_sat)
0450 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(hadd)
0451 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(rhadd)
0452 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(clz)
0453 #ifdef BOOST_COMPUTE_CL_VERSION_2_0
0454 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(ctz)
0455 #endif
0456 // clamp() (since 1.1) already defined in common
0457 BOOST_COMPUTE_LAMBDA_WRAP_TERNARY_FUNCTION(mad_hi)
0458 BOOST_COMPUTE_LAMBDA_WRAP_TERNARY_FUNCTION(mad24)
0459 BOOST_COMPUTE_LAMBDA_WRAP_TERNARY_FUNCTION(mad_sat)
0460 // max() and min() functions are defined in common
0461 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(mul_hi)
0462 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(mul24)
0463 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(rotate)
0464 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(sub_sat)
0465 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(upsample)
0466 #ifdef BOOST_COMPUTE_CL_VERSION_1_2
0467 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(popcount)
0468 #endif
0469 
0470 // Math Built-In Functions
0471 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(acos)
0472 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(acosh)
0473 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(acospi)
0474 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(asin)
0475 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(asinh)
0476 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(asinpi)
0477 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(atan)
0478 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(atan2)
0479 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(atanh)
0480 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(atanpi)
0481 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(atan2pi)
0482 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(cbrt)
0483 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(ceil)
0484 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(copysign)
0485 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(cos)
0486 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(cosh)
0487 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(cospi)
0488 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(erfc)
0489 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(erf)
0490 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(exp)
0491 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(exp2)
0492 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(exp10)
0493 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(expm1)
0494 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(fabs)
0495 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(fdim)
0496 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(floor)
0497 BOOST_COMPUTE_LAMBDA_WRAP_TERNARY_FUNCTION(fma)
0498 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(fmax)
0499 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(fmin)
0500 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(fmod)
0501 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION_PTR(fract)
0502 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION_PTR(frexp)
0503 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(hypot)
0504 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_BINARY_FUNCTION(ilogb) // ilogb returns intN_
0505 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(ldexp)
0506 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(lgamma)
0507 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION_PTR(lgamma_r)
0508 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(log)
0509 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(log2)
0510 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(log10)
0511 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(log1p)
0512 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(logb)
0513 BOOST_COMPUTE_LAMBDA_WRAP_TERNARY_FUNCTION(mad)
0514 #ifdef BOOST_COMPUTE_CL_VERSION_1_1
0515 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(maxmag)
0516 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(minmag)
0517 #endif
0518 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION_PTR(modf)
0519 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(nan)
0520 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(nextafter)
0521 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(pow)
0522 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(pown)
0523 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(powr)
0524 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(remainder)
0525 BOOST_COMPUTE_LAMBDA_WRAP_TERNARY_FUNCTION_PTR(remquo)
0526 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(rint)
0527 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(rootn)
0528 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(round)
0529 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(rsqrt)
0530 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(sin)
0531 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(sincos)
0532 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(sinh)
0533 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(sinpi)
0534 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(sqrt)
0535 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(tan)
0536 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(tanh)
0537 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(tanpi)
0538 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(tgamma)
0539 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(trunc)
0540 
0541 // Native Math Built-In Functions
0542 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(native_cos)
0543 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(native_divide)
0544 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(native_exp)
0545 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(native_exp2)
0546 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(native_exp10)
0547 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(native_log)
0548 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(native_log2)
0549 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(native_log10)
0550 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(native_powr)
0551 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(native_recip)
0552 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(native_rsqrt)
0553 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(native_sin)
0554 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(native_sqrt)
0555 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(native_tan)
0556 
0557 // Half Math Built-In Functions
0558 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(half_cos)
0559 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(half_divide)
0560 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(half_exp)
0561 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(half_exp2)
0562 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(half_exp10)
0563 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(half_log)
0564 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(half_log2)
0565 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(half_log10)
0566 BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(half_powr)
0567 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(half_recip)
0568 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(half_rsqrt)
0569 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(half_sin)
0570 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(half_sqrt)
0571 BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(half_tan)
0572 
0573 // Relational Built-In Functions
0574 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_BINARY_FUNCTION(isequal)
0575 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_BINARY_FUNCTION(isnotequal)
0576 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_BINARY_FUNCTION(isgreater)
0577 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_BINARY_FUNCTION(isgreaterequal)
0578 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_BINARY_FUNCTION(isless)
0579 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_BINARY_FUNCTION(islessequal)
0580 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_BINARY_FUNCTION(islessgreater)
0581 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_UNARY_FUNCTION(isfinite)
0582 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_UNARY_FUNCTION(isinf)
0583 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_UNARY_FUNCTION(isnan)
0584 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_UNARY_FUNCTION(isnormal)
0585 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_BINARY_FUNCTION(isordered)
0586 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_BINARY_FUNCTION(isunordered)
0587 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_UNARY_FUNCTION(singbit)
0588 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_UNARY_FUNCTION(all)
0589 BOOST_COMPUTE_LAMBDA_WRAP_BOOLEAN_UNARY_FUNCTION(any)
0590 BOOST_COMPUTE_LAMBDA_WRAP_TERNARY_FUNCTION(bitselect)
0591 BOOST_COMPUTE_LAMBDA_WRAP_TERNARY_FUNCTION(select)
0592 
0593 } // end lambda namespace
0594 } // end compute namespace
0595 } // end boost namespace
0596 
0597 #endif // BOOST_COMPUTE_LAMBDA_FUNCTIONAL_HPP