summaryrefslogtreecommitdiff
path: root/sim.h
diff options
context:
space:
mode:
authorJohn Fultz <jfultz@wolfram.com>2019-03-11 11:02:41 -0500
committerJohn Fultz <jfultz@wolfram.com>2019-07-21 02:02:55 -0700
commitd30b4adb9646da26bace320a0abfaace6c05368e (patch)
treeed6c554017ca67146021aeb80d65295ed54cc434 /sim.h
parentbe8c5f0f7fd2a2607ce8bf5ae60830a4d45f8e74 (diff)
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.
Diffstat (limited to 'sim.h')
-rw-r--r--sim.h1
1 files changed, 1 insertions, 0 deletions
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