Fixed misleading indentation and boolean-use warnings from gcc v6+

This commit is contained in:
Rob Falgout 2018-10-18 13:12:11 -07:00
parent 0f51e61363
commit 236c420abd
6 changed files with 9122 additions and 9140 deletions

View File

@ -10,9 +10,6 @@
* $Revision$
***********************************************************************EHEADER*/
/*====================
* Functions to run cr
*====================*/
@ -451,7 +448,7 @@ HYPRE_Int hypre_fptgscr(HYPRE_Int *cf, HYPRE_Int *A_i, HYPRE_Int *A_j, HYPRE_Rea
e1[i] = res/A_data[A_i[i]];
}
}
return hypre_error_flag;
return hypre_error_flag;
}
/* form the candidate set U */
@ -1452,7 +1449,7 @@ hypre_BoomerAMGIndepHMISa( hypre_ParCSRMatrix *S,
#define COMMON_C_PT 2
#define Z_PT -2
/* begin HANS added */
/* begin HANS added */
/**************************************************************
*
* Modified Independent Set Coarsening routine
@ -2594,7 +2591,7 @@ hypre_BoomerAMGCoarsenCR( hypre_ParCSRMatrix *A,
hypre_ParCSRMatrix *AN,
HYPRE_Int useCG,
hypre_ParCSRMatrix *S)
/*HYPRE_Int CRaddCpoints)*/
/*HYPRE_Int CRaddCpoints)*/
{
/* HYPRE_Real theta_global;*/
MPI_Comm comm = hypre_ParCSRMatrixComm(A);

View File

@ -10,8 +10,6 @@
* $Revision$
***********************************************************************EHEADER*/
#include "_hypre_parcsr_ls.h"
#include "aux_interp.h"
@ -795,8 +793,8 @@ hypre_BoomerAMGBuildStdInterp(hypre_ParCSRMatrix *A, HYPRE_Int *CF_marker,
ahat_offd[jj] = 0;
}
}
if (sum_neg_C*diagonal) alfa = sum_neg/sum_neg_C/diagonal;
if (sum_pos_C*diagonal) beta = sum_pos/sum_pos_C/diagonal;
if (sum_neg_C*diagonal != 0) alfa = sum_neg/sum_neg_C/diagonal;
if (sum_pos_C*diagonal != 0) beta = sum_pos/sum_pos_C/diagonal;
/*-----------------------------------------------------------------
* Set interpolation weight by dividing by the diagonal.
@ -858,7 +856,7 @@ hypre_BoomerAMGBuildStdInterp(hypre_ParCSRMatrix *A, HYPRE_Int *CF_marker,
ahat_offd[jj] = 0;
}
}
if (sum_C*diagonal) alfa = sum/sum_C/diagonal;
if (sum_C*diagonal != 0) alfa = sum/sum_C/diagonal;
/*-----------------------------------------------------------------
* Set interpolation weight by dividing by the diagonal.

View File

@ -10,10 +10,6 @@
* $Revision$
***********************************************************************EHEADER*/
/******************************************************************************
*
* MGR solve routine

View File

@ -10,9 +10,6 @@
* $Revision$
***********************************************************************EHEADER*/
#include "_hypre_parcsr_ls.h"
/*--------------------------------------------------------------------------
@ -882,9 +879,9 @@ hypre_BoomerAMGBuildMultipass( hypre_ParCSRMatrix *A,
{ new_num_cols_offd = local_index+1; }
pass_length = pass_pointer[pass+1] - pass_pointer[pass];
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel private(i,my_thread_num,num_threads,thread_start,thread_stop,cnt_nz,cnt_nz_offd,i1,j,j1,j_start,j_end,k1,k,P_marker,P_marker_offd)
#endif
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel private(i,my_thread_num,num_threads,thread_start,thread_stop,cnt_nz,cnt_nz_offd,i1,j,j1,j_start,j_end,k1,k,P_marker,P_marker_offd)
#endif
{
/* Thread by computing the sparsity structure for this pass only over
* each thread's range of rows. Rows are divided up evenly amongst
@ -1273,8 +1270,8 @@ hypre_BoomerAMGBuildMultipass( hypre_ParCSRMatrix *A,
}
}
diagonal = A_diag_data[A_diag_i[i1]];
if (sum_C_neg*diagonal) alfa = -sum_N_neg/(sum_C_neg*diagonal);
if (sum_C_pos*diagonal) beta = -sum_N_pos/(sum_C_pos*diagonal);
if (sum_C_neg*diagonal != 0) alfa = -sum_N_neg/(sum_C_neg*diagonal);
if (sum_C_pos*diagonal != 0) beta = -sum_N_pos/(sum_C_pos*diagonal);
for (j=P_diag_i[i1]; j < cnt; j++)
if (P_diag_data[j] < 0)
P_diag_data[j] *= alfa;
@ -1531,8 +1528,8 @@ hypre_BoomerAMGBuildMultipass( hypre_ParCSRMatrix *A,
}
}
diagonal = A_diag_data[A_diag_i[i1]];
if (sum_C_neg*diagonal) alfa = -sum_N_neg/(sum_C_neg*diagonal);
if (sum_C_pos*diagonal) beta = -sum_N_pos/(sum_C_pos*diagonal);
if (sum_C_neg*diagonal != 0) alfa = -sum_N_neg/(sum_C_neg*diagonal);
if (sum_C_pos*diagonal != 0) beta = -sum_N_pos/(sum_C_pos*diagonal);
for (j=P_diag_i[i1]; j < P_diag_i[i1+1]; j++)
if (P_diag_data[j] < 0)
@ -1648,7 +1645,7 @@ hypre_BoomerAMGBuildMultipass( hypre_ParCSRMatrix *A,
}
}
diagonal = A_diag_data[A_diag_i[i1]];
if (sum_C*diagonal) alfa = -sum_N/(sum_C*diagonal);
if (sum_C*diagonal != 0) alfa = -sum_N/(sum_C*diagonal);
for (j=P_diag_i[i1]; j < cnt; j++)
P_diag_data[j] *= alfa;
for (j=P_offd_i[i1]; j < cnt_offd; j++)

View File

@ -10,9 +10,6 @@
* $Revision$
***********************************************************************EHEADER*/
#include "_hypre_parcsr_ls.h"
#include "aux_interp.h"
@ -2604,10 +2601,7 @@ hypre_BoomerAMGBuildPartialExtInterp(hypre_ParCSRMatrix *A, HYPRE_Int *CF_marker
if(num_functions > 1)
hypre_TFree(dof_func_offd, HYPRE_MEMORY_HOST);
hypre_MatvecCommPkgDestroy(extend_comm_pkg);
}
return hypre_error_flag;

View File

@ -23,8 +23,8 @@
extern "C" {
#endif
hypre_CSRMatrix *
hypre_ExchangeRAPData( hypre_CSRMatrix *RAP_int, hypre_ParCSRCommPkg *comm_pkg_RT);
hypre_CSRMatrix *
hypre_ExchangeRAPData( hypre_CSRMatrix *RAP_int, hypre_ParCSRCommPkg *comm_pkg_RT);
/* reference seems necessary to prevent a problem with the
"headers" script... */