MCPcopy Create free account
hub / github.com/Kitware/VTK / ConvertToPython

Method ConvertToPython

Parallel/MPI4Py/vtkMPI4PyCommunicator.cxx:19–36  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

17
18//------------------------------------------------------------------------------
19PyObject* vtkMPI4PyCommunicator::ConvertToPython(vtkMPICommunicator* comm)
20{
21 // Import mpi4py if it does not exist.
22 if (!PyMPIComm_New)
23 {
24 if (import_mpi4py() < 0)
25 {
26 Py_RETURN_NONE;
27 }
28 }
29
30 if (!comm || !comm->GetMPIComm())
31 {
32 Py_RETURN_NONE;
33 }
34
35 return PyMPIComm_New(*comm->GetMPIComm()->GetHandle());
36}
37
38//------------------------------------------------------------------------------
39vtkMPICommunicator* vtkMPI4PyCommunicator::ConvertToVTK(PyObject* comm)

Callers 4

global_funcFunction · 0.80
_global_per_blockFunction · 0.80
array_countFunction · 0.80

Calls 2

import_mpi4pyFunction · 0.85
GetHandleMethod · 0.45

Tested by

no test coverage detected