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

Documentation

template<typename Result, typename Arg, bool Consumable>
class TiledArray::detail::Shift< Result, Arg, 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 tile result type
ArgThe argument type
ConsumableIf true, the tile is a temporary and may be consumed
Note
Input tiles can be consumed only if their type matches the result type.

Definition at line 46 of file shift.h.

Public Types

typedef Shift< Result, Arg, Consumable > Shift_
 This object type. More...
 
typedef Arg argument_type
 The argument type. More...
 
typedef Result result_type
 The result tile type. More...
 

Public Member Functions

 Shift ()=delete
 
 Shift (const Shift_ &)=default
 
 Shift (Shift_ &&)=default
 
 ~Shift ()=default
 
Shiftoperator= (const Shift_ &)=default
 
Shiftoperator= (Shift_ &&)=default
 
 Shift (const std::vector< long > &range_shift)
 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...
 
template<typename A >
result_type consume (A &arg) const
 Explicit consuming shift operation. More...
 

Static Public Attributes

static constexpr bool is_consumable
 Indicates whether it is possible to consume the left tile. More...
 

Member Typedef Documentation

◆ argument_type

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

The argument type.

Definition at line 49 of file shift.h.

◆ result_type

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

The result tile type.

Definition at line 50 of file shift.h.

◆ Shift_

template<typename Result , typename Arg , bool Consumable>
typedef Shift<Result, Arg, Consumable> TiledArray::detail::Shift< Result, Arg, Consumable >::Shift_

This object type.

Definition at line 48 of file shift.h.

Constructor & Destructor Documentation

◆ Shift() [1/4]

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

◆ Shift() [2/4]

template<typename Result , typename Arg , bool Consumable>
TiledArray::detail::Shift< Result, Arg, Consumable >::Shift ( const Shift_ )
default

◆ Shift() [3/4]

template<typename Result , typename Arg , bool Consumable>
TiledArray::detail::Shift< Result, Arg, Consumable >::Shift ( Shift_ &&  )
default

◆ ~Shift()

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

◆ Shift() [4/4]

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

Default constructor.

Construct a no operation that does not permute the result tile

Definition at line 108 of file shift.h.

Member Function Documentation

◆ consume()

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

Explicit consuming shift operation.

Template Parameters
AThe tile argument type
Parameters
argThe tile argument
Returns
In-place shifted arg

Definition at line 137 of file shift.h.

◆ operator()() [1/2]

template<typename Result , typename Arg , bool Consumable>
template<typename A >
result_type TiledArray::detail::Shift< Result, Arg, 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 127 of file shift.h.

◆ operator()() [2/2]

template<typename Result , typename Arg , bool Consumable>
template<typename Perm , typename = std::enable_if_t< TiledArray::detail::is_permutation_v<Perm>>>
result_type TiledArray::detail::Shift< Result, Arg, 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 117 of file shift.h.

◆ operator=() [1/2]

template<typename Result , typename Arg , bool Consumable>
Shift& TiledArray::detail::Shift< Result, Arg, Consumable >::operator= ( const Shift_ )
default

◆ operator=() [2/2]

template<typename Result , typename Arg , bool Consumable>
Shift& TiledArray::detail::Shift< Result, Arg, Consumable >::operator= ( Shift_ &&  )
default

Member Data Documentation

◆ is_consumable

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

Indicates whether it is possible to consume the left tile.

Definition at line 53 of file shift.h.


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