enable high level math functions
This commit is contained in:
parent
e174ced2eb
commit
ee58f2ab39
3 changed files with 21 additions and 3 deletions
|
@ -288,6 +288,17 @@ namespace MultiArrayTools
|
|||
return HighLevelOpHolder<ROP>(std::make_shared<HighLevelOpRoot<ROP>>( op ) );
|
||||
}
|
||||
|
||||
#define SP " "
|
||||
#define regFunc1(fff) template <class ROP> \
|
||||
HighLevelOpHolder<ROP> hl_##fff (const HighLevelOpHolder<ROP>& in) \
|
||||
{ return HighLevelOpHolder<ROP>( std::make_shared<HighLevelOp<ROP,x_##fff <double>,1>> \
|
||||
( std::array<std::shared_ptr<HighLevelOpBase<ROP>>,1>( {in.op()} ) ) ); } \
|
||||
|
||||
#include "extensions/math.h"
|
||||
#undef regFunc1
|
||||
#undef SP
|
||||
|
||||
/*
|
||||
template <class ROP>
|
||||
HighLevelOpHolder<ROP> exp(const HighLevelOpHolder<ROP>& in)
|
||||
{
|
||||
|
@ -295,5 +306,5 @@ namespace MultiArrayTools
|
|||
( std::make_shared<HighLevelOp<ROP,x_exp<double>,1>>
|
||||
( std::array<std::shared_ptr<HighLevelOpBase<ROP>>,1>( {in.op()} ) ) );
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -139,9 +139,16 @@ namespace MultiArrayTools
|
|||
template <class ROP>
|
||||
HighLevelOpHolder<ROP> mkHLO(const ROP& op);
|
||||
|
||||
#define SP " "
|
||||
#define regFunc1(fff) template <class ROP> \
|
||||
HighLevelOpHolder<ROP> hl_##fff (const HighLevelOpHolder<ROP>& in);
|
||||
#include "extensions/math.h"
|
||||
#undef regFunc1
|
||||
#undef SP
|
||||
/*
|
||||
template <class ROP>
|
||||
HighLevelOpHolder<ROP> exp(const HighLevelOpHolder<ROP>& in);
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -302,7 +302,7 @@ namespace
|
|||
|
||||
auto hop1 = mkHLO(ma2(i1,di2));
|
||||
auto hop3 = mkHLO(ma1(i1,di1));
|
||||
auto hop2 = exp(hop1);
|
||||
auto hop2 = hl_exp(hop1);
|
||||
auto hop4 = hop3 * hop2;
|
||||
auto hopr = mkHLO(resx4(i1,di4));
|
||||
hopr.assign( hop4, mi, ic_1, ic_2 );
|
||||
|
|
Loading…
Reference in a new issue