Documentation
template<typename Op>
class TiledArray::detail::UnaryWrapper< Op >
Unary tile operation wrapper.
This wrapper class is handles evaluation of lazily evaluated tiles in unary operations and forwards the evaluated arguments to the base operation object.
The base unary operation class must have the following interface.
- Template Parameters
-
Op The base binary operation type
Definition at line 83 of file unary_wrapper.h.
Public Types | |
typedef UnaryWrapper< Op > | UnaryWrapper_ |
typedef Op::argument_type | argument_type |
Argument type. More... | |
typedef Op::result_type | result_type |
The result tile type. More... | |
template<typename T > | |
using | eval_t = typename eval_trait< std::decay_t< T > >::type |
Public Member Functions | |
UnaryWrapper (const UnaryWrapper_ &)=default | |
UnaryWrapper (UnaryWrapper_ &&)=default | |
~UnaryWrapper ()=default | |
UnaryWrapper_ & | operator= (const UnaryWrapper_ &)=default |
UnaryWrapper_ & | operator= (UnaryWrapper_ &&)=default |
UnaryWrapper (const Op &op, const BipartitePermutation &perm) | |
UnaryWrapper (const Op &op) | |
const BipartitePermutation & | permutation () const |
Permutation accessor. More... | |
auto | operator() (argument_type &arg) const |
Apply operator to arg and possibly permute the result. More... | |
auto | operator() (const argument_type &arg) const |
Apply operator to arg and possibly permute the result. More... | |
template<typename A , std::enable_if_t< is_nonarray_lazy_tile_v< A >> * = nullptr> | |
auto | operator() (A &&arg) const |
Evaluate a lazy tile. More... | |
template<typename A , std::enable_if_t< is_array_tile_v< A >> * = nullptr> | |
auto | operator() (A &&arg) const |
Evaluate a lazy array tile. More... | |
template<typename A , std::enable_if_t< is_lazy_tile_v< A >> * = nullptr> | |
auto | consume (A &&arg) const |
Consume a lazy tile. More... | |
template<typename A , std::enable_if_t<!is_lazy_tile_v< A >> * = nullptr> | |
result_type | consume (A &&arg) const |
Static Public Attributes | |
static constexpr bool | is_consumable = Op::is_consumable |
Boolean value that indicates the argument can always be consumed. More... | |
template<typename T > | |
static constexpr bool | is_lazy_tile_v = is_lazy_tile<std::decay_t<T>>::value |
template<typename T > | |
static constexpr bool | is_array_tile_v = is_array_tile<std::decay_t<T>>::value |
template<typename T > | |
static constexpr bool | is_nonarray_lazy_tile_v |
Member Typedef Documentation
◆ argument_type
typedef Op::argument_type TiledArray::detail::UnaryWrapper< Op >::argument_type |
Argument type.
Definition at line 86 of file unary_wrapper.h.
◆ eval_t
using TiledArray::detail::UnaryWrapper< Op >::eval_t = typename eval_trait<std::decay_t<T> >::type |
Definition at line 103 of file unary_wrapper.h.
◆ result_type
typedef Op::result_type TiledArray::detail::UnaryWrapper< Op >::result_type |
The result tile type.
Definition at line 87 of file unary_wrapper.h.
◆ UnaryWrapper_
typedef UnaryWrapper<Op> TiledArray::detail::UnaryWrapper< Op >::UnaryWrapper_ |
Definition at line 85 of file unary_wrapper.h.
Constructor & Destructor Documentation
◆ UnaryWrapper() [1/4]
|
default |
◆ UnaryWrapper() [2/4]
|
default |
◆ ~UnaryWrapper()
|
default |
◆ UnaryWrapper() [3/4]
|
inline |
Definition at line 117 of file unary_wrapper.h.
◆ UnaryWrapper() [4/4]
|
inline |
Definition at line 120 of file unary_wrapper.h.
Member Function Documentation
◆ consume() [1/2]
|
inline |
Consume a lazy tile.
Definition at line 187 of file unary_wrapper.h.
◆ consume() [2/2]
|
inline |
Definition at line 204 of file unary_wrapper.h.
◆ operator()() [1/4]
|
inline |
Evaluate a lazy tile.
This function will evaluate arg
, then pass the evaluated tile to the Op
callable.
- Template Parameters
-
A The lazy tile type
- Parameters
-
arg The lazy tile argument
- Returns
- The result of the unary operation applied to the evaluated
arg
.
Definition at line 154 of file unary_wrapper.h.
◆ operator()() [2/4]
|
inline |
Evaluate a lazy array tile.
This function will evaluate arg
, then pass the evaluated tile to the Op
callable , optionally consuming the evaluated tile in the process.
- Template Parameters
-
A The lazy tile type
- Parameters
-
arg The lazy tile argument
- Returns
- The result of the unary operation applied to the evaluated
arg
.
Definition at line 167 of file unary_wrapper.h.
◆ operator()() [3/4]
|
inline |
Apply operator to arg
and possibly permute the result.
- Parameters
-
arg The argument
- Returns
- The result tile from the unary operation applied to the
arg
.
Definition at line 132 of file unary_wrapper.h.
◆ operator()() [4/4]
|
inline |
Apply operator to arg
and possibly permute the result.
- Parameters
-
arg The argument
- Returns
- The result tile from the unary operation applied to the
arg
.
Definition at line 141 of file unary_wrapper.h.
◆ operator=() [1/2]
|
default |
◆ operator=() [2/2]
|
default |
◆ permutation()
|
inline |
Permutation accessor.
- Returns
- A reference to the permutation applied to the result tile
Definition at line 125 of file unary_wrapper.h.
Member Data Documentation
◆ is_array_tile_v
|
staticconstexpr |
Definition at line 96 of file unary_wrapper.h.
◆ is_consumable
|
staticconstexpr |
Boolean value that indicates the argument can always be consumed.
Definition at line 90 of file unary_wrapper.h.
◆ is_lazy_tile_v
|
staticconstexpr |
Definition at line 93 of file unary_wrapper.h.
◆ is_nonarray_lazy_tile_v
|
staticconstexpr |
Definition at line 99 of file unary_wrapper.h.
The documentation for this class was generated from the following file:
- TiledArray/tile_op/unary_wrapper.h