SUNphi  1.0
SUNphi::Tens< TK, FUND > Class Template Reference

#include <TensClass.hpp>

Inheritance diagram for SUNphi::Tens< TK, FUND >:
SUNphi::BaseTens SUNphi::NnarySmET< Tens< TK, FUND > > SUNphi::ConstrainIsBaseOf< Base, Derived > SUNphi::ConstrainIsFloatingPoint< FUND > SUNphi::SmET< Tens< TK, FUND > > SUNphi::BaseNnarySmET SUNphi::BaseSmET SUNphi::BaseSmET

Public Types

using Tk = TK
 Tensor kind of the tensor.
 
using Fund = FUND
 Tensor fundamental type of the tensor.
 
using type = Derived
 Type checked.
 

Public Member Functions

template<typename Tref >
bool isAliasing (const Tref &alias) const
 
decltype(auto) getMaximallyMergedCompsView ()
 
template<typename TC >
int compSize () const
 Returns the size of a component.
 
template<class... DynSizes, typename = EnableIf<areIntegrals<Unqualified<DynSizes>...>>>
 Tens (DynSizes &&...extDynSizes)
 Construct the Tens on the basis of the dynamical sizes passed.
 
 Tens (TensStor< Tk, Fund > *v)
 Construct the Tens on the basis of a reference storage.
 
 ~Tens ()
 Move constructor. More...
 
template<typename Is >
decltype(auto) getMergedCompsView () const
 Returns a component-merged version. More...
 
template<typename... Ts>
decltype(auto) getMergedCompsView (Ts &&...ts)
 
const TensStor< Tk, Fund > & getStor () const
 Returns a constant reference to v.
 
TensStor< Tk, Fund > & getStor ()
 Returns a non-constant reference to v.
 
template<class... Comps, class = ConstrainAreIntegrals<Comps...>, class = ConstrainNTypes<Tk::nTypes,Comps...>>
Fundeval (const Comps &...comps)
 
template<class... Comps, class = ConstrainAreIntegrals<Comps...>, class = ConstrainNTypes<Tk::nTypes,Comps...>>
const Fundeval (const Comps &...comps) const
 
template<typename Oth >
decltype(auto) operator= (Oth &&oth)
 
Tens< TK, FUND > & operator~ ()
 
const Tens< TK, FUND > & operator~ () const
 
decltype(auto) _refEvalByCompsName (IntSeq< I >, IntSeq< Pos... >, Tp &&targs) const
 < Components to get More...
 
decltype(auto) _refEvalByCompsName (Ts &&...ts)
 
decltype(auto) refEvalByCompsName (Tp &&targs) const
 < Components to get More...
 
decltype(auto) refEvalByCompsName (Tp &&targs)
 
decltype(auto) evalThroughRepresentativeFunctionPassingCompsByName (IntSeq< I... >, const Args &...args) const
 < Components to get More...
 
decltype(auto) evalThroughRepresentativeFunctionPassingCompsByName (Ts &&...ts)
 
decltype(auto) operator() (Oth &&...oth)
 
decltype(auto) operator() (Oth &&...oth) const
 

Static Public Member Functions

template<typename Is , typename = EnableIf<isIntSeq<Is>>>
static constexpr void assertMergeableWith ()
 

Static Public Attributes

static constexpr bool isAssignable = true
 
static constexpr bool isStoring = true
 

Private Attributes

TensStor< Tk, Fund > * v
 Internal storage, inited to null. More...
 
bool freeAtDestroy
 Keep note of whether we need to free at destroy.
 

Detailed Description

template<typename TK, typename FUND>
class SUNphi::Tens< TK, FUND >

A Tensor class

Container with a given TensKind structure and fundamental type, holding resources for the storage of the data and providing evaluator

Definition at line 27 of file TensClass.hpp.

Constructor & Destructor Documentation

template<typename TK , typename FUND >
SUNphi::Tens< TK, FUND >::~Tens ( )
inline

Move constructor.

Destructor

Definition at line 120 of file TensClass.hpp.

Member Function Documentation

decltype(auto) SUNphi::NnarySmET< Tens< TK, FUND > >::_refEvalByCompsName ( IntSeq< I >  ,
IntSeq< Pos... >  ,
Tp &&  targs 
) const
inlineinherited

< Components to get

Evaluate the I-th reference, getting from the Tuple targs the element Pos

Internal implementation

Definition at line 54 of file NnarySmET.hpp.

decltype(auto) SUNphi::NnarySmET< Tens< TK, FUND > >::_refEvalByCompsName ( Ts &&...  ts)
inlineinherited

Overload the _refEvalByCompsName const method passing all args

Parameters
tsArguments

Definition at line 61 of file NnarySmET.hpp.

template<typename TK , typename FUND >
template<typename Is , typename = EnableIf<isIntSeq<Is>>>
static constexpr void SUNphi::Tens< TK, FUND >::assertMergeableWith ( )
inlinestatic

Assert that a given merging condition is valid

Definition at line 57 of file TensClass.hpp.

template<typename TK , typename FUND >
template<class... Comps, class = ConstrainAreIntegrals<Comps...>, class = ConstrainNTypes<Tk::nTypes,Comps...>>
Fund& SUNphi::Tens< TK, FUND >::eval ( const Comps &...  comps)
inline

Evaluate the tensor (returns QUALIFIED reference to internal data)

Parameters
compsComponent values

Definition at line 192 of file TensClass.hpp.

template<typename TK , typename FUND >
template<class... Comps, class = ConstrainAreIntegrals<Comps...>, class = ConstrainNTypes<Tk::nTypes,Comps...>>
const Fund& SUNphi::Tens< TK, FUND >::eval ( const Comps &...  comps) const
inline

Evaluate the tensor (returns QUALIFIED reference to internal data)

< Component values

Definition at line 193 of file TensClass.hpp.

decltype(auto) SUNphi::NnarySmET< Tens< TK, FUND > >::evalThroughRepresentativeFunctionPassingCompsByName ( IntSeq< I... >  ,
const Args &...  args 
) const
inlineinherited

< Components to get

Evaluate the result by calling a representative function

The result is obtained after splitting the components, identifying them trough the name of each TensComp

Definition at line 93 of file NnarySmET.hpp.

decltype(auto) SUNphi::NnarySmET< Tens< TK, FUND > >::evalThroughRepresentativeFunctionPassingCompsByName ( Ts &&...  ts)
inlineinherited

Overload the evalThroughRepresentativeFunctionPassingCompsByName const method passing all args

Parameters
tsArguments

Definition at line 101 of file NnarySmET.hpp.

template<typename TK , typename FUND >
decltype(auto) SUNphi::Tens< TK, FUND >::getMaximallyMergedCompsView ( )
inline

Returns the maximal possible merged comps view

Definition at line 57 of file TensClass.hpp.

template<typename TK , typename FUND >
template<typename Is >
decltype(auto) SUNphi::Tens< TK, FUND >::getMergedCompsView ( ) const
inline

Returns a component-merged version.

Create a reference to the same storage with appropriate DynSizes

Definition at line 156 of file TensClass.hpp.

template<typename TK , typename FUND >
template<typename... Ts>
decltype(auto) SUNphi::Tens< TK, FUND >::getMergedCompsView ( Ts &&...  ts)
inline

Overload the getMergedCompsView const method passing all args

Parameters
tsArguments

Definition at line 156 of file TensClass.hpp.

template<typename TK , typename FUND >
template<typename Tref >
bool SUNphi::Tens< TK, FUND >::isAliasing ( const Tref &  alias) const
inline

Check the aliasing with reference

Definition at line 44 of file TensClass.hpp.

decltype(auto) SUNphi::SmET< Tens< TK, FUND > >::operator() ( Oth &&...  oth)
inlineinherited

Implements the call operator via CRTP

Parameters
othOther quantit

Definition at line 289 of file BaseSmET.hpp.

decltype(auto) SUNphi::SmET< Tens< TK, FUND > >::operator() ( Oth &&...  oth) const
inlineinherited

Implements the const call operator via CRTP

< Other quantit

Definition at line 290 of file BaseSmET.hpp.

template<typename TK , typename FUND >
template<typename Oth >
decltype(auto) SUNphi::Tens< TK, FUND >::operator= ( Oth &&  oth)
inline

Assign from another object

Parameters
othOther object

Definition at line 197 of file TensClass.hpp.

Tens< TK, FUND > & SUNphi::NnarySmET< Tens< TK, FUND > >::operator~ ( )
inlineinherited

Cast operator to class T

Definition at line 46 of file NnarySmET.hpp.

const Tens< TK, FUND > & SUNphi::NnarySmET< Tens< TK, FUND > >::operator~ ( ) const
inlineinherited

Constant cast operator to class T

Definition at line 46 of file NnarySmET.hpp.

decltype(auto) SUNphi::NnarySmET< Tens< TK, FUND > >::refEvalByCompsName ( Tp &&  targs) const
inlineinherited

< Components to get

Evaluate the I-th reference, getting from the Tuple targs the element Pos

External implementation, using PosOfResTcsPresInRefsTk to dispatch components

Position of TensComp of the reference Tk present in thr result

Definition at line 68 of file NnarySmET.hpp.

decltype(auto) SUNphi::NnarySmET< Tens< TK, FUND > >::refEvalByCompsName ( Tp &&  targs)
inlineinherited

Evaluate the I-th reference, getting from the Tuple targs the element Pos

Non const version

Definition at line 82 of file NnarySmET.hpp.

Member Data Documentation

template<typename TK , typename FUND >
constexpr bool SUNphi::Tens< TK, FUND >::isAssignable = true
static

Returns whether this SmET can be the left hand of an assignement

This SmET can be assigned

Definition at line 42 of file TensClass.hpp.

template<typename TK , typename FUND >
constexpr bool SUNphi::Tens< TK, FUND >::isStoring = true
static

Returns whether this SmET is storing

This SmET is storing

Definition at line 43 of file TensClass.hpp.

template<typename TK , typename FUND >
TensStor<Tk,Fund>* SUNphi::Tens< TK, FUND >::v
private
Initial value:
=
nullptr

Internal storage, inited to null.

Definition at line 49 of file TensClass.hpp.


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