TiledArray::detail::Scal< Result, Arg, Scalar, Consumable > Class Template Reference

Documentation

template<typename Result, typename Arg, typename Scalar, bool Consumable>
class TiledArray::detail::Scal< Result, Arg, Scalar, Consumable >

Tile scaling operation.

This scaling operation will scale the content a tile and apply a permutation to the result tensor. If no permutation is given or the permutation is null, then the result is not permuted.

Template Parameters
ResultThe result type
ArgThe argument type
ScalarThe scaling factor type
ConsumableFlag that is true when Arg is consumable

Definition at line 46 of file scal.h.

Public Types

typedef Scal< Result, Arg, Scalar, Consumable > Scal_
 This object type. More...
 
typedef Arg argument_type
 The argument type. More...
 
typedef Scalar scalar_type
 The scaling factor type. More...
 
typedef Result result_type
 The result tile type. More...
 

Public Member Functions

 Scal (const Scal_ &)=default
 
 Scal (Scal_ &&)=default
 
 ~Scal ()=default
 
Scal_operator= (const Scal_ &)=default
 
Scal_operator= (Scal_ &&)=default
 
 Scal (const scalar_type factor)
 Constructor. More...
 
template<typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
result_type operator() (const argument_type &arg, const Perm &perm) const
 Scale and permute operator. More...
 
template<typename A >
result_type operator() (A &&arg) const
 Consuming scale operation. More...
 
result_type consume (argument_type &arg) const
 Explicit consuming scale operation. More...
 

Static Public Attributes

static constexpr bool is_consumable
 

Member Typedef Documentation

◆ argument_type

template<typename Result , typename Arg , typename Scalar , bool Consumable>
typedef Arg TiledArray::detail::Scal< Result, Arg, Scalar, Consumable >::argument_type

The argument type.

Definition at line 49 of file scal.h.

◆ result_type

template<typename Result , typename Arg , typename Scalar , bool Consumable>
typedef Result TiledArray::detail::Scal< Result, Arg, Scalar, Consumable >::result_type

The result tile type.

Definition at line 51 of file scal.h.

◆ Scal_

template<typename Result , typename Arg , typename Scalar , bool Consumable>
typedef Scal<Result, Arg, Scalar, Consumable> TiledArray::detail::Scal< Result, Arg, Scalar, Consumable >::Scal_

This object type.

Definition at line 48 of file scal.h.

◆ scalar_type

template<typename Result , typename Arg , typename Scalar , bool Consumable>
typedef Scalar TiledArray::detail::Scal< Result, Arg, Scalar, Consumable >::scalar_type

The scaling factor type.

Definition at line 50 of file scal.h.

Constructor & Destructor Documentation

◆ Scal() [1/3]

template<typename Result , typename Arg , typename Scalar , bool Consumable>
TiledArray::detail::Scal< Result, Arg, Scalar, Consumable >::Scal ( const Scal_ )
default

◆ Scal() [2/3]

template<typename Result , typename Arg , typename Scalar , bool Consumable>
TiledArray::detail::Scal< Result, Arg, Scalar, Consumable >::Scal ( Scal_ &&  )
default

◆ ~Scal()

template<typename Result , typename Arg , typename Scalar , bool Consumable>
TiledArray::detail::Scal< Result, Arg, Scalar, Consumable >::~Scal ( )
default

◆ Scal() [3/3]

template<typename Result , typename Arg , typename Scalar , bool Consumable>
TiledArray::detail::Scal< Result, Arg, Scalar, Consumable >::Scal ( const scalar_type  factor)
inlineexplicit

Constructor.

Construct a scaling operation that scales the result tensor

Parameters
factorThe scaling factor for the operation

Definition at line 97 of file scal.h.

Member Function Documentation

◆ consume()

template<typename Result , typename Arg , typename Scalar , bool Consumable>
result_type TiledArray::detail::Scal< Result, Arg, Scalar, Consumable >::consume ( argument_type arg) const
inline

Explicit consuming scale operation.

Parameters
argThe tile argument
Returns
In-place scaled arg

Definition at line 124 of file scal.h.

◆ operator()() [1/2]

template<typename Result , typename Arg , typename Scalar , bool Consumable>
template<typename A >
result_type TiledArray::detail::Scal< Result, Arg, Scalar, Consumable >::operator() ( A &&  arg) const
inline

Consuming scale operation.

Template Parameters
AThe tile argument type
Parameters
argThe tile argument
Returns
A scaled copy of arg

Definition at line 116 of file scal.h.

◆ operator()() [2/2]

template<typename Result , typename Arg , typename Scalar , bool Consumable>
template<typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
result_type TiledArray::detail::Scal< Result, Arg, Scalar, Consumable >::operator() ( const argument_type arg,
const Perm &  perm 
) const
inline

Scale and permute operator.

Parameters
argThe tile argument
permThe permutation applied to the result tile
Returns
A permuted and scaled copy of arg

Definition at line 106 of file scal.h.

◆ operator=() [1/2]

template<typename Result , typename Arg , typename Scalar , bool Consumable>
Scal_& TiledArray::detail::Scal< Result, Arg, Scalar, Consumable >::operator= ( const Scal_ )
default

◆ operator=() [2/2]

template<typename Result , typename Arg , typename Scalar , bool Consumable>
Scal_& TiledArray::detail::Scal< Result, Arg, Scalar, Consumable >::operator= ( Scal_ &&  )
default

Member Data Documentation

◆ is_consumable

template<typename Result , typename Arg , typename Scalar , bool Consumable>
constexpr bool TiledArray::detail::Scal< Result, Arg, Scalar, Consumable >::is_consumable
staticconstexpr
Initial value:
=
Consumable && std::is_same<result_type, argument_type>::value

Definition at line 53 of file scal.h.


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