From 79b57dd4ca54bcb80a50c8fadadc7e64269fb756 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sun, 21 Feb 2010 16:10:19 +0100 Subject: [PATCH] Document struct SplitPoint fields constness No functional change. Signed-off-by: Marco Costalba --- src/thread.h | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/thread.h b/src/thread.h index 9c5344c2..3800928b 100644 --- a/src/thread.h +++ b/src/thread.h @@ -47,18 +47,24 @@ const int ACTIVE_SPLIT_POINTS_MAX = 8; //// struct SplitPoint { - SplitPoint *parent; + + // Const data after splitPoint has been setup + SplitPoint* parent; const Position* pos; - SearchStack sstack[MAX_THREADS][PLY_MAX_PLUS_2]; - SearchStack *parentSstack; - int ply; - Depth depth; - volatile Value alpha, beta, bestValue; - Value futilityValue; bool pvNode; - int master, slaves[MAX_THREADS]; + Depth depth; + Value beta, futilityValue; + int ply, master, slaves[MAX_THREADS]; + SearchStack sstack[MAX_THREADS][PLY_MAX_PLUS_2]; + + // Const pointers to shared data + MovePicker* mp; + SearchStack* parentSstack; + + // Shared data Lock lock; - MovePicker *mp; + volatile Value alpha; + volatile Value bestValue; volatile int moves; volatile int cpus; volatile bool stopRequest; @@ -77,7 +83,7 @@ enum ThreadState }; struct Thread { - SplitPoint *splitPoint; + SplitPoint* splitPoint; volatile int activeSplitPoints; uint64_t nodes; uint64_t betaCutOffs[2]; -- 2.39.2