diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-10-20 05:38:52 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-10-20 05:38:52 +0000 |
commit | 019f6271792eba1d1d4d9c385bd545638d8d3cc4 (patch) | |
tree | 146c6e2a6cb22ac311ac50538ee87122fbee5565 | |
parent | 5628ad1b87a8e7ae096d7253a130af1ea61d0054 (diff) |
Small change to CCTK_ReduceLocalArray1D() which does now element-wise reduction
on a single array.
I'm not sure about the name of this function, it could have two meanings
depending on the definition of 'array':
1) Every processor has its own array and wants to apply a reduction operation
on each element with the corresponding elements of other processors' arrays.
That's what CCTK_ReduceLocalArray1D() is doing now.
2) The array is a global, shared one (like a grid function), and reduction
is done on all elements, resulting in a single output value.
Any idea about another name to avoid this ambiguousness ?
Thomas
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1067 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | src/comm/Reduction.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/comm/Reduction.c b/src/comm/Reduction.c index 9d58b420..1256fcdb 100644 --- a/src/comm/Reduction.c +++ b/src/comm/Reduction.c @@ -668,7 +668,7 @@ int CCTK_ReduceLocalArray1D (cGH *GH, int proc, int operation_handle, { return (CCTK_ReduceArray (GH, proc, operation_handle, num_in_array1d, data_type, out_array1d, - 1, 1, data_type, 1, in_array1d)); + 1, 1, data_type, num_in_array1d, in_array1d)); } void FMODIFIER FORTRAN_NAME(CCTK_ReduceLocalArray1D)(int *fortran_return, @@ -682,6 +682,7 @@ void FMODIFIER FORTRAN_NAME(CCTK_ReduceLocalArray1D)(int *fortran_return, { *fortran_return = CCTK_ReduceArray (GH, *proc, *operation_handle, *num_in_array1d, *data_type, out_array1d, - 1, 1, *data_type, 1,in_array1d); + 1, 1, *data_type, *num_in_array1d, + in_array1d); } |