diff options
Diffstat (limited to 'src/ReductionSum.c')
-rw-r--r-- | src/ReductionSum.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/ReductionSum.c b/src/ReductionSum.c index bac8635..61c96a2 100644 --- a/src/ReductionSum.c +++ b/src/ReductionSum.c @@ -137,7 +137,6 @@ static int ReductionSum (int N_dims, int operator_handle, { /* utility variables */ int i, j, num_points; - int ierr; int * iters_per_dim; int global_calling = 0; @@ -195,23 +194,22 @@ static int ReductionSum (int N_dims, int operator_handle, /* for strides and subscripts get values from param table (it they exist) */ if ( Util_TableQueryNKeys(param_table_handle) != 0) { - ierr = Util_TableGetGenericArray(param_table_handle, CCTK_VARIABLE_INT, + Util_TableGetGenericArray(param_table_handle, CCTK_VARIABLE_INT, N_input_arrays, input_array_offsets, "input_array_offsets"); - ierr = Util_TableGetGenericArray(param_table_handle, CCTK_VARIABLE_INT, + Util_TableGetGenericArray(param_table_handle, CCTK_VARIABLE_INT, N_dims, input_array_strides, "input_array_strides"); - ierr = Util_TableGetGenericArray(param_table_handle, CCTK_VARIABLE_INT, + Util_TableGetGenericArray(param_table_handle, CCTK_VARIABLE_INT, N_dims, input_array_min_subscripts, "input_array_min_subscripts"); - ierr = Util_TableGetGenericArray(param_table_handle, CCTK_VARIABLE_INT, + Util_TableGetGenericArray(param_table_handle, CCTK_VARIABLE_INT, N_dims, input_array_max_subscripts, "input_array_max_subscripts"); } /* for weights get values from param table (it they exist) */ if ( Util_TableQueryNKeys(param_table_handle) != 0) { - ierr = 0; /* Get the weight_on parameter and the weight_var_index parameter */ - ierr = Util_TableGetInt(param_table_handle, &weight_on, "weight_on"); - ierr = Util_TableGetPointerToConst(param_table_handle, &weight, "weight"); + Util_TableGetInt(param_table_handle, &weight_on, "weight_on"); + Util_TableGetPointerToConst(param_table_handle, &weight, "weight"); /* Need to add more checking here for size, storage */ } @@ -314,17 +312,17 @@ static int ReductionSum (int N_dims, int operator_handle, } /* Get the values of num_points and weight_sum */ - ierr = Util_TableGetInt(param_table_handle, &num_points, "num_points"); - ierr = Util_TableGetReal(param_table_handle, &weight_sum, "weight_sum"); + Util_TableGetInt(param_table_handle, &num_points, "num_points"); + Util_TableGetReal(param_table_handle, &weight_sum, "weight_sum"); num_points--; /* store the number of points in the paramater table and perform division */ - ierr = Util_TableGetInt(param_table_handle, &global_calling, "global_calling"); + Util_TableGetInt(param_table_handle, &global_calling, "global_calling"); if ( global_calling != 0) { - ierr = Util_TableSetInt(param_table_handle, num_points, "num_points"); - ierr = Util_TableSetInt(param_table_handle, 3,"global_operation"); - ierr = Util_TableSetInt(param_table_handle, 1,"perform_division"); + Util_TableSetInt(param_table_handle, num_points, "num_points"); + Util_TableSetInt(param_table_handle, 3,"global_operation"); + Util_TableSetInt(param_table_handle, 1,"perform_division"); } /* free memory */ |