26 #ifndef TILEDARRAY_EXPRESSIONS_LEAF_ENGINE_H__INCLUDED 27 #define TILEDARRAY_EXPRESSIONS_LEAF_ENGINE_H__INCLUDED 33 namespace expressions {
38 template <
typename Derived>
104 if(TiledArray::get_default_world().rank() == 0) {
106 "The array variable list is not compatible with the expected output:" \
107 <<
"\n expected = " << target_vars \
108 <<
"\n array = " <<
vars_ );
111 TA_EXCEPTION(
"Target variable is not a permutation of the given array variable list.");
123 const std::shared_ptr<pmap_interface>&
pmap)
161 std::shared_ptr<impl_type> pimpl =
173 #endif // TILEDARRAY_EXPRESSIONS_LEAF_ENGINE_H__INCLUDED EngineTrait< Derived >::size_type size_type
Size type.
shape_type make_shape()
Non-permuting shape factory function.
bool permute_tiles_
Result tile permutation flag (true == permute tile)
const Permutation & perm() const
Permutation accessor.
static constexpr bool consumable
trange_type make_trange(const Permutation &perm) const
Permuting tiled range factory function.
World * world() const
World accessor.
void perm_vars(const VariableList &)
Set the variable list for this expression.
static constexpr unsigned int leaves
op_type make_op() const
Tile operation factory function.
EngineTrait< Derived >::array_type array_type
The left-hand expression type.
EngineTrait< Derived >::trange_type trange_type
Tiled range type type.
EngineTrait< Derived >::dist_eval_type dist_eval_type
This expression's distributed evaluator type.
array_type array_
The array object.
EngineTrait< Derived >::op_type op_type
Tile operation type.
EngineTrait< Derived >::shape_type shape_type
Tensor shape type.
derived_type & derived()
Cast this object to it's derived type.
EngineTrait< Derived >::pmap_interface pmap_interface
Process map interface type.
const std::shared_ptr< pmap_interface > & pmap() const
Process map accessor.
VariableList vars_
The variable list of this expression.
EngineTrait< Derived >::policy policy
The result policy type.
LeafEngine< Derived > LeafEngine_
This class type.
LeafEngine(const Expr< D > &expr)
Engine constructor.
EngineTrait< ScalBlkTsrEngine< Array, Scalar, Result > >::trange_type trange_type
Tiled range type type.
ExprEngine< Derived > ExprEngine_
Base class type.
EngineTrait< ScalBlkTsrEngine< Array, Scalar, Result > >::shape_type shape_type
Tensor shape type.
Variable list manages a list variable strings.
shape_type make_shape(const Permutation &perm)
Permuting shape factory function.
void init_vars()
Initialize the variable list of this expression.
EngineTrait< ScalBlkTsrEngine< Array, Scalar, Result > >::dist_eval_type dist_eval_type
This expression's distributed evaluator type.
std::shared_ptr< pmap_interface > pmap_
The process map for the result tensor.
Base class for expression evaluation.
derived_type & derived()
Cast this object to it's derived type.
trange_type make_trange() const
Non-permuting tiled range factory function.
World * world_
The world where this expression will be evaluated.
void init_distribution(World *world, const std::shared_ptr< pmap_interface > &pmap)
bool is_permutation(const VariableList &other) const
Check that this variable list is a permutation of other.
Permutation of a sequence of objects indexed by base-0 indices.
Permutation perm_
The permutation that will be applied to the result.
Distributed evaluator for TiledArray::Array objects.
void init_distribution(World *world, const std::shared_ptr< pmap_interface > &pmap)
Initialize result tensor distribution.
shape_type shape_
The shape of the result tensor.
void init_vars(const VariableList &target_vars)
Initialize the variable list of this expression.
EngineTrait< Derived >::value_type value_type
Tensor value type.
trange_type trange_
The tiled range of the result tensor.
dist_eval_type make_dist_eval() const
Construct the distributed evaluator for array.
#define TA_USER_ERROR_MESSAGE(m)