17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-13 09:40:11 +01:00

perf(physics): the steps of the vehicle physics on many threads, in groups of vehicles which act on one another (performance.cpucores, 0: all cores)

This commit is contained in:
2026-10-23 19:56:36 +02:00
parent 2f96dfe767
commit 60667588b5
11 changed files with 403 additions and 4 deletions

View File

@@ -62,6 +62,9 @@ inline long Round(double const f)
double Random(double a, double b);
int Random(int min, int max);
// the engine Random() draws from in the calling thread, in place of Global.random_engine, or none for that one again. the threads
// of worker_pool have engines of their own: the one of the simulation can't be shared between threads
void set_thread_random_engine(std::mt19937 *Engine);
/// @author lxvia
/// @brief Returns a random seed from the system's entropy source, if available. Otherwise, falls back to a clock-based seed.