yakra / DataProcessing

Data Processing Scripts and Programs for Travel Mapping Project
0 stars 0 forks source link

ConcAugThread ideas #117

Closed yakra closed 4 years ago

yakra commented 4 years ago

Similar: https://github.com/TravelMapping/DataProcessing/issues/281

yakra commented 4 years ago
  • Try removing log_mtx, replace << with + operators, and see how that works out.

concurrencies.log gets mangled. Not as atomic as I thought.


  • If that's not satisfactory, build a list of strings in each thread, splicing onto a list in the main thread when done, and finally output the file at once all threads finish.

Or rather, just keep an array of lists, then step through it & write each one. But anyway. ConcAugGood This is a big help immediately. One thread is a bit slower now, due to constructing the list of strings rather than writing the log file directly. I could make up for this by interleaving some if (args.numthreads == 1) & else with the #ifdefs and using the same code for 1 thread as when threading is disabled, but don't really care; If running single-threaded for anything other than speed testing or debugging, one should disable threading at the preprocessor level anyway.



Nope, not even attempted. Travelers would never get credited for non-concurrent segments.