26 #ifndef TILEDARRAY_EXPRESSIONS_UNARY_ENGINE_H__INCLUDED 27 #define TILEDARRAY_EXPRESSIONS_UNARY_ENGINE_H__INCLUDED 33 namespace expressions {
40 template <
typename Derived>
64 static constexpr
unsigned int leaves = argument_type::leaves;
105 if(
arg_.vars() != target_vars)
106 arg_.perm_vars(target_vars);
113 arg_.init_vars(target_vars);
141 const std::shared_ptr<pmap_interface>&
pmap)
165 typename Derived::op_type,
typename dist_eval_type::policy> impl_type;
168 const typename argument_type::dist_eval_type arg =
arg_.make_dist_eval();
171 std::shared_ptr<impl_type> pimpl =
194 #endif // TILEDARRAY_EXPRESSIONS_UNARY_ENGINE_H__INCLUDED trange_type make_trange() const
Non-permuting tiled range factory function.
UnaryEngine(const UnaryExpr< D > &expr)
ExprEngine< Derived > ExprEngine_
Base class type.
static constexpr unsigned int leaves
bool permute_tiles_
Result tile permutation flag (true == permute tile)
const Permutation & perm() const
Permutation accessor.
EngineTrait< Derived >::size_type size_type
Size type.
World * world() const
World accessor.
op_type make_op() const
Tile operation factory function.
derived_type & derived()
Cast this object to it's derived type.
argument_type arg_
The argument.
const std::shared_ptr< pmap_interface > & pmap() const
Process map accessor.
VariableList vars_
The variable list of this expression.
void perm_vars(const VariableList &target_vars)
Set the variable list for this expression.
EngineTrait< Derived >::shape_type shape_type
Shape type.
const VariableList & vars() const
Variable list accessor.
void init_struct(const VariableList &target_vars)
Initialize result tensor structure.
EngineTrait< Derived >::dist_eval_type dist_eval_type
The distributed evaluator type.
EngineTrait< ScalEngine< Arg, Scalar, Result > >::trange_type trange_type
Tiled range type type.
static constexpr bool consumable
Variable list manages a list variable strings.
Tensor that is composed from an argument tensor.
EngineTrait< Derived >::trange_type trange_type
Tiled range type.
EngineTrait< ScalEngine< Arg, 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.
EngineTrait< Derived >::op_type op_type
The tile operation type.
dist_eval_type make_dist_eval() const
Construct the distributed evaluator for this expression.
EngineTrait< Derived >::policy policy
The result policy type.
World * world_
The world where this expression will be evaluated.
void inc()
Increment the number of tabs.
UnaryEngine< Derived > UnaryEngine_
This class type.
EngineTrait< Derived >::pmap_interface pmap_interface
Process map interface type.
Permutation of a sequence of objects indexed by base-0 indices.
void init_struct(const VariableList &target_vars)
Initialize result tensor structure.
Permutation perm_
The permutation that will be applied to the result.
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.
EngineTrait< Derived >::value_type value_type
The result tile type.
trange_type make_trange(const Permutation &perm) const
Permuting tiled range factory function.
void init_distribution(World *world, const std::shared_ptr< pmap_interface > &pmap)
Initialize result tensor distribution.
Expression output stream.
EngineTrait< Derived >::argument_type argument_type
The argument expression engine type.
void init_vars()
Initialize the variable list of this expression.
trange_type trange_
The tiled range of the result tensor.
void print(ExprOStream os, const VariableList &target_vars) const
Expression print.
void print(ExprOStream &os, const VariableList &target_vars) const
Expression print.
void init_vars(const VariableList &target_vars)
Initialize the variable list of this expression.
void dec()
Decrement the number of tabs.