26 #ifndef TILEDARRAY_TILE_OP_REDUCE_INTERFACE_H__INCLUDED 27 #define TILEDARRAY_TILE_OP_REDUCE_INTERFACE_H__INCLUDED 40 template <
typename Tile,
typename Op>
64 typename std::enable_if<is_lazy_tile<T>::value>::type
67 Op::operator()(result, eval_arg);
71 typename std::enable_if<! is_lazy_tile<T>::value >::type
73 Op::operator()(result, arg);
90 template <
typename Op>
105 Op::operator=(other);
110 using Op::operator();
120 template <
typename Left,
typename Right,
typename Op>
135 Op::operator=(other);
141 template <
typename L,
typename R>
143 reduce(
result_type& result,
const L& left,
const R& right)
const {
146 Op::operator()(result, eval_left, eval_right);
149 template <
typename L,
typename R>
151 reduce(
result_type& result,
const L& left,
const R& right)
const {
153 Op::operator()(result, left, eval_right);
156 template <
typename L,
typename R>
157 typename std::enable_if<is_lazy_tile<L>::value && (!is_lazy_tile<R>::value)>::type
158 reduce(
result_type& result,
const L& left,
const R& right)
const {
160 Op::operator()(result, eval_left, right);
163 template <
typename L,
typename R>
164 typename std::enable_if<!(is_lazy_tile<L>::value || is_lazy_tile<R>::value)>::type
165 reduce(
result_type& result,
const L& left,
const R& right)
const {
166 Op::operator()(result, left, right);
172 using Op::operator();
177 reduce(result, left, right);
183 template <
typename Op>
185 typename Op::second_argument_type, Op> :
public Op
200 Op::operator=(other);
205 using Op::operator();
212 #endif // TILEDARRAY_TILE_OP_REDUCE_INTERFACE_H__INCLUDED Tile argument_type
The reduction argument type.
Op::result_type result_type
The reduction result type.
Right second_argument_type
The reduction right-hand argument type.
Op::first_argument_type first_argument_type
The reduction left-hand argument type.
UnaryReduceWrapper(const Op &op)
UnaryReduceWrapper(const UnaryReduceWrapper_ &other)
BinaryReduceWrapper(const Op &op)
Binary reduction operation wrapper.
Op::argument_type argument_type
The reduction argument type.
UnaryReduceWrapper_ & operator=(const UnaryReduceWrapper_ &other)
UnaryReduceWrapper< typename Op::argument_type, Op > UnaryReduceWrapper_
This class type.
UnaryReduceWrapper(const UnaryReduceWrapper_ &other)
void operator()(result_type &result, const argument_type &arg) const
UnaryReduceWrapper(const Op &op)
BinaryReduceWrapper< Left, Right, Op > BinaryReduceWrapper_
This class type.
Op::result_type result_type
The reduction result type.
Op::result_type result_type
The reduction result type.
Left first_argument_type
The reduction left-hand argument type.
Op::result_type result_type
The reduction result type.
BinaryReduceWrapper_ & operator=(const BinaryReduceWrapper_ &other)
BinaryReduceWrapper(const BinaryReduceWrapper_ &other)
void operator()(result_type &result, const first_argument_type &left, const second_argument_type &right) const
BinaryReduceWrapper_ & operator=(const BinaryReduceWrapper_ &other)
Binary reduction wrapper class that handles lazy tile evaluation.
BinaryReduceWrapper< typename Op::first_argument_type, typename Op::second_argument_type, Op > BinaryReduceWrapper_
This class type.
UnaryReduceWrapper< Tile, Op > UnaryReduceWrapper_
This class type.
BinaryReduceWrapper(const Op &op)
UnaryReduceWrapper_ & operator=(const UnaryReduceWrapper_ &other)
Unary reduction wrapper class that handles lazy tile evaluation.
Unary reduction wrapper class that handles lazy tile evaluation.
BinaryReduceWrapper(const BinaryReduceWrapper_ &other)
Op::second_argument_type second_argument_type
The reduction right-hand argument type.
Detect lazy evaluation tiles.
An N-dimensional shallow copy wrapper for tile objects.