]> git.sesse.net Git - stockfish/blobdiff - src/thread.h
Rearrange structs to avoid internal padding
[stockfish] / src / thread.h
index 13121ca1175756ee4965f4af25e29dc339f7396b..100620313fcebc7e7f5f6161fe15b600b0a9929e 100644 (file)
@@ -37,8 +37,8 @@ struct SplitPoint {
   SplitPoint* parent;
   const Position* pos;
   Depth depth;
-  bool pvNode;
   Value beta;
+  int pvNode;
   int ply;
   int master;
   Move threatMove;
@@ -79,6 +79,7 @@ struct Thread {
   bool cutoff_occurred() const;
   bool is_available_to(int master) const;
 
+  SplitPoint splitPoints[MAX_ACTIVE_SPLIT_POINTS];
   MaterialInfoTable materialTable;
   PawnInfoTable pawnTable;
   int maxPly;
@@ -87,7 +88,6 @@ struct Thread {
   volatile ThreadState state;
   SplitPoint* volatile splitPoint;
   volatile int activeSplitPoints;
-  SplitPoint splitPoints[MAX_ACTIVE_SPLIT_POINTS];
 };
 
 
@@ -118,13 +118,13 @@ public:
   void split(Position& pos, SearchStack* ss, Value* alpha, const Value beta, Value* bestValue,
              Depth depth, Move threatMove, int moveCount, MovePicker* mp, bool pvNode);
 private:
+  Thread threads[MAX_THREADS];
   Lock mpLock;
   Depth minimumSplitDepth;
   int maxThreadsPerSplitPoint;
-  bool useSleepingThreads;
   int activeThreads;
+  bool useSleepingThreads;
   volatile bool allThreadsShouldExit;
-  Thread threads[MAX_THREADS];
 };
 
 extern ThreadsManager Threads;