We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8e6119 commit 2ad9757Copy full SHA for 2ad9757
python/libsharp/libsharp_mpi.pyx
@@ -1,10 +1,17 @@
1
-from mpi4py.MPI cimport Comm
+cdef extern from "mpi.h":
2
+ ctypedef void *MPI_Comm
3
+
4
cdef extern from "Python.h":
5
object PyLong_FromVoidPtr(void*)
6
7
+cdef extern:
8
+ ctypedef class mpi4py.MPI.Comm [object PyMPICommObject]:
9
+ cdef MPI_Comm ob_mpi
10
+ cdef unsigned flags
11
12
# For compatibility with mpi4py <= 1.3.1
13
# Newer versions could use the MPI._addressof function
-def _addressof(comm):
14
+def _addressof(Comm comm):
15
cdef void *ptr = NULL
- ptr = <void*>&(<Comm>comm).ob_mpi
16
+ ptr = <void*>&comm.ob_mpi
17
return PyLong_FromVoidPtr(ptr)
0 commit comments