27 #ifndef TILEDARRAY_EXPRESSIONS_SCAL_TSR_EXPR_H__INCLUDED 28 #define TILEDARRAY_EXPRESSIONS_SCAL_TSR_EXPR_H__INCLUDED 33 namespace expressions {
35 template <
typename Array>
38 template <
typename Array,
typename Scalar>
47 template <
typename Array,
typename Scalar>
64 template <
typename Array,
typename Scalar>
109 const std::string&
vars()
const {
return vars_; }
126 template <
typename Array,
typename Scalar,
127 typename std::enable_if<
130 inline ScalTsrExpr<typename std::remove_const<Array>::type, Scalar>
143 template <
typename Array,
typename Scalar,
144 typename std::enable_if<
147 inline ScalTsrExpr<typename std::remove_const<Array>::type, Scalar>
161 template <
typename Array,
typename Scalar1,
typename Scalar2,
162 typename std::enable_if<
165 inline ScalTsrExpr<Array, mult_t<Scalar1, Scalar2> >
179 template <
typename Array,
typename Scalar1,
typename Scalar2,
180 typename std::enable_if<
183 inline ScalTsrExpr<Array, mult_t<Scalar2, Scalar1> >
194 template <
typename Array>
195 inline ScalTsrExpr<typename std::remove_const<Array>::type,
196 typename ExprTrait<TsrExpr<Array, true> >::numeric_type>
209 template <
typename Array,
typename Scalar>
210 inline ScalTsrExpr<Array, Scalar>
220 template <
typename Array>
221 inline ConjTsrExpr<typename std::remove_const<Array>::type>
232 template <
typename Array>
243 template <
typename Array,
typename Scalar>
255 template <
typename Array,
typename Scalar>
256 inline ScalTsrExpr<Array, Scalar>
269 template <
typename Array,
typename Scalar,
270 typename std::enable_if<
273 inline ScalConjTsrExpr<Array, Scalar>
286 template <
typename Array,
typename Scalar,
287 typename std::enable_if<
290 inline ScalConjTsrExpr<Array, Scalar>
303 template <
typename Array,
typename Scalar1,
typename Scalar2,
304 typename std::enable_if<
307 inline ScalConjTsrExpr<Array, mult_t<Scalar1, Scalar2> >
320 template <
typename Array,
typename Scalar1,
typename Scalar2,
321 typename std::enable_if<
324 inline ScalConjTsrExpr<Array, mult_t<Scalar2, Scalar1> >
335 template <
typename Array>
336 inline ScalConjTsrExpr<Array, typename ExprTrait<ConjTsrExpr<Array> >::numeric_type>
341 conj_op<numeric_type>(-1));
350 template <
typename Array,
typename Scalar>
351 inline ScalConjTsrExpr<Array, Scalar>
360 #endif // TILEDARRAY_EXPRESSIONS_SCAL_TSR_EXPR_H__INCLUDED
Expression wrapper for scaled array objects.
const std::string & vars() const
Tensor variable string accessor.
ExprTrait< ScalTsrExpr_ >::engine_type engine_type
Expression engine type.
std::enable_if< TiledArray::detail::is_numeric< Scalar >::value, ScalAddExpr< Left, Right, Scalar > >::type operator*(const AddExpr< Left, Right > &expr, const Scalar &factor)
Scaled-addition expression factor.
Scaled tensor expression engine.
decltype(std::declval< Scalar1 >() *std::declval< Scalar2 >()) mult_t
decltype(scale(std::declval< T >()...)) result_of_scale_t
ScalTsrEngine< Array, scalar_type, result_type > engine_type
Expression engine type.
typename TiledArray::detail::numeric_type< T >::type numeric_t
ScalTsrExpr< Array, Scalar > ScalTsrExpr_
This class type.
Expression wrapper for array objects.
Array array_type
The Array type.
const array_type & array() const
Array accessor.
ExprTrait< ScalTsrExpr_ >::scalar_type scalar_type
Scalar type.
Expr< ScalTsrExpr_ > Expr_
Expression base type.
scalar_type factor() const
Scaling factor accessor.
Base class for expression evaluation.
ConjAddExpr< Left, Right > conj(const AddExpr< Left, Right > &expr)
Conjugated addition expression factory.
ScalTsrExpr(const array_type &array, const std::string &vars, const scalar_type factor)
Construct a scaled tensor expression.
ScalAddExpr< Left, Right, typename ExprTrait< AddExpr< Left, Right > >::numeric_type > operator-(const AddExpr< Left, Right > &expr)
Negated addition expression factor.
const std::string & vars() const
Tensor variable string accessor.
TILEDARRAY_FORCE_INLINE R conj(const R r)
Wrapper function for std::conj
Scalar scalar_type
Expression scalar type.
Expression wrapper for const array objects.
ComplexConjugate< S > conj_op(const S factor)
ComplexConjugate operator factory function.
ExprTrait< ScalTsrExpr_ >::array_type array_type
The array type.
TiledArray::tile_interface::result_of_scale_t< typename Array::eval_type, scalar_type > result_type
Result tile type.
ScalTsrExpr(const ScalTsrExpr_ &)=default
impl_type::eval_type eval_type
The tile evaluation type.
array_type & array() const
Array accessor.
DistArray< Tile, Policy > Array
TiledArray::detail::numeric_t< Array > numeric_type
Array base numeric type.