Example #1
0
 def size(self, gather=True):
     """
     Return the total number of connections.
         - only local connections, if gather is False,
         - all connections, if gather is True (default)
     """
     if gather:
         n = len(self)
         return recording.mpi_sum(n)
     else:
         return len(self)
Example #2
0
 def size(self, gather=True):
     """
     Return the total number of connections.
         - only local connections, if gather is False,
         - all connections, if gather is True (default)
     """
     if gather and self._simulator.state.num_processes > 1:
         n = len(self)
         return recording.mpi_sum(n)
     else:
         return len(self)
Example #3
0
 def size(self, gather=True):
     """
     Return the total number of connections.
         - only local connections, if gather is False,
         - all connections, if gather is True (default)
     """
     if gather:
         n = len(self)
         return recording.mpi_sum(n)
     else:
         return len(self)