27 #ifndef ANTIOCH_VEXCL_UTILS_DECL_H
28 #define ANTIOCH_VEXCL_UTILS_DECL_H
30 #ifdef ANTIOCH_METAPROGRAMMING_H
31 # error valarray_utils_decl.h must be included before metaprogramming.h
37 #include <type_traits>
39 #ifdef ANTIOCH_HAVE_VEXCL
46 #include "vexcl/vexcl.hpp"
50 template <
typename T>
class vector;
51 template <
typename T>
class vector_expression;
52 template <
typename T>
class is_vector_expression;
57 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
69 #ifdef VEXCL_OPERATIONS_HPP
74 max(const vex::vector<T>& a,
75 const vex::vector<T>& b)
81 min(const vex::vector<T>& a,
82 const vex::vector<T>& b)
96 typename
std::enable_if<vex::is_vector_expression<T>::value>
::type
102 template <
typename T,
typename NewScalar>
105 typedef vex::vector<NewScalar>
type;
108 template <
typename T>
111 max (
const vex::vector<T>& in);
113 template <
typename T>
116 min (
const vex::vector<T>& in);
118 template <
typename T>
121 template <typename T>
124 template <typename T>
127 template <typename T>
130 template <typename T>
133 template <typename T>
138 template <typename T1, typename T2>
141 zero_clone(vex::vector<T1>& output, const vex::vector<T2>& example);
143 template <typename T, typename Scalar>
146 constant_clone(const vex::vector<T>& example, const Scalar& value);
148 template <typename T>
151 init_clone(vex::vector<T>& output, const vex::vector<T>& example);
153 template <typename BoolInput, typename IfValue, typename ElseValue>
154 typename boost::proto::result_of::make_expr<
155 boost::proto::tag::if_else_,
156 boost::proto::deduce_domain,
157 const vex::vector_expression<BoolInput>&,
161 if_else(const vex::vector_expression<BoolInput> &condition,
162 const IfValue &if_true,
163 const ElseValue &if_false);
165 template <typename T>
169 template <typename T>
174 template <typename VectorT, typename IntT>
177 vex::is_vector_expression<typename value_type<VectorT>::type>::value &&
178 vex::is_vector_expression<IntT>::value,
179 typename value_type<VectorT>::type
181 eval_index(const VectorT& vec, const IntT& index);
186 #endif //ANTIOCH_VEXCL_UTILS_DECL_H
#define ANTIOCH_RETURNEXPR(Type, Expr)
bool conjunction_root(const T &vec, eigen_library_tag)
vex::vector< NewScalar > type
bool disjunction_root(const T &vec, eigen_library_tag)
void init_clone(T &output, const T &example)
enable_if_c< is_eigen< typename value_type< VectorT >::type >::value, typename value_type< VectorT >::type >::type eval_index(const VectorT &vec, const _Matrix< _UIntT, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &index)
_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > constant_clone(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &ex, const Scalar &value)
max(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &a, const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &b) ANTIOCH_AUTOFUNC(_Matrix< _Scalar ANTIOCH_COMMA _Rows ANTIOCH_COMMA _Cols ANTIOCH_COMMA _Options ANTIOCH_COMMA _MaxRows ANTIOCH_COMMA _MaxCols >
enable_if_c< is_eigen< T1 >::value &&is_eigen< T2 >::value, typename state_type< T1 >::type >::type if_else(const Condition &condition, const T1 &if_true, const T2 &if_false)
const vexcl_library_tag type
The parameters are reduced parameters.
typename _Scalar int _Rows int _Cols int _Options int _MaxRows int _MaxCols inline min(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &a, const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &b) ANTIOCH_AUTOFUNC(_Matrix< _Scalar ANTIOCH_COMMA _Rows ANTIOCH_COMMA _Cols ANTIOCH_COMMA _Options ANTIOCH_COMMA _MaxRows ANTIOCH_COMMA _MaxCols >
_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > zero_clone(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &ex)
#define ANTIOCH_AUTO(Type)