flu-plus-plus / bachelorproef

Bachelorproef Informatica Universiteit Antwerpen 2016–2017
Other
0 stars 4 forks source link

Parallelize Population queries, configure a Travis OS X build #44

Closed jonathanvdc closed 7 years ago

jonathanvdc commented 7 years ago

Okay so this PR turned out to be all over the place. It sort of played out like this: professor Broeckhove asked us to implement higher-order functions on Population and set up an OS X Travis build. I got to work and the following happened:

fixing a lightbulb

So there's that.

Anyway, what this PR does is exactly what we promised.

  1. We now have a working OS X builld. Travis' OS X machines seem to be somewhat slower than Travis' Linux machines and they tend to make us wait far longer for an OS X machine to become available, but I reckon they're a welcome improvement regardless.

  2. A bunch of higher-order functions have been added to class Population. We don't have a use case for them at the moment, but maybe someday someone will use them. Hopefully.

  3. Population supports serial_for and parallel_for now. It now uses ParallelMap (also new in this PR) for backing storage. I have replaced all existing uses of Population iterators by calls to either serial_for or parallel_for because both are faster than Population iterators. The comments explain ParallelMap.h why.

Also, our gtest report comparison is getting kind of crowded. I'd like to purge it after everyone has merged this PR into their forks.