SUNphi  1.0
Add.hpp File Reference

Defines a class which take the sum of two SmETs. More...

#include <smet/Reference.hpp>
#include <smet/NnarySmET.hpp>
#include <tens/TensKind.hpp>
#include <tens/TensClass.hpp>

Go to the source code of this file.

Classes

struct  SUNphi::BaseAdder
 
struct  SUNphi::ConstrainAreAdders< Args >
 
class  SUNphi::Adder< _Refs >
 Class to add two SmET. More...
 

Typedefs

template<typename T , typename Ret = void>
using SUNphi::EnableIfIsAdder = EnableIf< isAdder< T >,Ret >
 
template<typename T >
using SUNphi::ConstrainIsAdder = ConstrainIsBaseOf< BaseAdder,T >
 
template<typename T >
using SUNphi::ConstrainIsNotAdder = ConstrainIsNotBaseOf< BaseAdder,T >
 
using SUNphi::CheckAdderIsNnarySmet::MyTc = TensComp< double, 1 >
 Tensor comp for test.
 
using SUNphi::CheckAdderIsNnarySmet::MyTk = TensKind< MyTc >
 Tensor kind to be tested.
 
using SUNphi::CheckAdderIsNnarySmet::MyT = Tens< MyTk, double >
 Tensor to be tested.
 

Functions

template<typename... Ts>
Adder< Ts... > SUNphi::add (Ts &&...smets)
 
void SUNphi::neverInstantiatedFunction ()
 
template<typename T1 , typename T2 , TypeIf<(isSmET< T1 > and isSmET< T2 >), void * > = nullptr>
decltype(auto) SUNphi::operator+ (T1 &&smet1, T2 &&smet2)
 Implement smet1+smet2. More...
 

Variables

template<typename T >
constexpr bool SUNphi::isAdder = isBaseOf<BaseAdder ,T>
 

Detailed Description

Defines a class which take the sum of two SmETs.

Definition in file Add.hpp.

Typedef Documentation

template<typename T >
using SUNphi::ConstrainIsAdder = typedef ConstrainIsBaseOf<BaseAdder ,T>

Class forcing T to inherits from BaseAdder

Definition at line 16 of file Add.hpp.

template<typename T >
using SUNphi::ConstrainIsNotAdder = typedef ConstrainIsNotBaseOf<BaseAdder ,T>

Class forcing T not to inherits from BaseAdder

Definition at line 16 of file Add.hpp.

template<typename T , typename Ret = void>
using SUNphi::EnableIfIsAdder = typedef EnableIf< isAdder <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 16 of file Add.hpp.

Function Documentation

template<typename... Ts>
Adder<Ts...> SUNphi::add ( Ts &&...  smets)

< Name of the NnarySmET to build

Simple Adder builder called add

Plain Adder getting n plain SmET

Parameters
smetsSmETs to act upon

Definition at line 81 of file Add.hpp.

void SUNphi::neverInstantiatedFunction ( )

Forward definition of a never instantiated expression

template<typename T1 , typename T2 , TypeIf<(isSmET< T1 > and isSmET< T2 >), void * > = nullptr>
decltype(auto) SUNphi::operator+ ( T1 &&  smet1,
T2 &&  smet2 
)

Implement smet1+smet2.

Parameters
smet1First addend
smet2Second addend

Definition at line 87 of file Add.hpp.

Variable Documentation

template<typename T >
constexpr bool SUNphi::isAdder = isBaseOf<BaseAdder ,T>

Expression which is true if T inherits from BaseAdder

Definition at line 16 of file Add.hpp.