TiledArray  0.7.0
TiledArray::expressions::TsrExpr< Array, Alias > Class Template Reference

Expression wrapper for array objects. More...

#include <dist_array.h>

Inheritance diagram for TiledArray::expressions::TsrExpr< Array, Alias >:
Collaboration diagram for TiledArray::expressions::TsrExpr< Array, Alias >:

Public Types

typedef TsrExpr< Array, Alias > TsrExpr_
 This class type. More...
 
typedef Expr< TsrExpr_Expr_
 Base class type. More...
 
typedef ExprTrait< TsrExpr_ >::array_type array_type
 The array type. More...
 
typedef ExprTrait< TsrExpr_ >::engine_type engine_type
 Expression engine type. More...
 
- Public Types inherited from TiledArray::expressions::Expr< TsrExpr< Array, Alias > >
using engine_t = typename ExprTrait< Derived_ >::engine_type
 
using eval_type_t = typename engine_t< Derived_ >::eval_type
 
typedef Expr< TsrExpr< Array, Alias > > Expr_
 This class type. More...
 
typedef TsrExpr< Array, Alias > derived_type
 The derived object type. More...
 
typedef engine_t< derived_typeengine_type
 Expression engine type. More...
 

Public Member Functions

 TsrExpr ()=default
 
 TsrExpr (const TsrExpr_ &)=default
 
 TsrExpr (TsrExpr_ &&)=default
 
 ~TsrExpr ()=default
 
 TsrExpr (array_type &array, const std::string &vars)
 Constructor. More...
 
array_typeoperator= (TsrExpr_ &other)
 Expression assignment operator. More...
 
template<typename D >
array_typeoperator= (const Expr< D > &other)
 Expression assignment operator. More...
 
template<typename D >
array_typeoperator+= (const Expr< D > &other)
 Expression plus-assignment operator. More...
 
template<typename D >
array_typeoperator-= (const Expr< D > &other)
 Expression minus-assignment operator. More...
 
template<typename D >
array_typeoperator*= (const Expr< D > &other)
 Expression multiply-assignment operator. More...
 
array_typearray () const
 Array accessor. More...
 
TsrExpr< Array, false > no_alias () const
 Flag this tensor expression for a non-aliasing assignment. More...
 
template<typename Index >
BlkTsrExpr< const Array, Alias > block (const Index &lower_bound, const Index &upper_bound) const
 Block expression. More...
 
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. More...
 
template<typename Index >
BlkTsrExpr< Array, Alias > block (const Index &lower_bound, const Index &upper_bound)
 Block expression. More...
 
BlkTsrExpr< Array, Alias > block (const std::initializer_list< std::size_t > &lower_bound, const std::initializer_list< std::size_t > &upper_bound)
 Block expression. More...
 
ConjTsrExpr< Arrayconj () const
 Conjugated-tensor expression factor. More...
 
const std::string & vars () const
 Tensor variable string accessor. More...
 
- Public Member Functions inherited from TiledArray::expressions::Expr< TsrExpr< Array, Alias > >
Expr< TsrExpr< Array, Alias > > & set_shape (typename override_type::shape_type const &shape)
 
Expr< TsrExpr< Array, Alias > > & set_world (World &world)
 
Expr< TsrExpr< Array, Alias > > & set_pmap (const std::shared_ptr< typename override_type::pmap_interface > pmap)
 
 Expr ()=default
 
 Expr (const Expr_ &)=default
 
 Expr (Expr_ &&)=default
 
 ~Expr ()=default
 
Expr_operator= (const Expr_ &)=delete
 
Expr_operator= (Expr_ &&)=delete
 
derived_typederived ()
 Cast this object to it's derived type. More...
 
const derived_typederived () const
 Cast this object to it's derived type. More...
 
void eval_to (TsrExpr< A, Alias > &tsr) const
 Evaluate this object and assign it to tsr. More...
 
void eval_to (BlkTsrExpr< A, Alias > &tsr) const
 Evaluate this object and assign it to tsr. More...
 
void print (ExprOStream &os, const VariableList &target_vars) const
 Expression print. More...
 
Future< typename Op::result_type > reduce (const Op &op, World &world) const
 
Future< typename Op::result_type > reduce (const Op &op) const
 
Future< typename Op::result_type > reduce (const Expr< D > &right_expr, const Op &op, World &world) const
 
Future< typename Op::result_type > reduce (const Expr< D > &right_expr, const Op &op) const
 
Future< typename TiledArray::TraceReduction< typename EngineTrait< engine_type >::eval_type >::result_type > trace (World &world) const
 
Future< typename TiledArray::TraceReduction< typename EngineTrait< engine_type >::eval_type >::result_type > trace () const
 
Future< typename TiledArray::SumReduction< typename EngineTrait< engine_type >::eval_type >::result_type > sum (World &world) const
 
Future< typename TiledArray::SumReduction< typename EngineTrait< engine_type >::eval_type >::result_type > sum () const
 
Future< typename TiledArray::ProductReduction< typename EngineTrait< engine_type >::eval_type >::result_type > product (World &world) const
 
Future< typename TiledArray::ProductReduction< typename EngineTrait< engine_type >::eval_type >::result_type > product () const
 
Future< typename TiledArray::SquaredNormReduction< typename EngineTrait< engine_type >::eval_type >::result_type > squared_norm (World &world) const
 
Future< typename TiledArray::SquaredNormReduction< typename EngineTrait< engine_type >::eval_type >::result_type > squared_norm () const
 
Future< typename TiledArray::SquaredNormReduction< typename EngineTrait< engine_type >::eval_type >::result_type > norm (World &world) const
 
Future< typename TiledArray::SquaredNormReduction< typename EngineTrait< engine_type >::eval_type >::result_type > norm () const
 
std::enable_if< TiledArray::detail::is_strictly_ordered< TiledArray::detail::numeric_t< typename EngineTrait< typename ExprTrait< Derived_ >::engine_type >::eval_type > >::value, Future< typename TiledArray::MinReduction< typename EngineTrait< typename ExprTrait< Derived_ >::engine_type >::eval_type >::result_type > > min (World &world) const
 
std::enable_if< TiledArray::detail::is_strictly_ordered< TiledArray::detail::numeric_t< typename EngineTrait< typename ExprTrait< Derived_ >::engine_type >::eval_type > >::value, Future< typename TiledArray::MinReduction< typename EngineTrait< typename ExprTrait< Derived_ >::engine_type >::eval_type >::result_type > > min () const
 
std::enable_if< TiledArray::detail::is_strictly_ordered< TiledArray::detail::numeric_t< typename EngineTrait< typename ExprTrait< Derived_ >::engine_type >::eval_type > >::value, Future< typename TiledArray::MaxReduction< typename EngineTrait< typename ExprTrait< Derived_ >::engine_type >::eval_type >::result_type > > max (World &world) const
 
std::enable_if< TiledArray::detail::is_strictly_ordered< TiledArray::detail::numeric_t< typename EngineTrait< typename ExprTrait< Derived_ >::engine_type >::eval_type > >::value, Future< typename TiledArray::MaxReduction< typename EngineTrait< typename ExprTrait< Derived_ >::engine_type >::eval_type >::result_type > > max () const
 
Future< typename TiledArray::AbsMinReduction< typename EngineTrait< engine_type >::eval_type >::result_type > abs_min (World &world) const
 
Future< typename TiledArray::AbsMinReduction< typename EngineTrait< engine_type >::eval_type >::result_type > abs_min () const
 
Future< typename TiledArray::AbsMaxReduction< typename EngineTrait< engine_type >::eval_type >::result_type > abs_max (World &world) const
 
Future< typename TiledArray::AbsMaxReduction< typename EngineTrait< engine_type >::eval_type >::result_type > abs_max () const
 
Future< typename TiledArray::DotReduction< typename EngineTrait< engine_type >::eval_type, typename EngineTrait< typename D::engine_type >::eval_type >::result_type > dot (const Expr< D > &right_expr, World &world) const
 
Future< typename TiledArray::DotReduction< typename EngineTrait< engine_type >::eval_type, typename EngineTrait< typename D::engine_type >::eval_type >::result_type > dot (const Expr< D > &right_expr) const
 
Future< typename TiledArray::InnerProductReduction< typename EngineTrait< engine_type >::eval_type, typename EngineTrait< typename D::engine_type >::eval_type >::result_type > inner_product (const Expr< D > &right_expr, World &world) const
 
Future< typename TiledArray::InnerProductReduction< typename EngineTrait< engine_type >::eval_type, typename EngineTrait< typename D::engine_type >::eval_type >::result_type > inner_product (const Expr< D > &right_expr) const
 

Detailed Description

template<typename Array, bool Alias>
class TiledArray::expressions::TsrExpr< Array, Alias >

Expression wrapper for array objects.

Template Parameters
ArrayThe TiledArray::Array type
AliasIndicates the array tiles should be computed as a temporary before assignment

Definition at line 39 of file dist_array.h.

Member Typedef Documentation

◆ array_type

template<typename Array, bool Alias>
typedef ExprTrait<TsrExpr_>::array_type TiledArray::expressions::TsrExpr< Array, Alias >::array_type

The array type.

Definition at line 88 of file tsr_expr.h.

◆ engine_type

template<typename Array, bool Alias>
typedef ExprTrait<TsrExpr_>::engine_type TiledArray::expressions::TsrExpr< Array, Alias >::engine_type

Expression engine type.

Definition at line 90 of file tsr_expr.h.

◆ Expr_

template<typename Array, bool Alias>
typedef Expr<TsrExpr_> TiledArray::expressions::TsrExpr< Array, Alias >::Expr_

Base class type.

Definition at line 86 of file tsr_expr.h.

◆ TsrExpr_

template<typename Array, bool Alias>
typedef TsrExpr<Array, Alias> TiledArray::expressions::TsrExpr< Array, Alias >::TsrExpr_

This class type.

Definition at line 85 of file tsr_expr.h.

Constructor & Destructor Documentation

◆ TsrExpr() [1/4]

template<typename Array, bool Alias>
TiledArray::expressions::TsrExpr< Array, Alias >::TsrExpr ( )
default

◆ TsrExpr() [2/4]

template<typename Array, bool Alias>
TiledArray::expressions::TsrExpr< Array, Alias >::TsrExpr ( const TsrExpr_ )
default

◆ TsrExpr() [3/4]

template<typename Array, bool Alias>
TiledArray::expressions::TsrExpr< Array, Alias >::TsrExpr ( TsrExpr_ &&  )
default

◆ ~TsrExpr()

template<typename Array, bool Alias>
TiledArray::expressions::TsrExpr< Array, Alias >::~TsrExpr ( )
default

◆ TsrExpr() [4/4]

template<typename Array, bool Alias>
TiledArray::expressions::TsrExpr< Array, Alias >::TsrExpr ( array_type array,
const std::string &  vars 
)
inline

Constructor.

Parameters
arrayThe array object
varsThe variable list that is associated with this expression

Definition at line 109 of file tsr_expr.h.

Member Function Documentation

◆ array()

template<typename Array, bool Alias>
array_type& TiledArray::expressions::TsrExpr< Array, Alias >::array ( ) const
inline

Array accessor.

Returns
a const reference to this array

Definition at line 173 of file tsr_expr.h.

Here is the caller graph for this function:

◆ block() [1/4]

template<typename Array, bool Alias>
template<typename Index >
BlkTsrExpr<const Array, Alias> TiledArray::expressions::TsrExpr< Array, Alias >::block ( const Index &  lower_bound,
const Index &  upper_bound 
) const
inline

Block expression.

Template Parameters
IndexThe bound index types
Parameters
lower_boundThe lower_bound of the block
upper_boundThe upper_bound of the block

Definition at line 190 of file tsr_expr.h.

◆ block() [2/4]

template<typename Array, bool Alias>
BlkTsrExpr<const Array, Alias> TiledArray::expressions::TsrExpr< Array, Alias >::block ( const std::initializer_list< std::size_t > &  lower_bound,
const std::initializer_list< std::size_t > &  upper_bound 
) const
inline

Block expression.

Parameters
lower_boundThe lower_bound of the block
upper_boundThe upper_bound of the block

Definition at line 200 of file tsr_expr.h.

◆ block() [3/4]

template<typename Array, bool Alias>
template<typename Index >
BlkTsrExpr<Array, Alias> TiledArray::expressions::TsrExpr< Array, Alias >::block ( const Index &  lower_bound,
const Index &  upper_bound 
)
inline

Block expression.

Template Parameters
IndexThe bound index types
Parameters
lower_boundThe lower_bound of the block
upper_boundThe upper_bound of the block

Definition at line 213 of file tsr_expr.h.

◆ block() [4/4]

template<typename Array, bool Alias>
BlkTsrExpr<Array, Alias> TiledArray::expressions::TsrExpr< Array, Alias >::block ( const std::initializer_list< std::size_t > &  lower_bound,
const std::initializer_list< std::size_t > &  upper_bound 
)
inline

Block expression.

Parameters
lower_boundThe lower_bound of the block
upper_boundThe upper_bound of the block

Definition at line 223 of file tsr_expr.h.

◆ conj()

template<typename Array, bool Alias>
ConjTsrExpr<Array> TiledArray::expressions::TsrExpr< Array, Alias >::conj ( ) const
inline

Conjugated-tensor expression factor.

Returns
A conjugated expression object

Definition at line 232 of file tsr_expr.h.

Here is the call graph for this function:

◆ no_alias()

template<typename Array, bool Alias>
TsrExpr<Array, false> TiledArray::expressions::TsrExpr< Array, Alias >::no_alias ( ) const
inline

Flag this tensor expression for a non-aliasing assignment.

Returns
A non-aliased tensor expression

Definition at line 179 of file tsr_expr.h.

◆ operator*=()

template<typename Array, bool Alias>
template<typename D >
array_type& TiledArray::expressions::TsrExpr< Array, Alias >::operator*= ( const Expr< D > &  other)
inline

Expression multiply-assignment operator.

Template Parameters
DThe derived expression type
Parameters
otherThe expression that will scale this array

Definition at line 163 of file tsr_expr.h.

Here is the call graph for this function:

◆ operator+=()

template<typename Array, bool Alias>
template<typename D >
array_type& TiledArray::expressions::TsrExpr< Array, Alias >::operator+= ( const Expr< D > &  other)
inline

Expression plus-assignment operator.

Template Parameters
DThe derived expression type
Parameters
otherThe expression that will be added to this array

Definition at line 139 of file tsr_expr.h.

Here is the call graph for this function:

◆ operator-=()

template<typename Array, bool Alias>
template<typename D >
array_type& TiledArray::expressions::TsrExpr< Array, Alias >::operator-= ( const Expr< D > &  other)
inline

Expression minus-assignment operator.

Template Parameters
DThe derived expression type
Parameters
otherThe expression that will be subtracted from this array

Definition at line 151 of file tsr_expr.h.

Here is the call graph for this function:

◆ operator=() [1/2]

template<typename Array, bool Alias>
array_type& TiledArray::expressions::TsrExpr< Array, Alias >::operator= ( TsrExpr_ other)
inline

Expression assignment operator.

Parameters
otherThe expression that will be assigned to this array

Definition at line 116 of file tsr_expr.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [2/2]

template<typename Array, bool Alias>
template<typename D >
array_type& TiledArray::expressions::TsrExpr< Array, Alias >::operator= ( const Expr< D > &  other)
inline

Expression assignment operator.

Template Parameters
DThe derived expression type
Parameters
otherThe expression that will be assigned to this array

Definition at line 126 of file tsr_expr.h.

Here is the call graph for this function:

◆ vars()

template<typename Array, bool Alias>
const std::string& TiledArray::expressions::TsrExpr< Array, Alias >::vars ( ) const
inline

Tensor variable string accessor.

Returns
A const reference to the variable string for this tensor

Definition at line 239 of file tsr_expr.h.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: