SUNphi
1.0
|
Header file defining basic properties of Nnary SmET. More...
#include <ints/IntSeqCat.hpp>
#include <smet/BaseSmET.hpp>
#include <smet/Reference.hpp>
#include <tens/TensKind.hpp>
#include <tuple/TupleOrder.hpp>
#include <utility/Position.hpp>
Go to the source code of this file.
Classes | |
struct | SUNphi::BaseNnarySmET |
Defines the NnarySmET type traits. More... | |
struct | SUNphi::ConstrainAreNnarySmETs< Args > |
struct | SUNphi::HasMember_refs< Type > |
struct | SUNphi::HasMember_refs< Type >::Fallback |
struct | SUNphi::HasMember_refs< Type >::Derived |
struct | SUNphi::HasMember_refs< Type >::Check< U, U > |
struct | SUNphi::ConstrainHasMember_refs< T > |
Class forcing T to have a member "refs" defined. More... | |
struct | SUNphi::NnarySmET< T > |
Nnary SmET. More... | |
Macros | |
#define | STATIC_ASSERT_IS_NNARY_SMET(...) |
Defines the check for a Nnary SmET. More... | |
#define | IDENTITY_REPRESENTATIVE_FUNCTION |
Provide an identity representative function. More... | |
#define | EVAL_THROUGH_REPRESENTATIVE_FUNCTION_PASSING_COMPS_BY_NAME |
Provides an evaluator through a representative function. More... | |
#define | PROVIDE_NNARY_SMET_REFS_AND_CHECK_ARE_N(N) |
#define | PROVIDE_SIMPLE_NNARY_COMP_SIZE |
#define | PROVIDE_FUND_ACCORDING_TO_REPRESENTATIVE_FUNCTION |
Defines the Fund type using the call to representativeFunction . More... | |
#define | SAME_FUND_AS_REF(ID) |
Get the same Fund type of a given ref. More... | |
#define | AS_ASSIGNABLE_AS_REF(ID) IS_ASSIGNABLE_ATTRIBUTE(/*! As assignable as ref ID */,Unqualified<Ref<ID>>::isAssignable) |
Get the same assignability of a given ref. | |
#define | SAME_TK_AS_REF(ID) |
Get the same TensKind of a given ref. More... | |
#define | PROVIDE_POS_OF_RES_TCS_IN_REFS |
Provide the position of result Tk TensComp in each input. More... | |
#define | PROVIDE_EXTRA_MERGE_DELIMS(...) |
Add an ExtraDelims IntSeq called ExtraDelims . More... | |
#define | NO_EXTRA_MERGE_DELIMS |
Add an empty ExtraDelims . More... | |
#define | PROVIDE_MERGEABLE_COMPS_ACCORDING_TO_REFS_AND_EXTRA |
Provide MergeableComps delimiter according to references and extra. More... | |
#define | MERGED_COMPS_VIEW_OF_REF(I) get<I>(refs).template getMergedCompsView<TupleElementType<I,MDs>>() |
Returns the merged comps view of the I-th Ref . | |
#define | PROVIDE_NNARY_GET_MERGED_COMPS_VIEW(DESCRIPTION, ...) |
Provides a getMergedCompsView method, taking Is as template parameter. More... | |
#define | PROVIDE_NNARY_GET_MERGED_COMPS_VIEW_ACCORDING_TO_REPRESENTATIVE_FUNCTION |
Uses the representativeFunction to provide a merged view. More... | |
#define | PROVIDE_NNARY_SMET_SIMPLE_CREATOR(NNARY_SMET) |
Defines a simple creator taking n references. More... | |
#define | STATIC_ASSERT_IS_NNARY_SMET(...) |
Defines the check for a Nnary SmET. More... | |
#define | SIMPLE_NNARY_SMET_BUILDER(BUILDER, NNARY_SMET) |
#define | FORWARD_IS_ALIASING_TO_REFS |
#define | REPRESENTATIVE_FUNCTION_WINS_ALL |
Provides Fund , eval and mergedComps according to representativeFunction . More... | |
#define | CANCEL_DUPLICATED_NNARY_SMET_CALL(CALLER, NNARY_SMET) |
#define | NNARY_SMET_GOES_INSIDE(EXT_FUN, NNARY_SMET, INT_FUN) |
#define | ABSORB_DUPLICATED_NNARY_SMET_CALL(CALLER, NNARY_SMET) |
Typedefs | |
template<typename T , typename Ret = void> | |
using | SUNphi::EnableIfIsNnarySmET = EnableIf< isNnarySmET< T >,Ret > |
template<typename T > | |
using | SUNphi::ConstrainIsNnarySmET = ConstrainIsBaseOf< BaseNnarySmET,T > |
template<typename T > | |
using | SUNphi::ConstrainIsNotNnarySmET = ConstrainIsNotBaseOf< BaseNnarySmET,T > |
template<typename RefsMD , typename PosOfResTcsInRefTks , typename ExtraDelims > | |
using | SUNphi::NnarySmETCompsMergeability = decltype(_nnarySmETCompsMergeability(RefsMD{}, PosOfResTcsInRefTks{}, IntSeqOfSameNumb< tupleSize< RefsMD >, NOT_PRESENT >{}, ExtraDelims{})) |
Functions | |
template<typename Type > | |
constexpr bool | SUNphi::hasMember_refsHelper () |
template<int ResPos = 0, typename... MergeDelim, typename... PosOfResTcsInRefTk, int... PrevPosInts, typename ExtraDelim > | |
decltype(auto) constexpr | SUNphi::_nnarySmETCompsMergeability (Tuple< MergeDelim... >, Tuple< PosOfResTcsInRefTk... >, IntSeq< PrevPosInts... >, ExtraDelim) |
Variables | |
template<typename T > | |
constexpr bool | SUNphi::isNnarySmET = isBaseOf<BaseNnarySmET ,T> |
template<typename Type > | |
constexpr bool | SUNphi::hasMember_refs = hasMember_refsHelper<RemRef<Type>>() |
Header file defining basic properties of Nnary SmET.
Definition in file NnarySmET.hpp.
#define ABSORB_DUPLICATED_NNARY_SMET_CALL | ( | CALLER, | |
NNARY_SMET | |||
) |
Implements a duplicated-call absorber
Example
< Name of builder
Definition at line 515 of file NnarySmET.hpp.
#define CANCEL_DUPLICATED_NNARY_SMET_CALL | ( | CALLER, | |
NNARY_SMET | |||
) |
Implements a duplicated-call canceller
Example
< Name of builder
Definition at line 451 of file NnarySmET.hpp.
#define EVAL_THROUGH_REPRESENTATIVE_FUNCTION_PASSING_COMPS_BY_NAME |
Provides an evaluator through a representative function.
Definition at line 105 of file NnarySmET.hpp.
#define FORWARD_IS_ALIASING_TO_REFS |
Set aliasing according to the isAliasing of references
Definition at line 420 of file NnarySmET.hpp.
#define IDENTITY_REPRESENTATIVE_FUNCTION |
Provide an identity representative function.
Definition at line 29 of file NnarySmET.hpp.
#define NNARY_SMET_GOES_INSIDE | ( | EXT_FUN, | |
NNARY_SMET, | |||
INT_FUN | |||
) |
Defines a simple way to swap nested NnarySmET
CANCEL_DUPLICATED_NNARY_SMET_CALL
< External builder
< Name of the SmET
Definition at line 494 of file NnarySmET.hpp.
#define NO_EXTRA_MERGE_DELIMS |
Add an empty ExtraDelims
.
Definition at line 319 of file NnarySmET.hpp.
#define PROVIDE_EXTRA_MERGE_DELIMS | ( | ... | ) |
Add an ExtraDelims
IntSeq
called ExtraDelims
.
Definition at line 313 of file NnarySmET.hpp.
#define PROVIDE_FUND_ACCORDING_TO_REPRESENTATIVE_FUNCTION |
Defines the Fund
type using the call to representativeFunction
.
Definition at line 175 of file NnarySmET.hpp.
#define PROVIDE_MERGEABLE_COMPS_ACCORDING_TO_REFS_AND_EXTRA |
Provide MergeableComps
delimiter according to references and extra.
Definition at line 324 of file NnarySmET.hpp.
#define PROVIDE_NNARY_GET_MERGED_COMPS_VIEW | ( | DESCRIPTION, | |
... | |||
) |
Provides a getMergedCompsView
method, taking Is as template parameter.
Definition at line 338 of file NnarySmET.hpp.
#define PROVIDE_NNARY_GET_MERGED_COMPS_VIEW_ACCORDING_TO_REPRESENTATIVE_FUNCTION |
Uses the representativeFunction
to provide a merged view.
Definition at line 365 of file NnarySmET.hpp.
#define PROVIDE_NNARY_SMET_REFS_AND_CHECK_ARE_N | ( | N | ) |
Provide the references to the objects
The reference types are contained in a Tuple
with types obtained from template pars
Definition at line 126 of file NnarySmET.hpp.
#define PROVIDE_NNARY_SMET_SIMPLE_CREATOR | ( | NNARY_SMET | ) |
Defines a simple creator taking n references.
< Name of the NnarySmET
Definition at line 383 of file NnarySmET.hpp.
#define PROVIDE_POS_OF_RES_TCS_IN_REFS |
Provide the position of result Tk TensComp
in each input.
Definition at line 206 of file NnarySmET.hpp.
#define PROVIDE_SIMPLE_NNARY_COMP_SIZE |
Returns the size of a TensComp
, with a simple approach
Search the asked TensComp
in each ref TensKind
iteratively and returns the size in the first found ref
Definition at line 151 of file NnarySmET.hpp.
#define REPRESENTATIVE_FUNCTION_WINS_ALL |
Provides Fund
, eval
and mergedComps
according to representativeFunction
.
Definition at line 432 of file NnarySmET.hpp.
#define SAME_FUND_AS_REF | ( | ID | ) |
Get the same Fund
type of a given ref.
Definition at line 192 of file NnarySmET.hpp.
#define SAME_TK_AS_REF | ( | ID | ) |
Get the same TensKind
of a given ref.
Definition at line 201 of file NnarySmET.hpp.
#define SIMPLE_NNARY_SMET_BUILDER | ( | BUILDER, | |
NNARY_SMET | |||
) |
Create a simple builder with a name and a NNARY_SMET returned type
NnarySmET
cannot use SFINAE to worsen default constructors (unless packing args in Tuple
) so the simple builder cannot be overloaded. If required, use a custom builder and use if constexpr construct inside it to route the manipulations.
< Name of builder function
Definition at line 406 of file NnarySmET.hpp.
#define STATIC_ASSERT_IS_NNARY_SMET | ( | ... | ) |
Defines the check for a Nnary SmET.
Defines the check for a NnarySmET.
Definition at line 394 of file NnarySmET.hpp.
#define STATIC_ASSERT_IS_NNARY_SMET | ( | ... | ) |
Defines the check for a Nnary SmET.
Defines the check for a NnarySmET.
Definition at line 394 of file NnarySmET.hpp.
using SUNphi::ConstrainIsNnarySmET = typedef ConstrainIsBaseOf<BaseNnarySmET ,T> |
Class forcing T to inherits from BaseNnarySmET
Definition at line 18 of file NnarySmET.hpp.
using SUNphi::ConstrainIsNotNnarySmET = typedef ConstrainIsNotBaseOf<BaseNnarySmET ,T> |
Class forcing T not to inherits from BaseNnarySmET
Definition at line 18 of file NnarySmET.hpp.
using SUNphi::EnableIfIsNnarySmET = typedef EnableIf< isNnarySmET <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 NnarySmET.hpp.
using SUNphi::NnarySmETCompsMergeability = typedef decltype(_nnarySmETCompsMergeability(RefsMD{},PosOfResTcsInRefTks{},IntSeqOfSameNumb<tupleSize<RefsMD>,NOT_PRESENT>{},ExtraDelims{})) |
Determine the mergeability of a given TensComp
A component is declared mergeable if its presence in all TensKind
is of the same nature of the previous one (e.g. present only in one of the TensKind
), if its position inside the TensKind
is consecutive with previous TensComp
, and if the component was mergeable in all TensKind
Definition at line 310 of file NnarySmET.hpp.
decltype(auto) constexpr SUNphi::_nnarySmETCompsMergeability | ( | Tuple< MergeDelim... > | , |
Tuple< PosOfResTcsInRefTk... > | , | ||
IntSeq< PrevPosInts... > | , | ||
ExtraDelim | |||
) |
Determine the mergeability of the ResPos
component of the result
Nested internal implemention
Number of remaining TensComp
to be checked
Slice with the poisition of the current component
Nested delimiters
Function to check whether the current component is not consecutive in all Refs
Check whether the current component is not consecutive in all Refs
Check whether the current component was not originally mergeable
Check where the current component is present
Check where the previous component was present
Check it the position was extra-delimited
Determine if a break in mergeability is needed
Insert a break or not
Definition at line 223 of file NnarySmET.hpp.
constexpr bool SUNphi::hasMember_refsHelper | ( | ) |
Intemediate function to distinguish the non-class case
Definition at line 21 of file NnarySmET.hpp.
constexpr bool SUNphi::hasMember_refs = hasMember_refsHelper<RemRef<Type>>() |
Detect if Type
has member (variable or method) refs
Uses SFINAE to induce ambiguity in the detection of the member
Definition at line 21 of file NnarySmET.hpp.
constexpr bool SUNphi::isNnarySmET = isBaseOf<BaseNnarySmET ,T> |
Expression which is true if T inherits from BaseNnarySmET
Definition at line 18 of file NnarySmET.hpp.