8 #include <ios/Logger.hpp> 9 #include <metaprogramming/SFINAE.hpp> 10 #include <tens/TensKind.hpp> 11 #include <tens/TensStor.hpp> 12 #include <smet/Assign.hpp> 13 #include <smet/NnarySmET.hpp> 25 template <
typename TK,
60 template <
typename TC>
63 return v->
template compSize<TC>();
75 cout<<
"TensClass alloc: "<<
this<<
endl;
87 cout<<
"Creating a Tens of type "<<
Tk::
name()<<
" NOT allocating"<<
endl;
124 cout<<
"TensClass destroy: "<<
this<<
endl;
130 printf(
"Destroying a Tens of type %s deallocating\n",
Tk::
name());
137 printf(
"Destroying a Tens of type %s NOT deallocating\n",
Tk::
name());
172 #define DEBUG_TENS_COMPONENTS 1
174 #define DEBUG_TENS_COMPONENTS 0
178 #define PROVIDE_EVALUATOR(QUALIFIER) 180 template <class...Comps, 181 class=ConstrainAreIntegrals<Comps...>, 182 class=ConstrainNTypes<Tk::nTypes,Comps...>> 183 QUALIFIER Fund& eval(const Comps&...comps) QUALIFIER 186 ((runLog()<<"Components: "<<&v) * ... *comps); 189 v->eval(forw<const Comps>(comps)...); 195 #undef PROVIDE_EVALUATOR 206 template <
typename SMET,
218 template <
typename SMET,
228 template <
typename SMET,
#define STATIC_ASSERT_IS_SMET(...)
#define STATIC_ASSERT_ARE_N_TYPES(N, UNEXP_PARPACK)
Static assert if not passing exactly N types.
#define PROVIDE_TK(...)
Provides the Tk member.
const TensStor< Tk, Fund > & getStor() const
Returns a constant reference to v.
#define PROVIDE_FUND(...)
Provides the Fund member.
#define STORING
Set the SmET to storing.
#define PROVIDE_GET_MERGED_COMPS_VIEW(DESCRIPTION,...)
Provides a getMergedCompsView method, taking Is as template parameter.
#define PROVIDE_EVALUATOR(QUALIFIER)
Provides either the const or non-const evaluator.
#define NON_CONST_QUALIF
Empty token to be used in macro expecting qualifier.
#define SFINAE_WORSEN_DEFAULT_VERSION_TEMPLATE_PARS
Forces the type to be a floating-point.
TensStor< Tk, Fund > * v
Internal storage, inited to null.
#define PROVIDE_MERGEABLE_COMPS(LONG_DESCRIPTION,...)
#define STATIC_ASSERT_IS_NNARY_SMET(...)
Defines the check for a Nnary SmET.
void getStor(SMET &&smet, DummyTypes...)
#define SFINAE_ON_TEMPLATE_ARG(...)
static constexpr int element()
Get the I element of the sequence.
#define SFINAE_WORSEN_DEFAULT_VERSION_ARGS_CHECK
Check that no extra arg is passed.
#define IS_ALIASING_ACCORDING_TO_POINTER(_p)
decltype(auto) operator+(T1 &&smet1, T2 &&smet2)
Implement smet1+smet2.
#define CONST_QUALIF
Token to be used in macro indicating "const" keyword.
#define SFINAE_WORSEN_DEFAULT_VERSION_ARGS
Provide empty list of args, used to unprioritize default version.
#define DECLAUTO
Short name for decltype(auto)
#define PROVIDE_SMET_ASSIGNEMENT_OPERATOR(UNARY_SMET)
Defines the assignement operator, calling assign.
decltype(auto) evalThroughRepresentativeFunctionPassingCompsByName(Ts &&...ts)
#define DEFINE_BASE_TYPE(TYPE,...)
int compSize() const
Returns the size of a component.
#define ASSIGNABLE
Set the SmET as assignable.
#define DEBUG_TENS_COMPONENTS
Enable or not printing the components.
TensStor< Tk, Fund > & getStor()
Returns a non-constant reference to v.
bool freeAtDestroy
Keep note of whether we need to free at destroy.