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

Documentation

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

Expression wrapper for array objects.

Template Parameters
ArrayThe TiledArray::Array type
AliasIf true, the array tiles should be evaluated as temporaries before assignment; if false, can reuse the result tiles

Definition at line 83 of file tsr_expr.h.

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...
 
using index1_type = TA_1INDEX_TYPE
 

Public Member Functions

 TsrExpr ()=default
 
 TsrExpr (const TsrExpr_ &)=default
 
 TsrExpr (TsrExpr_ &&)=default
 
 ~TsrExpr ()=default
 
 TsrExpr (array_type &array, const std::string &annotation)
 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 Index1 , typename Index2 , typename = std::enable_if_t< TiledArray::detail::is_integral_range_v<Index1> && TiledArray::detail::is_integral_range_v<Index2>>>
BlkTsrExpr< const Array, Alias > block (const Index1 &lower_bound, const Index2 &upper_bound) const
 immutable Block expression factory More...
 
template<typename Index1 , typename Index2 , typename = std::enable_if_t<std::is_integral_v<Index1> && std::is_integral_v<Index2>>>
BlkTsrExpr< const Array, Alias > block (const std::initializer_list< Index1 > &lower_bound, const std::initializer_list< Index2 > &upper_bound) const
 immutable Block expression factory More...
 
template<typename PairRange , typename = std::enable_if_t< TiledArray::detail::is_gpair_range_v<PairRange>>>
BlkTsrExpr< const Array, Alias > block (const PairRange &bounds) const
 immutable Block expression factory More...
 
template<typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
BlkTsrExpr< const Array, Alias > block (const std::initializer_list< std::initializer_list< Index >> &bounds) const
 immutable Block expression factory More...
 
template<typename Index1 , typename Index2 , typename = std::enable_if_t< TiledArray::detail::is_integral_range_v<Index1> && TiledArray::detail::is_integral_range_v<Index2>>>
BlkTsrExpr< Array, Alias > block (const Index1 &lower_bound, const Index2 &upper_bound)
 mutable Block expression factory More...
 
template<typename Index1 , typename Index2 , typename = std::enable_if_t<std::is_integral_v<Index1> && std::is_integral_v<Index2>>>
BlkTsrExpr< Array, Alias > block (const std::initializer_list< Index1 > &lower_bound, const std::initializer_list< Index2 > &upper_bound)
 mutable Block expression factory More...
 
template<typename PairRange , typename = std::enable_if_t< TiledArray::detail::is_gpair_range_v<PairRange>>>
BlkTsrExpr< Array, Alias > block (const PairRange &bounds)
 mutable Block expression factory More...
 
template<typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
BlkTsrExpr< Array, Alias > block (const std::initializer_list< std::initializer_list< Index >> &bounds)
 mutable Block expression factory More...
 
ConjTsrExpr< Arrayconj () const
 Conjugated-tensor expression factor. More...
 
const std::string & annotation () const
 Tensor annotation accessor. More...
 

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.

◆ index1_type

template<typename Array , bool Alias>
using TiledArray::expressions::TsrExpr< Array, Alias >::index1_type = TA_1INDEX_TYPE

Definition at line 91 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 &  annotation 
)
inline

Constructor.

Parameters
arrayThe array object
annotationThe annotation for array

Definition at line 108 of file tsr_expr.h.

Member Function Documentation

◆ annotation()

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

Tensor annotation accessor.

Returns
A const reference to the annotation for this tensor

Definition at line 304 of file tsr_expr.h.

Here is the caller graph for this function:

◆ 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 175 of file tsr_expr.h.

Here is the caller graph for this function:

◆ block() [1/8]

template<typename Array , bool Alias>
template<typename Index1 , typename Index2 , typename = std::enable_if_t< TiledArray::detail::is_integral_range_v<Index1> && TiledArray::detail::is_integral_range_v<Index2>>>
BlkTsrExpr<Array, Alias> TiledArray::expressions::TsrExpr< Array, Alias >::block ( const Index1 &  lower_bound,
const Index2 &  upper_bound 
)
inline

mutable Block expression factory

Template Parameters
Index1An integral range type
Index2An integral range type
Parameters
lower_boundThe lower_bound of the block
upper_boundThe upper_bound of the block

Definition at line 249 of file tsr_expr.h.

◆ block() [2/8]

template<typename Array , bool Alias>
template<typename Index1 , typename Index2 , typename = std::enable_if_t< TiledArray::detail::is_integral_range_v<Index1> && TiledArray::detail::is_integral_range_v<Index2>>>
BlkTsrExpr<const Array, Alias> TiledArray::expressions::TsrExpr< Array, Alias >::block ( const Index1 &  lower_bound,
const Index2 &  upper_bound 
) const
inline

immutable Block expression factory

Template Parameters
Index1An integral range type
Index2An integral range type
Parameters
lower_boundThe lower_bound of the block
upper_boundThe upper_bound of the block

Definition at line 194 of file tsr_expr.h.

◆ block() [3/8]

template<typename Array , bool Alias>
template<typename PairRange , typename = std::enable_if_t< TiledArray::detail::is_gpair_range_v<PairRange>>>
BlkTsrExpr<Array, Alias> TiledArray::expressions::TsrExpr< Array, Alias >::block ( const PairRange &  bounds)
inline

mutable Block expression factory

Template Parameters
PairRangeType representing a range of generalized pairs (see TiledArray::detail::is_gpair_v )
Parameters
boundsThe {lower,upper} bounds of the block

Definition at line 279 of file tsr_expr.h.

◆ block() [4/8]

template<typename Array , bool Alias>
template<typename PairRange , typename = std::enable_if_t< TiledArray::detail::is_gpair_range_v<PairRange>>>
BlkTsrExpr<const Array, Alias> TiledArray::expressions::TsrExpr< Array, Alias >::block ( const PairRange &  bounds) const
inline

immutable Block expression factory

Template Parameters
PairRangeType representing a range of generalized pairs (see TiledArray::detail::is_gpair_v )
Parameters
boundsThe {lower,upper} bounds of the block

Definition at line 224 of file tsr_expr.h.

◆ block() [5/8]

template<typename Array , bool Alias>
template<typename Index1 , typename Index2 , typename = std::enable_if_t<std::is_integral_v<Index1> && std::is_integral_v<Index2>>>
BlkTsrExpr<Array, Alias> TiledArray::expressions::TsrExpr< Array, Alias >::block ( const std::initializer_list< Index1 > &  lower_bound,
const std::initializer_list< Index2 > &  upper_bound 
)
inline

mutable Block expression factory

Template Parameters
Index1An integral type
Index2An integral type
Parameters
lower_boundThe lower_bound of the block
upper_boundThe upper_bound of the block

Definition at line 264 of file tsr_expr.h.

◆ block() [6/8]

template<typename Array , bool Alias>
template<typename Index1 , typename Index2 , typename = std::enable_if_t<std::is_integral_v<Index1> && std::is_integral_v<Index2>>>
BlkTsrExpr<const Array, Alias> TiledArray::expressions::TsrExpr< Array, Alias >::block ( const std::initializer_list< Index1 > &  lower_bound,
const std::initializer_list< Index2 > &  upper_bound 
) const
inline

immutable Block expression factory

Template Parameters
Index1An integral type
Index2An integral type
Parameters
lower_boundThe lower_bound of the block
upper_boundThe upper_bound of the block

Definition at line 209 of file tsr_expr.h.

◆ block() [7/8]

template<typename Array , bool Alias>
template<typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
BlkTsrExpr<Array, Alias> TiledArray::expressions::TsrExpr< Array, Alias >::block ( const std::initializer_list< std::initializer_list< Index >> &  bounds)
inline

mutable Block expression factory

Template Parameters
IndexAn integral type
Parameters
boundsThe {lower,upper} bounds of the block

Definition at line 289 of file tsr_expr.h.

◆ block() [8/8]

template<typename Array , bool Alias>
template<typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
BlkTsrExpr<const Array, Alias> TiledArray::expressions::TsrExpr< Array, Alias >::block ( const std::initializer_list< std::initializer_list< Index >> &  bounds) const
inline

immutable Block expression factory

Template Parameters
IndexAn integral type
Parameters
boundsThe {lower,upper} bounds of the block

Definition at line 234 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 297 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 180 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 164 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 138 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>
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 124 of file tsr_expr.h.

Here is the call graph for this function:

◆ operator=() [2/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 114 of file tsr_expr.h.

Here is the caller graph for this function:

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