Go to the documentation of this file.
26 #ifndef TILEDARRAY_EXPRESSIONS_ADD_EXPR_H__INCLUDED
27 #define TILEDARRAY_EXPRESSIONS_ADD_EXPR_H__INCLUDED
33 namespace expressions {
35 template <
typename Left,
typename Right>
39 template <
typename Left,
typename Right,
typename Scalar>
48 template <
typename Left,
typename Right>
59 typedef numeric_t<typename EngineTrait<engine_type>::eval_type>
61 typedef scalar_t<typename EngineTrait<engine_type>::eval_type>
65 template <
typename Left,
typename Right,
typename Scalar>
79 typedef numeric_t<typename EngineTrait<engine_type>::eval_type>
87 template <
typename Left,
typename Right>
119 template <
typename Left,
typename Right,
typename Scalar>
166 template <
typename Left,
typename Right>
171 "no_alias() expressions are not allowed on the right-hand side of "
172 "the assignment operator.");
175 "no_alias() expressions are not allowed on the right-hand side of "
176 "the assignment operator.");
188 template <
typename Left,
typename Right,
typename Scalar>
189 inline typename std::enable_if<TiledArray::detail::is_numeric_v<Scalar>,
190 ScalAddExpr<Left, Right, Scalar> >::type
203 template <
typename Left,
typename Right,
typename Scalar>
204 inline typename std::enable_if<TiledArray::detail::is_numeric_v<Scalar>,
205 ScalAddExpr<Left, Right, Scalar> >::type
219 template <
typename Left,
typename Right,
typename Scalar1,
typename Scalar2,
220 typename std::enable_if<
221 TiledArray::detail::is_numeric_v<Scalar2> >::type* =
nullptr>
225 expr.left(), expr.right(), expr.
factor() * factor);
237 template <
typename Left,
typename Right,
typename Scalar1,
typename Scalar2,
238 typename std::enable_if<
239 TiledArray::detail::is_numeric_v<Scalar1> >::type* =
nullptr>
243 expr.left(), expr.right(), expr.
factor() * factor);
252 template <
typename Left,
typename Right>
253 inline ScalAddExpr<Left, Right,
254 typename ExprTrait<AddExpr<Left, Right> >::numeric_type>
258 expr.left(), expr.right(), -1);
268 template <
typename Left,
typename Right,
typename Scalar>
280 template <
typename Left,
typename Right>
291 template <
typename Left,
typename Right>
303 template <
typename Left,
typename Right,
typename Scalar>
307 expr.left(), expr.right(),
318 template <
typename Left,
typename Right,
typename Scalar>
322 expr.left(), expr.right(),
334 template <
typename Left,
typename Right,
typename Scalar,
335 typename std::enable_if<
336 TiledArray::detail::is_numeric_v<Scalar> >::type* =
nullptr>
351 template <
typename Left,
typename Right,
typename Scalar,
352 typename std::enable_if<
353 TiledArray::detail::is_numeric_v<Scalar> >::type* =
nullptr>
369 template <
typename Left,
typename Right,
typename Scalar1,
typename Scalar2,
370 typename std::enable_if<
371 TiledArray::detail::is_numeric_v<Scalar2> >::type* =
nullptr>
375 expr.left(), expr.right(),
conj_op(expr.
factor().factor() * factor));
387 template <
typename Left,
typename Right,
typename Scalar1,
typename Scalar2,
388 typename std::enable_if<
389 TiledArray::detail::is_numeric_v<Scalar1> >::type* =
nullptr>
393 expr.left(), expr.right(),
conj_op(expr.
factor().factor() * factor));
402 template <
typename Left,
typename Right>
404 Left, Right,
typename ExprTrait<ConjAddExpr<Left, Right> >::numeric_type>
409 conj_op<scalar_type>(-1));
419 template <
typename Left,
typename Right,
typename Scalar>
429 #endif // TILEDARRAY_EXPRESSIONS_ADD_EXPR_H__INCLUDED
AddExpr_ & operator=(AddExpr_ &&)=delete
Add-then-scale expression.
AddExpr(const AddExpr_ &)=default
scalar_type factor() const
Scaling factor accessor.
ScalAddExpr(const ScalAddExpr_ &)=default
Scalar scalar_type
Expression scalar type.
ScalAddExpr< Left, Right, typename ExprTrait< AddExpr< Left, Right > >::numeric_type > operator-(const AddExpr< Left, Right > &expr)
Negated addition expression factor.
Right right_type
The right-hand expression type.
typename TiledArray::detail::numeric_type< T >::type numeric_t
numeric_t<T> is an alias for numeric_type<T>::type
decltype(std::declval< Scalar1 >() *std::declval< Scalar2 >()) mult_t
AddExpr(AddExpr_ &&)=default
ExprTrait< AddExpr_ >::right_type right_type
The right-hand expression type.
ScalAddExpr(ScalAddExpr_ &&)=default
numeric_t< typename EngineTrait< engine_type >::eval_type > numeric_type
Addition numeric type.
AddExpr< Left, Right > AddExpr_
This class type.
Base class for expression evaluation.
Binary expression object.
AddExpr< Left, Right > operator+(const Expr< Left > &left, const Expr< Right > &right)
Addition expression factor.
ScalAddExpr< Left, Right, Scalar > ScalAddExpr_
This class type.
std::enable_if< TiledArray::detail::is_numeric_v< Scalar >, ScalAddExpr< Left, Right, Scalar > >::type operator*(const AddExpr< Left, Right > &expr, const Scalar &factor)
Scaled-addition expression factor.
Addition expression engine.
scalar_t< typename EngineTrait< engine_type >::eval_type > scalar_type
Addition result scalar type.
ConjAddExpr< Left, Right > conj(const AddExpr< Left, Right > &expr)
Conjugated addition expression factory.
typename TiledArray::detail::scalar_type< T >::type scalar_t
scalar_t<T> is an alias for scalar_type<T>::type
BinaryExpr< AddExpr_ > BinaryExpr_
Binary base class type.
Right right_type
The right-hand expression type.
AddExpr_ & operator=(const AddExpr_ &)=delete
Left left_type
The left-hand expression type.
TiledArray::tile_interface::result_of_add_t< typename EngineTrait< typename ExprTrait< Left >::engine_type >::eval_type, typename EngineTrait< typename ExprTrait< Right >::engine_type >::eval_type > result_type
Result tile type.
ExprTrait< ScalAddExpr_ >::engine_type engine_type
Expression engine type.
ExprTrait< AddExpr_ >::engine_type engine_type
Expression engine type.
BinaryExpr< ScalAddExpr_ > BinaryExpr_
Binary base class type.
ScalAddExpr_ & operator=(const ScalAddExpr_ &)=delete
Left left_type
The left-hand expression type.
ExprTrait< ScalAddExpr_ >::right_type right_type
The right-hand expression type.
ExprTrait< ScalAddExpr_ >::left_type left_type
The left-hand expression type.
ComplexConjugate< S > conj_op(const S factor)
ComplexConjugate operator factory function.
TiledArray::tile_interface::result_of_add_t< typename EngineTrait< typename ExprTrait< Left >::engine_type >::eval_type, typename EngineTrait< typename ExprTrait< Right >::engine_type >::eval_type, scalar_type > result_type
Result tile type.
decltype(add(std::declval< T >()...)) result_of_add_t
numeric_t< typename EngineTrait< engine_type >::eval_type > numeric_type
Addition result numeric type.
Addition expression engine.
AddEngine< typename ExprTrait< Left >::engine_type, typename ExprTrait< Right >::engine_type, result_type > engine_type
Expression engine type.
ScalAddExpr(const left_type &left, const right_type &right, const scalar_type factor)
Expression constructor.
AddExpr(const left_type &left, const right_type &right)
Expression constructor.
ScalAddExpr< Left, Right, TiledArray::detail::ComplexConjugate< Scalar > > ScalConjAddExpr
TILEDARRAY_FORCE_INLINE R conj(const R r)
Wrapper function for std::conj
ScalAddEngine< typename ExprTrait< Left >::engine_type, typename ExprTrait< Right >::engine_type, Scalar, result_type > engine_type
Expression engine type.
ExprTrait< AddExpr_ >::left_type left_type
The left-hand expression type.
ScalAddExpr_ & operator=(ScalAddExpr_ &&)=delete
ExprTrait< ScalAddExpr_ >::scalar_type scalar_type
Scalar type.
derived_type & derived()
Cast this object to its derived type.