Open kamil-tarnas opened 7 years ago
Divide array traversing to std::thread::hardware_concurrency() threads. Use command line parameters to obtain thread concurrency flag.
Think through how to divide computation between cores in SimMatrix::DoSimStep() to avoid cache locality, stale times and all the other problems with multi threaded systems.
Interface for multithread join and fork functionality.
Separate function for non-threaded simulations.
Still needs some work - for example the encapsulation of threaded logic. Alternatively, the approach of hooking ThreadPool repository when it is ready might be a good idea - https://github.com/cavemanjaw/ThreadPool
There could be implemented mechanism for setting up and running multiple threads of simulations running in parallel.