3 boost/numeric/odeint/external/vexcl/vexcl_abs.hpp
6 abs() specialization for vexcl
9 Copyright 2009-2013 Karsten Ahnert
10 Copyright 2009-2013 Mario Mulansky
12 Distributed under the Boost Software License, Version 1.0.
13 (See accompanying file LICENSE_1_0.txt or
14 copy at http://www.boost.org/LICENSE_1_0.txt)
18 #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_ABS_HPP_DEFINED
19 #define BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_ABS_HPP_DEFINED
21 #include <vexcl/vector.hpp>
22 #include <vexcl/multivector.hpp>
23 #include <vexcl/operations.hpp>
27 template <typename T, size_t N>
28 typename std::enable_if<
29 std::is_integral<T>::value,
30 typename boost::proto::result_of::make_expr<
31 boost::proto::tag::function,
33 const vex::multivector<T, N>&
36 abs(const multivector<T, N> &arg) {
37 return boost::proto::make_expr<boost::proto::tag::function>(
43 template <typename T, size_t N>
44 typename std::enable_if<
45 !std::is_integral<T>::value,
46 typename boost::proto::result_of::make_expr<
47 boost::proto::tag::function,
49 const vex::multivector<T, N>&
52 abs(const multivector<T, N> &arg) {
53 return boost::proto::make_expr<boost::proto::tag::function>(
61 #endif // BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_ABS_HPP_DEFINED