diff --git a/bfps/cpp/Lagrange_polys.hpp b/bfps/cpp/Lagrange_polys.hpp index 6b6e9053ea1469f366591e11fe0d1221f3181029..401b9b7f076eeaa4ac44c8190ebaff947cd62247 100644 --- a/bfps/cpp/Lagrange_polys.hpp +++ b/bfps/cpp/Lagrange_polys.hpp @@ -28,14 +28,14 @@ #define LAGRANGE_POLYS -void beta_Lagrange_n1(int deriv, double x, double *poly_val); -void beta_Lagrange_n2(int deriv, double x, double *poly_val); -void beta_Lagrange_n3(int deriv, double x, double *poly_val); -void beta_Lagrange_n4(int deriv, double x, double *poly_val); -void beta_Lagrange_n5(int deriv, double x, double *poly_val); -void beta_Lagrange_n6(int deriv, double x, double *poly_val); -void beta_Lagrange_n7(int deriv, double x, double *poly_val); -void beta_Lagrange_n8(int deriv, double x, double *poly_val); +void beta_Lagrange_n1(const int deriv, const double x, double *__restrict__ poly_val); +void beta_Lagrange_n2(const int deriv, const double x, double *__restrict__ poly_val); +void beta_Lagrange_n3(const int deriv, const double x, double *__restrict__ poly_val); +void beta_Lagrange_n4(const int deriv, const double x, double *__restrict__ poly_val); +void beta_Lagrange_n5(const int deriv, const double x, double *__restrict__ poly_val); +void beta_Lagrange_n6(const int deriv, const double x, double *__restrict__ poly_val); +void beta_Lagrange_n7(const int deriv, const double x, double *__restrict__ poly_val); +void beta_Lagrange_n8(const int deriv, const double x, double *__restrict__ poly_val); #endif//LAGRANGE_POLYS diff --git a/bfps/cpp/interpolator.hpp b/bfps/cpp/interpolator.hpp index 4f2716a27a589880dcebce282e696b76160ce4cf..299fef4910693b878d3f2734636b43dbf8f98a6d 100644 --- a/bfps/cpp/interpolator.hpp +++ b/bfps/cpp/interpolator.hpp @@ -40,9 +40,9 @@ #define INTERPOLATOR typedef void (*base_polynomial_values)( - int derivative, - double fraction, - double *destination); + const int derivative, + const double fraction, + double *__restrict__ destination); template <class rnumber, int interp_neighbours> class interpolator @@ -59,7 +59,7 @@ class interpolator base_polynomial_values BETA_POLYS); ~interpolator(); - void operator()(double t, int *xg, double *xx, double *dest, int *deriv = NULL); + void operator()(double t, int *__restrict__ xg, double *__restrict__ xx, double *__restrict__ dest, int *deriv = NULL); /* destroys input */ int read_rFFTW(void *src); }; diff --git a/bfps/cpp/particles.hpp b/bfps/cpp/particles.hpp index 49537de1d7baca127485e001f214c85ecb51e116..4b743a006c15c1c83b65d66b9fd8056caee6e2e9 100644 --- a/bfps/cpp/particles.hpp +++ b/bfps/cpp/particles.hpp @@ -107,19 +107,19 @@ class particles /* an Euler step is needed to compute an estimate of future positions, * which is needed for synchronization. * */ - void jump_estimate(double *jump_length); - void get_rhs(double *x, double *rhs); - void get_rhs(double t, double *x, double *rhs); + void jump_estimate(double *__restrict__ jump_length); + void get_rhs(double *__restrict__ x, double *__restrict__ rhs); + void get_rhs(double t, double *__restrict__ x, double *__restrict__ rhs); int get_rank(double z); // get rank for given value of z void synchronize(); - void synchronize_single_particle_state(int p, double *x, int source_id = -1); - void get_grid_coordinates(double *x, int *xg, double *xx); + void synchronize_single_particle_state(int p, double *__restrict__ x, int source_id = -1); + void get_grid_coordinates(double *__restrict__ x, int *__restrict__ xg, double *__restrict__ xx); void sample_vec_field( interpolator<rnumber, interp_neighbours> *vec, double t, - double *x, - double *y, + double *__restrict__ x, + double *__restrict__ y, const bool synch = false, int *deriv = NULL); inline void sample_vec_field(interpolator<rnumber, interp_neighbours> *field, double *vec_values) diff --git a/bfps/cpp/spline_n1.hpp b/bfps/cpp/spline_n1.hpp index ebb440adad954557da56d8f6fb114a5d366d487a..707e9fbcd3a1772c07ba59e6494260f0d8740a7d 100644 --- a/bfps/cpp/spline_n1.hpp +++ b/bfps/cpp/spline_n1.hpp @@ -28,9 +28,9 @@ #define SPLINE_N1 -void beta_n1_m0(int deriv, double x, double *poly_val); -void beta_n1_m1(int deriv, double x, double *poly_val); -void beta_n1_m2(int deriv, double x, double *poly_val); +void beta_n1_m0(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n1_m1(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n1_m2(const int deriv, const double x, double *__restrict__ poly_val); #endif//SPLINE_N1 diff --git a/bfps/cpp/spline_n2.hpp b/bfps/cpp/spline_n2.hpp index 181cca2d73da4f6d6d3222e700e185c2184e392c..b29e7be13f663d9bdbca310b91b7e3a1db92a205 100644 --- a/bfps/cpp/spline_n2.hpp +++ b/bfps/cpp/spline_n2.hpp @@ -28,11 +28,11 @@ #define SPLINE_N2 -void beta_n2_m0(int deriv, double x, double *poly_val); -void beta_n2_m1(int deriv, double x, double *poly_val); -void beta_n2_m2(int deriv, double x, double *poly_val); -void beta_n2_m3(int deriv, double x, double *poly_val); -void beta_n2_m4(int deriv, double x, double *poly_val); +void beta_n2_m0(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n2_m1(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n2_m2(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n2_m3(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n2_m4(const int deriv, const double x, double *__restrict__ poly_val); #endif//SPLINE_N2 diff --git a/bfps/cpp/spline_n3.hpp b/bfps/cpp/spline_n3.hpp index e53507573438db3275eff1bafa9089b318cfe4cc..159f8b970947b507205f40fcfb5140ca683770ce 100644 --- a/bfps/cpp/spline_n3.hpp +++ b/bfps/cpp/spline_n3.hpp @@ -28,13 +28,13 @@ #define SPLINE_N3 -void beta_n3_m0(int deriv, double x, double *poly_val); -void beta_n3_m1(int deriv, double x, double *poly_val); -void beta_n3_m2(int deriv, double x, double *poly_val); -void beta_n3_m3(int deriv, double x, double *poly_val); -void beta_n3_m4(int deriv, double x, double *poly_val); -void beta_n3_m5(int deriv, double x, double *poly_val); -void beta_n3_m6(int deriv, double x, double *poly_val); +void beta_n3_m0(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n3_m1(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n3_m2(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n3_m3(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n3_m4(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n3_m5(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n3_m6(const int deriv, const double x, double *__restrict__ poly_val); #endif//SPLINE_N3 diff --git a/bfps/cpp/spline_n4.hpp b/bfps/cpp/spline_n4.hpp index a3cb59609f07ddf12700839f06b24beba9d44294..4b80d16ea110fe1738f1eecca5f2f9cbe6e43e84 100644 --- a/bfps/cpp/spline_n4.hpp +++ b/bfps/cpp/spline_n4.hpp @@ -28,15 +28,15 @@ #define SPLINE_N4 -void beta_n4_m0(int deriv, double x, double *poly_val); -void beta_n4_m1(int deriv, double x, double *poly_val); -void beta_n4_m2(int deriv, double x, double *poly_val); -void beta_n4_m3(int deriv, double x, double *poly_val); -void beta_n4_m4(int deriv, double x, double *poly_val); -void beta_n4_m5(int deriv, double x, double *poly_val); -void beta_n4_m6(int deriv, double x, double *poly_val); -void beta_n4_m7(int deriv, double x, double *poly_val); -void beta_n4_m8(int deriv, double x, double *poly_val); +void beta_n4_m0(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n4_m1(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n4_m2(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n4_m3(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n4_m4(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n4_m5(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n4_m6(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n4_m7(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n4_m8(const int deriv, const double x, double *__restrict__ poly_val); #endif//SPLINE_N4 diff --git a/bfps/cpp/spline_n5.hpp b/bfps/cpp/spline_n5.hpp index e256ef31f88c7e231d58a163011e067b8309f04c..fccd512076dc571fdded3fe3ccf44f7e4132ec48 100644 --- a/bfps/cpp/spline_n5.hpp +++ b/bfps/cpp/spline_n5.hpp @@ -28,17 +28,17 @@ #define SPLINE_N5 -void beta_n5_m0(int deriv, double x, double *poly_val); -void beta_n5_m1(int deriv, double x, double *poly_val); -void beta_n5_m2(int deriv, double x, double *poly_val); -void beta_n5_m3(int deriv, double x, double *poly_val); -void beta_n5_m4(int deriv, double x, double *poly_val); -void beta_n5_m5(int deriv, double x, double *poly_val); -void beta_n5_m6(int deriv, double x, double *poly_val); -void beta_n5_m7(int deriv, double x, double *poly_val); -void beta_n5_m8(int deriv, double x, double *poly_val); -void beta_n5_m9(int deriv, double x, double *poly_val); -void beta_n5_m10(int deriv, double x, double *poly_val); +void beta_n5_m0( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n5_m1( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n5_m2( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n5_m3( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n5_m4( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n5_m5( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n5_m6( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n5_m7( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n5_m8( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n5_m9( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n5_m10(const int deriv, const double x, double *__restrict__ poly_val); #endif//SPLINE_N5 diff --git a/bfps/cpp/spline_n6.hpp b/bfps/cpp/spline_n6.hpp index 6e0a4b0ef33831868bd579c144be7ed9a6d05bb6..8eb99092eafd0f1f7c783a023eae49d714479ce1 100644 --- a/bfps/cpp/spline_n6.hpp +++ b/bfps/cpp/spline_n6.hpp @@ -28,19 +28,19 @@ #define SPLINE_N6 -void beta_n6_m0(int deriv, double x, double *poly_val); -void beta_n6_m1(int deriv, double x, double *poly_val); -void beta_n6_m2(int deriv, double x, double *poly_val); -void beta_n6_m3(int deriv, double x, double *poly_val); -void beta_n6_m4(int deriv, double x, double *poly_val); -void beta_n6_m5(int deriv, double x, double *poly_val); -void beta_n6_m6(int deriv, double x, double *poly_val); -void beta_n6_m7(int deriv, double x, double *poly_val); -void beta_n6_m8(int deriv, double x, double *poly_val); -void beta_n6_m9(int deriv, double x, double *poly_val); -void beta_n6_m10(int deriv, double x, double *poly_val); -void beta_n6_m11(int deriv, double x, double *poly_val); -void beta_n6_m12(int deriv, double x, double *poly_val); +void beta_n6_m0( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n6_m1( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n6_m2( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n6_m3( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n6_m4( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n6_m5( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n6_m6( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n6_m7( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n6_m8( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n6_m9( const int deriv, const double x, double *__restrict__ poly_val); +void beta_n6_m10(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n6_m11(const int deriv, const double x, double *__restrict__ poly_val); +void beta_n6_m12(const int deriv, const double x, double *__restrict__ poly_val); #endif//SPLINE_N6 diff --git a/tox_plain.ini b/tox_plain.ini index 696894d30dbf8eb094b6a8349ffe892f7c6867f7..150f5997e7b2bdf03bf60c3e5b880a5635e640fc 100644 --- a/tox_plain.ini +++ b/tox_plain.ini @@ -12,10 +12,10 @@ commands = #python tests/test_plain.py -n 256 --run --initialize --ncpu 8 --niter_todo 8 --precision single --wd "data/single" python tests/test_plain.py \ -n 128 --run --initialize --ncpu 4 \ - --nparticles 0 --niter_todo 24 \ + --nparticles 100 --niter_todo 24 \ --precision single --wd "data/single" \ - --kMeta 3.0 \ - --multiplejob + --kMeta 3.0 #\ + #--multiplejob #python tests/test_plain.py -n 32 --run --initialize --multiplejob --ncpu 2 --nparticles 16 --niter_todo 64 --precision single --wd "data/single" #python tests/test_plain.py -n 32 --run --initialize --multiplejob --ncpu 2 --nparticles 16 --niter_todo 64 --precision double --wd "data/double"