X-Git-Url: https://git.auder.net/?p=morpheus.git;a=blobdiff_plain;f=pkg%2Fsrc%2Ffunctions.c;fp=pkg%2Fsrc%2Ffunctions.c;h=89e84ef7518a7e3e686e098dabe4706af8175b27;hp=79deff46c702b718b4b9bebeb8d24720d98a3bc2;hb=f47183deb252f12d532af81a491083f1411cacc8;hpb=dfdd811f8488c88148c930eba94924fdbb7a3261 diff --git a/pkg/src/functions.c b/pkg/src/functions.c index 79deff4..89e84ef 100644 --- a/pkg/src/functions.c +++ b/pkg/src/functions.c @@ -1,5 +1,5 @@ #include -#include +//#include // Index matrix (by columns) #define mi(i, j, d1, d2) (j*d1 + i) @@ -53,7 +53,7 @@ void Moments_M3(double* X, double* Y, int* pn, int* pd, double* M3) // with g(Zi, theta) = i-th contribution to all moments (size dim) - real moments void Compute_Omega(double* X, int* Y, double* M, int* pnc, int* pn, int* pd, double* W) { - int nc=*pnc, n=*pn, d=*pd; + int n=*pn, d=*pd; //,nc=*pnc int dim = d + d*d + d*d*d; //double* W = (double*)malloc(dim*dim*sizeof(double)); @@ -101,7 +101,7 @@ void Compute_Omega(double* X, int* Y, double* M, int* pnc, int* pn, int* pd, dou // This final nested loop is very costly. Some basic optimisations: double gj = g[j]; int baseIdx = j * dim; - #pragma GCC unroll 32 +// #pragma GCC unroll 32 for (int k=j; k>=0; k--) W[baseIdx+k] += gj * g[k]; }