fix compile error (#991)

This PR fixes compile errors/warnings.
This commit is contained in:
Rui Peng Li 2023-10-23 09:39:42 -07:00 committed by GitHub
parent 2e29e665bb
commit 07fb84ed21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -105,9 +105,9 @@ hypre_GaussElimSetupDevice(hypre_ParAMGData *amg_data,
#else
/* Silence declared but never referenced warnings */
(A_piv = NULL);
(A_mat = NULL);
(A_work = NULL);
(A_piv += 0);
(A_mat += 0);
(A_work += 0);
(buffer_size *= 1);
hypre_error_w_msg(HYPRE_ERROR_GENERIC,
@ -309,8 +309,8 @@ hypre_GaussElimSolveDevice(hypre_ParAMGData *amg_data,
#else
/* Silence declared but never referenced warnings */
(A_mat = NULL);
(A_piv = NULL);
(A_mat += 0);
(A_piv += 0);
(i_one *= 1);
(d_one *= 1.0);
(zero *= zero);

View File

@ -152,6 +152,7 @@ hypre_IntArrayNegateDevice( hypre_IntArray *v )
* hypre_IntArraySetInterleavedValuesDevice
*--------------------------------------------------------------------------*/
#if defined(HYPRE_USING_CUDA) || defined(HYPRE_USING_HIP)
struct hypre_cycle_functor
{
HYPRE_Int cycle_length;
@ -163,6 +164,7 @@ struct hypre_cycle_functor
return x % cycle_length;
}
};
#endif
HYPRE_Int
hypre_IntArraySetInterleavedValuesDevice( hypre_IntArray *v,