SUNphi  1.0
TensClass.hpp File Reference

Header file for the Tens class. More...

#include <ios/Logger.hpp>
#include <metaprogramming/SFINAE.hpp>
#include <tens/TensKind.hpp>
#include <tens/TensStor.hpp>
#include <smet/Assign.hpp>
#include <smet/NnarySmET.hpp>

Go to the source code of this file.

Classes

struct  SUNphi::BaseTens
 
struct  SUNphi::ConstrainAreTenss< Args >
 
class  SUNphi::Tens< TK, FUND >
 

Macros

#define DEBUG_TENS_COMPONENTS   0
 Enable or not printing the components.
 
#define PROVIDE_EVALUATOR(QUALIFIER)
 Provides either the const or non-const evaluator. More...
 

Typedefs

template<typename T , typename Ret = void>
using SUNphi::EnableIfIsTens = EnableIf< isTens< T >,Ret >
 
template<typename T >
using SUNphi::ConstrainIsTens = ConstrainIsBaseOf< BaseTens,T >
 
template<typename T >
using SUNphi::ConstrainIsNotTens = ConstrainIsNotBaseOf< BaseTens,T >
 

Functions

template<typename SMET , typename... DummyTypes>
void SUNphi::getStor (SMET &&smet, DummyTypes...)
 
template<typename SMET , TypeIf<(isNnarySmET< SMET > and not isTens< SMET >), void * > = nullptr>
decltype(auto) SUNphi::getStor (SMET &&smet)
 
template<typename SMET , TypeIf<(isNnarySmET< SMET > and isTens< SMET >), void * > = nullptr>
auto & SUNphi::getStor (SMET &&smet)
 

Variables

template<typename T >
constexpr bool SUNphi::isTens = isBaseOf<BaseTens ,T>
 

Detailed Description

Header file for the Tens class.

Definition in file TensClass.hpp.

Macro Definition Documentation

#define PROVIDE_EVALUATOR (   QUALIFIER)
Value:
\
template <class...Comps, /* Component types */ \
class=ConstrainAreIntegrals<Comps...>, /* Force the components to be integer-like */ \
class=ConstrainNTypes<Tk::nTypes,Comps...>> /* Constrain the component to be in the same number of Tk */ \
QUALIFIER Fund& eval(const Comps&...comps) QUALIFIER \
{ \
((runLog()<<"Components: "<<&v) * ... *comps); \
\
return \
v->eval(forw<const Comps>(comps)...); \
}
Logger runLog
Global logger.
#define DEBUG_TENS_COMPONENTS
Enable or not printing the components.
Definition: TensClass.hpp:174

Provides either the const or non-const evaluator.

Definition at line 178 of file TensClass.hpp.

Typedef Documentation

template<typename T >
using SUNphi::ConstrainIsNotTens = typedef ConstrainIsNotBaseOf<BaseTens ,T>

Class forcing T not to inherits from BaseTens

Definition at line 18 of file TensClass.hpp.

template<typename T >
using SUNphi::ConstrainIsTens = typedef ConstrainIsBaseOf<BaseTens ,T>

Class forcing T to inherits from BaseTens

Definition at line 18 of file TensClass.hpp.

template<typename T , typename Ret = void>
using SUNphi::EnableIfIsTens = typedef EnableIf< isTens <T> ,Ret>

Provides the class itself if T is of the given type

Provides the class itself if T satisfies the condition

Definition at line 18 of file TensClass.hpp.

Function Documentation

template<typename SMET , typename... DummyTypes>
void SUNphi::getStor ( SMET &&  smet,
DummyTypes...   
)

Get the storage of a SmET

default case, asserting if smet is not a NnarySmET as needed

Parameters
smetSmET to be searched

Definition at line 208 of file TensClass.hpp.

template<typename SMET , TypeIf<(isNnarySmET< SMET > and not isTens< SMET >), void * > = nullptr>
decltype(auto) SUNphi::getStor ( SMET &&  smet)

Get the storage of a SmET

In this case we are treating a NnarySmET which is not a Tens

Parameters
smetSmET to be searched

Definition at line 220 of file TensClass.hpp.

template<typename SMET , TypeIf<(isNnarySmET< SMET > and isTens< SMET >), void * > = nullptr>
auto& SUNphi::getStor ( SMET &&  smet)

Get the storage of a SmET

In this case we are treating a UnarySmET which is a Tens

Parameters
smetSmET to be searched

Definition at line 230 of file TensClass.hpp.

Variable Documentation

template<typename T >
constexpr bool SUNphi::isTens = isBaseOf<BaseTens ,T>

Expression which is true if T inherits from BaseTens

Definition at line 18 of file TensClass.hpp.