Show
Ignore:
Timestamp:
03/03/10 10:41:30 (2 years ago)
Author:
pierre
Message:

Speed up the DistanceDependentProbabilityConnector? in parallel in the new implementation, by computing only distances that will be used by the nodes. Spot also a bug, not fixed yet, with the positions in parallel. They are not correctly assigned by defaults

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/connectors.py

    r716 r721  
    134134                create = create[:projection.post.local_cells.size] 
    135135            targets = projection.post.local_cells[create].tolist() 
    136              
    137136            weights = self.get_weights(N, local)[create] 
    138137            weights = common.check_weight(weights, projection.synapse_type, is_conductance) 
     
    541540        p = {} 
    542541        for src in projection.pre.all(): 
    543             d = self.space.distances(src.position, projection.post.positions) 
     542            local = projection.post._mask_local.flatten() 
     543            d   = self.space.distances(src.position, projection.post.positions, post_mask=local) 
    544544            p[src] = eval(self.d_expression).flatten() 
    545545            if p[src].dtype == 'bool':