aboutsummaryrefslogtreecommitdiff
path: root/src/template.h
diff options
context:
space:
mode:
authorschnetter <schnetter@0f49ee68-0e4f-0410-9b9c-b2c123ded7ef>2012-05-06 22:14:23 +0000
committerschnetter <schnetter@0f49ee68-0e4f-0410-9b9c-b2c123ded7ef>2012-05-06 22:14:23 +0000
commit66261fe7dc204aab0d0b8a03b39a4e604a6db498 (patch)
tree774093ff98e9dea96f46ef96b00fb6b83742c8bf /src/template.h
parent18bc4665359045d9ef115c7817b2c6b76ab0cfc5 (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/template.h')
-rw-r--r--src/template.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/template.h b/src/template.h
index c98ab4e..b5ef202 100644
--- a/src/template.h
+++ b/src/template.h
@@ -8,35 +8,35 @@
@version $Header$
@@*/
int FUNCTION_NAME(/***** coordinate system *****/
- const CCTK_REAL coord_origin[],
- const CCTK_REAL coord_delta[],
+ const CCTK_REAL *restrict coord_origin,
+ const CCTK_REAL *restrict coord_delta,
/***** interpolation points *****/
int N_interp_points,
int interp_coords_type_code,
- const void* const interp_coords[],
- const CCTK_INT N_boundary_points_to_omit[],
- const CCTK_REAL boundary_off_centering_tolerance[],
- const CCTK_REAL boundary_extrapolation_tolerance[],
+ const void *restrict const *restrict interp_coords,
+ const CCTK_INT *restrict N_boundary_points_to_omit,
+ const CCTK_REAL *restrict boundary_off_centering_tolerance,
+ const CCTK_REAL *restrict boundary_extrapolation_tolerance,
/***** input arrays *****/
int N_input_arrays,
- const CCTK_INT input_array_offsets[],
- const CCTK_INT input_array_strides[],
- const CCTK_INT input_array_min_subscripts[],
- const CCTK_INT input_array_max_subscripts[],
- const CCTK_INT input_array_type_codes[],
- const void* const input_arrays[],
+ const CCTK_INT *restrict input_array_offsets,
+ const CCTK_INT *restrict input_array_strides,
+ const CCTK_INT *restrict input_array_min_subscripts,
+ const CCTK_INT *restrict input_array_max_subscripts,
+ const CCTK_INT *restrict input_array_type_codes,
+ const void *restrict const *restrict input_arrays,
/***** output arrays *****/
int N_output_arrays,
- const CCTK_INT output_array_type_codes[],
- void* const output_arrays[],
+ const CCTK_INT *restrict output_array_type_codes,
+ void* const *restrict output_arrays,
/***** operation info *****/
- const CCTK_INT operand_indices[],
- const CCTK_INT operation_codes[],
+ const CCTK_INT *restrict operand_indices,
+ const CCTK_INT *restrict operation_codes,
/***** debugging *****/
int debug, FILE* log_fp,
/***** other return results *****/
struct error_info* error_info,
struct molecule_structure_flags* molecule_structure_flags,
struct molecule_min_max_m_info* molecule_min_max_m_info,
- CCTK_INT* const molecule_positions[],
- struct Jacobian_info* Jacobian_info);
+ CCTK_INT *restrict const *restrict molecule_positions,
+ struct Jacobian_info *restrict Jacobian_info);