예제 #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)
예제 #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)
예제 #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)