26 #ifndef TILEDARRAY_EXPRESSIONS_ADD_ENGINE_H__INCLUDED 27 #define TILEDARRAY_EXPRESSIONS_ADD_ENGINE_H__INCLUDED 34 namespace expressions {
37 template <
typename,
typename>
class AddExpr;
39 template <
typename,
typename,
typename>
class AddEngine;
42 template <
typename Left,
typename Right,
typename Result>
46 "The left- and right-hand expressions must use the same policy class");
63 typedef typename Left::policy
policy;
71 typedef typename policy::pmap_interface
74 static constexpr
bool consumable =
true;
75 static constexpr
unsigned int leaves =
79 template <
typename Left,
typename Right,
typename Scalar,
typename Result>
83 "The left- and right-hand expressions must use the same policy class");
110 typedef typename policy::pmap_interface
114 static constexpr
unsigned int leaves =
123 template <
typename Left,
typename Right,
typename Result>
166 template <
typename L,
typename R>
211 template <
typename Left,
typename Right,
typename Scalar,
typename Result>
212 class ScalAddEngine :
213 public BinaryEngine<ScalAddEngine<Left, Right, Scalar, Result> >
217 typedef ScalAddEngine<Left, Right, Scalar, Result>
266 template <
typename L,
typename R,
typename S>
310 std::stringstream ss;
311 ss <<
"[+] [" << factor_ <<
"] ";
320 #endif // TILEDARRAY_EXPRESSIONS_ADD_ENGINE_H__INCLUDED static op_type make_tile_op(const Permutation &perm)
Permuting tile operation factory function.
shape_type make_shape(const Permutation &perm) const
Permuting shape factory function.
EngineTrait< ScalAddEngine_ >::right_type right_type
The right-hand expression type.
TiledArray::detail::BinaryWrapper< op_base_type > op_type
The tile operation type.
right_type right_
The right-hand argument.
Op::result_type result_type
The result tile type.
Tile scale-addition operation.
EngineTrait< ScalAddEngine_ >::op_type op_type
The tile operation type.
EngineTrait< ScalAddEngine_ >::op_base_type op_base_type
The tile operation type.
EngineTrait< AddEngine_ >::op_base_type op_base_type
The tile operation type.
const Permutation & perm() const
Permutation accessor.
eval_trait< value_type >::type eval_type
Evaluation tile type.
EngineTrait< AddEngine_ >::shape_type shape_type
Shape type.
shape_type make_shape() const
Non-permuting shape factory function.
op_type::result_type value_type
The result tile type.
EngineTrait< AddEngine_ >::value_type value_type
The result tile type.
EngineTrait< AddEngine_ >::left_type left_type
The left-hand expression type.
EngineTrait< AddEngine_ >::dist_eval_type dist_eval_type
The distributed evaluator type.
EngineTrait< AddEngine_ >::op_type op_type
The tile operation type.
op_type::result_type value_type
The result tile type.
policy::pmap_interface pmap_interface
Process map interface type.
Left left_type
The left-hand expression type.
const shape_type & shape() const
Shape accessor.
policy::pmap_interface pmap_interface
Process map interface type.
EngineTrait< ScalAddEngine_ >::dist_eval_type dist_eval_type
The distributed evaluator type.
BinaryEngine< ScalAddEngine_ > BinaryEngine_
Binary expression engine base type.
TiledArray::detail::BinaryWrapper< op_base_type > op_type
The tile operation type.
EngineTrait< AddEngine_ >::pmap_interface pmap_interface
Process map interface type.
AddEngine(const AddExpr< L, R > &expr)
Constructor.
policy::shape_type shape_type
Shape type.
op_type make_tile_op(const Permutation &perm) const
Permuting tile operation factory function.
policy::size_type size_type
Size type.
policy::shape_type shape_type
Shape type.
const char * make_tag() const
Expression identification tag.
Tensor expression object.
Left left_type
The left-hand expression type.
TiledArray::detail::Add< Result, typename EngineTrait< Left >::eval_type, typename EngineTrait< Right >::eval_type, EngineTrait< Left >::consumable, EngineTrait< Right >::consumable > op_base_type
The base tile operation type.
EngineTrait< ScalAddEngine_ >::size_type size_type
Size type.
Right right_type
The right-hand expression type.
Binary tile operation wrapper.
Add-then-scale expression.
EngineTrait< ScalAddEngine_ >::shape_type shape_type
Shape type.
TiledArray::detail::DistEval< value_type, policy > dist_eval_type
The distributed evaluator type.
TiledArray::detail::DistEval< value_type, policy > dist_eval_type
The distributed evaluator type.
Right right_type
The right-hand expression type.
EngineTrait< AddEngine_ >::size_type size_type
Size type.
std::string make_tag() const
Expression identification tag.
EngineTrait< AddEngine_ >::right_type right_type
The right-hand expression type.
EngineTrait< ScalAddEngine_ >::scalar_type scalar_type
Tile scalar type.
EngineTrait< AddEngine_ >::policy policy
The result policy type.
AddEngine< Left, Right, Result > AddEngine_
This class type.
EngineTrait< AddEngine_ >::trange_type trange_type
Tiled range type.
shape_type make_shape(const Permutation &perm) const
Permuting shape factory function.
policy::size_type size_type
Size type.
Scalar scalar_type
Tile scalar type.
policy::trange_type trange_type
Tiled range type.
Consumable tile type trait.
EngineTrait< ScalAddEngine_ >::value_type value_type
The result tile type.
shape_type make_shape() const
Non-permuting shape factory function.
op_type make_tile_op() const
Non-permuting tile operation factory function.
Permutation of a sequence of objects indexed by base-0 indices.
Left::policy policy
The result policy type.
EngineTrait< ScalAddEngine_ >::policy policy
The result policy type.
static op_type make_tile_op()
Non-permuting tile operation factory function.
scalar_type factor()
Scaling factor accessor.
EngineTrait< ScalAddEngine_ >::trange_type trange_type
Tiled range type.
TiledArray::detail::ScalAdd< Result, typename EngineTrait< Left >::eval_type, typename EngineTrait< Right >::eval_type, scalar_type, EngineTrait< Left >::consumable, EngineTrait< Right >::consumable > op_base_type
The base tile operation type.
ScalAddEngine< Left, Right, Scalar, Result > ScalAddEngine_
This class type.
Left::policy policy
The result policy type.
eval_trait< value_type >::type eval_type
Evaluation tile type.
BinaryEngine< AddEngine_ > BinaryEngine_
Binary expression engine base type.
ExprEngine< ScalAddEngine_ > ExprEngine_
Expression engine base type.
EngineTrait< ScalAddEngine_ >::left_type left_type
The left-hand expression type.
EngineTrait< ScalAddEngine_ >::pmap_interface pmap_interface
Process map interface type.
ScalAddEngine(const ScalAddExpr< L, R, S > &expr)
Constructor.
Addition expression engine.
policy::trange_type trange_type
Tiled range type.
Addition expression engine.
BinaryEngine_::ExprEngine_ ExprEngine_
Expression engine base type.
left_type left_
The left-hand argument.