aboutsummaryrefslogtreecommitdiff
path: root/src/local_reductions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/local_reductions.h')
-rw-r--r--src/local_reductions.h107
1 files changed, 0 insertions, 107 deletions
diff --git a/src/local_reductions.h b/src/local_reductions.h
index 31d7c93..6f073b2 100644
--- a/src/local_reductions.h
+++ b/src/local_reductions.h
@@ -139,113 +139,6 @@ extern "C" {
} \
} \
} \
- else if (mask_on == 0) \
- { \
- if ( input_array_offset == 0) \
- { \
- while (iter < max_iter) \
- { \
- sum_indices = actual_indices[0]; \
- for (k=N_dims-1;k>0;k--) \
- { \
- product = 1; \
- for (j=k-1;j>=0;j--) \
- { \
- product *= actual_iters_per_dim[j]; \
- } \
- sum_indices += actual_indices[k]*product; \
- } \
- inval = (out_type) typed_vdata[sum_indices]; \
- REDUCTION_OPERATION(*outval,inval); \
- num_points++; \
- iter++; \
- flag = 0; \
- for (k=0;k<N_dims;k++) \
- { \
- if( indices[k] < iters_per_dim[k]-1) \
- { \
- if (flag==1) \
- { \
- actual_indices[k] += input_array_strides[k-1]; \
- indices[k]++; \
- flag = 0; \
- break; \
- } \
- indices[k]++; \
- actual_indices[k] += input_array_strides[k]; \
- break; \
- } \
- else if (indices[k] == iters_per_dim[k]-1) \
- { \
- indices[k] = 0; \
- actual_indices[k] = input_array_min_subscripts[k]; \
- flag = 1; \
- continue; \
- } \
- else \
- { \
- CCTK_WARN(1,"indices out of bounds, this should not happen"); \
- return -1; \
- } \
- } \
- } \
- } \
- else \
- { \
- while (iter < max_iter) \
- { \
- sum_indices = actual_indices[0]; \
- for (k=N_dims-1;k>0;k--) \
- { \
- product = 1; \
- for (j=k-1;j>=0;j--) \
- { \
- product *= actual_iters_per_dim[j]; \
- } \
- sum_indices += actual_indices[k]*product; \
- } \
- /* prevent offset from giving segfaults */ \
- if (sum_indices >= max_iter) \
- { \
- CCTK_WARN(1,"offsets and strides access unallocated memory"); \
- return -1; \
- } \
- inval = (out_type) typed_vdata[sum_indices]; \
- REDUCTION_OPERATION(*outval,inval); \
- num_points++; \
- iter++; \
- flag = 0; \
- for (k=0;k<N_dims;k++) \
- { \
- if( indices[k] < iters_per_dim[k]-1) \
- { \
- if (flag==1) \
- { \
- actual_indices[k] += input_array_strides[k-1]; \
- indices[k]++; \
- flag = 0; \
- break; \
- } \
- indices[k]++; \
- actual_indices[k] += input_array_strides[k]; \
- break; \
- } \
- else if (indices[k] == iters_per_dim[k]-1) \
- { \
- indices[k] = 0; \
- actual_indices[k] = input_array_min_subscripts[k]; \
- flag = 1; \
- continue; \
- } \
- else \
- { \
- CCTK_WARN(1,"indices out of bounds, this should not happen"); \
- return -1; \
- } \
- } \
- } \
- } \
- } \
else \
{ \
CCTK_WARN(1, "mask_on is not set to a valid value"); \