SpineML / SpineML_2_BRAHMS

Code generation scripts to run a SpineML neural model using BRAHMS on standard CPUs
http://spineml.github.io/simulators/BRAHMS/
4 stars 3 forks source link

Connection lists must be sorted by src then dst indices for consistency #17

Open ajc158 opened 9 years ago

ajc158 commented 9 years ago

This is a fairly easy fix - just use

vector < conn > vConn;
// fill up vConn
std::sort(vConn.begin(), vConn.end(), sortFunc);

Where sortFunc is:

bool sortFunc(conn a, conn b) {
 if (a.src < b.src) return true;
 if (a.src == b.src && a.dst < b.dst) return true;
 return false;
}

Just noting it here so I do it...

sebjameswml commented 7 years ago

Commit 48637c0 in SpineCreator ensures that when importing connection lists, they get sorted. Did you want to implement this in S2B as well?