Fix sign-compare warnings (#714)

This PR fixes warnings from [-Wsign-compare] when building hypre with GPU support.
This commit is contained in:
Victor A. Paludetto Magri 2022-08-17 14:16:34 -07:00 committed by GitHub
parent c551365fe7
commit 2383e6881d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -453,10 +453,10 @@ hypre_spgemm_numerical_with_rownnz( HYPRE_Int m,
hypre_assert(bDim.x * bDim.y == GROUP_SIZE);
// grid dimension (number of blocks)
const HYPRE_Int num_blocks = hypre_min( hypre_HandleSpgemmBlockNumDim(hypre_handle())[1][BIN],
(m + bDim.z - 1) / bDim.z );
(HYPRE_Int) ((m + bDim.z - 1) / bDim.z) );
dim3 gDim( num_blocks );
// number of active groups
HYPRE_Int num_act_groups = hypre_min(bDim.z * gDim.x, m);
HYPRE_Int num_act_groups = hypre_min((HYPRE_Int) (bDim.z * gDim.x), m);
const char HASH_TYPE = HYPRE_SPGEMM_HASH_TYPE;
@ -708,4 +708,3 @@ HYPRE_Int hypre_spgemm_numerical_max_num_blocks( HYPRE_Int multiProcessorCount,
}
#endif /* HYPRE_USING_CUDA || defined(HYPRE_USING_HIP) */

View File

@ -353,10 +353,10 @@ hypre_spgemm_symbolic_rownnz( HYPRE_Int m,
hypre_assert(bDim.x * bDim.y == GROUP_SIZE);
// grid dimension (number of blocks)
const HYPRE_Int num_blocks = hypre_min( hypre_HandleSpgemmBlockNumDim(hypre_handle())[0][BIN],
(m + bDim.z - 1) / bDim.z );
(HYPRE_Int) ((m + bDim.z - 1) / bDim.z) );
dim3 gDim( num_blocks );
// number of active groups
HYPRE_Int num_act_groups = hypre_min(bDim.z * gDim.x, m);
HYPRE_Int num_act_groups = hypre_min((HYPRE_Int) (bDim.z * gDim.x), m);
const char HASH_TYPE = HYPRE_SPGEMM_HASH_TYPE;
if (HASH_TYPE != 'L' && HASH_TYPE != 'Q' && HASH_TYPE != 'D')
@ -509,4 +509,3 @@ HYPRE_Int hypre_spgemm_symbolic_max_num_blocks( HYPRE_Int multiProcessorCount,
}
#endif /* HYPRE_USING_CUDA || defined(HYPRE_USING_HIP) */