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

Tile shift operation. More...

#include <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

result_type eval (const argument_type &arg, const Permutation &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...
 
result_type operator() (const argument_type &arg, const Permutation &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
 

Detailed Description

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 159 of file shift.h.

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 163 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 165 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 164 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 162 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 225 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 255 of file shift.h.

◆ eval() [1/3]

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

Definition at line 182 of file shift.h.

Here is the call graph for this function:
Here is the caller 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 195 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<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 204 of file shift.h.

Here is the call graph for this function:

◆ operator()() [1/2]

template<typename Result , typename Arg , typename Scalar , bool Consumable>
result_type TiledArray::detail::ScalShift< Result, Arg, Scalar, Consumable >::operator() ( const argument_type arg,
const Permutation 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 237 of file shift.h.

Here is the call graph for this function:

◆ operator()() [2/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 247 of file shift.h.

◆ 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
static
Initial value:
=
Consumable && std::is_same<result_type, argument_type>::value

Definition at line 167 of file shift.h.


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