Go to the documentation of this file.
26 #ifndef TILEDARRAY_TILE_OP_NOOP_H__INCLUDED
27 #define TILEDARRAY_TILE_OP_NOOP_H__INCLUDED
29 #include "../tile_interface/clone.h"
30 #include "../tile_interface/permute.h"
43 template <
typename Result,
typename Arg,
bool Consumable>
56 template <
typename Perm,
57 typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
58 result_type eval(
const Arg& arg,
const Perm& perm)
const {
67 template <bool C, typename std::enable_if<!C>::type* =
nullptr>
73 template <bool C, typename std::enable_if<C>::type* =
nullptr>
85 template <
typename Perm,
86 typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
88 return eval(arg, perm);
98 return Noop_::template eval<is_consumable>(arg);
106 constexpr
bool can_consume =
108 std::is_same<result_type, argument_type>::value;
109 return Noop_::template eval<can_consume>(arg);
117 #endif // TILEDARRAY_TILE_OP_NOOP_H__INCLUDED
Consumable tile type trait.
Result result_type
The result tile type.
void permute(InputOp &&input_op, OutputOp &&output_op, Result &result, const Perm &perm, const Arg0 &arg0, const Args &... args)
Construct a permuted tensor copy.
result_type operator()(const argument_type &arg, const Perm &perm) const
Permute operator.
DistArray< Tile, Policy > clone(const DistArray< Tile, Policy > &arg)
Create a deep copy of an array.
Arg argument_type
The argument type.
result_type operator()(A &&arg) const
Clone operator.
Noop< Result, Arg, Consumable > Noop_
This object type.
result_type consume(argument_type &arg) const
Pass-through operations (shallow copy)
static constexpr bool is_consumable
Create a deep copy of a tile.