From d30b4adb9646da26bace320a0abfaace6c05368e Mon Sep 17 00:00:00 2001 From: John Fultz Date: Mon, 11 Mar 2019 11:02:41 -0500 Subject: Move simulate code to a new static function. The code running the simulation is now disconnected from the Simulation class, with appropriate members being copied into a SimmedMoveConstants field (read-only, thread-safe) and a SimmedMoveMessage (the class for communicating per-sim data to and from external threads). The newly added static function, Simulate::simulateOnePosition(), should now be thread-safe and usable as a run function for a thread. --- sim.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sim.h') diff --git a/sim.h b/sim.h index 0b3a7fb..ff618ef 100644 --- a/sim.h +++ b/sim.h @@ -275,6 +275,7 @@ public: // simulate one iteration void simulate(int plies); + static void simulateOnePosition(SimmedMoveMessage &message, const SimmedMoveConstants &constants); // Incoporate the results of a single simulation into the // cumulative results -- cgit v1.2.3