Skip to content
Snippets Groups Projects
Commit 5ae7930a authored by Abhinav Singh's avatar Abhinav Singh
Browse files

Lambda Kernel Update

parent 9b5d3bcc
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
#include <iostream>
template<typename st>
double horner(const std::array<double,10> &v, st x)
double horner(const double *v, st x)
{
st s = 0;
for(int i=9; i>=0; i--)
......@@ -16,9 +16,9 @@ double horner(const std::array<double,10> &v, st x)
return s;
}
//These needs to be Checked
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) };
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) };
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)};
double c1[10]={(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) };
double c2[10]={-(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) };
double c3[10]={(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)};
template<typename st>
......@@ -46,7 +46,7 @@ public:
template<typename st>
double horner22(const std::array<double,6> &v, st x)
double horner22(const double *v, st x)
{
st s = 0;
for(int i=5; i>=0; i--)
......@@ -54,8 +54,8 @@ double horner22(const std::array<double,6> &v, st x)
return s;
}
constexpr std::array<double,6> c221={1.0,0.0,-1.0,-4.5,7.5,-3.0};
constexpr std::array<double,6> c222={-4.0,18.0,-29.0,21.5,-7.5,1.0};
double c221[6]={1.0,0.0,-1.0,-4.5,7.5,-3.0};
double c222[6]={-4.0,18.0,-29.0,21.5,-7.5,1.0};
template<typename st>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment