8 // Number of OpenMP threads
9 #define OMP_NUM_THREADS 8
11 // CHUNK_SIZE = number of lambda values to be treated sequentially by a single core
14 /*******************************
15 * Matrix and arrays indexation
16 *******************************/
18 // Matrix Index ; TODO? ncol unused
19 #define mi(i,j,nrow,ncol)\
22 // Array Index ; TODO? d3 unused
23 #define ai(i,j,k,d1,d2,d3)\
26 // Array4 Index ; TODO? ...
27 #define ai4(i,j,k,m,d1,d2,d3,d4)\
28 m*d1*d2*d3 + k*d1*d2 + j*d1 + i
30 // Array5 Index ; TODO? ...
31 #define ai5(i,j,k,m,n,d1,d2,d3,d4,d5)\
32 n*d1*d2*d3*d4 + m*d1*d2*d3 + k*d1*d2 + j*d1 + i
34 /*************************
35 * Array copy & "zeroing"
36 ************************/
38 // Fill an array with zeros
39 #define zeroArray(array, size)\
41 for (int u=0; u<size; u++)\
46 #define copyArray(array, copy, size)\
48 for (int u=0; u<size; u++)\