Loading...
Searching...
No Matches
vec_expr_v2.h
Go to the documentation of this file.
#ifndef _RHEOLEF_VEC_EXPR_v2_H
#define _RHEOLEF_VEC_EXPR_v2_H
// vec-valued affine expressions:
//
// vec w = 2*u - v + 1:
//
// author: Pierre.Saramito@imag.fr
//
// date: 14 september 2015
//
// Notes; implementation uses template expressions and SFINAE techiques
// * template expressions allows one to eliminate temporaries
// * SFINAE reduces the code size
//
// OVERVIEW:
// 1. linear/affine algebra operators
// 1.1. vec_expr, a type concept for expression types
// 1.2. unary operations
// 1.3. binary operations
// 2. completing the interface of the vec<T,M> class
// 2.1. cstor & assignment
// 2.2. computed assignment
// 2.3. scalar product
//
#include "rheolef/vec.h"
#include "rheolef/dis_inner_product.h"
#include "rheolef/dis_accumulate.h"
#include "rheolef/expr_utilities.h"
namespace rheolef {
// ===================================================================
// 1. linear/affine algebra operators
// ===================================================================
// -------------------------------------------------------------------
// 1.1. vec_expr, a type concept for expression types
// -------------------------------------------------------------------
namespace details {
// Define a trait type for detecting vec expression valid arguments
template<class T> struct is_vec : std::false_type {};
template<class T, class M> struct is_vec<vec<T, M> > : std::true_type {};
// Define a trait type for detecting vec expression valid arguments
template<class T> struct is_vec_expr_v2_arg : std::false_type {};
template<class T, class M> struct is_vec_expr_v2_arg <vec<T, M> > : std::true_type {};
} // namespace details
// -------------------------------------------
// 1.2. unary operations
// -------------------------------------------
namespace details {
template <class Op, class Expr>
struct vec_expr_v2_unary {
// typedefs:
typedef typename Expr::size_type size_type;
typedef typename Expr::value_type value_type;
typedef typename Expr::memory_type memory_type;
typedef typename Expr::const_iterator expr_const_iterator;
typedef typename float_traits <value_type>::type float_type;
// allocatos:
vec_expr_v2_unary (const Op& op, const Expr& expr)
: _op(op), _expr_iter(expr.begin()), _ownership(expr.ownership()) {}
template <class BinaryOp, class Constant>
vec_expr_v2_unary (const BinaryOp& binop, const Constant& c, const Expr& expr)
: _op(binop,c), _expr_iter(expr.begin()), _ownership(expr.ownership()) {}
template <class BinaryOp, class Constant>
vec_expr_v2_unary (const BinaryOp& binop, const Expr& expr, const Constant& c)
: _op(binop,c), _expr_iter(expr.begin()), _ownership(expr.ownership()) {}
// accessors:
const distributor& ownership() const { return _ownership; }
size_type size() const { return _ownership.size(); }
// minimal forward iterator interface:
struct const_iterator {
typedef std::forward_iterator_tag iterator_category;
typedef typename Expr::value_type value_type;
typedef value_type& reference;
typedef value_type* pointer;
typedef std::ptrdiff_t difference_type;
const_iterator (Op op, expr_const_iterator expr_iter)
: _op(op), _expr_iter (expr_iter) {}
const_iterator& operator++ () { ++_expr_iter; return *this; }
value_type operator* () const { return _op (*_expr_iter); }
protected:
const Op _op;
expr_const_iterator _expr_iter;
};
const_iterator begin() const { return const_iterator (_op, _expr_iter); }
protected:
const Op _op;
const expr_const_iterator _expr_iter;
const distributor _ownership;
};
template<class Op, class Expr> struct is_vec_expr_v2_arg <vec_expr_v2_unary<Op,Expr> > : std::true_type {};
} // namespace details
#define _RHEOLEF_vec_expr_v2_unary_operator(OP, FUNCTOR) \
template <class Expr> \
inline \
typename \
std::enable_if< \
details::is_vec_expr_v2_arg<Expr>::value, \
details::vec_expr_v2_unary< \
FUNCTOR, \
Expr \
> \
>::type \
operator OP (const Expr& expr) \
{ \
typedef details::vec_expr_v2_unary <FUNCTOR, Expr> expr_t; \
return expr_t (FUNCTOR(), expr); \
}
_RHEOLEF_vec_expr_v2_unary_operator(+, details::generic_unary_plus<>)
_RHEOLEF_vec_expr_v2_unary_operator(-, details::generic_negate<>)
#undef _RHEOLEF_vec_expr_v2_unary_operator
// -------------------------------------------
// 1.3. binary operations
// -------------------------------------------
namespace details {
template <class Op, class Expr1, class Expr2>
struct vec_expr_v2_binary {
typedef typename Expr1::size_type size_type;
typedef typename promote<
typename Expr1::value_type,
typename Expr2::value_type>::type value_type;
typedef typename Expr1::memory_type memory_type; // TODO: check Expr2::memory_type
typedef typename Expr1::const_iterator expr1_const_iterator;
typedef typename Expr2::const_iterator expr2_const_iterator;
typedef typename float_traits <value_type>::type float_type;
// allocators:
vec_expr_v2_binary (const Op& op, const Expr1& expr1, const Expr2& expr2)
: _op (op),
_iter1 (expr1.begin()),
_iter2 (expr2.begin()),
_ownership (expr1.ownership())
{
check_macro (expr1.size() == expr2.size(), "linear binary vec expression: incompatible sizes "
<< expr1.size() << " and " << expr2.size());
}
// accessors:
const distributor& ownership() const { return _ownership; }
size_type size() const { return _ownership.size(); }
// minimal forward iterator interface:
struct const_iterator {
typedef std::forward_iterator_tag iterator_category;
typedef typename promote<
typename Expr1::value_type,
typename Expr2::value_type>::type value_type;
typedef value_type& reference;
typedef value_type* pointer;
typedef std::ptrdiff_t difference_type;
const_iterator (Op op, expr1_const_iterator iter1, expr2_const_iterator iter2)
: _op(op), _iter1 (iter1), _iter2 (iter2) {}
const_iterator& operator++ () { ++_iter1; ++_iter2; return *this; }
value_type operator* () const { return _op (*_iter1, *_iter2); }
protected:
const Op _op;
expr1_const_iterator _iter1;
expr2_const_iterator _iter2;
};
const_iterator begin() const { return const_iterator (_op, _iter1, _iter2); }
protected:
const Op _op;
expr1_const_iterator _iter1;
expr2_const_iterator _iter2;
const distributor _ownership;
};
template<class Op, class Expr1, class Expr2> struct is_vec_expr_v2_arg <vec_expr_v2_binary<Op,Expr1,Expr2> > : std::true_type {};
template <class Op, class Expr1, class Expr2, class Sfinae = void>
struct vec_expr_v2_binary_traits { /* catch-all case */ };
// vec_expr +- vec_expr
template <class Op, class Expr1, class Expr2>
struct vec_expr_v2_binary_traits <Op, Expr1, Expr2,
typename std::enable_if<
details::is_vec_expr_v2_arg<Expr1>::value &&
details::is_vec_expr_v2_arg<Expr2>::value>::type>
{
typedef vec_expr_v2_binary <Op,Expr1,Expr2> type;
};
// constant +-* vec_expr
template <class Op, class Expr1, class Expr2>
struct vec_expr_v2_binary_traits <Op, Expr1, Expr2,
typename std::enable_if<
details::is_rheolef_arithmetic<Expr1>::value &&
details::is_vec_expr_v2_arg<Expr2>::value>::type>
{
typedef generic_binder1st <Op, Expr1> fun_t;
typedef vec_expr_v2_unary <fun_t,Expr2> type;
};
// vec_expr +-* constant
template <class Op, class Expr1, class Expr2>
struct vec_expr_v2_binary_traits <Op, Expr1, Expr2,
typename std::enable_if<
details::is_vec_expr_v2_arg<Expr1>::value &&
details::is_rheolef_arithmetic<Expr2>::value>::type>
{
typedef generic_binder2nd <Op, Expr2> fun_t;
typedef vec_expr_v2_unary <fun_t,Expr1> type;
};
} // namespace details
// x+y; x+c ; c+x
#define _RHEOLEF_vec_expr_v2_binary_operator(OP, FUNCTOR) \
template <class Expr1, class Expr2> \
inline \
typename \
std::enable_if< \
(details::is_vec_expr_v2_arg<Expr1>::value && \
details::is_vec_expr_v2_arg<Expr2>::value) || \
(details::is_rheolef_arithmetic<Expr1>::value && \
details::is_vec_expr_v2_arg<Expr2>::value) || \
(details::is_vec_expr_v2_arg<Expr1>::value && \
details::is_rheolef_arithmetic<Expr2>::value), \
typename \
details::vec_expr_v2_binary_traits< \
FUNCTOR, \
Expr1, Expr2 \
>::type \
>::type \
operator OP (const Expr1& expr1, const Expr2& expr2) \
{ \
typedef typename details::vec_expr_v2_binary_traits <FUNCTOR, Expr1, Expr2>::type expr_t; \
return expr_t (FUNCTOR(), expr1, expr2); \
}
_RHEOLEF_vec_expr_v2_binary_operator(+, details::generic_plus<>)
_RHEOLEF_vec_expr_v2_binary_operator(-, details::generic_minus<>)
#undef _RHEOLEF_vec_expr_v2_binary_operator
// c*x ; x*c
template <class Expr1, class Expr2>
inline
typename
std::enable_if<
(details::is_rheolef_arithmetic<Expr1>::value &&
details::is_vec_expr_v2_arg<Expr2>::value) ||
(details::is_vec_expr_v2_arg<Expr1>::value &&
details::is_rheolef_arithmetic<Expr2>::value),
typename
details::vec_expr_v2_binary_traits<
details::generic_multiplies<>,
Expr1, Expr2
>::type
>::type
operator* (const Expr1& expr1, const Expr2& expr2)
{
typedef details::generic_multiplies<> fun_t;
typedef typename details::vec_expr_v2_binary_traits <fun_t, Expr1, Expr2>::type expr_t;
return expr_t (fun_t(), expr1, expr2);
}
// x/c
template <class Expr1, class Expr2>
inline
typename
std::enable_if<
(details::is_vec_expr_v2_arg<Expr1>::value &&
details::is_rheolef_arithmetic<Expr2>::value),
typename
details::vec_expr_v2_binary_traits<
details::generic_divides<>,
Expr1, Expr2
>::type
>::type
operator/ (const Expr1& expr1, const Expr2& expr2)
{
typedef details::generic_divides<> fun_t;
typedef typename details::vec_expr_v2_binary_traits <fun_t, Expr1, Expr2>::type expr_t;
return expr_t (fun_t(), expr1, expr2);
}
// ===================================================================
// 2. completing the interface of the vec<T,M> class
// ===================================================================
// ---------------------------------------------------------------------------
// 2.1. cstor & assignment
// ---------------------------------------------------------------------------
// vec<double> x = expr;
template<class T, class M>
template<class Expr, class Sfinae>
inline
vec<T,M>::vec (const Expr& expr)
: disarray<T,M>()
{
operator= (expr);
}
// x = expr;
template< class T, class M>
template <class Expr, class Sfinae>
inline
vec<T, M>&
vec<T,M>::operator= (const Expr& expr)
{
if (disarray<T,M>::dis_size() == 0) {
resize (expr.ownership());
} else {
std::size_t n = disarray<T,M>::size();
check_macro (n == expr.size(),
"vec = vec_expression : incompatible size "
<< n << " and " << expr.size());
}
details::assign_with_operator (disarray<T,M>::begin(), disarray<T,M>::end(), expr.begin(), details::assign_op());
return *this;
}
// ---------------------------------------------------------------------------
// 2.2) computed assignment
// ---------------------------------------------------------------------------
// x +-= expr;
#define _RHEOLEF_vec_expr_v2_op_assign(OP, FUNCTOR) \
template<class T, class M, class Expr> \
inline \
typename std::enable_if< \
details::is_vec_expr_v2_arg<Expr>::value, \
vec<T,M>&>::type \
operator OP (vec<T,M>& x, const Expr& expr) \
{ \
check_macro (x.size() == expr.size(), "vec " << #OP << " vec_expression : incompatible spaces " \
<< x.size() << " and " << expr.size()); \
details::assign_with_operator (x.begin(), x.end(), expr.begin(), FUNCTOR()); \
return x; \
}
_RHEOLEF_vec_expr_v2_op_assign(+=, details::plus_assign)
_RHEOLEF_vec_expr_v2_op_assign(-=, details::minus_assign)
#undef _RHEOLEF_vec_expr_v2_op_assign
// x -+*/= c
#define _RHEOLEF_vec_expr_v2_op_assign_constant(OP, FUNCTOR) \
template<class T, class M, class Expr> \
inline \
typename std::enable_if< \
details::is_rheolef_arithmetic<Expr>::value, \
vec<T,M>&>::type \
operator OP (vec<T,M>& x, const Expr& expr) \
{ \
details::assign_with_operator (x.begin(), x.end(), details::iterator_on_constant<Expr>(expr), FUNCTOR()); \
return x; \
}
_RHEOLEF_vec_expr_v2_op_assign_constant(+=, details::plus_assign)
_RHEOLEF_vec_expr_v2_op_assign_constant(-=, details::minus_assign)
_RHEOLEF_vec_expr_v2_op_assign_constant(*=, details::multiplies_assign)
_RHEOLEF_vec_expr_v2_op_assign_constant(/=, details::divides_assign)
#undef _RHEOLEF_vec_expr_v2_op_assign_constant
// ---------------------------------------------------------------------------
// 2.3. scalar product
// ---------------------------------------------------------------------------
template <class Expr1, class Expr2>
inline
typename
std::enable_if<
details::is_vec_expr_v2_arg<Expr1>::value &&
details::is_vec_expr_v2_arg<Expr2>::value,
typename promote<
typename Expr1::float_type,
typename Expr2::float_type>::type
>::type
dot (const Expr1& expr1, const Expr2& expr2)
{
typedef typename Expr1::memory_type M;
return dis_inner_product (expr1.begin(), expr2.begin(), expr1.size(), expr1.ownership().comm(), M());
}
template <class Expr1, class Expr2>
inline
typename
std::enable_if<
details::is_rheolef_arithmetic<Expr1>::value &&
details::is_vec_expr_v2_arg<Expr2>::value,
typename Expr2::float_type
>::type
dot (const Expr1& expr1, const Expr2& expr2)
{
typedef typename Expr2::memory_type M;
return expr1*dis_accumulate (expr2.begin(), expr2.size(), expr2.ownership().comm(), M());
}
template <class Expr1, class Expr2>
inline
typename
std::enable_if<
details::is_vec_expr_v2_arg<Expr1>::value &&
details::is_rheolef_arithmetic<Expr2>::value,
typename Expr1::float_type
>::type
dot (const Expr1& expr1, const Expr2& expr2)
{
typedef typename Expr1::memory_type M;
return dis_accumulate (expr1.begin(), expr1.size(), expr1.ownership().comm(), M())*expr2;
}
} // namespace rheolef
#endif // _RHEOLEF_VEC_EXPR_v2_H
rheolef::disarray
see the disarray page for the full documentation
Definition disarray.h:497
rheolef::distributor
see the distributor page for the full documentation
Definition distributor.h:69
rheolef::vec
see the vec page for the full documentation
Definition vec.h:79
rheolef::vec::operator=
vec< T, M > & operator=(const vec< T, M > &x)
Definition vec.h:175
rheolef::vec::resize
void resize(const distributor &ownership, const T &init_val=std::numeric_limits< T >::max())
Definition vec.h:199
rheolef::vec::vec
vec(const vec< T, M > &)
Definition vec.h:168
rheolef::type
rheolef::std::enable_if< details::is_field_expr_v2_nonlinear_arg< Expr1 >::value &&! details::is_field_expr_v2_constant< Expr1 >::value &&details::is_field_expr_v2_nonlinear_arg< Expr2 >::value &&! details::is_field_expr_v2_constant< Expr2 >::value, details::field_expr_v2_nonlinear_node_binary< details::function_traits< Function >::functor_type, details::field_expr_v2_nonlinear_terminal_wrapper_traits< Expr1 >::type, details::field_expr_v2_nonlinear_terminal_wrapper_traits< Expr2 >::type > > type
T
Expr1::float_type T
Definition field_expr.h:230
check_macro
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
rheolef::details
Definition compiler_eigen.h:39
rheolef::details::assign_with_operator
void assign_with_operator(ForwardIterator first, ForwardIterator last, InputIterator iter_rhs, OpAssign op_assign)
Definition expr_utilities.h:137
rheolef
This file is part of Rheolef.
Definition compiler_eigen.h:39
rheolef::_RHEOLEF_vec_expr_v2_op_assign_constant
_RHEOLEF_vec_expr_v2_op_assign_constant(+=, details::plus_assign) _RHEOLEF_vec_expr_v2_op_assign_constant(-
rheolef::dis_accumulate
std::iterator_traits< InputIterator >::value_type dis_accumulate(InputIterator first, Size n, const distributor::communicator_type &comm, sequential)
Definition dis_accumulate.h:61
rheolef::dis_inner_product
promote< typenamestd::iterator_traits< InputIterator1 >::value_type, typenamestd::iterator_traits< InputIterator2 >::value_type >::type dis_inner_product(InputIterator1 first1, InputIterator2 first2, Size n, const distributor::communicator_type &comm, sequential)
Definition dis_inner_product.h:72
rheolef::operator*
csr< T, sequential > operator*(const T &lambda, const csr< T, sequential > &a)
Definition csr.h:437
rheolef::dot
rheolef::std::enable_if< details::is_vec_expr_v2_arg< Expr1 >::value &&details::is_vec_expr_v2_arg< Expr2 >::value, promote< Expr1::float_type, Expr2::float_type >::type > type dot const Expr1 expr1, const Expr2 expr2 dot(const Expr1 &expr1, const Expr2 &expr2)
Definition vec_expr_v2.h:415
std
STL namespace.
rheolef::details::assign_op
Definition expr_utilities.h:115
rheolef::details::type
rheolef::details::is_rheolef_arithmetic
Definition Float.h:150
rheolef::details::is_vec_expr_v2_arg
Definition vec_expr_v2.h:65
rheolef::details::is_vec
Definition vec_expr_v2.h:61
rheolef::details::minus_assign
Definition expr_utilities.h:123
rheolef::details::multiplies_assign
Definition expr_utilities.h:127
rheolef::details::plus_assign
Definition expr_utilities.h:119
rheolef::details::vec_expr_v2_binary::const_iterator
Definition vec_expr_v2.h:186
rheolef::details::vec_expr_v2_binary::const_iterator::iterator_category
std::forward_iterator_tag iterator_category
Definition vec_expr_v2.h:187
rheolef::details::vec_expr_v2_binary::const_iterator::const_iterator
const_iterator(Op op, expr1_const_iterator iter1, expr2_const_iterator iter2)
Definition vec_expr_v2.h:194
rheolef::details::vec_expr_v2_binary::const_iterator::_op
const Op _op
Definition vec_expr_v2.h:199
rheolef::details::vec_expr_v2_binary::const_iterator::_iter2
expr2_const_iterator _iter2
Definition vec_expr_v2.h:201
rheolef::details::vec_expr_v2_binary::const_iterator::value_type
promote< typenameExpr1::value_type, typenameExpr2::value_type >::type value_type
Definition vec_expr_v2.h:190
rheolef::details::vec_expr_v2_binary::const_iterator::operator++
const_iterator & operator++()
Definition vec_expr_v2.h:196
rheolef::details::vec_expr_v2_binary::const_iterator::reference
value_type & reference
Definition vec_expr_v2.h:191
rheolef::details::vec_expr_v2_binary::const_iterator::operator*
value_type operator*() const
Definition vec_expr_v2.h:197
rheolef::details::vec_expr_v2_binary::const_iterator::pointer
value_type * pointer
Definition vec_expr_v2.h:192
rheolef::details::vec_expr_v2_binary::const_iterator::difference_type
std::ptrdiff_t difference_type
Definition vec_expr_v2.h:193
rheolef::details::vec_expr_v2_binary::const_iterator::_iter1
expr1_const_iterator _iter1
Definition vec_expr_v2.h:200
rheolef::details::vec_expr_v2_binary_traits< Op, Expr1, Expr2, typename std::enable_if< details::is_vec_expr_v2_arg< Expr1 >::value &&details::is_rheolef_arithmetic< Expr2 >::value >::type >::fun_t
generic_binder2nd< Op, Expr2 > fun_t
Definition vec_expr_v2.h:241
rheolef::details::vec_expr_v2_binary_traits< Op, Expr1, Expr2, typename std::enable_if< details::is_vec_expr_v2_arg< Expr1 >::value &&details::is_rheolef_arithmetic< Expr2 >::value >::type >::type
vec_expr_v2_unary< fun_t, Expr1 > type
Definition vec_expr_v2.h:242
rheolef::details::vec_expr_v2_binary_traits< Op, Expr1, Expr2, typename std::enable_if< details::is_vec_expr_v2_arg< Expr1 >::value &&details::is_vec_expr_v2_arg< Expr2 >::value >::type >::type
vec_expr_v2_binary< Op, Expr1, Expr2 > type
Definition vec_expr_v2.h:222
rheolef::details::vec_expr_v2_binary_traits< Op, Expr1, Expr2, typename std::enable_if< details::is_rheolef_arithmetic< Expr1 >::value &&details::is_vec_expr_v2_arg< Expr2 >::value >::type >::fun_t
generic_binder1st< Op, Expr1 > fun_t
Definition vec_expr_v2.h:231
rheolef::details::vec_expr_v2_binary_traits< Op, Expr1, Expr2, typename std::enable_if< details::is_rheolef_arithmetic< Expr1 >::value &&details::is_vec_expr_v2_arg< Expr2 >::value >::type >::type
vec_expr_v2_unary< fun_t, Expr2 > type
Definition vec_expr_v2.h:232
rheolef::details::vec_expr_v2_binary_traits
Definition vec_expr_v2.h:213
rheolef::details::vec_expr_v2_binary
Definition vec_expr_v2.h:156
rheolef::details::vec_expr_v2_binary::begin
const_iterator begin() const
Definition vec_expr_v2.h:203
rheolef::details::vec_expr_v2_binary::_op
const Op _op
Definition vec_expr_v2.h:205
rheolef::details::vec_expr_v2_binary::expr2_const_iterator
Expr2::const_iterator expr2_const_iterator
Definition vec_expr_v2.h:164
rheolef::details::vec_expr_v2_binary::size
size_type size() const
Definition vec_expr_v2.h:182
rheolef::details::vec_expr_v2_binary::expr1_const_iterator
Expr1::const_iterator expr1_const_iterator
Definition vec_expr_v2.h:163
rheolef::details::vec_expr_v2_binary::_iter2
expr2_const_iterator _iter2
Definition vec_expr_v2.h:207
rheolef::details::vec_expr_v2_binary::vec_expr_v2_binary
vec_expr_v2_binary(const Op &op, const Expr1 &expr1, const Expr2 &expr2)
Definition vec_expr_v2.h:169
rheolef::details::vec_expr_v2_binary::value_type
promote< typenameExpr1::value_type, typenameExpr2::value_type >::type value_type
Definition vec_expr_v2.h:161
rheolef::details::vec_expr_v2_binary::size_type
Expr1::size_type size_type
Definition vec_expr_v2.h:158
rheolef::details::vec_expr_v2_binary::_ownership
const distributor _ownership
Definition vec_expr_v2.h:208
rheolef::details::vec_expr_v2_binary::memory_type
Expr1::memory_type memory_type
Definition vec_expr_v2.h:162
rheolef::details::vec_expr_v2_binary::ownership
const distributor & ownership() const
Definition vec_expr_v2.h:181
rheolef::details::vec_expr_v2_binary::float_type
float_traits< value_type >::type float_type
Definition vec_expr_v2.h:165
rheolef::details::vec_expr_v2_binary::_iter1
expr1_const_iterator _iter1
Definition vec_expr_v2.h:206
rheolef::details::vec_expr_v2_unary::const_iterator::iterator_category
std::forward_iterator_tag iterator_category
Definition vec_expr_v2.h:106
rheolef::details::vec_expr_v2_unary::const_iterator::_op
const Op _op
Definition vec_expr_v2.h:116
rheolef::details::vec_expr_v2_unary::const_iterator::_expr_iter
expr_const_iterator _expr_iter
Definition vec_expr_v2.h:117
rheolef::details::vec_expr_v2_unary::const_iterator::const_iterator
const_iterator(Op op, expr_const_iterator expr_iter)
Definition vec_expr_v2.h:111
rheolef::details::vec_expr_v2_unary::const_iterator::operator++
const_iterator & operator++()
Definition vec_expr_v2.h:113
rheolef::details::vec_expr_v2_unary::const_iterator::value_type
Expr::value_type value_type
Definition vec_expr_v2.h:107
rheolef::details::vec_expr_v2_unary::const_iterator::reference
value_type & reference
Definition vec_expr_v2.h:108
rheolef::details::vec_expr_v2_unary::const_iterator::operator*
value_type operator*() const
Definition vec_expr_v2.h:114
rheolef::details::vec_expr_v2_unary::const_iterator::pointer
value_type * pointer
Definition vec_expr_v2.h:109
rheolef::details::vec_expr_v2_unary::const_iterator::difference_type
std::ptrdiff_t difference_type
Definition vec_expr_v2.h:110
rheolef::details::vec_expr_v2_unary
Definition vec_expr_v2.h:75
rheolef::details::vec_expr_v2_unary< fun_t, Expr2 >::begin
const_iterator begin() const
Definition vec_expr_v2.h:119
rheolef::details::vec_expr_v2_unary::expr_const_iterator
Expr::const_iterator expr_const_iterator
Definition vec_expr_v2.h:82
rheolef::details::vec_expr_v2_unary< fun_t, Expr2 >::_expr_iter
const expr_const_iterator _expr_iter
Definition vec_expr_v2.h:122
rheolef::details::vec_expr_v2_unary::vec_expr_v2_unary
vec_expr_v2_unary(const Op &op, const Expr &expr)
Definition vec_expr_v2.h:87
rheolef::details::vec_expr_v2_unary< fun_t, Expr2 >::_op
const fun_t _op
Definition vec_expr_v2.h:121
rheolef::details::vec_expr_v2_unary::size
size_type size() const
Definition vec_expr_v2.h:101
rheolef::details::vec_expr_v2_unary::vec_expr_v2_unary
vec_expr_v2_unary(const BinaryOp &binop, const Constant &c, const Expr &expr)
Definition vec_expr_v2.h:91
rheolef::details::vec_expr_v2_unary::size_type
Expr::size_type size_type
Definition vec_expr_v2.h:79
rheolef::details::vec_expr_v2_unary< fun_t, Expr2 >::_ownership
const distributor _ownership
Definition vec_expr_v2.h:123
rheolef::details::vec_expr_v2_unary::vec_expr_v2_unary
vec_expr_v2_unary(const BinaryOp &binop, const Expr &expr, const Constant &c)
Definition vec_expr_v2.h:95
rheolef::details::vec_expr_v2_unary::value_type
Expr::value_type value_type
Definition vec_expr_v2.h:80
rheolef::details::vec_expr_v2_unary::memory_type
Expr::memory_type memory_type
Definition vec_expr_v2.h:81
rheolef::details::vec_expr_v2_unary< fun_t, Expr2 >::ownership
const distributor & ownership() const
Definition vec_expr_v2.h:100
rheolef::details::vec_expr_v2_unary::float_type
float_traits< value_type >::type float_type
Definition vec_expr_v2.h:83
rheolef::float_traits::type
T type
Definition Float.h:94
rheolef::promote
Definition promote.h:29
M
Expr1::memory_type M
Definition vec_expr_v2.h:416
_RHEOLEF_vec_expr_v2_op_assign
#define _RHEOLEF_vec_expr_v2_op_assign(OP, FUNCTOR)
Definition vec_expr_v2.h:352
_RHEOLEF_vec_expr_v2_op_assign_constant
#define _RHEOLEF_vec_expr_v2_op_assign_constant(OP, FUNCTOR)
Definition vec_expr_v2.h:370
_RHEOLEF_vec_expr_v2_unary_operator
#define _RHEOLEF_vec_expr_v2_unary_operator(OP, FUNCTOR)
Definition vec_expr_v2.h:129
_RHEOLEF_vec_expr_v2_binary_operator
#define _RHEOLEF_vec_expr_v2_binary_operator(OP, FUNCTOR)
Definition vec_expr_v2.h:248