diff options
author | schnetter <schnetter@0f49ee68-0e4f-0410-9b9c-b2c123ded7ef> | 2012-05-06 22:14:23 +0000 |
---|---|---|
committer | schnetter <schnetter@0f49ee68-0e4f-0410-9b9c-b2c123ded7ef> | 2012-05-06 22:14:23 +0000 |
commit | 66261fe7dc204aab0d0b8a03b39a4e604a6db498 (patch) | |
tree | 774093ff98e9dea96f46ef96b00fb6b83742c8bf /src/common/evaluate.c | |
parent | 18bc4665359045d9ef115c7817b2c6b76ab0cfc5 (diff) |
Parallelize AEILocalInterp with OpenMP
This leads to a slight change in behaviour. Currently, AEILocalInterp
traverses the list of points sequentially, and aborts when the first
error is encountered. After parallelisation, there is no fixed order
in which the points are traversed, and if several errors are
encountered, any one of the errors may be returned, not necessarily
the first. I am not aware of any thorn that would or should rely on
such an ordering.
This patch also adds "restrict" and "const" statements that may
improve performance as it gives the compiler more information about
dependencies between pointers.
git-svn-id: http://svn.aei.mpg.de/numrel/AEIThorns/AEILocalInterp/trunk@55 0f49ee68-0e4f-0410-9b9c-b2c123ded7ef
Diffstat (limited to 'src/common/evaluate.c')
-rw-r--r-- | src/common/evaluate.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/common/evaluate.c b/src/common/evaluate.c index 60156b3..3c814e4 100644 --- a/src/common/evaluate.c +++ b/src/common/evaluate.c @@ -13,43 +13,43 @@ * 1-D routines */ -fp AEILocalInterp_eval_1dcube2(const struct coeffs_struct_1d_cube_size2 *coeffs, - const struct data_struct_1d_cube_size2 *data) +fp AEILocalInterp_eval_1dcube2(const struct coeffs_struct_1d_cube_size2 *restrict const coeffs, + const struct data_struct_1d_cube_size2 *restrict const data) { return #include "1d.cube.size2/evaluate-molecule.c" } -fp AEILocalInterp_eval_1dcube3(const struct coeffs_struct_1d_cube_size3 *coeffs, - const struct data_struct_1d_cube_size3 *data) +fp AEILocalInterp_eval_1dcube3(const struct coeffs_struct_1d_cube_size3 *restrict const coeffs, + const struct data_struct_1d_cube_size3 *restrict const data) { return #include "1d.cube.size3/evaluate-molecule.c" } -fp AEILocalInterp_eval_1dcube4(const struct coeffs_struct_1d_cube_size4 *coeffs, - const struct data_struct_1d_cube_size4 *data) +fp AEILocalInterp_eval_1dcube4(const struct coeffs_struct_1d_cube_size4 *restrict const coeffs, + const struct data_struct_1d_cube_size4 *restrict const data) { return #include "1d.cube.size4/evaluate-molecule.c" } -fp AEILocalInterp_eval_1dcube5(const struct coeffs_struct_1d_cube_size5 *coeffs, - const struct data_struct_1d_cube_size5 *data) +fp AEILocalInterp_eval_1dcube5(const struct coeffs_struct_1d_cube_size5 *restrict const coeffs, + const struct data_struct_1d_cube_size5 *restrict const data) { return #include "1d.cube.size5/evaluate-molecule.c" } -fp AEILocalInterp_eval_1dcube6(const struct coeffs_struct_1d_cube_size6 *coeffs, - const struct data_struct_1d_cube_size6 *data) +fp AEILocalInterp_eval_1dcube6(const struct coeffs_struct_1d_cube_size6 *restrict const coeffs, + const struct data_struct_1d_cube_size6 *restrict const data) { return #include "1d.cube.size6/evaluate-molecule.c" } -fp AEILocalInterp_eval_1dcube7(const struct coeffs_struct_1d_cube_size7 *coeffs, - const struct data_struct_1d_cube_size7 *data) +fp AEILocalInterp_eval_1dcube7(const struct coeffs_struct_1d_cube_size7 *restrict const coeffs, + const struct data_struct_1d_cube_size7 *restrict const data) { return #include "1d.cube.size7/evaluate-molecule.c" @@ -61,36 +61,36 @@ return * 2-D routines */ -fp AEILocalInterp_eval_2dcube2(const struct coeffs_struct_2d_cube_size2 *coeffs, - const struct data_struct_2d_cube_size2 *data) +fp AEILocalInterp_eval_2dcube2(const struct coeffs_struct_2d_cube_size2 *restrict const coeffs, + const struct data_struct_2d_cube_size2 *restrict const data) { return #include "2d.cube.size2/evaluate-molecule.c" } -fp AEILocalInterp_eval_2dcube3(const struct coeffs_struct_2d_cube_size3 *coeffs, - const struct data_struct_2d_cube_size3 *data) +fp AEILocalInterp_eval_2dcube3(const struct coeffs_struct_2d_cube_size3 *restrict const coeffs, + const struct data_struct_2d_cube_size3 *restrict const data) { return #include "2d.cube.size3/evaluate-molecule.c" } -fp AEILocalInterp_eval_2dcube4(const struct coeffs_struct_2d_cube_size4 *coeffs, - const struct data_struct_2d_cube_size4 *data) +fp AEILocalInterp_eval_2dcube4(const struct coeffs_struct_2d_cube_size4 *restrict const coeffs, + const struct data_struct_2d_cube_size4 *restrict const data) { return #include "2d.cube.size4/evaluate-molecule.c" } -fp AEILocalInterp_eval_2dcube5(const struct coeffs_struct_2d_cube_size5 *coeffs, - const struct data_struct_2d_cube_size5 *data) +fp AEILocalInterp_eval_2dcube5(const struct coeffs_struct_2d_cube_size5 *restrict const coeffs, + const struct data_struct_2d_cube_size5 *restrict const data) { return #include "2d.cube.size5/evaluate-molecule.c" } -fp AEILocalInterp_eval_2dcube6(const struct coeffs_struct_2d_cube_size6 *coeffs, - const struct data_struct_2d_cube_size6 *data) +fp AEILocalInterp_eval_2dcube6(const struct coeffs_struct_2d_cube_size6 *restrict const coeffs, + const struct data_struct_2d_cube_size6 *restrict const data) { return #include "2d.cube.size6/evaluate-molecule.c" @@ -102,36 +102,36 @@ return * 3-D routines */ -fp AEILocalInterp_eval_3dcube2(const struct coeffs_struct_3d_cube_size2 *coeffs, - const struct data_struct_3d_cube_size2 *data) +fp AEILocalInterp_eval_3dcube2(const struct coeffs_struct_3d_cube_size2 *restrict const coeffs, + const struct data_struct_3d_cube_size2 *restrict const data) { return #include "3d.cube.size2/evaluate-molecule.c" } -fp AEILocalInterp_eval_3dcube3(const struct coeffs_struct_3d_cube_size3 *coeffs, - const struct data_struct_3d_cube_size3 *data) +fp AEILocalInterp_eval_3dcube3(const struct coeffs_struct_3d_cube_size3 *restrict const coeffs, + const struct data_struct_3d_cube_size3 *restrict const data) { return #include "3d.cube.size3/evaluate-molecule.c" } -fp AEILocalInterp_eval_3dcube4(const struct coeffs_struct_3d_cube_size4 *coeffs, - const struct data_struct_3d_cube_size4 *data) +fp AEILocalInterp_eval_3dcube4(const struct coeffs_struct_3d_cube_size4 *restrict const coeffs, + const struct data_struct_3d_cube_size4 *restrict const data) { return #include "3d.cube.size4/evaluate-molecule.c" } -fp AEILocalInterp_eval_3dcube5(const struct coeffs_struct_3d_cube_size5 *coeffs, - const struct data_struct_3d_cube_size5 *data) +fp AEILocalInterp_eval_3dcube5(const struct coeffs_struct_3d_cube_size5 *restrict const coeffs, + const struct data_struct_3d_cube_size5 *restrict const data) { return #include "3d.cube.size5/evaluate-molecule.c" } -fp AEILocalInterp_eval_3dcube6(const struct coeffs_struct_3d_cube_size6 *coeffs, - const struct data_struct_3d_cube_size6 *data) +fp AEILocalInterp_eval_3dcube6(const struct coeffs_struct_3d_cube_size6 *restrict const coeffs, + const struct data_struct_3d_cube_size6 *restrict const data) { return #include "3d.cube.size6/evaluate-molecule.c" |