SUNphi
1.0
|
Class to add a SmET
with the prodcut of two others: a+b*c
.
More...
#include <MulAdd.hpp>
Public Types | |
enum | Pos_t { FACT1, FACT2, ADDEND } |
Position of the elements. | |
using | Refs = Tuple< _Refs... > |
template<int I> | |
using | Ref = TupleElementType< I, Tuple< _Refs... >> |
using | Tk = typename RemRef< Ref< ADDEND >>::Tk |
using | Fund = decltype(_fundThroughRepresentativeFunction(IntsUpTo< NSmET >{})) |
using | PosOfResTcsInRefsTk = PosOfTcsOfTkInListOfTks< Tk, typename RemRef< _Refs >::Tk... > |
using | PosOfResTcsPresInRefsTk = PosOfTcsOfTkPresInListOfTks< Tk, typename RemRef< _Refs >::Tk... > |
using | ExtraDelims = IntSeq<> |
using | MergeableComps = NnarySmETCompsMergeability< Tuple< typename RemRef< _Refs >::MergeableComps... >, PosOfResTcsInRefsTk, ExtraDelims > |
Public Member Functions | |
template<typename TC , int I = 0> | |
int | compSize () const |
template<typename Tref > | |
bool | isAliasing (const Tref &alias) const |
decltype(auto) | getMaximallyMergedCompsView () |
template<int... Is, typename MDs > | |
decltype(auto) | mergedCompsViewAccordingToRepresentativeFunction (IntSeq< Is... >, MDs) const |
template<typename... Ts> | |
decltype(auto) | mergedCompsViewAccordingToRepresentativeFunction (Ts &&...ts) |
template<typename Is > | |
decltype(auto) | getMergedCompsView () const |
template<typename... Ts> | |
decltype(auto) | getMergedCompsView (Ts &&...ts) |
template<typename... Args> | |
decltype(auto) | eval (Args &&...args) const |
template<typename... Ts> | |
decltype(auto) | eval (Ts &&...ts) |
template<typename... SMETS> | |
MulAdder (SMETS &&...smets) | |
MulAdder< _Refs... > & | operator~ () |
const MulAdder< _Refs... > & | 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 Fact1 , typename Fact2 , typename Addend > | |
static decltype(auto) | representativeFunction (Fact1 &&fact1, Fact2 &&fact2, Addend &&addend) |
Representative function of the multiply-sum operation. More... | |
template<int... Is> | |
static decltype(auto) | _fundThroughRepresentativeFunction (IntSeq< Is... >) |
template<typename Is , typename = EnableIf<isIntSeq<Is>>> | |
static constexpr void | assertMergeableWith () |
Public Attributes | |
Tuple< Reference< _Refs >... > | refs |
Static Public Attributes | |
static constexpr int | NSmET = 3 |
static constexpr bool | isStoring = false |
static constexpr bool | isAssignable |
Class to add a SmET
with the prodcut of two others: a+b*c
.
Definition at line 22 of file MulAdd.hpp.
using SUNphi::MulAdder< _Refs >::ExtraDelims = IntSeq<> |
No Additional MergeDelims is included
Additional delimiters
Definition at line 62 of file MulAdd.hpp.
using SUNphi::MulAdder< _Refs >::Fund = decltype(_fundThroughRepresentativeFunction(IntsUpTo<NSmET>{})) |
Obtains the Fund
type by calling the representativeFunction
Definition at line 58 of file MulAdd.hpp.
using SUNphi::MulAdder< _Refs >::MergeableComps = NnarySmETCompsMergeability< Tuple<typename RemRef<_Refs>::MergeableComps...>, PosOfResTcsInRefsTk, ExtraDelims> |
List of points where the TensKind
can be split
Using MergingDelimsForRefs
and ExtraDelims
to determine the mergability
Definition at line 64 of file MulAdd.hpp.
using SUNphi::MulAdder< _Refs >::PosOfResTcsInRefsTk = PosOfTcsOfTkInListOfTks<Tk,typename RemRef<_Refs>::Tk...> |
Position of all the Result TensComp
in each Refs
Tk
Definition at line 60 of file MulAdd.hpp.
using SUNphi::MulAdder< _Refs >::PosOfResTcsPresInRefsTk = PosOfTcsOfTkPresInListOfTks<Tk,typename RemRef<_Refs>::Tk...> |
Position of all the Result TensComp
present in each Refs
Tk
Definition at line 60 of file MulAdd.hpp.
using SUNphi::MulAdder< _Refs >::Ref = TupleElementType<I,Tuple<_Refs...>> |
Type of I-th SmET
Definition at line 29 of file MulAdd.hpp.
using SUNphi::MulAdder< _Refs >::Refs = Tuple<_Refs...> |
Type of the binding references
Definition at line 29 of file MulAdd.hpp.
using SUNphi::MulAdder< _Refs >::Tk = typename RemRef<Ref<ADDEND>>::Tk |
|
inlineexplicit |
Constructor taking universal reference
Definition at line 70 of file MulAdd.hpp.
|
inlinestatic |
Fundamental type according to the representativeFunction
Internal implementation, getting the type through a call to
the representativeFunction
passing by value the Fund
type of each ref, using an IntSeq
to call them
Definition at line 58 of file MulAdd.hpp.
|
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.
|
inlineinherited |
Overload the _refEvalByCompsName
const method passing all args
ts | Arguments |
Definition at line 61 of file NnarySmET.hpp.
|
inlinestatic |
Assert that a given merging condition is valid
Definition at line 64 of file MulAdd.hpp.
|
inline |
|
inline |
Evaluator, external interface
Evaluate the function by usign a method called
representativeFunction
, to be provided in the clas
passing to it the evaluation of each individual reference,
dispatching the components id by the name they have in the
reference
Definition at line 68 of file MulAdd.hpp.
|
inline |
Overload the eval
const method passing all args
ts | Arguments |
Definition at line 68 of file MulAdd.hpp.
|
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.
|
inlineinherited |
Overload the evalThroughRepresentativeFunctionPassingCompsByName
const method passing all args
ts | Arguments |
Definition at line 101 of file NnarySmET.hpp.
|
inline |
Returns the maximal possible merged comps view
Definition at line 64 of file MulAdd.hpp.
|
inline |
Uses the representativeFunction
to provide a merged view
Definition at line 66 of file MulAdd.hpp.
|
inline |
Overload the getMergedCompsView
const method passing all args
ts | Arguments |
Definition at line 66 of file MulAdd.hpp.
|
inline |
Forward aliasing check to the references
Definition at line 51 of file MulAdd.hpp.
|
inline |
Overload the mergedCompsViewAccordingToRepresentativeFunction
const method passing all args
ts | Arguments |
Definition at line 66 of file MulAdd.hpp.
|
inline |
Calls the representativeFunction
with the merged view of each ref
Definition at line 66 of file MulAdd.hpp.
|
inlineinherited |
Implements the call operator via CRTP
oth | Other quantit |
Definition at line 289 of file BaseSmET.hpp.
|
inlineinherited |
Implements the const call operator via CRTP
< Other quantit
Definition at line 290 of file BaseSmET.hpp.
|
inlineinherited |
Cast operator to class T
Definition at line 46 of file NnarySmET.hpp.
|
inlineinherited |
Constant cast operator to class T
Definition at line 46 of file NnarySmET.hpp.
|
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.
|
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.
|
inlinestatic |
Representative function of the multiply-sum operation.
fact1 | First factor |
fact2 | Second factor |
addend | Third factor |
Definition at line 40 of file MulAdd.hpp.
|
staticinherited |
Returns whether this SmET
can be the left hand of an assignement
This SmET can never be lhs
Definition at line 44 of file NnarySmET.hpp.
|
static |
Returns whether this SmET is storing
This SmET
is not storing
Definition at line 50 of file MulAdd.hpp.
|
static |
Number or SmET
to act upon
Definition at line 29 of file MulAdd.hpp.
Tuple<Reference<_Refs>...> SUNphi::MulAdder< _Refs >::refs |
Reference to the 3 object
Definition at line 29 of file MulAdd.hpp.