mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-02 05:02:45 +01:00
75efb467db
Review of #574: - The sub-steps of one train and its exchange in them are helpers (train_substeps(), exchange_train()) taken by both the serial loop and the cluster job (exchange_cluster()), which gets one context struct (hose_exchange) by reference, so std::function keeps it in its small buffer. Picking the trains (hose_layout()) is its own function too. - The runner of the clusters gets the number of vehicles exchanged and wakes the pool only for at least 64 of them a thread; below that the clusters go one after another. The neighbours and facts take a thread for each 64 vehicles and stay in the main thread below 128. With performance.multithreading no both still go one after another. - The neighbours and facts moved out of update() into update_neighbours_and_facts() and take_facts(); the inner loop variable is side, no longer shadowing end. The vehicles outside the trains of lay_out_clusters() are gathered by outside_trains(). vehicle_facts::none is nowhere, the none of lay_out_clusters() no_cluster. - The test lambdas capture explicitly and the runner of the test takes its job as auto. Results unchanged: the clusters still work out the same sub-steps and take the trains in the same order.