26 #ifndef TILEDARRAY_EXPRESSIONS_TSR_EXPR_H__INCLUDED 27 #define TILEDARRAY_EXPRESSIONS_TSR_EXPR_H__INCLUDED 37 namespace expressions {
43 struct is_aliased :
public std::true_type { };
45 template <
typename Array,
bool Alias>
47 public std::integral_constant<bool, Alias> { };
49 template <
typename Array,
bool Alias>
60 template <
typename Array>
74 template <
typename Array>
82 template <
typename Array,
bool Alias>
83 class TsrExpr :
public Expr<TsrExpr<Array, Alias> > {
125 template <
typename D>
128 "no_alias() expressions are not allowed on the right-hand side of " 129 "the assignment operator.");
138 template <
typename D>
141 "no_alias() expressions are not allowed on the right-hand side of " 142 "the assignment operator.");
150 template <
typename D>
153 "no_alias() expressions are not allowed on the right-hand side of " 154 "the assignment operator.");
162 template <
typename D>
165 "no_alias() expressions are not allowed on the right-hand side of " 166 "the assignment operator.");
188 template <
typename Index>
190 block(
const Index& lower_bound,
const Index& upper_bound)
const {
200 block(
const std::initializer_list<std::size_t>& lower_bound,
201 const std::initializer_list<std::size_t>& upper_bound)
const {
211 template <
typename Index>
213 block(
const Index& lower_bound,
const Index& upper_bound) {
223 block(
const std::initializer_list<std::size_t>& lower_bound,
224 const std::initializer_list<std::size_t>& upper_bound) {
239 const std::string&
vars()
const {
return vars_; }
247 template <
typename Array>
249 public Expr<TsrExpr<const Array, true> >
292 template <
typename Index>
294 block(
const Index& lower_bound,
const Index& upper_bound)
const {
304 template <
typename Index>
306 block(
const std::initializer_list<Index>& lower_bound,
307 const std::initializer_list<Index>& upper_bound)
const {
323 const std::string&
vars()
const {
return vars_; }
330 #endif // TILEDARRAY_EXPRESSIONS_TSR_EXPR_H__INCLUDED
TiledArray::detail::numeric_t< Array > numeric_type
Array base numeric type.
ConjTsrExpr< Array > conj() const
Conjugated-tensor expression factor.
TsrExpr< Array, Alias > TsrExpr_
This class type.
array_type & operator=(const Expr< D > &other)
Expression assignment operator.
Expression wrapper for scaled array objects.
const std::string & vars() const
Tensor variable string accessor.
TsrEngine< Array, typename Array::eval_type, Alias > engine_type
Expression engine type.
TiledArray::detail::scalar_t< Array > scalar_type
Array base scalar type.
Multiplication expression.
typename TiledArray::detail::numeric_type< T >::type numeric_t
const std::string & vars() const
Tensor variable string accessor.
Array array_type
The Array type.
Expression wrapper for array objects.
TsrExpr< const Array, true > TsrExpr_
This class type.
array_type & operator-=(const Expr< D > &other)
Expression minus-assignment operator.
ExprTrait< TsrExpr_ >::engine_type engine_type
Expression engine type.
BlkTsrExpr< Array, Alias > block(const Index &lower_bound, const Index &upper_bound)
Block expression.
BlkTsrExpr< const Array, true > block(const Index &lower_bound, const Index &upper_bound) const
Block expression.
const array_type & array() const
Array accessor.
Expr< TsrExpr_ > Expr_
Expression base type.
BlkTsrExpr< const Array, true > block(const std::initializer_list< Index > &lower_bound, const std::initializer_list< Index > &upper_bound) const
Block expression.
typename TiledArray::detail::scalar_type< T >::type scalar_t
BlkTsrExpr< Array, Alias > block(const std::initializer_list< std::size_t > &lower_bound, const std::initializer_list< std::size_t > &upper_bound)
Block expression.
ExprTrait< TsrExpr_ >::engine_type engine_type
Expression engine type.
Base class for expression evaluation.
derived_type & derived()
Cast this object to it's derived type.
void eval_to(TsrExpr< A, Alias > &tsr) const
Evaluate this object and assign it to tsr.
TsrEngine< Array, typename Array::eval_type, true > engine_type
Expression engine type.
TiledArray::detail::numeric_t< Array > numeric_type
Array base numeric type.
ExprTrait< TsrExpr_ >::array_type array_type
The array type.
array_type & operator=(TsrExpr_ &other)
Expression assignment operator.
Expression wrapper for const array objects.
ComplexConjugate< S > conj_op(const S factor)
ComplexConjugate operator factory function.
array_type & operator*=(const Expr< D > &other)
Expression multiply-assignment operator.
ExprTrait< TsrExpr_ >::array_type array_type
The array type.
ConjTsrExpr< Array > conj() const
Conjugated-tensor expression factor.
array_type & array() const
Array accessor.
Tensor expression engine.
TsrExpr(const array_type &array, const std::string &vars)
Constructor.
TsrExpr(array_type &array, const std::string &vars)
Constructor.
Array array_type
The Array type.
array_type & operator+=(const Expr< D > &other)
Expression plus-assignment operator.
TiledArray::detail::scalar_t< Array > scalar_type
Array base scalar type.
BlkTsrExpr< const Array, Alias > block(const std::initializer_list< std::size_t > &lower_bound, const std::initializer_list< std::size_t > &upper_bound) const
Block expression.
BlkTsrExpr< const Array, Alias > block(const Index &lower_bound, const Index &upper_bound) const
Block expression.
TsrExpr< Array, false > no_alias() const
Flag this tensor expression for a non-aliasing assignment.
Expr< TsrExpr_ > Expr_
Base class type.