Helper to convert NgMPI_Comm to hypre's MPI_Comm type. In NG_MPI_WRAPPER mode, NG_MPI_Comm stores the real MPI_Comm as uintptr_t. In non-wrapper mode, NG_MPI_Comm is directly MPI_Comm.
| 42 | // In NG_MPI_WRAPPER mode, NG_MPI_Comm stores the real MPI_Comm as uintptr_t. |
| 43 | // In non-wrapper mode, NG_MPI_Comm is directly MPI_Comm. |
| 44 | static inline MPI_Comm ToHypreComm(NgMPI_Comm ngcomm) { |
| 45 | #ifdef NG_MPI_WRAPPER |
| 46 | NG_MPI_Comm ng_comm = ngcomm; |
| 47 | return (MPI_Comm)(ng_comm.value); |
| 48 | #else |
| 49 | return (NG_MPI_Comm)ngcomm; |
| 50 | #endif |
| 51 | } |
| 52 | #endif // HYPRE_WITH_MPI |
| 53 | |
| 54 |