Silence clang warning

Should not be a change in behavior, just making explicit the
order of operations with parantheses and silencing a clang warning.
This commit is contained in:
Paul T. Bauman 2022-03-09 13:29:28 -06:00
parent d55a409bdb
commit 08b901f24d

View File

@ -62,12 +62,12 @@ struct FF_pred : public thrust::unary_function<Tuple, bool>
if (option == 1)
{
/* A_{F,F} */
return row_CF_marker[i] < 0 && (j == -2 || j >= 0 && col_CF_marker[j] < 0);
return row_CF_marker[i] < 0 && (j == -2 || (j >= 0 && col_CF_marker[j] < 0) );
}
else
{
/* A_{F2, F} */
return row_CF_marker[i] == -2 && (j == -2 || j >= 0 && col_CF_marker[j] < 0);
return row_CF_marker[i] == -2 && (j == -2 || (j >= 0 && col_CF_marker[j] < 0) );
}
}
};
@ -137,7 +137,7 @@ struct CC_pred : public thrust::unary_function<Tuple, bool>
const HYPRE_Int i = thrust::get<0>(t);
const HYPRE_Int j = thrust::get<1>(t);
return row_CF_marker[i] >= 0 && (j == -2 || j >= 0 && col_CF_marker[j] >= 0);
return row_CF_marker[i] >= 0 && (j == -2 || (j >= 0 && col_CF_marker[j] >= 0) );
}
};