Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:42:52

0001 /*
0002   [auto_generated]
0003   boost/numeric/odeint/external/vexcl/vexcl_abs.hpp
0004 
0005   [begin_description]
0006   abs() specialization for vexcl
0007   [end_description]
0008 
0009   Copyright 2009-2013 Karsten Ahnert
0010   Copyright 2009-2013 Mario Mulansky
0011 
0012   Distributed under the Boost Software License, Version 1.0.
0013   (See accompanying file LICENSE_1_0.txt or
0014   copy at http://www.boost.org/LICENSE_1_0.txt)
0015 */
0016 
0017 
0018 #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_ABS_HPP_DEFINED
0019 #define BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_ABS_HPP_DEFINED
0020 
0021 #include <vexcl/vector.hpp>
0022 #include <vexcl/multivector.hpp>
0023 #include <vexcl/operations.hpp>
0024 
0025 namespace vex {
0026 
0027 template <typename T, size_t N>
0028 typename std::enable_if<
0029     std::is_integral<T>::value,
0030     typename boost::proto::result_of::make_expr<
0031         boost::proto::tag::function,
0032         abs_func,
0033         const vex::multivector<T, N>&
0034     >::type const
0035 >::type
0036 abs(const multivector<T, N> &arg) {
0037     return boost::proto::make_expr<boost::proto::tag::function>(
0038             abs_func(),
0039             boost::ref(arg)
0040             );
0041 }
0042 
0043 template <typename T, size_t N>
0044 typename std::enable_if<
0045     !std::is_integral<T>::value,
0046     typename boost::proto::result_of::make_expr<
0047         boost::proto::tag::function,
0048         fabs_func,
0049         const vex::multivector<T, N>&
0050     >::type const
0051 >::type
0052 abs(const multivector<T, N> &arg) {
0053     return boost::proto::make_expr<boost::proto::tag::function>(
0054             fabs_func(),
0055             boost::ref(arg)
0056             );
0057 }
0058 
0059 } // namespace vex
0060 
0061 #endif // BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_ABS_HPP_DEFINED