5 #ifndef OPENFPM_PDATA_LAMBDAKERNEL_HPP 6 #define OPENFPM_PDATA_LAMBDAKERNEL_HPP 11 double horner(
const std::array<double,10> &v, st x)
14 for(
int i=9; i>=0; i--)
19 constexpr std::array<double,10> c1={(1.0 * 12.0) , (0.0 * 12.0) , -(5.0 * 3.0) , (0.0 * 12.0) , (1.0 * 3.0) , -(100.0 * 4.0) , (455.0 * 3.0) , -(295.0 * 6.0) , (345.0 * 3.0) , -(115.0 * 2.0) };
20 constexpr std::array<double,10> c2={-(199.0 * 24.0) , (5485.0 * 6.0) , -(32975.0 * 3.0) , (28425.0 * 6.0) , -(61953.0 * 3.0) , (33175.0 * 4.0) , -(20685.0 * 3.0) , (3055.0 * 6.0) , -(1035.0 * 3.0) , (115.0 * 2.0) };
21 constexpr std::array<double,10> c3={(5913.0 * 24.0) , -(89235.0 * 6.0) , (297585.0 * 3.0) , -(143895.0 * 6.0) , (177871.0 * 3.0) , -(54641.0 * 4.0) , (19775.0 * 3.0) , -(1715.0 * 6.0) , (345.0 * 3.0) , -(23.0 * 2.0)};
28 static const int np = 6;
29 static inline st value(st x,
size_t i)
32 return horner(c3, -x) / 24.0;
34 return horner(c2, -x) / 24.0;
36 return horner(c1, -x) / 12.0;
38 return horner(c1, x) / 12.0;
40 return horner(c2, x) / 24.0;
42 return horner(c3, x) / 24.0;
47 #endif //OPENFPM_PDATA_LAMBDAKERNEL_HPP