diff options
author | yye00 <yye00@7daa882c-dc44-4453-834e-278d26b18e6a> | 2004-10-18 20:17:58 +0000 |
---|---|---|
committer | yye00 <yye00@7daa882c-dc44-4453-834e-278d26b18e6a> | 2004-10-18 20:17:58 +0000 |
commit | 8d180b856c65d7c40c6e8867687779f3be7350c3 (patch) | |
tree | 74326555a18d3e2028b2bc7722c499deee656544 | |
parent | cc6f10490615b4956e71a4e782e8dbcebcfc5747 (diff) |
cut down compilation time by reducing size of iterator macro
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/LocalReduce/trunk@47 7daa882c-dc44-4453-834e-278d26b18e6a
-rw-r--r-- | src/local_reductions.h | 107 |
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"); \ |