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

Documentation

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

Tile shift operation.

This tile operation will shift the range of the tile and/or apply a permutation to the result tensor.

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

Definition at line 155 of file shift.h.

Public Types

typedef ScalShift< Result, Arg, Scalar, Consumable > ScalShift_
 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

template<typename Perm , typename = std::enable_if_t< TiledArray::detail::is_permutation_v<Perm>>>
result_type eval (const argument_type &arg, const Perm &perm) const
 
template<bool C>
std::enable_if<!C, result_type >::type eval (const argument_type &arg) const
 
template<bool C>
std::enable_if< C, result_type >::type eval (argument_type &arg) const
 
 ScalShift ()=delete
 
 ScalShift (const ScalShift_ &)=default
 
 ScalShift (ScalShift_ &&)=default
 
 ~ScalShift ()=default
 
ScalShift_operator= (const ScalShift_ &)=default
 
ScalShift_operator= (ScalShift_ &&)=default
 
 ScalShift (const std::vector< long > &range_shift, const scalar_type factor)
 Default constructor. More...
 
template<typename Perm , typename = std::enable_if_t< TiledArray::detail::is_permutation_v<Perm>>>
result_type operator() (const argument_type &arg, const Perm &perm) const
 Shift and permute operator. More...
 
template<typename A >
result_type operator() (A &&arg) const
 Consuming shift operation. More...
 
result_type consume (argument_type &arg) const
 Explicit consuming shift 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::ScalShift< Result, Arg, Scalar, Consumable >::argument_type

The argument type.

Definition at line 159 of file shift.h.

◆ result_type

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

The result tile type.

Definition at line 161 of file shift.h.

◆ scalar_type

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

The scaling factor type.

Definition at line 160 of file shift.h.

◆ ScalShift_

template<typename Result , typename Arg , typename Scalar , bool Consumable>
typedef ScalShift<Result, Arg, Scalar, Consumable> TiledArray::detail::ScalShift< Result, Arg, Scalar, Consumable >::ScalShift_

This object type.

Definition at line 158 of file shift.h.

Constructor & Destructor Documentation

◆ ScalShift() [1/4]

template<typename Result , typename Arg , typename Scalar , bool Consumable>
TiledArray::detail::ScalShift< Result, Arg, Scalar, Consumable >::ScalShift ( )
delete

◆ ScalShift() [2/4]

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

◆ ScalShift() [3/4]

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

◆ ~ScalShift()

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

◆ ScalShift() [4/4]

template<typename Result , typename Arg , typename Scalar , bool Consumable>
TiledArray::detail::ScalShift< Result, Arg, Scalar, Consumable >::ScalShift ( const std::vector< long > &  range_shift,
const scalar_type  factor 
)
inline

Default constructor.

Construct a no operation that does not permute the result tile

Definition at line 217 of file shift.h.

Member Function Documentation

◆ consume()

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

Explicit consuming shift operation.

Parameters
argThe tile argument
Returns
In-place shifted arg

Definition at line 245 of file shift.h.

◆ eval() [1/3]

template<typename Result , typename Arg , typename Scalar , bool Consumable>
template<bool C>
std::enable_if<C, result_type>::type TiledArray::detail::ScalShift< Result, Arg, Scalar, Consumable >::eval ( argument_type arg) const
inline

Definition at line 197 of file shift.h.

Here is the call graph for this function:

◆ eval() [2/3]

template<typename Result , typename Arg , typename Scalar , bool Consumable>
template<bool C>
std::enable_if<!C, result_type>::type TiledArray::detail::ScalShift< Result, Arg, Scalar, Consumable >::eval ( const argument_type arg) const
inline

Definition at line 188 of file shift.h.

Here is the call graph for this function:

◆ eval() [3/3]

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

Definition at line 176 of file shift.h.

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

◆ operator()() [1/2]

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

Consuming shift operation.

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

Definition at line 237 of file shift.h.

◆ operator()() [2/2]

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

Shift and permute operator.

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

Definition at line 227 of file shift.h.

Here is the call graph for this function:

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Member Data Documentation

◆ is_consumable

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

Definition at line 163 of file shift.h.


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