Skip to content

Commit 942293f

Browse files
committed
Revert "Conn: updateSynapsePermanence micro-optimization"
This reverts commit d22099d.
1 parent d22099d commit 942293f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/htm/algorithms/Connections.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,13 @@ void Connections::updateSynapsePermanence(Synapse synapse,
268268

269269
const bool before = synData.permanence >= connectedThreshold_;
270270
const bool after = permanence >= connectedThreshold_;
271-
if( before == after ) { //no change
272-
return;
273-
}
271+
272+
// update the permanence
274273
synData.permanence = permanence;
275274

275+
if( before == after ) { //no change in dis/connected status
276+
return;
277+
}
276278
const auto &presyn = synData.presynapticCell;
277279
auto &potentialPresyn = potentialSynapsesForPresynapticCell_[presyn];
278280
auto &potentialPreseg = potentialSegmentsForPresynapticCell_[presyn];

0 commit comments

Comments
 (0)