From 1be72de77f77673aa71fbf157df785fc6635e0ca Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 11 Mar 2018 12:11:40 +0100 Subject: [PATCH 001/132] Included boost in SolveBoard, speed unchanged --- include/dll.h | 7 +- src/Init.cpp | 4 + src/Makefiles/Makefile_Visual | 1 + src/Makefiles/Makefile_Visual_boost | 155 ++++++++++++++++++ src/SolveBoard.cpp | 244 +++++++++++++++++++++------- 5 files changed, 352 insertions(+), 59 deletions(-) create mode 100644 src/Makefiles/Makefile_Visual_boost diff --git a/include/dll.h b/include/dll.h index f94da845..930d690a 100644 --- a/include/dll.h +++ b/include/dll.h @@ -351,7 +351,12 @@ struct DDSInfo // Currently 0 = none, 1 = DllMain, 2 = Unix-style int constructor; - // Currently 0 = none, 1 = Windows, 2 = OpenMP, 3 = GCD + // Currently + // 0 = none, + // 1 = Windows (native), + // 2 = OpenMP, + // 3 = GCD, + // 4 = Boost int threading; // The actual number of threads configured diff --git a/src/Init.cpp b/src/Init.cpp index a102c2d6..1befd9fc 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -667,6 +667,10 @@ void STDCALL GetDDSInfo(DDSInfo * info) info->threading = 0; sprintf(t, "%-12s %20s\n", "Threading", "None"); strcat(info->systemString, t); +#elif defined(DDS_THREADS_BOOST) + info->threading = 4; + sprintf(t, "%-12s %20s\n", "Threading", "Boost"); + strcat(info->systemString, t); #elif defined(_OPENMP) info->threading = 2; sprintf(t, "%-12s %20s\n", "Threading", "OpenMP"); diff --git a/src/Makefiles/Makefile_Visual b/src/Makefiles/Makefile_Visual index 8ee22fb9..1020c250 100644 --- a/src/Makefiles/Makefile_Visual +++ b/src/Makefiles/Makefile_Visual @@ -21,6 +21,7 @@ CC_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs WARN_FLAGS = \ /Wall \ /wd4127 \ + /wd4464 \ /wd4555 \ /wd4668 \ /wd4701 \ diff --git a/src/Makefiles/Makefile_Visual_boost b/src/Makefiles/Makefile_Visual_boost new file mode 100644 index 00000000..502823f2 --- /dev/null +++ b/src/Makefiles/Makefile_Visual_boost @@ -0,0 +1,155 @@ +# This the DDS Makefile for Windows and the Microsoft Visual C++ +# compiler. It does assume a Unix-like setup for some commands, +# but if you only want to call "make" with the default target, +# you should be OK. If not, see Makefile_Visual_Windows. + +# Unlike Makefile_Visual, this Makefile uses Boost for +# multi-threading. You can still set +# make DDS_THREADS=none + +BOOST32_PATH = \User\sheins\boost_1_66_0_x32 +BOOST32_LIB = $(BOOST32_PATH)\lib32-msvc-14.0 + +CC_BOOST_INCL = /I$(BOOST32_PATH) +CC_BOOST_LINK = /link /LIBPATH:$(BOOST32_LIB) + +# The "windres" and "cvtres" tools are used for putting version +# information into the DLL in a way that Windows can see. +# It is not mandatory, and if you don't have those tools, +# You can remove $(VFILE).obj in the target line below. + + +# If your Microsoft compiler is not called cl, change it here. +CC = cl +CC_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs + +# These flags are not turned on by default, but DDS should pass them. +# Turn them on below. +WARN_FLAGS = \ + /Wall \ + /wd4127 \ + /wd4464 \ + /wd4555 \ + /wd4668 \ + /wd4701 \ + /wd4710 \ + /wd4711 \ + /wd4820 \ + /wd4986 \ + /wd4987 \ + /wd4996 \ + /WX + +# Here you can turn on warnings and add /DSMALL_MEMORY_OPTION. +# CC_FULL_FLAGS = $(CC_FLAGS) +CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) + +LIB_FLAGS = $(CC_BOOST_LINK) + +DLLBASE = dds +DLL = $(DLLBASE).dll +DLIB = $(DLLBASE).lib +EXPORTER = Exports.def + +VFILE = ddsres + +SOURCE_FILES = \ + dds.cpp \ + ABsearch.cpp \ + ABstats.cpp \ + CalcTables.cpp \ + DealerPar.cpp \ + Init.cpp \ + LaterTricks.cpp \ + Moves.cpp \ + Par.cpp \ + PlayAnalyser.cpp \ + PBN.cpp \ + QuickTricks.cpp \ + Scheduler.cpp \ + SolveBoard.cpp \ + SolverIF.cpp \ + Stats.cpp \ + Timer.cpp \ + TransTable.cpp + +OBJ_FILES = $(subst .cpp,.obj,$(SOURCE_FILES)) $(VFILE).obj + +ifeq ($(DDS_THREADS),none) +DDS_THR = /DDDS_THREADS_SINGLE +else +DDS_THR = /DDDS_THREADS_BOOST +endif + + +vs: $(OBJ_FILES) + $(CC) $(CC_FULL_FLAGS) $(OBJ_FILES) $(EXPORTER) $(LIB_FLAGS) /DLL /out:$(DLL) + +%.obj: %.cpp + $(CC) $(CC_FULL_FLAGS) $(DDS_THR) $(CC_BOOST_INCL) /c $< + +$(DLLBASE).res: $(DLLBASE).rc + windres $(DLLBASE).rc $(DLLBASE).res + +$(VFILE).obj: $(DLLBASE).res + cvtres /MACHINE:X86 /OUT:$(VFILE).obj $(DLLBASE).res + +depend: + makedepend -Y -o.obj -- $(CC_FLAGS) -- $(SOURCE_FILES) + +clean: + rm -f $(OBJ_FILES) $(DLL) $(DLLBASE).{lib,exp,def,obj,res} + +install: + test -d ../test || mkdir ../test + test -d ../examples || mkdir ../examples + cp $(DLL) $(DLIB) ../test + cp $(DLL) $(DLIB) ../examples + +# DO NOT DELETE + +dds.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +dds.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h +ABsearch.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABsearch.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h +ABsearch.obj: QuickTricks.h LaterTricks.h ABsearch.h +ABstats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABstats.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +CalcTables.obj: dds.h debug.h ../include/portab.h TransTable.h +CalcTables.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +CalcTables.obj: Scheduler.h SolveBoard.h PBN.h +DealerPar.obj: dds.h debug.h ../include/portab.h TransTable.h +DealerPar.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h +Init.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Init.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h +Init.obj: ABsearch.h +LaterTricks.obj: dds.h debug.h ../include/portab.h TransTable.h +LaterTricks.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +LaterTricks.obj: Scheduler.h threadmem.h LaterTricks.h +Moves.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Moves.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h +Par.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Par.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +PlayAnalyser.obj: dds.h debug.h ../include/portab.h TransTable.h +PlayAnalyser.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +PlayAnalyser.obj: Scheduler.h threadmem.h SolverIF.h PBN.h +PBN.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +PBN.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h +QuickTricks.obj: dds.h debug.h ../include/portab.h TransTable.h +QuickTricks.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +QuickTricks.obj: Scheduler.h threadmem.h QuickTricks.h +Scheduler.obj: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h +Scheduler.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard.obj: Scheduler.h threadmem.h SolverIF.h SolveBoard.h PBN.h +SolverIF.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +SolverIF.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h +SolverIF.obj: threadmem.h ABsearch.h SolverIF.h +Stats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Stats.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +Timer.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Timer.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +TransTable.obj: dds.h debug.h ../include/portab.h TransTable.h +TransTable.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +TransTable.obj: Scheduler.h diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index b62c4e00..c88d824e 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -8,6 +8,24 @@ */ +// Disable some boost header warnings. +#ifdef DDS_THREADS_BOOST + #ifdef _WIN32 + #pragma warning(push) + #pragma warning(disable: 4061 4191 4365 4571 4619 4625 4626 5026 5027 5031) + #endif + + #include + using boost::thread; + + #ifdef _WIN32 + #pragma warning(pop) + #endif +#endif + +#include +using namespace std; + #include "dds.h" #include "threadmem.h" #include "SolverIF.h" @@ -29,28 +47,17 @@ #endif extern int noOfThreads; - -#if (defined(_WIN32) || defined(__CYGWIN__)) && \ - !defined(_OPENMP) && !defined(DDS_THREADS_SINGLE) -HANDLE solveAllEvents[MAXNOOFTHREADS]; +long chunk; paramType param; -LONG volatile threadIndex; -LONG volatile current; -long chunk; -DWORD CALLBACK SolveChunk (void *); -DWORD CALLBACK SolveChunkDDtable (void *); - -DWORD CALLBACK SolveChunk (void *) +void SolveChunkCommon( + const int thid) { futureTricks fut[MAXNOOFBOARDS]; - int thid; - - thid = InterlockedIncrement(&threadIndex); - int index; schedType st; + while (1) { st = scheduler.GetNumber(thid); @@ -90,22 +97,13 @@ DWORD CALLBACK SolveChunk (void *) param.error = res; } } - - if (SetEvent(solveAllEvents[thid]) == 0) - return 0; - - return 1; - } -DWORD CALLBACK SolveChunkDDtable (void *) +void SolveChunkDDtableCommon( + const int thid) { futureTricks fut[MAXNOOFBOARDS]; - int thid; - - thid = InterlockedIncrement(&threadIndex); - int index; schedType st; @@ -169,6 +167,26 @@ DWORD CALLBACK SolveChunkDDtable (void *) } END_THREAD_TIMER(thid); } +} + + +#if (defined(_WIN32) || defined(__CYGWIN__)) && \ + (!defined(_OPENMP)) && \ + !defined(DDS_THREADS_BOOST) && \ + !defined(DDS_THREADS_SINGLE) + +HANDLE solveAllEvents[MAXNOOFTHREADS]; +LONG volatile threadIndex; + +DWORD CALLBACK SolveChunk (void *); +DWORD CALLBACK SolveChunkDDtable (void *); + +DWORD CALLBACK SolveChunk (void *) +{ + int thid; + thid = InterlockedIncrement(&threadIndex); + + SolveChunkCommon(thid); if (SetEvent(solveAllEvents[thid]) == 0) return 0; @@ -177,48 +195,40 @@ DWORD CALLBACK SolveChunkDDtable (void *) } -int SolveAllBoardsN( - boards * bop, - solvedBoards * solvedp, - int chunkSize, - int source) // 0 solve, 1 calc +DWORD CALLBACK SolveChunkDDtable (void *) { - int k; - int res; - DWORD solveAllWaitResult; + int thid; + thid = InterlockedIncrement(&threadIndex); - current = 0; - threadIndex = -1; - chunk = chunkSize; - param.error = 0; + SolveChunkDDtableCommon(thid); - if (bop->noOfBoards > MAXNOOFBOARDS) - return RETURN_TOO_MANY_BOARDS; + if (SetEvent(solveAllEvents[thid]) == 0) + return 0; - for (k = 0; k < noOfThreads; k++) + return 1; +} + + +int SolveInitThreadsWindows() +{ + for (int k = 0; k < noOfThreads; k++) { solveAllEvents[k] = CreateEvent(NULL, FALSE, FALSE, 0); if (solveAllEvents[k] == 0) return RETURN_THREAD_CREATE; } + return RETURN_NO_FAULT; +} - param.bop = bop; - param.solvedp = solvedp; - param.noOfBoards = bop->noOfBoards; - - if (source == 0) - scheduler.Register(bop, SCHEDULER_SOLVE); - else - scheduler.Register(bop, SCHEDULER_CALC); - - for (k = 0; k < MAXNOOFBOARDS; k++) - solvedp->solvedBoard[k].cards = 0; - if (chunkSize != 1) +int SolveRunThreadsWindows( + const int chunkSize) +{ + if (chunkSize == 1) { - for (k = 0; k < noOfThreads; k++) + for (int k = 0; k < noOfThreads; k++) { - res = QueueUserWorkItem(SolveChunkDDtable, NULL, + int res = QueueUserWorkItem(SolveChunk, NULL, WT_EXECUTELONGFUNCTION); if (res != 1) return res; @@ -226,9 +236,9 @@ int SolveAllBoardsN( } else { - for (k = 0; k < noOfThreads; k++) + for (int k = 0; k < noOfThreads; k++) { - res = QueueUserWorkItem(SolveChunk, NULL, + int res = QueueUserWorkItem(SolveChunkDDtable, NULL, WT_EXECUTELONGFUNCTION); if (res != 1) return res; @@ -236,6 +246,7 @@ int SolveAllBoardsN( } START_BLOCK_TIMER; + DWORD solveAllWaitResult; solveAllWaitResult = WaitForMultipleObjects( static_cast(noOfThreads), solveAllEvents, TRUE, INFINITE); @@ -244,11 +255,127 @@ int SolveAllBoardsN( if (solveAllWaitResult != WAIT_OBJECT_0) return RETURN_THREAD_WAIT; - for (k = 0; k < noOfThreads; k++) + for (int k = 0; k < noOfThreads; k++) CloseHandle(solveAllEvents[k]); + return RETURN_NO_FAULT; +} + + +int SolveAllBoardsN( + boards * bop, + solvedBoards * solvedp, + int chunkSize, + int source) // 0 solve, 1 calc +{ + threadIndex = -1; + chunk = chunkSize; + param.error = 0; + + if (bop->noOfBoards > MAXNOOFBOARDS) + return RETURN_TOO_MANY_BOARDS; + + int retInit = SolveInitThreadsWindows(); + if (retInit != RETURN_NO_FAULT) + return retInit; + + param.bop = bop; + param.solvedp = solvedp; + param.noOfBoards = bop->noOfBoards; + + if (source == 0) + scheduler.Register(bop, SCHEDULER_SOLVE); + else + scheduler.Register(bop, SCHEDULER_CALC); + + for (int k = 0; k < MAXNOOFBOARDS; k++) + solvedp->solvedBoard[k].cards = 0; + + int retRun = SolveRunThreadsWindows(chunkSize); + if (retRun != RETURN_NO_FAULT) + return retRun; + /* Calculate number of solved boards. */ + solvedp->noOfBoards = param.noOfBoards; + + if (param.error == 0) + return 1; + else + return param.error; +} + +#elif (defined(DDS_THREADS_BOOST)) + +// TODO + +vector threads; + +int SolveInitThreadsBoost() +{ + threads.resize(static_cast(noOfThreads)); + return RETURN_NO_FAULT; +} + + +int SolveRunThreadsBoost( + const int chunkSize) +{ + const unsigned noth = static_cast(noOfThreads); + START_BLOCK_TIMER; + if (chunkSize == 1) + { + for (unsigned k = 0; k < noth; k++) + threads[k] = new thread(SolveChunkCommon, k); + } + else + { + for (unsigned k = 0; k < noth; k++) + threads[k] = new thread(SolveChunkDDtableCommon, k); + } + END_BLOCK_TIMER; + for (unsigned k = 0; k < noth; k++) + { + threads[k]->join(); + delete threads[k]; + } + return RETURN_NO_FAULT; +} + + +int SolveAllBoardsN( + boards * bop, + solvedBoards * solvedp, + int chunkSize, + int source) // 0 solve, 1 calc +{ + chunk = chunkSize; + param.error = 0; + + if (bop->noOfBoards > MAXNOOFBOARDS) + return RETURN_TOO_MANY_BOARDS; + + int retInit = SolveInitThreadsBoost(); + if (retInit != RETURN_NO_FAULT) + return retInit; + + param.bop = bop; + param.solvedp = solvedp; + param.noOfBoards = bop->noOfBoards; + + if (source == 0) + scheduler.Register(bop, SCHEDULER_SOLVE); + else + scheduler.Register(bop, SCHEDULER_CALC); + + for (int k = 0; k < MAXNOOFBOARDS; k++) + solvedp->solvedBoard[k].cards = 0; + + int retRun = SolveRunThreadsBoost(chunkSize); + if (retRun != RETURN_NO_FAULT) + return retRun; + + /* Calculate number of solved boards. */ solvedp->noOfBoards = param.noOfBoards; if (param.error == 0) @@ -257,6 +384,7 @@ int SolveAllBoardsN( return param.error; } + #elif (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) && !defined(_OPENMP) && !defined(DDS_THREADS_SINGLE) // This code for LLVM multi-threading on the Mac was kindly From 492587ef21cf344f5eb154749a2a0ef038d3c79a Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 11 Mar 2018 14:01:49 +0100 Subject: [PATCH 002/132] Cygwin OpenMP (or no multi-threading) works --- src/Makefiles/Makefile_cygwin | 6 +- src/SolveBoard.cpp | 288 ++++++++++++++++----------------- test/Makefiles/Makefile_Visual | 1 + 3 files changed, 139 insertions(+), 156 deletions(-) diff --git a/src/Makefiles/Makefile_cygwin b/src/Makefiles/Makefile_cygwin index e538a76b..921cf870 100644 --- a/src/Makefiles/Makefile_cygwin +++ b/src/Makefiles/Makefile_cygwin @@ -4,7 +4,7 @@ # target, you should be OK. # If you want to compile a single-threaded version, use -# make DDS_THREADS=none +# DDS_THREADS=none # The "windres" and "cvtres" tools are used for putting version # information into the DLL in a way that Windows can see. @@ -16,9 +16,9 @@ CC = g++ # Use this one to get Windows multi-threading -CC_FLAGS = -O3 -flto -mtune=generic -fno-use-linker-plugin +# CC_FLAGS = -O3 -flto -mtune=generic -fno-use-linker-plugin # Use this one to get OpenMP multi-threading -# CC_FLAGS = -O3 -flto -fopenmp -mtune=generic -fno-use-linker-plugin +CC_FLAGS = -O3 -flto -fopenmp -mtune=generic -fno-use-linker-plugin LD_FLAGS = \ -Wl,--subsystem,windows \ diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index c88d824e..bfa37d6a 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -10,7 +10,7 @@ // Disable some boost header warnings. #ifdef DDS_THREADS_BOOST - #ifdef _WIN32 + #if (defined(_WIN32) && !defined(__CYGWIN__)) #pragma warning(push) #pragma warning(disable: 4061 4191 4365 4571 4619 4625 4626 5026 5027 5031) #endif @@ -26,6 +26,7 @@ #include using namespace std; + #include "dds.h" #include "threadmem.h" #include "SolverIF.h" @@ -34,6 +35,7 @@ using namespace std; #include "PBN.h" #include "debug.h" + #ifdef DDS_SCHEDULER #define START_BLOCK_TIMER scheduler.StartBlockTimer() #define END_BLOCK_TIMER scheduler.EndBlockTimer() @@ -51,6 +53,10 @@ long chunk; paramType param; +void SolveChunkCommon(const int thid); +void SolveChunkDDtableCommon(const int thid); + + void SolveChunkCommon( const int thid) { @@ -169,17 +175,86 @@ void SolveChunkDDtableCommon( } } +#if (defined(DDS_THREADS_SINGLE)) + +int SolveInitThreadsNone(); +int SolveRunThreadsNone(const int chunkSize); + + +int SolveInitThreadsNone() +{ + return RETURN_NO_FAULT; +} + + +int SolveRunThreadsNone( + const int chunkSize) +{ + START_BLOCK_TIMER; + + if (chunkSize == 1) + SolveChunkCommon(0); + else + SolveChunkDDtableCommon(0); + END_BLOCK_TIMER; + + return RETURN_NO_FAULT; +} + -#if (defined(_WIN32) || defined(__CYGWIN__)) && \ +int SolveAllBoardsN( + boards * bop, + solvedBoards * solvedp, + int chunkSize, + int source) // 0 solve, 1 calc +{ + chunk = chunkSize; + param.error = 0; + + if (bop->noOfBoards > MAXNOOFBOARDS) + return RETURN_TOO_MANY_BOARDS; + + int retInit = SolveInitThreadsNone(); + if (retInit != RETURN_NO_FAULT) + return retInit; + + param.bop = bop; + param.solvedp = solvedp; + param.noOfBoards = bop->noOfBoards; + + if (source == 0) + scheduler.Register(bop, SCHEDULER_SOLVE); + else + scheduler.Register(bop, SCHEDULER_CALC); + + for (int k = 0; k < MAXNOOFBOARDS; k++) + solvedp->solvedBoard[k].cards = 0; + + int retRun = SolveRunThreadsNone(chunkSize); + if (retRun != RETURN_NO_FAULT) + return retRun; + + /* Calculate number of solved boards. */ + solvedp->noOfBoards = param.noOfBoards; + + if (param.error == 0) + return 1; + else + return param.error; +} + + +#elif (defined(_WIN32) || defined(__CYGWIN__)) && \ (!defined(_OPENMP)) && \ - !defined(DDS_THREADS_BOOST) && \ - !defined(DDS_THREADS_SINGLE) + !defined(DDS_THREADS_BOOST) HANDLE solveAllEvents[MAXNOOFTHREADS]; LONG volatile threadIndex; DWORD CALLBACK SolveChunk (void *); DWORD CALLBACK SolveChunkDDtable (void *); +int SolveInitThreadsWindows(); +int SolveRunThreadsWindows(const int chunkSize); DWORD CALLBACK SolveChunk (void *) { @@ -554,186 +629,93 @@ int SolveAllBoardsN( return 1; } -#else +#elif (defined(_OPENMP)) -int SolveAllBoardsN( - boards * bop, - solvedBoards * solvedp, - int chunkSize, - int source) // 0 solve, 1 calc -{ - int k, i, res, chunk, fail; - futureTricks fut[MAXNOOFBOARDS]; +int SolveInitThreadsOpenMP(); +int SolveRunThreadsOpenMP(const int chunkSize); - chunk = chunkSize; - fail = 1; - if (bop->noOfBoards > MAXNOOFBOARDS) - return RETURN_TOO_MANY_BOARDS; - - for (i = 0; i < MAXNOOFBOARDS; i++) - solvedp->solvedBoard[i].cards = 0; - -#if defined (_OPENMP) && !defined(DDS_THREADS_SINGLE) +int SolveInitThreadsOpenMP() +{ + /* Added after suggestion by Dirk Willecke. */ if (omp_get_dynamic()) omp_set_dynamic(0); + omp_set_num_threads(noOfThreads); - /* Added after suggestion by Dirk Willecke. */ -#elif defined (_OPENMP) - omp_set_num_threads(1); -#endif - int index, thid, hint; - schedType st; + return RETURN_NO_FAULT; +} - START_BLOCK_TIMER; - if (source == 0) - scheduler.Register(bop, SCHEDULER_SOLVE); - else - scheduler.Register(bop, SCHEDULER_CALC); +int SolveRunThreadsOpenMP( + const int chunkSize) +{ + int thid; + START_BLOCK_TIMER; if (chunkSize == 1) { - #pragma omp parallel default(none) shared(scheduler, fut, bop, solvedp, chunk, fail) private(st, index, thid, res) + #pragma omp parallel default(none) shared(scheduler) private(thid) { #pragma omp while schedule(dynamic, chunk) - - while (1) - { -#if defined (_OPENMP) && !defined(DDS_THREADS_SINGLE) - thid = omp_get_thread_num(); -#else - thid = 0; -#endif - - st = scheduler.GetNumber(thid); - index = st.number; - if (index == -1) - break; - - // This is not a perfect repeat detector, as the hands in - // a group might have declarers N, S, N, N. Then the second - // N would not reuse the first N. However, must reuses are - // reasonably adjacent, and this is just an optimization anyway. - - if (st.repeatOf != -1 && - (bop->deals[index ].first == - bop->deals[st.repeatOf].first)) - { - START_THREAD_TIMER(thid); - solvedp->solvedBoard[index] = fut[ st.repeatOf ]; - END_THREAD_TIMER(thid); - continue; - } - else - { - START_THREAD_TIMER(thid); - res = SolveBoard( - bop->deals[index], - bop->target[index], - bop->solutions[index], - bop->mode[index], - &fut[index], - thid); - END_THREAD_TIMER(thid); - - if (res == 1) - solvedp->solvedBoard[index] = fut[index]; - else - fail = res; - - } - } + thid = omp_get_thread_num(); + SolveChunkCommon(thid); } } else { - #pragma omp parallel default(none) shared(scheduler, bop, fut, solvedp, chunk, fail) private(st, index, thid, k, hint, res) + #pragma omp parallel default(none) shared(scheduler) private(thid) { #pragma omp while schedule(dynamic, chunk) + thid = omp_get_thread_num(); + SolveChunkDDtableCommon(thid); + } + } + END_BLOCK_TIMER; - while (1) - { -#if defined (_OPENMP) && !defined(DDS_THREADS_SINGLE) - thid = omp_get_thread_num(); -#else - thid = 0; -#endif - - st = scheduler.GetNumber(thid); - index = st.number; - if (index == -1) - break; - - if (st.repeatOf != -1) - { - START_THREAD_TIMER(thid); - for (k = 0; k < chunk; k++) - { - bop->deals[index].first = k; - - solvedp->solvedBoard[index].score[k] = - solvedp->solvedBoard[ st.repeatOf ].score[k]; - } - END_THREAD_TIMER(thid); - continue; - } - - bop->deals[index].first = 0; - - START_THREAD_TIMER(thid); - res = SolveBoard( - bop->deals[index], - bop->target[index], - bop->solutions[index], - bop->mode[index], - &fut[index], - thid); - - // SH: I'm making a terrible use of the fut structure here. + return RETURN_NO_FAULT; +} - if (res == 1) - solvedp->solvedBoard[index].score[0] = fut[index].score[0]; - else - fail = res; - for (k = 1; k < chunk; k++) - { - hint = (k == 2 ? fut[index].score[0] : - 13 - fut[index].score[0]); +int SolveAllBoardsN( + boards * bop, + solvedBoards * solvedp, + int chunkSize, + int source) // 0 solve, 1 calc +{ + chunk = chunkSize; + param.error = 0; - bop->deals[index].first = k; // Next declarer + if (bop->noOfBoards > MAXNOOFBOARDS) + return RETURN_TOO_MANY_BOARDS; - res = SolveSameBoard( - bop->deals[index], - &fut[index], - hint, - thid); + int retInit = SolveInitThreadsOpenMP(); + if (retInit != RETURN_NO_FAULT) + return retInit; - if (res == 1) - solvedp->solvedBoard[index].score[k] = - fut[index].score[0]; - else - fail = res; - } - END_THREAD_TIMER(thid); - } - } + param.bop = bop; + param.solvedp = solvedp; + param.noOfBoards = bop->noOfBoards; - } + if (source == 0) + scheduler.Register(bop, SCHEDULER_SOLVE); + else + scheduler.Register(bop, SCHEDULER_CALC); - END_BLOCK_TIMER; + for (int k = 0; k < MAXNOOFBOARDS; k++) + solvedp->solvedBoard[k].cards = 0; - if (fail != 1) - return fail; + int retRun = SolveRunThreadsOpenMP(chunkSize); + if (retRun != RETURN_NO_FAULT) + return retRun; - solvedp->noOfBoards = 0; - for (i = 0; i < MAXNOOFBOARDS; i++) - if (solvedp->solvedBoard[i].cards != 0) - solvedp->noOfBoards++; + /* Calculate number of solved boards. */ + solvedp->noOfBoards = param.noOfBoards; - return 1; + if (param.error == 0) + return 1; + else + return param.error; } #endif diff --git a/test/Makefiles/Makefile_Visual b/test/Makefiles/Makefile_Visual index 06a692d1..872a8cef 100644 --- a/test/Makefiles/Makefile_Visual +++ b/test/Makefiles/Makefile_Visual @@ -28,6 +28,7 @@ WARN_FLAGS = \ /wd4555 \ /wd4668 \ /wd4701 \ + /wd4710 \ /wd4711 \ /wd4820 \ /wd4986 \ From 91829de8a06356032b96fb2c67917ac3b2a17c2b Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 11 Mar 2018 16:13:47 +0100 Subject: [PATCH 003/132] Split out SolveBoard. Works: CL WinAPI/Boost/none, Cygwin g++ OpenMP/Boost --- src/Makefiles/Makefile_Visual | 24 +- src/Makefiles/Makefile_Visual_Windows | 27 ++ src/Makefiles/Makefile_Visual_boost | 24 +- src/Makefiles/Makefile_cygwin | 24 +- src/Makefiles/Makefile_cygwin_boost | 194 +++++++++ src/SolveBoard.cpp | 563 ++------------------------ src/SolveBoard.h | 21 + src/SolveBoard_GCD.cpp | 63 +++ src/SolveBoard_GCD.h | 18 + src/SolveBoard_OpenMP.cpp | 63 +++ src/SolveBoard_OpenMP.h | 18 + src/SolveBoard_WinAPI.cpp | 117 ++++++ src/SolveBoard_WinAPI.h | 18 + src/SolveBoard_basic.cpp | 35 ++ src/SolveBoard_basic.h | 18 + src/SolveBoard_boost.cpp | 79 ++++ src/SolveBoard_boost.h | 18 + test/Makefiles/Makefile_Visual | 1 + 18 files changed, 785 insertions(+), 540 deletions(-) create mode 100644 src/Makefiles/Makefile_cygwin_boost create mode 100644 src/SolveBoard_GCD.cpp create mode 100644 src/SolveBoard_GCD.h create mode 100644 src/SolveBoard_OpenMP.cpp create mode 100644 src/SolveBoard_OpenMP.h create mode 100644 src/SolveBoard_WinAPI.cpp create mode 100644 src/SolveBoard_WinAPI.h create mode 100644 src/SolveBoard_basic.cpp create mode 100644 src/SolveBoard_basic.h create mode 100644 src/SolveBoard_boost.cpp create mode 100644 src/SolveBoard_boost.h diff --git a/src/Makefiles/Makefile_Visual b/src/Makefiles/Makefile_Visual index 1020c250..11d20ae5 100644 --- a/src/Makefiles/Makefile_Visual +++ b/src/Makefiles/Makefile_Visual @@ -4,7 +4,7 @@ # you should be OK. # If you want to compile a single-threaded version, use -# make DDS_THREADS=none +# DDS_THREADS=none # The "windres" and "cvtres" tools are used for putting version # information into the DLL in a way that Windows can see. @@ -61,6 +61,11 @@ SOURCE_FILES = \ QuickTricks.cpp \ Scheduler.cpp \ SolveBoard.cpp \ + SolveBoard_basic.cpp \ + SolveBoard_boost.cpp \ + SolveBoard_GCD.cpp \ + SolveBoard_OpenMP.cpp \ + SolveBoard_WinAPI.cpp \ SolverIF.cpp \ Stats.cpp \ Timer.cpp \ @@ -136,6 +141,23 @@ Scheduler.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h SolveBoard.obj: dds.h debug.h ../include/portab.h TransTable.h SolveBoard.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h SolveBoard.obj: Scheduler.h threadmem.h SolverIF.h SolveBoard.h PBN.h +SolveBoard.obj: SolveBoard_basic.h SolveBoard_boost.h SolveBoard_GCD.h +SolveBoard.obj: SolveBoard_OpenMP.h SolveBoard_WinAPI.h +SolveBoard_basic.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_basic.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_basic.obj: Scheduler.h SolveBoard.h SolveBoard_basic.h +SolveBoard_boost.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_boost.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_boost.obj: Scheduler.h SolveBoard.h SolveBoard_boost.h +SolveBoard_GCD.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_GCD.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_GCD.obj: Scheduler.h SolveBoard.h SolveBoard_GCD.h +SolveBoard_OpenMP.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_OpenMP.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_OpenMP.obj: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h +SolveBoard_WinAPI.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_WinAPI.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_WinAPI.obj: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h SolverIF.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h SolverIF.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h SolverIF.obj: threadmem.h ABsearch.h SolverIF.h diff --git a/src/Makefiles/Makefile_Visual_Windows b/src/Makefiles/Makefile_Visual_Windows index 10fa8095..02ddc708 100644 --- a/src/Makefiles/Makefile_Visual_Windows +++ b/src/Makefiles/Makefile_Visual_Windows @@ -60,6 +60,11 @@ SOURCE_FILES = \ QuickTricks.cpp \ Scheduler.cpp \ SolveBoard.cpp \ + SolveBoard_basic.cpp \ + SolveBoard_boost.cpp \ + SolveBoard_GCD.cpp \ + SolveBoard_OpenMP.cpp \ + SolveBoard_WinAPI.cpp \ SolverIF.cpp \ Stats.cpp \ Timer.cpp \ @@ -80,6 +85,11 @@ OBJ_FILES = \ QuickTricks.obj \ Scheduler.obj \ SolveBoard.obj \ + SolveBoard_basic.obj \ + SolveBoard_boost.obj \ + SolveBoard_GCD.obj \ + SolveBoard_OpenMP.obj \ + SolveBoard_WinAPI.obj \ SolverIF.obj \ Stats.obj \ Timer.obj \ @@ -142,6 +152,23 @@ Scheduler.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h SolveBoard.obj: dds.h debug.h ../include/portab.h TransTable.h SolveBoard.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h SolveBoard.obj: Scheduler.h threadmem.h SolverIF.h SolveBoard.h PBN.h +SolveBoard.obj: SolveBoard_basic.h SolveBoard_boost.h SolveBoard_GCD.h +SolveBoard.obj: SolveBoard_OpenMP.h SolveBoard_WinAPI.h +SolveBoard_basic.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_basic.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_basic.obj: Scheduler.h SolveBoard.h SolveBoard_basic.h +SolveBoard_boost.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_boost.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_boost.obj: Scheduler.h SolveBoard.h SolveBoard_boost.h +SolveBoard_GCD.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_GCD.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_GCD.obj: Scheduler.h SolveBoard.h SolveBoard_GCD.h +SolveBoard_OpenMP.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_OpenMP.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_OpenMP.obj: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h +SolveBoard_WinAPI.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_WinAPI.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_WinAPI.obj: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h SolverIF.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h SolverIF.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h SolverIF.obj: threadmem.h ABsearch.h SolverIF.h diff --git a/src/Makefiles/Makefile_Visual_boost b/src/Makefiles/Makefile_Visual_boost index 502823f2..e502c721 100644 --- a/src/Makefiles/Makefile_Visual_boost +++ b/src/Makefiles/Makefile_Visual_boost @@ -5,7 +5,7 @@ # Unlike Makefile_Visual, this Makefile uses Boost for # multi-threading. You can still set -# make DDS_THREADS=none +# DDS_THREADS=none BOOST32_PATH = \User\sheins\boost_1_66_0_x32 BOOST32_LIB = $(BOOST32_PATH)\lib32-msvc-14.0 @@ -68,6 +68,11 @@ SOURCE_FILES = \ QuickTricks.cpp \ Scheduler.cpp \ SolveBoard.cpp \ + SolveBoard_basic.cpp \ + SolveBoard_boost.cpp \ + SolveBoard_GCD.cpp \ + SolveBoard_OpenMP.cpp \ + SolveBoard_WinAPI.cpp \ SolverIF.cpp \ Stats.cpp \ Timer.cpp \ @@ -143,6 +148,23 @@ Scheduler.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h SolveBoard.obj: dds.h debug.h ../include/portab.h TransTable.h SolveBoard.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h SolveBoard.obj: Scheduler.h threadmem.h SolverIF.h SolveBoard.h PBN.h +SolveBoard.obj: SolveBoard_basic.h SolveBoard_boost.h SolveBoard_GCD.h +SolveBoard.obj: SolveBoard_OpenMP.h SolveBoard_WinAPI.h +SolveBoard_basic.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_basic.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_basic.obj: Scheduler.h SolveBoard.h SolveBoard_basic.h +SolveBoard_boost.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_boost.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_boost.obj: Scheduler.h SolveBoard.h SolveBoard_boost.h +SolveBoard_GCD.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_GCD.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_GCD.obj: Scheduler.h SolveBoard.h SolveBoard_GCD.h +SolveBoard_OpenMP.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_OpenMP.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_OpenMP.obj: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h +SolveBoard_WinAPI.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_WinAPI.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_WinAPI.obj: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h SolverIF.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h SolverIF.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h SolverIF.obj: threadmem.h ABsearch.h SolverIF.h diff --git a/src/Makefiles/Makefile_cygwin b/src/Makefiles/Makefile_cygwin index 921cf870..a9fdcece 100644 --- a/src/Makefiles/Makefile_cygwin +++ b/src/Makefiles/Makefile_cygwin @@ -83,6 +83,11 @@ SOURCE_FILES = \ QuickTricks.cpp \ Scheduler.cpp \ SolveBoard.cpp \ + SolveBoard_basic.cpp \ + SolveBoard_boost.cpp \ + SolveBoard_GCD.cpp \ + SolveBoard_OpenMP.cpp \ + SolveBoard_WinAPI.cpp \ SolverIF.cpp \ Stats.cpp \ Timer.cpp \ @@ -158,7 +163,24 @@ Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -SolveBoard.o: SolverIF.h SolveBoard.h PBN.h +SolveBoard.o: SolverIF.h SolveBoard.h PBN.h SolveBoard_basic.h +SolveBoard.o: SolveBoard_boost.h SolveBoard_GCD.h SolveBoard_OpenMP.h +SolveBoard.o: SolveBoard_WinAPI.h +SolveBoard_basic.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_basic.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_basic.o: Scheduler.h SolveBoard.h SolveBoard_basic.h +SolveBoard_boost.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_boost.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_boost.o: Scheduler.h SolveBoard.h SolveBoard_boost.h +SolveBoard_GCD.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_GCD.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_GCD.o: Scheduler.h SolveBoard.h SolveBoard_GCD.h +SolveBoard_OpenMP.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_OpenMP.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_OpenMP.o: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h +SolveBoard_WinAPI.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_WinAPI.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_WinAPI.o: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h SolverIF.o: ABsearch.h SolverIF.h diff --git a/src/Makefiles/Makefile_cygwin_boost b/src/Makefiles/Makefile_cygwin_boost new file mode 100644 index 00000000..57a682cb --- /dev/null +++ b/src/Makefiles/Makefile_cygwin_boost @@ -0,0 +1,194 @@ +# This the DDS Makefile for Cygwin under Windows and the +# GNU g++ compiler, using Boost for multi-threading. +# It does assume a Unix-like setup for some commands, but if you +# only want to call "make" with the default target, you should be OK. + +# If you want to compile a single-threaded version, use +# DDS_THREADS=none + +# BOOST32_PATH = /cygdrive/c/User/sheins/boost_1_66_0_unix +# BOOST32_LIB = $(BOOST32_PATH)\lib32-msvc-14.0 + +# The "windres" and "cvtres" tools are used for putting version +# information into the DLL in a way that Windows can see. +# It is not mandatory, and if you don't have those tools, +# You can remove $(VFILE).obj in the target line below. + + +# If your compiler name is not given here, change it. +CC = g++ + +CC_FLAGS = -O3 -flto -mtune=generic -fno-use-linker-plugin + +LD_FLAGS = \ + -Wl,--subsystem,windows \ + -Wl,--output-def,$(DLLBASE).def \ + -Wl,--dynamicbase \ + -Wl,--nxcompat \ + -Wl,--no-seh \ + -Wl,--enable-stdcall-fixup \ + -lboost_system \ + -lboost_thread + +# These flags are not turned on be default, but DDS should pass them. +# Turn them on below. +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Wformat=2 \ + -Winit-self \ + -Wlogical-op \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wnoexcept \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wredundant-decls \ + -Wsign-promo \ + -Wstrict-null-sentinel \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long + +# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION +# CC_FULL_FLAGS = $(CC_FLAGS) +CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) + +LIB_FLAGS = -shared + +DLLBASE = dds +DLL = $(DLLBASE).dll +EXPORTER = Exports.def + +VFILE = ddsres +WINDRES_FLAG = + +SOURCE_FILES = \ + dds.cpp \ + ABsearch.cpp \ + ABstats.cpp \ + CalcTables.cpp \ + DealerPar.cpp \ + Init.cpp \ + LaterTricks.cpp \ + Moves.cpp \ + Par.cpp \ + PlayAnalyser.cpp \ + PBN.cpp \ + QuickTricks.cpp \ + Scheduler.cpp \ + SolveBoard.cpp \ + SolveBoard_basic.cpp \ + SolveBoard_boost.cpp \ + SolveBoard_GCD.cpp \ + SolveBoard_OpenMP.cpp \ + SolveBoard_WinAPI.cpp \ + SolverIF.cpp \ + Stats.cpp \ + Timer.cpp \ + TransTable.cpp + +O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o + +ifeq ($(DDS_THREADS),none) +DDS_THR = -DDDS_THREADS_SINGLE +else +DDS_THR = -DDDS_THREADS_BOOST +endif + + +cygwin: $(O_FILES) + $(CC) $(LIB_FLAGS) $(CC_FULL_FLAGS) $(O_FILES) $(LD_FLAGS) $(EXPORTER) -o $(DLL) + +%.o: %.cpp + $(CC) $(CC_FULL_FLAGS) $(DDS_THR) -c $< + +$(DLLBASE).res: $(DLLBASE).rc + windres $(DLLBASE).rc $(DLLBASE).res + +$(VFILE).o: $(DLLBASE).rc + windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o + +depend: + makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) + +clean: + rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} + +install: + test -d ../test || mkdir ../test + test -d ../examples || mkdir ../examples + cp $(DLL) $(DLLBASE).def ../test + cp $(DLL) $(DLLBASE).def ../examples + + +# DO NOT DELETE + +dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +dds.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h +ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABsearch.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h +ABsearch.o: QuickTricks.h LaterTricks.h ABsearch.h +ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABstats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +CalcTables.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h +CalcTables.o: PBN.h +DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +DealerPar.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Init.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h +Init.o: ABsearch.h +LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h +LaterTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h +LaterTricks.o: threadmem.h LaterTricks.h +Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Moves.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h +Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Par.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h +PlayAnalyser.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +PlayAnalyser.o: Scheduler.h threadmem.h SolverIF.h PBN.h +PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +PBN.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h +QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h +QuickTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h +QuickTricks.o: threadmem.h QuickTricks.h +Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h +Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h +SolveBoard.o: SolverIF.h SolveBoard.h PBN.h SolveBoard_basic.h +SolveBoard.o: SolveBoard_boost.h SolveBoard_GCD.h SolveBoard_OpenMP.h +SolveBoard.o: SolveBoard_WinAPI.h +SolveBoard_basic.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_basic.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_basic.o: Scheduler.h SolveBoard.h SolveBoard_basic.h +SolveBoard_boost.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_boost.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_boost.o: Scheduler.h SolveBoard.h SolveBoard_boost.h +SolveBoard_GCD.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_GCD.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_GCD.o: Scheduler.h SolveBoard.h SolveBoard_GCD.h +SolveBoard_OpenMP.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_OpenMP.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_OpenMP.o: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h +SolveBoard_WinAPI.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_WinAPI.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_WinAPI.o: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h +SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h +SolverIF.o: ABsearch.h SolverIF.h +Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +TransTable.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index bfa37d6a..be97dad1 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -8,25 +8,6 @@ */ -// Disable some boost header warnings. -#ifdef DDS_THREADS_BOOST - #if (defined(_WIN32) && !defined(__CYGWIN__)) - #pragma warning(push) - #pragma warning(disable: 4061 4191 4365 4571 4619 4625 4626 5026 5027 5031) - #endif - - #include - using boost::thread; - - #ifdef _WIN32 - #pragma warning(pop) - #endif -#endif - -#include -using namespace std; - - #include "dds.h" #include "threadmem.h" #include "SolverIF.h" @@ -35,26 +16,37 @@ using namespace std; #include "PBN.h" #include "debug.h" +#include "SolveBoard_basic.h" +#include "SolveBoard_boost.h" +#include "SolveBoard_GCD.h" +#include "SolveBoard_OpenMP.h" +#include "SolveBoard_WinAPI.h" -#ifdef DDS_SCHEDULER - #define START_BLOCK_TIMER scheduler.StartBlockTimer() - #define END_BLOCK_TIMER scheduler.EndBlockTimer() - #define START_THREAD_TIMER(a) scheduler.StartThreadTimer(a) - #define END_THREAD_TIMER(a) scheduler.EndThreadTimer(a) -#else - #define START_BLOCK_TIMER 1 - #define END_BLOCK_TIMER 1 - #define START_THREAD_TIMER(a) 1 - #define END_THREAD_TIMER(a) 1 -#endif extern int noOfThreads; long chunk; paramType param; -void SolveChunkCommon(const int thid); -void SolveChunkDDtableCommon(const int thid); +#if (defined(DDS_THREADS_SINGLE)) + auto initPtr = SolveInitThreadsNone; + auto runPtr = SolveRunThreadsNone; +#elif (defined(DDS_THREADS_BOOST)) + auto initPtr = SolveInitThreadsBoost; + auto runPtr = SolveRunThreadsBoost; +#elif (defined(_OPENMP)) + auto initPtr = SolveInitThreadsOpenMP; + auto runPtr = SolveRunThreadsOpenMP; +#elif (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) + auto initPtr = SolveInitThreadsGCD; + auto runPtr = SolveRunThreadsGCD; +#elif (defined(_WIN32) || defined(__CYGWIN__)) + auto initPtr = SolveInitThreadsWinAPI; + auto runPtr = SolveRunThreadsWinAPI; +#else + auto initPtr = nullptr; + auto runPtr = nullptr; +#endif void SolveChunkCommon( @@ -175,167 +167,6 @@ void SolveChunkDDtableCommon( } } -#if (defined(DDS_THREADS_SINGLE)) - -int SolveInitThreadsNone(); -int SolveRunThreadsNone(const int chunkSize); - - -int SolveInitThreadsNone() -{ - return RETURN_NO_FAULT; -} - - -int SolveRunThreadsNone( - const int chunkSize) -{ - START_BLOCK_TIMER; - - if (chunkSize == 1) - SolveChunkCommon(0); - else - SolveChunkDDtableCommon(0); - END_BLOCK_TIMER; - - return RETURN_NO_FAULT; -} - - -int SolveAllBoardsN( - boards * bop, - solvedBoards * solvedp, - int chunkSize, - int source) // 0 solve, 1 calc -{ - chunk = chunkSize; - param.error = 0; - - if (bop->noOfBoards > MAXNOOFBOARDS) - return RETURN_TOO_MANY_BOARDS; - - int retInit = SolveInitThreadsNone(); - if (retInit != RETURN_NO_FAULT) - return retInit; - - param.bop = bop; - param.solvedp = solvedp; - param.noOfBoards = bop->noOfBoards; - - if (source == 0) - scheduler.Register(bop, SCHEDULER_SOLVE); - else - scheduler.Register(bop, SCHEDULER_CALC); - - for (int k = 0; k < MAXNOOFBOARDS; k++) - solvedp->solvedBoard[k].cards = 0; - - int retRun = SolveRunThreadsNone(chunkSize); - if (retRun != RETURN_NO_FAULT) - return retRun; - - /* Calculate number of solved boards. */ - solvedp->noOfBoards = param.noOfBoards; - - if (param.error == 0) - return 1; - else - return param.error; -} - - -#elif (defined(_WIN32) || defined(__CYGWIN__)) && \ - (!defined(_OPENMP)) && \ - !defined(DDS_THREADS_BOOST) - -HANDLE solveAllEvents[MAXNOOFTHREADS]; -LONG volatile threadIndex; - -DWORD CALLBACK SolveChunk (void *); -DWORD CALLBACK SolveChunkDDtable (void *); -int SolveInitThreadsWindows(); -int SolveRunThreadsWindows(const int chunkSize); - -DWORD CALLBACK SolveChunk (void *) -{ - int thid; - thid = InterlockedIncrement(&threadIndex); - - SolveChunkCommon(thid); - - if (SetEvent(solveAllEvents[thid]) == 0) - return 0; - - return 1; -} - - -DWORD CALLBACK SolveChunkDDtable (void *) -{ - int thid; - thid = InterlockedIncrement(&threadIndex); - - SolveChunkDDtableCommon(thid); - - if (SetEvent(solveAllEvents[thid]) == 0) - return 0; - - return 1; -} - - -int SolveInitThreadsWindows() -{ - for (int k = 0; k < noOfThreads; k++) - { - solveAllEvents[k] = CreateEvent(NULL, FALSE, FALSE, 0); - if (solveAllEvents[k] == 0) - return RETURN_THREAD_CREATE; - } - return RETURN_NO_FAULT; -} - - -int SolveRunThreadsWindows( - const int chunkSize) -{ - if (chunkSize == 1) - { - for (int k = 0; k < noOfThreads; k++) - { - int res = QueueUserWorkItem(SolveChunk, NULL, - WT_EXECUTELONGFUNCTION); - if (res != 1) - return res; - } - } - else - { - for (int k = 0; k < noOfThreads; k++) - { - int res = QueueUserWorkItem(SolveChunkDDtable, NULL, - WT_EXECUTELONGFUNCTION); - if (res != 1) - return res; - } - } - - START_BLOCK_TIMER; - DWORD solveAllWaitResult; - solveAllWaitResult = WaitForMultipleObjects( - static_cast(noOfThreads), - solveAllEvents, TRUE, INFINITE); - END_BLOCK_TIMER; - - if (solveAllWaitResult != WAIT_OBJECT_0) - return RETURN_THREAD_WAIT; - - for (int k = 0; k < noOfThreads; k++) - CloseHandle(solveAllEvents[k]); - - return RETURN_NO_FAULT; -} - int SolveAllBoardsN( boards * bop, @@ -343,14 +174,13 @@ int SolveAllBoardsN( int chunkSize, int source) // 0 solve, 1 calc { - threadIndex = -1; chunk = chunkSize; param.error = 0; if (bop->noOfBoards > MAXNOOFBOARDS) return RETURN_TOO_MANY_BOARDS; - int retInit = SolveInitThreadsWindows(); + int retInit = (* initPtr)(); if (retInit != RETURN_NO_FAULT) return retInit; @@ -366,7 +196,7 @@ int SolveAllBoardsN( for (int k = 0; k < MAXNOOFBOARDS; k++) solvedp->solvedBoard[k].cards = 0; - int retRun = SolveRunThreadsWindows(chunkSize); + int retRun = (* runPtr)(chunkSize); if (retRun != RETURN_NO_FAULT) return retRun; @@ -379,347 +209,6 @@ int SolveAllBoardsN( return param.error; } -#elif (defined(DDS_THREADS_BOOST)) - -// TODO - -vector threads; - -int SolveInitThreadsBoost() -{ - threads.resize(static_cast(noOfThreads)); - return RETURN_NO_FAULT; -} - - -int SolveRunThreadsBoost( - const int chunkSize) -{ - const unsigned noth = static_cast(noOfThreads); - START_BLOCK_TIMER; - if (chunkSize == 1) - { - for (unsigned k = 0; k < noth; k++) - threads[k] = new thread(SolveChunkCommon, k); - } - else - { - for (unsigned k = 0; k < noth; k++) - threads[k] = new thread(SolveChunkDDtableCommon, k); - } - END_BLOCK_TIMER; - - for (unsigned k = 0; k < noth; k++) - { - threads[k]->join(); - delete threads[k]; - } - return RETURN_NO_FAULT; -} - - -int SolveAllBoardsN( - boards * bop, - solvedBoards * solvedp, - int chunkSize, - int source) // 0 solve, 1 calc -{ - chunk = chunkSize; - param.error = 0; - - if (bop->noOfBoards > MAXNOOFBOARDS) - return RETURN_TOO_MANY_BOARDS; - - int retInit = SolveInitThreadsBoost(); - if (retInit != RETURN_NO_FAULT) - return retInit; - - param.bop = bop; - param.solvedp = solvedp; - param.noOfBoards = bop->noOfBoards; - - if (source == 0) - scheduler.Register(bop, SCHEDULER_SOLVE); - else - scheduler.Register(bop, SCHEDULER_CALC); - - for (int k = 0; k < MAXNOOFBOARDS; k++) - solvedp->solvedBoard[k].cards = 0; - - int retRun = SolveRunThreadsBoost(chunkSize); - if (retRun != RETURN_NO_FAULT) - return retRun; - - /* Calculate number of solved boards. */ - solvedp->noOfBoards = param.noOfBoards; - - if (param.error == 0) - return 1; - else - return param.error; -} - - -#elif (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) && !defined(_OPENMP) && !defined(DDS_THREADS_SINGLE) - -// This code for LLVM multi-threading on the Mac was kindly -/// contributed by Pierre Cossard. - -int SolveAllBoardsN( - boards * bop, - solvedBoards * solvedp, - int chunkSize, - int source) // 0 solve, 1 calc -{ - __block int chunk; - __block int fail; - - chunk = chunkSize; - fail = 1; - - if (bop->noOfBoards > MAXNOOFBOARDS) - return RETURN_TOO_MANY_BOARDS; - - futureTricks *fut = static_cast - (calloc(MAXNOOFBOARDS, sizeof(futureTricks))); - - for (int i = 0; i < MAXNOOFBOARDS; i++) - solvedp->solvedBoard[i].cards = 0; - - START_BLOCK_TIMER; - - if (source == 0) - scheduler.Register(bop, SCHEDULER_SOLVE); - else - scheduler.Register(bop, SCHEDULER_CALC); - - if (chunkSize == 1) - { - dispatch_apply(static_cast(noOfThreads), - dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), - ^(size_t t) - { - while (1) - { - int thid = static_cast(t); - schedType st = scheduler.GetNumber(thid); - int index = st.number; - if (index == -1) - break; - - // This is not a perfect repeat detector, as the hands in - // a group might have declarers N, S, N, N. Then the second - // N would not reuse the first N. However, most reuses are - // reasonably adjacent, and this is just an optimization anyway. - - if (st.repeatOf != -1 && - (bop->deals[index ].first == - bop->deals[st.repeatOf].first)) - { - START_THREAD_TIMER(thid); - solvedp->solvedBoard[index] = fut[ st.repeatOf ]; - END_THREAD_TIMER(thid); - continue; - } - else - { - START_THREAD_TIMER(thid); - int res = SolveBoard( - bop->deals[index], - bop->target[index], - bop->solutions[index], - bop->mode[index], - &fut[index], - thid); - END_THREAD_TIMER(thid); - - if (res == 1) - solvedp->solvedBoard[index] = fut[index]; - else - fail = res; - - } - } - }); - - } - else - { - dispatch_apply(static_cast(noOfThreads), - dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), - ^(size_t t) - { - while (1) - { - int thid = static_cast(t); - - schedType st = scheduler.GetNumber(thid); - int index = st.number; - if (index == -1) - break; - - if (st.repeatOf != -1) - { - START_THREAD_TIMER(thid); - for (int k = 0; k < chunk; k++) - { - bop->deals[index].first = k; - - solvedp->solvedBoard[index].score[k] = - solvedp->solvedBoard[ st.repeatOf ].score[k]; - } - END_THREAD_TIMER(thid); - continue; - } - - bop->deals[index].first = 0; - - START_THREAD_TIMER(thid); - int res = SolveBoard( - bop->deals[index], - bop->target[index], - bop->solutions[index], - bop->mode[index], - &fut[index], - thid); - - // SH: I'm making a terrible use of the fut structure here. - - if (res == 1) - solvedp->solvedBoard[index].score[0] = fut[index].score[0]; - else - fail = res; - - for (int k = 1; k < chunk; k++) - { - int hint = (k == 2 ? fut[index].score[0] : - 13 - fut[index].score[0]); - - bop->deals[index].first = k; // Next declarer - - res = SolveSameBoard( - bop->deals[index], - &fut[index], - hint, - thid); - - if (res == 1) - solvedp->solvedBoard[index].score[k] = - fut[index].score[0]; - else - fail = res; - } - END_THREAD_TIMER(thid); - } - }); - } - - END_BLOCK_TIMER; - - free(fut); - - if (fail != 1) - return fail; - - solvedp->noOfBoards = 0; - for (int i = 0; i < MAXNOOFBOARDS; i++) - if (solvedp->solvedBoard[i].cards != 0) - solvedp->noOfBoards++; - - return 1; -} - -#elif (defined(_OPENMP)) - -int SolveInitThreadsOpenMP(); -int SolveRunThreadsOpenMP(const int chunkSize); - - -int SolveInitThreadsOpenMP() -{ - /* Added after suggestion by Dirk Willecke. */ - if (omp_get_dynamic()) - omp_set_dynamic(0); - - omp_set_num_threads(noOfThreads); - - return RETURN_NO_FAULT; -} - - -int SolveRunThreadsOpenMP( - const int chunkSize) -{ - int thid; - - START_BLOCK_TIMER; - if (chunkSize == 1) - { - #pragma omp parallel default(none) shared(scheduler) private(thid) - { - #pragma omp while schedule(dynamic, chunk) - thid = omp_get_thread_num(); - SolveChunkCommon(thid); - } - } - else - { - #pragma omp parallel default(none) shared(scheduler) private(thid) - { - #pragma omp while schedule(dynamic, chunk) - thid = omp_get_thread_num(); - SolveChunkDDtableCommon(thid); - } - } - END_BLOCK_TIMER; - - return RETURN_NO_FAULT; -} - - -int SolveAllBoardsN( - boards * bop, - solvedBoards * solvedp, - int chunkSize, - int source) // 0 solve, 1 calc -{ - chunk = chunkSize; - param.error = 0; - - if (bop->noOfBoards > MAXNOOFBOARDS) - return RETURN_TOO_MANY_BOARDS; - - int retInit = SolveInitThreadsOpenMP(); - if (retInit != RETURN_NO_FAULT) - return retInit; - - param.bop = bop; - param.solvedp = solvedp; - param.noOfBoards = bop->noOfBoards; - - if (source == 0) - scheduler.Register(bop, SCHEDULER_SOLVE); - else - scheduler.Register(bop, SCHEDULER_CALC); - - for (int k = 0; k < MAXNOOFBOARDS; k++) - solvedp->solvedBoard[k].cards = 0; - - int retRun = SolveRunThreadsOpenMP(chunkSize); - if (retRun != RETURN_NO_FAULT) - return retRun; - - /* Calculate number of solved boards. */ - solvedp->noOfBoards = param.noOfBoards; - - if (param.error == 0) - return 1; - else - return param.error; -} - -#endif - int STDCALL SolveBoardPBN( dealPBN dlpbn, diff --git a/src/SolveBoard.h b/src/SolveBoard.h index 25159fd0..53655497 100644 --- a/src/SolveBoard.h +++ b/src/SolveBoard.h @@ -11,6 +11,27 @@ #define DDS_SOLVEBOARD_H +#include "Scheduler.h" + +#ifdef DDS_SCHEDULER + #define START_BLOCK_TIMER scheduler.StartBlockTimer() + #define END_BLOCK_TIMER scheduler.EndBlockTimer() + #define START_THREAD_TIMER(a) scheduler.StartThreadTimer(a) + #define END_THREAD_TIMER(a) scheduler.EndThreadTimer(a) +#else + #define START_BLOCK_TIMER 1 + #define END_BLOCK_TIMER 1 + #define START_THREAD_TIMER(a) 1 + #define END_THREAD_TIMER(a) 1 +#endif + + +void SolveChunkCommon( + const int thid); + +void SolveChunkDDtableCommon( + const int thid); + int SolveAllBoardsN( struct boards * bop, struct solvedBoards * solvedp, diff --git a/src/SolveBoard_GCD.cpp b/src/SolveBoard_GCD.cpp new file mode 100644 index 00000000..85166c64 --- /dev/null +++ b/src/SolveBoard_GCD.cpp @@ -0,0 +1,63 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2016 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#include "dds.h" +#include "SolveBoard.h" +#include "SolveBoard_GCD.h" + + +extern int noOfThreads; + + +int SolveInitThreadsGCD() +{ + return RETURN_NO_FAULT; +} + + +int SolveRunThreadsGCD( + const int chunkSize) +{ + // This code for LLVM multi-threading on the Mac was kindly + // contributed by Pierre Cossard. + +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) + int thid; + + START_BLOCK_TIMER; + if (chunkSize == 1) + { + dispatch_apply(static_cast(noOfThreads), + dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), + ^(size_t t) + { + thid = omp_get_thread_num(); + SolveChunkCommon(thid); + }); + } + else + { + dispatch_apply(static_cast(noOfThreads), + dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), + ^(size_t t) + { + thid = omp_get_thread_num(); + SolveChunkDDtableCommon(thid); + }); + } + END_BLOCK_TIMER; + + return RETURN_NO_FAULT; + +#else + UNUSED(chunkSize); + return RETURN_NO_FAULT; +#endif +} diff --git a/src/SolveBoard_GCD.h b/src/SolveBoard_GCD.h new file mode 100644 index 00000000..4618f12c --- /dev/null +++ b/src/SolveBoard_GCD.h @@ -0,0 +1,18 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2016 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_SOLVEBOARD_GCD_H +#define DDS_SOLVEBOARD_GCD_H + +int SolveInitThreadsGCD(); + +int SolveRunThreadsGCD( + const int chunkSize); + +#endif diff --git a/src/SolveBoard_OpenMP.cpp b/src/SolveBoard_OpenMP.cpp new file mode 100644 index 00000000..e4050e21 --- /dev/null +++ b/src/SolveBoard_OpenMP.cpp @@ -0,0 +1,63 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2016 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#include "dds.h" +#include "SolveBoard.h" +#include "SolveBoard_OpenMP.h" + + +int SolveInitThreadsOpenMP() +{ + /* Added after suggestion by Dirk Willecke. */ +#ifdef _OPENMP + if (omp_get_dynamic()) + omp_set_dynamic(0); + + omp_set_num_threads(noOfThreads); +#endif + + return RETURN_NO_FAULT; +} + + +int SolveRunThreadsOpenMP( + const int chunkSize) +{ +#ifdef _OPENMP + int thid; + + START_BLOCK_TIMER; + if (chunkSize == 1) + { + #pragma omp parallel default(none) private(thid) + { + #pragma omp while schedule(dynamic, chunk) + thid = omp_get_thread_num(); + SolveChunkCommon(thid); + } + } + else + { + #pragma omp parallel default(none) private(thid) + { + #pragma omp while schedule(dynamic, chunk) + thid = omp_get_thread_num(); + SolveChunkDDtableCommon(thid); + } + } + END_BLOCK_TIMER; + + return RETURN_NO_FAULT; + +#else + UNUSED(chunkSize); + return RETURN_NO_FAULT; +#endif +} diff --git a/src/SolveBoard_OpenMP.h b/src/SolveBoard_OpenMP.h new file mode 100644 index 00000000..ae00aaad --- /dev/null +++ b/src/SolveBoard_OpenMP.h @@ -0,0 +1,18 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2016 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_SOLVEBOARD_OPENMP_H +#define DDS_SOLVEBOARD_OPENMP_H + +int SolveInitThreadsOpenMP(); + +int SolveRunThreadsOpenMP( + const int chunkSize); + +#endif diff --git a/src/SolveBoard_WinAPI.cpp b/src/SolveBoard_WinAPI.cpp new file mode 100644 index 00000000..6e6e5a38 --- /dev/null +++ b/src/SolveBoard_WinAPI.cpp @@ -0,0 +1,117 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2016 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#include "dds.h" +#include "SolveBoard.h" +#include "SolveBoard_WinAPI.h" + + +extern int noOfThreads; + +#ifdef _WIN32 +HANDLE solveAllEvents[MAXNOOFTHREADS]; +LONG threadIndex; + +DWORD CALLBACK SolveChunkWinAPI(void *); +DWORD CALLBACK SolveChunkDDtableWinAPI(void *); +#endif + + +#ifdef _WIN32 +DWORD CALLBACK SolveChunkWinAPI(void *) +{ + int thid; + thid = InterlockedIncrement(&threadIndex); + + SolveChunkCommon(thid); + + if (SetEvent(solveAllEvents[thid]) == 0) + return 0; + + return 1; +} +#endif + + +#ifdef _WIN32 +DWORD CALLBACK SolveChunkDDtableWinAPI(void *) +{ + int thid; + thid = InterlockedIncrement(&threadIndex); + + SolveChunkDDtableCommon(thid); + + if (SetEvent(solveAllEvents[thid]) == 0) + return 0; + + return 1; +} +#endif + + +int SolveInitThreadsWinAPI() +{ +#ifdef _WIN32 + threadIndex = -1; + + for (int k = 0; k < noOfThreads; k++) + { + solveAllEvents[k] = CreateEvent(NULL, FALSE, FALSE, 0); + if (solveAllEvents[k] == 0) + return RETURN_THREAD_CREATE; + } +#endif + + return RETURN_NO_FAULT; +} + + +int SolveRunThreadsWinAPI( + const int chunkSize) +{ +#ifdef _WIN32 + if (chunkSize == 1) + { + for (int k = 0; k < noOfThreads; k++) + { + int res = QueueUserWorkItem(SolveChunkWinAPI, NULL, + WT_EXECUTELONGFUNCTION); + if (res != 1) + return res; + } + } + else + { + for (int k = 0; k < noOfThreads; k++) + { + int res = QueueUserWorkItem(SolveChunkDDtableWinAPI, NULL, + WT_EXECUTELONGFUNCTION); + if (res != 1) + return res; + } + } + + START_BLOCK_TIMER; + DWORD solveAllWaitResult; + solveAllWaitResult = WaitForMultipleObjects( + static_cast(noOfThreads), + solveAllEvents, TRUE, INFINITE); + END_BLOCK_TIMER; + + if (solveAllWaitResult != WAIT_OBJECT_0) + return RETURN_THREAD_WAIT; + + for (int k = 0; k < noOfThreads; k++) + CloseHandle(solveAllEvents[k]); +#endif + + return RETURN_NO_FAULT; +} + diff --git a/src/SolveBoard_WinAPI.h b/src/SolveBoard_WinAPI.h new file mode 100644 index 00000000..7661a0cd --- /dev/null +++ b/src/SolveBoard_WinAPI.h @@ -0,0 +1,18 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2016 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_SOLVEBOARD_WINAPI_H +#define DDS_SOLVEBOARD_WINAPI_H + +int SolveInitThreadsWinAPI(); + +int SolveRunThreadsWinAPI( + const int chunkSize); + +#endif diff --git a/src/SolveBoard_basic.cpp b/src/SolveBoard_basic.cpp new file mode 100644 index 00000000..27d8d888 --- /dev/null +++ b/src/SolveBoard_basic.cpp @@ -0,0 +1,35 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2016 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#include "dds.h" +#include "SolveBoard.h" +#include "SolveBoard_basic.h" + + +int SolveInitThreadsNone() +{ + return RETURN_NO_FAULT; +} + + +int SolveRunThreadsNone( + const int chunkSize) +{ + START_BLOCK_TIMER; + + if (chunkSize == 1) + SolveChunkCommon(0); + else + SolveChunkDDtableCommon(0); + END_BLOCK_TIMER; + + return RETURN_NO_FAULT; +} + diff --git a/src/SolveBoard_basic.h b/src/SolveBoard_basic.h new file mode 100644 index 00000000..c1b2ce3a --- /dev/null +++ b/src/SolveBoard_basic.h @@ -0,0 +1,18 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2016 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_SOLVEBOARD_BASIC_H +#define DDS_SOLVEBOARD_BASIC_H + +int SolveInitThreadsNone(); + +int SolveRunThreadsNone( + const int chunkSize); + +#endif diff --git a/src/SolveBoard_boost.cpp b/src/SolveBoard_boost.cpp new file mode 100644 index 00000000..2fec3084 --- /dev/null +++ b/src/SolveBoard_boost.cpp @@ -0,0 +1,79 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2016 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +// Disable some boost header warnings. +#ifdef DDS_THREADS_BOOST + #if (defined(_WIN32) && !defined(__CYGWIN__)) + #pragma warning(push) + #pragma warning(disable: 4061 4191 4365 4571 4619 4625 4626 5026 5027 5031) + #endif + + #include + using boost::thread; + + #include + using namespace std; + vector threads; + + #ifdef _WIN32 + #pragma warning(pop) + #endif +#endif + + + +#include "dds.h" +#include "SolveBoard.h" +#include "SolveBoard_boost.h" + + +extern int noOfThreads; + + +int SolveInitThreadsBoost() +{ +#ifdef DDS_THREADS_BOOST + threads.resize(static_cast(noOfThreads)); +#endif + return RETURN_NO_FAULT; +} + + +int SolveRunThreadsBoost( + const int chunkSize) +{ +#ifdef DDS_THREADS_BOOST + const unsigned noth = static_cast(noOfThreads); + START_BLOCK_TIMER; + if (chunkSize == 1) + { + for (unsigned k = 0; k < noth; k++) + threads[k] = new thread(SolveChunkCommon, k); + } + else + { + for (unsigned k = 0; k < noth; k++) + threads[k] = new thread(SolveChunkDDtableCommon, k); + } + END_BLOCK_TIMER; + + for (unsigned k = 0; k < noth; k++) + { + threads[k]->join(); + delete threads[k]; + } + return RETURN_NO_FAULT; + +#else + UNUSED(chunkSize); + return RETURN_NO_FAULT; + +#endif +} diff --git a/src/SolveBoard_boost.h b/src/SolveBoard_boost.h new file mode 100644 index 00000000..2c558af5 --- /dev/null +++ b/src/SolveBoard_boost.h @@ -0,0 +1,18 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2016 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_SOLVEBOARD_BOOST_H +#define DDS_SOLVEBOARD_BOOST_H + +int SolveInitThreadsBoost(); + +int SolveRunThreadsBoost( + const int chunkSize); + +#endif diff --git a/test/Makefiles/Makefile_Visual b/test/Makefiles/Makefile_Visual index 872a8cef..9d683006 100644 --- a/test/Makefiles/Makefile_Visual +++ b/test/Makefiles/Makefile_Visual @@ -24,6 +24,7 @@ LINK_FLAGS = /LTCG WARN_FLAGS = \ /Wall \ /wd4127 \ + /wd4464 \ /wd4514 \ /wd4555 \ /wd4668 \ From 9112031fee595b5f6eb9144cd7b48f7b9abd4927 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 11 Mar 2018 21:00:21 +0100 Subject: [PATCH 004/132] Now OpenMP works with mingw64 as well --- src/Makefiles/Makefile_mingw | 34 ++++++++++++++++++++++++++----- test/Makefiles/Makefile_mingw | 38 +++++++++++++++++++++++++++++++++-- 2 files changed, 65 insertions(+), 7 deletions(-) diff --git a/src/Makefiles/Makefile_mingw b/src/Makefiles/Makefile_mingw index c81d89c1..47bd42aa 100644 --- a/src/Makefiles/Makefile_mingw +++ b/src/Makefiles/Makefile_mingw @@ -4,7 +4,7 @@ # you should be OK. # If you want to compile a single-threaded version, use -# make DDS_THREADS=none +# DDS_THREADS=none # The "windres" and "cvtres" tools are used for putting version # information into the DLL in a way that Windows can see. @@ -14,7 +14,8 @@ # If your exact compiler name is not given here, change it. # CC = mingw32-g++ -CC = i686-w64-mingw32-g++ +# CC = i686-w64-mingw32-g++ +CC = g++ # Use this one to get Windows multi-threading # CC_FLAGS = -O3 -flto -mtune=generic @@ -27,7 +28,8 @@ LD_FLAGS = \ -Wl,--dynamicbase \ -Wl,--nxcompat \ -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup + -Wl,--enable-stdcall-fixup \ + -lpthread # These flags are not turned on be default, but DDS should pass them. @@ -68,7 +70,7 @@ DLL = $(DLLBASE).dll EXPORTER = Exports.def VFILE = ddsres -WINDRES_FLAG = -F pe-i386 +WINDRES_FLAG = -F pe-x86-64 SOURCE_FILES = \ dds.cpp \ @@ -85,6 +87,11 @@ SOURCE_FILES = \ QuickTricks.cpp \ Scheduler.cpp \ SolveBoard.cpp \ + SolveBoard_basic.cpp \ + SolveBoard_boost.cpp \ + SolveBoard_GCD.cpp \ + SolveBoard_OpenMP.cpp \ + SolveBoard_WinAPI.cpp \ SolverIF.cpp \ Stats.cpp \ Timer.cpp \ @@ -160,7 +167,24 @@ Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -SolveBoard.o: SolverIF.h SolveBoard.h PBN.h +SolveBoard.o: SolverIF.h SolveBoard.h PBN.h SolveBoard_basic.h +SolveBoard.o: SolveBoard_boost.h SolveBoard_GCD.h SolveBoard_OpenMP.h +SolveBoard.o: SolveBoard_WinAPI.h +SolveBoard_basic.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_basic.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_basic.o: Scheduler.h SolveBoard.h SolveBoard_basic.h +SolveBoard_boost.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_boost.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_boost.o: Scheduler.h SolveBoard.h SolveBoard_boost.h +SolveBoard_GCD.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_GCD.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_GCD.o: Scheduler.h SolveBoard.h SolveBoard_GCD.h +SolveBoard_OpenMP.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_OpenMP.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_OpenMP.o: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h +SolveBoard_WinAPI.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_WinAPI.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_WinAPI.o: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h SolverIF.o: ABsearch.h SolverIF.h diff --git a/test/Makefiles/Makefile_mingw b/test/Makefiles/Makefile_mingw index 70c7ad95..c89dee9d 100644 --- a/test/Makefiles/Makefile_mingw +++ b/test/Makefiles/Makefile_mingw @@ -17,7 +17,8 @@ # If your exact compiler name is not given here, change it. # CC = mingw32-g++ -CC = i686-w64-mingw32-g++ +# CC = i686-w64-mingw32-g++ +CC = g++ # Use this one to get Windows multi-threading # CC_FLAGS = -O3 -flto -mtune=generic @@ -69,7 +70,6 @@ DTEST_SOURCE_FILES = \ testStats.cpp LD_FLAGS = \ - -Wl,--subsystem,windows \ -Wl,--output-def,$(DLLBASE).def \ -Wl,--dynamicbase \ -Wl,--nxcompat \ @@ -97,6 +97,11 @@ STOLEN_SOURCE_FILES = \ $(SRC)/QuickTricks.cpp \ $(SRC)/Scheduler.cpp \ $(SRC)/SolveBoard.cpp \ + $(SRC)/SolveBoard_basic.cpp \ + $(SRC)/SolveBoard_boost.cpp \ + $(SRC)/SolveBoard_GCD.cpp \ + $(SRC)/SolveBoard_OpenMP.cpp \ + $(SRC)/SolveBoard_WinAPI.cpp \ $(SRC)/SolverIF.cpp \ $(SRC)/Stats.cpp \ $(SRC)/Timer.cpp \ @@ -111,6 +116,7 @@ ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) dtest: $(DTEST_OBJ_FILES) $(CC) $(CC_FULL_FLAGS) $(DTEST_OBJ_FILES) $(LD_FLAGS) $(LIB_FLAGS) -o $(DTEST) +# $(CC) $(CC_FULL_FLAGS) $(DTEST_OBJ_FILES) $(LD_FLAGS) $(LIB_FLAGS) -o $(DTEST) itest: $(ITEST_OBJ_FILES) $(CC) $(CC_FULL_FLAGS) $(ITEST_OBJ_FILES) $(LD_FLAGS) -o $(ITEST) @@ -189,6 +195,34 @@ clean: ../src/SolveBoard.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h ../src/SolveBoard.o: ../src/Scheduler.h ../src/threadmem.h ../src/SolverIF.h ../src/SolveBoard.o: ../src/SolveBoard.h ../src/PBN.h +../src/SolveBoard.o: ../src/SolveBoard_basic.h ../src/SolveBoard_boost.h +../src/SolveBoard.o: ../src/SolveBoard_GCD.h ../src/SolveBoard_OpenMP.h +../src/SolveBoard.o: ../src/SolveBoard_WinAPI.h +../src/SolveBoard_basic.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard_basic.o: ../src/TransTable.h ../include/dll.h +../src/SolveBoard_basic.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/SolveBoard_basic.o: ../src/Stats.h ../src/Scheduler.h +../src/SolveBoard_basic.o: ../src/SolveBoard.h ../src/SolveBoard_basic.h +../src/SolveBoard_boost.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard_boost.o: ../src/TransTable.h ../include/dll.h +../src/SolveBoard_boost.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/SolveBoard_boost.o: ../src/Stats.h ../src/Scheduler.h +../src/SolveBoard_boost.o: ../src/SolveBoard.h ../src/SolveBoard_boost.h +../src/SolveBoard_GCD.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard_GCD.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/SolveBoard_GCD.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/SolveBoard_GCD.o: ../src/Scheduler.h ../src/SolveBoard.h +../src/SolveBoard_GCD.o: ../src/SolveBoard_GCD.h +../src/SolveBoard_OpenMP.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard_OpenMP.o: ../src/TransTable.h ../include/dll.h +../src/SolveBoard_OpenMP.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/SolveBoard_OpenMP.o: ../src/Stats.h ../src/Scheduler.h +../src/SolveBoard_OpenMP.o: ../src/SolveBoard.h ../src/SolveBoard_OpenMP.h +../src/SolveBoard_WinAPI.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard_WinAPI.o: ../src/TransTable.h ../include/dll.h +../src/SolveBoard_WinAPI.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/SolveBoard_WinAPI.o: ../src/Stats.h ../src/Scheduler.h +../src/SolveBoard_WinAPI.o: ../src/SolveBoard.h ../src/SolveBoard_WinAPI.h ../src/SolverIF.o: ../src/dds.h ../src/debug.h ../include/portab.h ../src/SolverIF.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h ../src/SolverIF.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h From 9f7ccd9b9f84fe50d25bdb1ca27822018bb4e230 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Mon, 12 Mar 2018 08:16:26 +0100 Subject: [PATCH 005/132] Moved Scheduler to atomic int. Several TODOs to delete later --- include/portab.h | 3 +- src/Makefile_mingw_boost_BAD | 196 ++++++++++++++++++++++++++++ src/Makefiles/Makefile_Visual | 2 + src/Makefiles/Makefile_Visual_boost | 2 + src/NOTES | 19 +++ src/Scheduler.cpp | 26 +--- src/Scheduler.h | 23 ++-- test/Makefiles/Makefile_Visual | 2 +- test/Makefiles/Makefile_mingw | 4 +- test/dtest.cpp | 12 ++ 10 files changed, 246 insertions(+), 43 deletions(-) create mode 100644 src/Makefile_mingw_boost_BAD create mode 100644 src/NOTES diff --git a/include/portab.h b/include/portab.h index 72cd62ad..40dad4bf 100644 --- a/include/portab.h +++ b/include/portab.h @@ -69,7 +69,8 @@ #if __cplusplus <= 199711L #ifndef nullptr - #define nullptr NULL + // TODO + // #define nullptr NULL #endif #endif diff --git a/src/Makefile_mingw_boost_BAD b/src/Makefile_mingw_boost_BAD new file mode 100644 index 00000000..f0304937 --- /dev/null +++ b/src/Makefile_mingw_boost_BAD @@ -0,0 +1,196 @@ +# This the DDS Makefile for Windows and the MinGW compiler. +# It does assume a Unix-like setup for some commands, +# but if you only want to call "make" with the default target, +# you should be OK. + +# If you want to compile a single-threaded version, use +# DDS_THREADS=none + +# The "windres" and "cvtres" tools are used for putting version +# information into the DLL in a way that Windows can see. +# It is not mandatory, and if you don't have those tools, +# You can remove $(VFILE).obj in the target line below. + + +# If your exact compiler name is not given here, change it. +# CC = mingw32-g++ +# CC = i686-w64-mingw32-g++ +CC = g++ + +# Use this one to get Windows multi-threading +# CC_FLAGS = -O3 -flto -mtune=generic +# Use this one to get OpenMP multi-threading +CC_FLAGS = -O3 -flto -mtune=generic + +LD_FLAGS = \ + -Wl,--subsystem,windows \ + -Wl,--output-def,$(DLLBASE).def \ + -Wl,--dynamicbase \ + -Wl,--nxcompat \ + -Wl,--no-seh \ + -Wl,--enable-stdcall-fixup \ + -lboost_system \ + -lboost_thread + + +# These flags are not turned on be default, but DDS should pass them. +# Turn them on below. +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wlogical-op \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wnoexcept \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wsign-promo \ + -Wstrict-null-sentinel \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-format + +# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION +# CC_FULL_FLAGS = $(CC_FLAGS) +CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) + +LIB_FLAGS = -mdll + +DLLBASE = dds +DLL = $(DLLBASE).dll +EXPORTER = Exports.def + +VFILE = ddsres +WINDRES_FLAG = -F pe-x86-64 + +SOURCE_FILES = \ + dds.cpp \ + ABsearch.cpp \ + ABstats.cpp \ + CalcTables.cpp \ + DealerPar.cpp \ + Init.cpp \ + LaterTricks.cpp \ + Moves.cpp \ + Par.cpp \ + PlayAnalyser.cpp \ + PBN.cpp \ + QuickTricks.cpp \ + Scheduler.cpp \ + SolveBoard.cpp \ + SolveBoard_basic.cpp \ + SolveBoard_boost.cpp \ + SolveBoard_GCD.cpp \ + SolveBoard_OpenMP.cpp \ + SolveBoard_WinAPI.cpp \ + SolverIF.cpp \ + Stats.cpp \ + Timer.cpp \ + TransTable.cpp + +O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o + +ifeq ($(DDS_THREADS),none) +DDS_THR = -DDDS_THREADS_SINGLE +else +DDS_THR = -DDDS_THREADS_BOOST +endif + + +mingw: $(O_FILES) + $(CC) $(LIB_FLAGS) $(CC_FULL_FLAGS) $(O_FILES) $(LD_FLAGS) $(EXPORTER) -o $(DLL) + +%.o: %.cpp + $(CC) $(CC_FULL_FLAGS) $(DDS_THR) -c $< + +$(DLLBASE).res: $(DLLBASE).rc + windres $(DLLBASE).rc $(DLLBASE).res + +$(VFILE).o: $(DLLBASE).rc + windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o + +depend: + makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) + +clean: + rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} + +install: + test -d ../test || mkdir ../test + test -d ../examples || mkdir ../examples + cp $(DLL) $(DLLBASE).def ../test + cp $(DLL) $(DLLBASE).def ../examples + + +# DO NOT DELETE + +dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +dds.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h +ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABsearch.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h +ABsearch.o: QuickTricks.h LaterTricks.h ABsearch.h +ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABstats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +CalcTables.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h +CalcTables.o: PBN.h +DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +DealerPar.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Init.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h +Init.o: ABsearch.h +LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h +LaterTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h +LaterTricks.o: threadmem.h LaterTricks.h +Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Moves.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h +Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Par.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h +PlayAnalyser.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +PlayAnalyser.o: Scheduler.h threadmem.h SolverIF.h PBN.h +PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +PBN.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h +QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h +QuickTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h +QuickTricks.o: threadmem.h QuickTricks.h +Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h +Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h +SolveBoard.o: SolverIF.h SolveBoard.h PBN.h SolveBoard_basic.h +SolveBoard.o: SolveBoard_boost.h SolveBoard_GCD.h SolveBoard_OpenMP.h +SolveBoard.o: SolveBoard_WinAPI.h +SolveBoard_basic.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_basic.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_basic.o: Scheduler.h SolveBoard.h SolveBoard_basic.h +SolveBoard_boost.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_boost.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_boost.o: Scheduler.h SolveBoard.h SolveBoard_boost.h +SolveBoard_GCD.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_GCD.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_GCD.o: Scheduler.h SolveBoard.h SolveBoard_GCD.h +SolveBoard_OpenMP.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_OpenMP.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_OpenMP.o: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h +SolveBoard_WinAPI.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_WinAPI.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_WinAPI.o: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h +SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h +SolverIF.o: ABsearch.h SolverIF.h +Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +TransTable.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h diff --git a/src/Makefiles/Makefile_Visual b/src/Makefiles/Makefile_Visual index 11d20ae5..368331eb 100644 --- a/src/Makefiles/Makefile_Visual +++ b/src/Makefiles/Makefile_Visual @@ -23,6 +23,8 @@ WARN_FLAGS = \ /wd4127 \ /wd4464 \ /wd4555 \ + /wd4625 \ + /wd4626 \ /wd4668 \ /wd4701 \ /wd4710 \ diff --git a/src/Makefiles/Makefile_Visual_boost b/src/Makefiles/Makefile_Visual_boost index e502c721..0c60d1f6 100644 --- a/src/Makefiles/Makefile_Visual_boost +++ b/src/Makefiles/Makefile_Visual_boost @@ -30,6 +30,8 @@ WARN_FLAGS = \ /wd4127 \ /wd4464 \ /wd4555 \ + /wd4625 \ + /wd4626 \ /wd4668 \ /wd4701 \ /wd4710 \ diff --git a/src/NOTES b/src/NOTES new file mode 100644 index 00000000..b8889e59 --- /dev/null +++ b/src/NOTES @@ -0,0 +1,19 @@ +11.03.2018 + +Scheduler.cpp and .h +--- +No lock at all anymore +Use atomic increments where available (C++11) +Timer functions do not go by _WIN32 alone +- _WIN32: Yes +- __CYGWIN__ +- MAC +- __MINGW32__, maybe also __MINGW64__? + +PlayAnalyser +--- +- Check all _WIN32 +- Same structure as usual: Boost, OpenMP, ... + + +More modular Makefiles diff --git a/src/Scheduler.cpp b/src/Scheduler.cpp index 1e050bc1..db3f4413 100644 --- a/src/Scheduler.cpp +++ b/src/Scheduler.cpp @@ -44,12 +44,6 @@ Scheduler::Scheduler() sprintf(fname, ""); fp = stdout; #endif - -#if defined(_OPENMP) && !defined(DDS_THREADS_SINGLE) - omp_init_lock(&lock); -#elif (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) && !defined(_OPENMP) && !defined(DDS_THREADS_SINGLE) - lock = dispatch_semaphore_create(1); -#endif } @@ -141,12 +135,6 @@ Scheduler::~Scheduler() if (fp != stdout && fp != nullptr) fclose(fp); #endif - -#if defined(_OPENMP) && !defined(DDS_THREADS_SINGLE) - omp_destroy_lock(&lock); -#elif (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) && !defined(_OPENMP) && !defined(DDS_THREADS_SINGLE) - dispatch_release(lock); -#endif } @@ -780,20 +768,8 @@ schedType Scheduler::GetNumber( return st; } -#if (defined(_WIN32) || defined(__CYGWIN__)) && \ - !defined(_OPENMP) && !defined(DDS_THREADS_SINGLE) - g = InterlockedIncrement(&currGroup); -#elif defined(_OPENMP) && !defined(DDS_THREADS_SINGLE) - omp_set_lock(&lock); + // Atomic. g = ++currGroup; - omp_unset_lock(&lock); -#elif (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) && !defined(_OPENMP) && !defined(DDS_THREADS_SINGLE) - dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER); - g = ++currGroup; - dispatch_semaphore_signal(lock); -#else - g = ++currGroup; -#endif if (g >= numGroups) { diff --git a/src/Scheduler.h b/src/Scheduler.h index df4a6cb1..c37944ea 100644 --- a/src/Scheduler.h +++ b/src/Scheduler.h @@ -10,6 +10,8 @@ #ifndef DDS_SCHEDULER_H #define DDS_SCHEDULER_H +#include + #include #include #include @@ -28,8 +30,8 @@ #define HASH_MAX 200 - -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) && !defined(_OPENMP) && !defined(DDDS_THREADS_SINGLE) +// TODO Can probably be deleted +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) #include #endif @@ -45,12 +47,6 @@ class Scheduler { private: -#if defined(_OPENMP) && !defined(DDDS_THREADS_SINGLE) - omp_lock_t lock; -#elif (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) && !defined(_OPENMP) && !defined(DDDS_THREADS_SINGLE) - dispatch_semaphore_t lock; -#endif - struct listType { int first; @@ -96,11 +92,8 @@ class Scheduler groupType group[MAXNOOFBOARDS]; int numGroups; int extraGroups; -#ifdef _WIN32 - LONG volatile currGroup; -#else - int volatile currGroup; -#endif + + std::atomic currGroup; listType list[DDS_SUITS + 2][HASH_MAX]; @@ -140,6 +133,10 @@ class Scheduler timeval blockEnd; #endif + void CreateLock(); + + void DestroyLock(); + void MakeGroups( boards * bop); diff --git a/test/Makefiles/Makefile_Visual b/test/Makefiles/Makefile_Visual index 9d683006..36060bbd 100644 --- a/test/Makefiles/Makefile_Visual +++ b/test/Makefiles/Makefile_Visual @@ -87,7 +87,7 @@ ITEST_SOURCE_FILES = \ ITEST_OBJ_FILES = $(subst .cpp,.obj,$(ITEST_SOURCE_FILES)) dtest: $(DTEST_OBJ_FILES) - link $(DTEST_OBJ_FILES) $(DLIB) /out:$(DTEST).exe + link /LTCG $(DTEST_OBJ_FILES) $(DLIB) /out:$(DTEST).exe itest: $(ITEST_OBJ_FILES) link /LTCG $(ITEST_OBJ_FILES) /out:$(ITEST).exe diff --git a/test/Makefiles/Makefile_mingw b/test/Makefiles/Makefile_mingw index c89dee9d..315a1a43 100644 --- a/test/Makefiles/Makefile_mingw +++ b/test/Makefiles/Makefile_mingw @@ -23,7 +23,7 @@ CC = g++ # Use this one to get Windows multi-threading # CC_FLAGS = -O3 -flto -mtune=generic # Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -fopenmp -mtune=generic +CC_FLAGS = -O3 -flto -mtune=generic # These flags are not turned on by default, but DDS should pass them. # Turn them on below. @@ -70,7 +70,6 @@ DTEST_SOURCE_FILES = \ testStats.cpp LD_FLAGS = \ - -Wl,--output-def,$(DLLBASE).def \ -Wl,--dynamicbase \ -Wl,--nxcompat \ -Wl,--no-seh \ @@ -116,7 +115,6 @@ ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) dtest: $(DTEST_OBJ_FILES) $(CC) $(CC_FULL_FLAGS) $(DTEST_OBJ_FILES) $(LD_FLAGS) $(LIB_FLAGS) -o $(DTEST) -# $(CC) $(CC_FULL_FLAGS) $(DTEST_OBJ_FILES) $(LD_FLAGS) $(LIB_FLAGS) -o $(DTEST) itest: $(ITEST_OBJ_FILES) $(CC) $(CC_FULL_FLAGS) $(ITEST_OBJ_FILES) $(LD_FLAGS) -o $(ITEST) diff --git a/test/dtest.cpp b/test/dtest.cpp index d5afac30..9e16fb6b 100644 --- a/test/dtest.cpp +++ b/test/dtest.cpp @@ -27,6 +27,18 @@ int main(int argc, char * argv[]) printf("%-12s %20s\n\n", "Version", info.versionString); fflush(stdout); +// TODO +#if defined(_WIN32) + printf("_WIN32\n"); + fflush(stdout); +#elif defined(_WIN64) + printf("_WIN32\n"); + fflush(stdout); +#else + printf("No WIN\n"); + fflush(stdout); +#endif + realMain(argc, argv); exit(0); From 539685333a4d45c8b39f760b79ed0b3ac8dfa225 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Tue, 13 Mar 2018 23:18:31 +0100 Subject: [PATCH 006/132] Intermediate check-in of System, doesn't quite compile for Visual C++ --- include/dll.h | 7 + src/Init.cpp | 100 ++------ src/Makefiles/Makefile_cygwin | 3 + src/NOTES | 11 +- src/System.cpp | 425 ++++++++++++++++++++++++++++++++++ src/System.h | 113 +++++++++ 6 files changed, 570 insertions(+), 89 deletions(-) create mode 100644 src/System.cpp create mode 100644 src/System.h diff --git a/include/dll.h b/include/dll.h index 930d690a..66e3c583 100644 --- a/include/dll.h +++ b/include/dll.h @@ -141,6 +141,10 @@ #define RETURN_THREAD_WAIT -103 #define TEXT_THREAD_WAIT "Something failed waiting for thread to end" +// Tried to set a multi-threading system that is not present in DLL. +#define RETURN_THREAD_MISSING -104 +#define TEXT_THREAD_MISSING "Multi-threading system not present" + // CalcAllTables*() #define RETURN_NO_SUIT -201 #define TEXT_NO_SUIT "Denomination filter vector has no entries" @@ -370,6 +374,9 @@ struct DDSInfo EXTERN_C DLLEXPORT void STDCALL SetMaxThreads( int userThreads); +EXTERN_C DLLEXPORT int STDCALL SetThreading( + int code); + EXTERN_C DLLEXPORT void STDCALL FreeMemory(); EXTERN_C DLLEXPORT int STDCALL SolveBoard( diff --git a/src/Init.cpp b/src/Init.cpp index 1befd9fc..52f7512b 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -14,6 +14,7 @@ #include "Stats.h" #include "ABsearch.h" #include "Scheduler.h" +#include "System.h" void InitConstants(); @@ -24,6 +25,7 @@ double ConstantMemoryUsed(); void FreeThreadMem(); localVarType localVar[MAXNOOFTHREADS]; +System sysdep; Scheduler scheduler; int noOfThreads; @@ -219,6 +221,13 @@ void STDCALL SetMaxThreads( } +int STDCALL SetThreading( + int code) +{ + return sysdep.PreferThreading(static_cast(code)); +} + + void InitConstants() { // highestRank[aggr] is the highest absolute rank in the @@ -600,93 +609,7 @@ void ResetBestMoves( void STDCALL GetDDSInfo(DDSInfo * info) { - char t[80]; - - info->major = DDS_VERSION / 10000; - info->minor = (DDS_VERSION - info->major * 10000) / 100; - info->patch = DDS_VERSION % 100; - - sprintf(info->versionString, "%d.%d.%d", - info->major, info->minor, info->patch); - - info->system = 0; - info->compiler = 0; - info->constructor = 0; - info->threading = 0; - info->noOfThreads = noOfThreads; - - sprintf(info->systemString, "DDS DLL\n-------\n"); - -#if defined(_WIN32) - info->system = 1; - sprintf(t, "%-12s %20s\n", "System", "Windows"); - strcat(info->systemString, t); -#elif defined(__CYGWIN__) - info->system = 2; - sprintf(t, "%-12s %20s\n", "System", "Cygwin"); - strcat(info->systemString, t); -#elif defined(__linux) - info->system = 3; - sprintf(t, "%-12s %20s\n", "System", "Linux"); - strcat(info->systemString, t); -#elif defined(__APPLE__) - info->system = 4; - sprintf(t, "%-12s %20s\n", "System", "Apple"); - strcat(info->systemString, t); -#endif - -#if defined(_MSC_VER) - info->compiler = 1; - sprintf(t, "%-12s %20s\n", "Compiler", "Microsoft Visual C++"); - strcat(info->systemString, t); -#elif defined(__MINGW32__) - info->compiler = 2; - sprintf(t, "%-12s %20s\n", "Compiler", "MinGW"); - strcat(info->systemString, t); -#elif defined(__GNUC__) - info->compiler = 3; - sprintf(t, "%-12s %20s\n", "Compiler", "GNU g++"); - strcat(info->systemString, t); -#elif defined(__clang__) - info->compiler = 4; - sprintf(t, "%-12s %20s\n", "Compiler", "clang"); - strcat(info->systemString, t); -#endif - -#if defined(USES_DLLMAIN) - info->constructor = 1; - sprintf(t, "%-12s %20s\n", "Constructor", "DllMain"); - strcat(info->systemString, t); -#elif defined(USES_CONSTRUCTOR) - info->constructor = 2; - sprintf(t, "%-12s %20s\n", "Constructor", "Unix-style"); - strcat(info->systemString, t); -#endif - -#if defined(DDS_THREADS_SINGLE) - info->threading = 0; - sprintf(t, "%-12s %20s\n", "Threading", "None"); - strcat(info->systemString, t); -#elif defined(DDS_THREADS_BOOST) - info->threading = 4; - sprintf(t, "%-12s %20s\n", "Threading", "Boost"); - strcat(info->systemString, t); -#elif defined(_OPENMP) - info->threading = 2; - sprintf(t, "%-12s %20s\n", "Threading", "OpenMP"); - strcat(info->systemString, t); -#elif defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED) - info->threading = 3; - sprintf(t, "%-12s %20s\n", "Threading", "GCD"); - strcat(info->systemString, t); -#else - info->threading = 1; - sprintf(t, "%-12s %20s\n", "Threading", "Windows"); - strcat(info->systemString, t); -#endif - - sprintf(t, "%-12s %20d\n", "Threads", noOfThreads); - strcat(info->systemString, t); + (void) sysdep.str(info); } @@ -808,6 +731,9 @@ void STDCALL ErrorMessage(int code, char line[80]) case RETURN_THREAD_WAIT: strcpy(line, TEXT_THREAD_WAIT); break; + case RETURN_THREAD_MISSING: + strcpy(line, TEXT_THREAD_MISSING); + break; case RETURN_NO_SUIT: strcpy(line, TEXT_NO_SUIT); break; diff --git a/src/Makefiles/Makefile_cygwin b/src/Makefiles/Makefile_cygwin index a9fdcece..a8648a0b 100644 --- a/src/Makefiles/Makefile_cygwin +++ b/src/Makefiles/Makefile_cygwin @@ -90,6 +90,7 @@ SOURCE_FILES = \ SolveBoard_WinAPI.cpp \ SolverIF.cpp \ Stats.cpp \ + System.cpp \ Timer.cpp \ TransTable.cpp @@ -186,6 +187,8 @@ SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h SolverIF.o: ABsearch.h SolverIF.h Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +System.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +System.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h diff --git a/src/NOTES b/src/NOTES index b8889e59..bae766f1 100644 --- a/src/NOTES +++ b/src/NOTES @@ -1,9 +1,12 @@ 11.03.2018 +Move away from SolveBoard_*.cpp to System.cpp +- Move Init.cpp (ncores, kilobytesfree) to System + +Death to all ifdef's that are not for debug and timing + Scheduler.cpp and .h --- -No lock at all anymore -Use atomic increments where available (C++11) Timer functions do not go by _WIN32 alone - _WIN32: Yes - __CYGWIN__ @@ -15,5 +18,9 @@ PlayAnalyser - Check all _WIN32 - Same structure as usual: Boost, OpenMP, ... +On laptop, fold dtest timing functions back into dtest + +Use SetThreading() from dtest and itest +Read from *test command line, recognize right number More modular Makefiles diff --git a/src/System.cpp b/src/System.cpp new file mode 100644 index 00000000..4e01421e --- /dev/null +++ b/src/System.cpp @@ -0,0 +1,425 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#include +#include +#include + +#include "../include/dll.h" +#include "dds.h" + +#include "System.h" +#include "SolveBoard.h" + +#define DDS_SYSTEM_THREAD_BASIC 0 +#define DDS_SYSTEM_THREAD_WINAPI 1 +#define DDS_SYSTEM_THREAD_OPENMP 2 +#define DDS_SYSTEM_THREAD_GCD 3 +#define DDS_SYSTEM_THREAD_BOOST 4 +#define DDS_SYSTEM_THREAD_SIZE 5 + +const vector DDS_SYSTEM_PLATFORM = +{ + "", + "Windows", + "Cygwin", + "Linux", + "Apple" +}; + +const vector DDS_SYSTEM_COMPILER = +{ + "", + "Microsoft Visual C++", + "MinGW", + "GNU g++", + "clang" +}; + +const vector DDS_SYSTEM_CONSTRUCTOR = +{ + "", + "DllMain", + "Unix-style" +}; + +const vector DDS_SYSTEM_THREADING = +{ + "None", + "Windows", + "OpenMP", + "GCD", + "Boost" +}; + + +System::System() +{ + System::Reset(); +} + + +System::~System() +{ +} + + +void System::Reset() +{ + runCat = DDS_SYSTEM_SOLVE; + numThreads = 1; + preferredSystem = DDS_SYSTEM_THREAD_BASIC; + + availableSystem.resize(DDS_SYSTEM_THREAD_SIZE); + + availableSystem[DDS_SYSTEM_THREAD_BASIC] = true; + +#ifdef _MSC_VER + availableSystem[DDS_SYSTEM_THREAD_WINAPI] = true; +#else + availableSystem[DDS_SYSTEM_THREAD_WINAPI] = false; +#endif + +#ifdef _OPENMP + availableSystem[DDS_SYSTEM_THREAD_OPENMP] = true; +#else + availableSystem[DDS_SYSTEM_THREAD_OPENMP] = false; +#endif + +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) + availableSystem[DDS_SYSTEM_THREAD_GCD] = true; +#else + availableSystem[DDS_SYSTEM_THREAD_GCD] = false; +#endif + +#ifdef BOOST_VERSION + availableSystem[DDS_SYSTEM_THREAD_BOOST] = true; +#else + availableSystem[DDS_SYSTEM_THREAD_BOOST] = false; +#endif + + InitPtrList.resize(DDS_SYSTEM_THREAD_SIZE); + InitPtrList[DDS_SYSTEM_THREAD_BASIC] = &System::InitThreadsBasic; + InitPtrList[DDS_SYSTEM_THREAD_WINAPI] = &System::InitThreadsWinAPI; + InitPtrList[DDS_SYSTEM_THREAD_OPENMP] = &System::InitThreadsOpenMP; + InitPtrList[DDS_SYSTEM_THREAD_GCD] = &System::InitThreadsGCD; + InitPtrList[DDS_SYSTEM_THREAD_BOOST] = &System::InitThreadsBoost; + + RunPtrList.resize(DDS_SYSTEM_THREAD_SIZE); + RunPtrList[DDS_SYSTEM_THREAD_BASIC] = &System::RunThreadsBasic; + RunPtrList[DDS_SYSTEM_THREAD_WINAPI] = &System::RunThreadsWinAPI; + RunPtrList[DDS_SYSTEM_THREAD_OPENMP] = &System::RunThreadsOpenMP; + RunPtrList[DDS_SYSTEM_THREAD_GCD] = &System::RunThreadsGCD; + RunPtrList[DDS_SYSTEM_THREAD_BOOST] = &System::RunThreadsBoost; + + // TODO Correct functions + CallbackSimpleList.resize(DDS_SYSTEM_SIZE); + CallbackSimpleList[DDS_SYSTEM_SOLVE] = SolveChunkCommon; + CallbackSimpleList[DDS_SYSTEM_CALC] = SolveChunkCommon; + CallbackSimpleList[DDS_SYSTEM_PLAY] = SolveChunkCommon; + + CallbackComplexList.resize(DDS_SYSTEM_SIZE); + CallbackComplexList[DDS_SYSTEM_SOLVE] = SolveChunkDDtableCommon; + CallbackComplexList[DDS_SYSTEM_CALC] = SolveChunkDDtableCommon; + CallbackComplexList[DDS_SYSTEM_PLAY] = SolveChunkDDtableCommon; +} + + +int System::Register( + const unsigned code, + const int nThreads) +{ + if (code >= DDS_SYSTEM_SIZE) + return RETURN_THREAD_MISSING; // Not quite right; + + runCat = code; + + if (nThreads < 1 || nThreads >= MAXNOOFTHREADS) + return RETURN_THREAD_INDEX; + + numThreads = nThreads; + return RETURN_NO_FAULT; +} + + +int System::PreferThreading(const unsigned code) +{ + if (code >= DDS_SYSTEM_THREAD_SIZE) + return RETURN_THREAD_MISSING; + + if (! availableSystem[code]) + return RETURN_THREAD_MISSING; + + preferredSystem = code; + return RETURN_NO_FAULT; +} + + +////////////////////////////////////////////////////////////////////// +// Basic // +////////////////////////////////////////////////////////////////////// + +int System::InitThreadsBasic() +{ + return RETURN_NO_FAULT; +} + + +int System::RunThreadsBasic() +{ + (*fptr)(0); + return RETURN_NO_FAULT; +} + + +////////////////////////////////////////////////////////////////////// +// WinAPI // +////////////////////////////////////////////////////////////////////// + +int System::InitThreadsWinAPI() +{ +#ifdef _WIN32 + threadIndex = -1; + for (int k = 0; k < numThreads; k++) + { + solveAllEvents[k] = CreateEvent(NULL, FALSE, FALSE, 0); + if (solveAllEvents[k] == 0) + return RETURN_THREAD_CREATE; + } +#endif + + return RETURN_NO_FAULT; +} + + +#ifdef _WIN32 +DWORD CALLBACK System::WinCallback(void *) +{ + int thid; + thid = InterlockedIncrement(&threadIndex); + (*fptr)(thid); + + if (SetEvent(solveAllEvents[thid]) == 0) + return 0; + + return 1; +} +#endif + + +int System::RunThreadsWinAPI() +{ +#ifdef _WIN32 + + for (int k = 0; k < numThreads; k++) + { + int res = QueueUserWorkItem(&System::WinCallback, &k, + WT_EXECUTELONGFUNCTION); + if (res != 1) + return res; + } + + DWORD solveAllWaitResult; + solveAllWaitResult = WaitForMultipleObjects( + static_cast(numThreads), solveAllEvents, TRUE, INFINITE); + + if (solveAllWaitResult != WAIT_OBJECT_0) + return RETURN_THREAD_WAIT; + + for (int k = 0; k < noOfThreads; k++) + CloseHandle(solveAllEvents[k]); +#endif + + return RETURN_NO_FAULT; +} + + +////////////////////////////////////////////////////////////////////// +// OpenMP // +////////////////////////////////////////////////////////////////////// + +int System::InitThreadsOpenMP() +{ + // Added after suggestion by Dirk Willecke. +#ifdef _OPENMP + if (omp_get_dynamic()) + omp_set_dynamic(0); + + omp_set_num_threads(numThreads); +#endif + + return RETURN_NO_FAULT; +} + + +int System::RunThreadsOpenMP() +{ +#ifdef _OPENMP + int thid; + #pragma omp parallel default(none) private(thid) + { + #pragma omp while schedule(dynamic, chunk) + while (1) + { + thid = omp_get_thread_num(); + (*fptr)(thid); + } + } +#endif + + return RETURN_NO_FAULT; +} + + +////////////////////////////////////////////////////////////////////// +// GCD // +////////////////////////////////////////////////////////////////////// + +int System::InitThreadsGCD() +{ + return RETURN_NO_FAULT; +} + + +int System::RunThreadsGCD() +{ +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) + dispatch_apply(static_cast(noOfThreads), + dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), + ^(size_t t) + { + thid = omp_get_thread_num(); + (*fptr)(thid); + } +#endif + + return RETURN_NO_FAULT; +} + + +////////////////////////////////////////////////////////////////////// +// Boost // +////////////////////////////////////////////////////////////////////// + +int System::InitThreadsBoost() +{ +#ifdef BOOST_VERSION + threads.resize(static_cast(numThreads)); +#endif + return RETURN_NO_FAULT; +} + + +int System::RunThreadsBoost() +{ +#ifdef BOOST_VERSION + const unsigned nu = static_cast(numThreads); + for (unsigned k = 0; k < nu; k++) + threads[k] = new thread(fptr, k); + + for (unsigned k = 0; k < nu; k++) + { + threads[k]->join(); + delete threads[k]; + } +#endif + + return RETURN_NO_FAULT; +} + + +int System::InitThreads() +{ + return (this->*InitPtrList[preferredSystem])(); +} + + +int System::RunThreads(const int chunkSize) +{ + // TODO Add timing on the caller side, not here in System + + fptr = (chunkSize == 1 ? + CallbackSimpleList[runCat] : CallbackComplexList[runCat]); + + return (this->*RunPtrList[preferredSystem])(); +} + + +string System::str(DDSInfo * info) const +{ + info->major = DDS_VERSION / 10000; + info->minor = (DDS_VERSION - info->major * 10000) / 100; + info->patch = DDS_VERSION % 100; + + sprintf(info->versionString, "%d.%d.%d", + info->major, info->minor, info->patch); + + info->system = 0; + info->compiler = 0; + info->constructor = 0; + info->threading = 0; + info->noOfThreads = numThreads; + +#if defined(_WIN32) + info->system = 1; +#elif defined(__CYGWIN__) + info->system = 2; +#elif defined(__linux) + info->system = 3; +#elif defined(__APPLE__) + info->system = 4; +#endif + + stringstream ss; + ss << "DDS DLL\n-------\n"; + ss << left << setw(13) << "System" << + setw(20) << right << + DDS_SYSTEM_PLATFORM[static_cast(info->system)] << "\n"; + +#if defined(_MSC_VER) + info->compiler = 1; +#elif defined(__MINGW32__) + info->compiler = 2; +#elif defined(__GNUC__) + info->compiler = 3; +#elif defined(__clang__) + info->compiler = 4; +#endif + ss << left << setw(13) << "Compiler" << + setw(20) << right << + DDS_SYSTEM_COMPILER[static_cast(info->compiler)] << "\n"; + +#if defined(USES_DLLMAIN) + info->constructor = 1; +#elif defined(USES_CONSTRUCTOR) + info->constructor = 2; +#endif + ss << left << setw(13) << "Constructor" << + setw(20) << right << + DDS_SYSTEM_CONSTRUCTOR[static_cast(info->constructor)] << + "\n"; + + ss << left << setw(9) << "Threading"; + string sy = ""; + for (unsigned k = 0; k < DDS_SYSTEM_THREAD_SIZE; k++) + { + if (availableSystem[k]) + { + sy += " " + DDS_SYSTEM_THREADING[k]; + if (k == preferredSystem) + sy += "(*)"; + } + } + ss << setw(24) << right << sy << "\n"; + + strcpy(info->systemString, ss.str().c_str()); + return ss.str(); +} + diff --git a/src/System.h b/src/System.h new file mode 100644 index 00000000..c072bdd1 --- /dev/null +++ b/src/System.h @@ -0,0 +1,113 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_SYSTEM_H +#define DDS_SYSTEM_H + +/* + This class encapsulates all(?) the system-dependent stuff. + */ + +#include +#include + +// Boost: Disable some header warnings. + +#ifdef BOOST_VERSION + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable: 4061 4191 4365 4571 4619 4625 4626 5026 5027 50 31) + #endif + + #include + + #ifdef _MSC_VER + #pragma warning(pop) + #endif +#endif + +#include "dds.h" + +using namespace std; + +#define DDS_SYSTEM_SOLVE 0 +#define DDS_SYSTEM_CALC 1 +#define DDS_SYSTEM_PLAY 2 +#define DDS_SYSTEM_SIZE 3 + + +class System +{ + private: + + unsigned runCat; // SOLVE / CALC / PLAY + + int numThreads; + + unsigned preferredSystem; + + vector availableSystem; + + typedef void (*fptrType)(const int thid); + vector CallbackSimpleList; + vector CallbackComplexList; + + typedef int (System::*InitPtr)(); + vector InitPtrList; + + typedef int (System::*RunPtr)(); + vector RunPtrList; + + fptrType fptr; + +#ifdef BOOST_VERSION + using boost::thread; + vector threads; +#endif + +#ifdef _MSC_VER + HANDLE solveAllEvents[MAXNOOFTHREADS]; + LONG threadIndex; + DWORD CALLBACK WinCallback(void *); +#endif + + int InitThreadsBasic(); + int InitThreadsBoost(); + int InitThreadsOpenMP(); + int InitThreadsGCD(); + int InitThreadsWinAPI(); + + int RunThreadsBasic(); + int RunThreadsBoost(); + int RunThreadsOpenMP(); + int RunThreadsGCD(); + int RunThreadsWinAPI(); + + + public: + System(); + + ~System(); + + void Reset(); + + int Register( + const unsigned code, + const int noOfThreads = 1); + + int PreferThreading(const unsigned code); + + int InitThreads(); + + int RunThreads(const int chunkSize); + + string str(DDSInfo * info) const; +}; + +#endif From c8a648193889758a0eec7c10a809d3fb6c1c98fa Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Wed, 14 Mar 2018 17:25:57 +0100 Subject: [PATCH 007/132] dtest works again, at least for Visual C++ / basic + WinAPI --- .gitignore | 4 ++++ src/Makefiles/Makefile_Visual | 11 ++++++++++- src/SolveBoard.cpp | 24 +++++++++++++++++++----- src/System.cpp | 32 +++++++++++++++++++++++++------- src/System.h | 4 ++-- test/Makefiles/Makefile_Visual | 10 ++++++++++ test/dtest.cpp | 8 +++++--- test/testcommon.cpp | 25 ++++++++++++++++++++++++- test/testcommon.h | 1 + 9 files changed, 100 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 6dc4e6a1..c4bb56c2 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,7 @@ test/itest *.exe *.swp *.bak + +*.exp +*.lib +*.res diff --git a/src/Makefiles/Makefile_Visual b/src/Makefiles/Makefile_Visual index 368331eb..565017c0 100644 --- a/src/Makefiles/Makefile_Visual +++ b/src/Makefiles/Makefile_Visual @@ -21,18 +21,23 @@ CC_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs WARN_FLAGS = \ /Wall \ /wd4127 \ + /wd4365 \ /wd4464 \ /wd4555 \ + /wd4571 \ /wd4625 \ /wd4626 \ /wd4668 \ /wd4701 \ /wd4710 \ /wd4711 \ + /wd4774 \ /wd4820 \ /wd4986 \ /wd4987 \ /wd4996 \ + /wd5026 \ + /wd5027 \ /WX # Here you can turn on warnings and add /DSMALL_MEMORY_OPTION. @@ -70,6 +75,7 @@ SOURCE_FILES = \ SolveBoard_WinAPI.cpp \ SolverIF.cpp \ Stats.cpp \ + System.cpp \ Timer.cpp \ TransTable.cpp @@ -122,7 +128,7 @@ DealerPar.obj: dds.h debug.h ../include/portab.h TransTable.h DealerPar.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Init.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.obj: ABsearch.h +Init.obj: ABsearch.h System.h LaterTricks.obj: dds.h debug.h ../include/portab.h TransTable.h LaterTricks.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h LaterTricks.obj: Scheduler.h threadmem.h LaterTricks.h @@ -165,6 +171,9 @@ SolverIF.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h SolverIF.obj: threadmem.h ABsearch.h SolverIF.h Stats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Stats.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +System.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +System.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h System.h +System.obj: SolveBoard.h Timer.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h TransTable.obj: dds.h debug.h ../include/portab.h TransTable.h diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index be97dad1..00ebc2c6 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -13,6 +13,7 @@ #include "SolverIF.h" #include "SolveBoard.h" #include "Scheduler.h" +#include "System.h" #include "PBN.h" #include "debug.h" @@ -26,6 +27,7 @@ extern int noOfThreads; long chunk; paramType param; +extern System sysdep; #if (defined(DDS_THREADS_SINGLE)) @@ -180,23 +182,35 @@ int SolveAllBoardsN( if (bop->noOfBoards > MAXNOOFBOARDS) return RETURN_TOO_MANY_BOARDS; - int retInit = (* initPtr)(); - if (retInit != RETURN_NO_FAULT) - return retInit; - param.bop = bop; param.solvedp = solvedp; param.noOfBoards = bop->noOfBoards; if (source == 0) + { scheduler.Register(bop, SCHEDULER_SOLVE); + sysdep.Register(DDS_SYSTEM_SOLVE, noOfThreads); + } else + { scheduler.Register(bop, SCHEDULER_CALC); + sysdep.Register(DDS_SYSTEM_CALC, noOfThreads); + } for (int k = 0; k < MAXNOOFBOARDS; k++) solvedp->solvedBoard[k].cards = 0; - int retRun = (* runPtr)(chunkSize); + // int retInit = (* initPtr)(); + int retInit = sysdep.InitThreads(); + if (retInit != RETURN_NO_FAULT) + return retInit; + + + START_BLOCK_TIMER; + // int retRun = (* runPtr)(chunkSize); + int retRun = sysdep.RunThreads(chunkSize); + END_BLOCK_TIMER; + if (retRun != RETURN_NO_FAULT) return retRun; diff --git a/src/System.cpp b/src/System.cpp index 4e01421e..cab93990 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -18,6 +18,8 @@ #include "System.h" #include "SolveBoard.h" +extern int noOfThreads; + #define DDS_SYSTEM_THREAD_BASIC 0 #define DDS_SYSTEM_THREAD_WINAPI 1 #define DDS_SYSTEM_THREAD_OPENMP 2 @@ -200,13 +202,20 @@ int System::InitThreadsWinAPI() #ifdef _WIN32 -DWORD CALLBACK System::WinCallback(void *) + +struct WinWrapType { int thid; - thid = InterlockedIncrement(&threadIndex); - (*fptr)(thid); + fptrType fptr; + HANDLE *waitPtr; +}; + +DWORD CALLBACK WinCallback(void * p) +{ + WinWrapType * winWrap = static_cast(p); + (*(winWrap->fptr))(winWrap->thid); - if (SetEvent(solveAllEvents[thid]) == 0) + if (SetEvent(winWrap->waitPtr[winWrap->thid]) == 0) return 0; return 1; @@ -217,11 +226,17 @@ DWORD CALLBACK System::WinCallback(void *) int System::RunThreadsWinAPI() { #ifdef _WIN32 - + vector winWrap; + winWrap.resize(numThreads); + for (int k = 0; k < numThreads; k++) { - int res = QueueUserWorkItem(&System::WinCallback, &k, - WT_EXECUTELONGFUNCTION); + winWrap[k].thid = k; + winWrap[k].fptr = fptr; + winWrap[k].waitPtr = solveAllEvents; + + int res = QueueUserWorkItem(WinCallback, + static_cast(&winWrap[k]), WT_EXECUTELONGFUNCTION); if (res != 1) return res; } @@ -419,6 +434,9 @@ string System::str(DDSInfo * info) const } ss << setw(24) << right << sy << "\n"; + ss << left << setw(17) << "Number of threads" << + setw(16) << right << noOfThreads << "\n"; + strcpy(info->systemString, ss.str().c_str()); return ss.str(); } diff --git a/src/System.h b/src/System.h index c072bdd1..05f40e26 100644 --- a/src/System.h +++ b/src/System.h @@ -41,6 +41,8 @@ using namespace std; #define DDS_SYSTEM_PLAY 2 #define DDS_SYSTEM_SIZE 3 +typedef void (*fptrType)(const int thid); + class System { @@ -54,7 +56,6 @@ class System vector availableSystem; - typedef void (*fptrType)(const int thid); vector CallbackSimpleList; vector CallbackComplexList; @@ -74,7 +75,6 @@ class System #ifdef _MSC_VER HANDLE solveAllEvents[MAXNOOFTHREADS]; LONG threadIndex; - DWORD CALLBACK WinCallback(void *); #endif int InitThreadsBasic(); diff --git a/test/Makefiles/Makefile_Visual b/test/Makefiles/Makefile_Visual index 36060bbd..c3cd1994 100644 --- a/test/Makefiles/Makefile_Visual +++ b/test/Makefiles/Makefile_Visual @@ -24,17 +24,27 @@ LINK_FLAGS = /LTCG WARN_FLAGS = \ /Wall \ /wd4127 \ + /wd4242 \ + /wd4244 \ + /wd4365 \ /wd4464 \ /wd4514 \ + /wd4530 \ /wd4555 \ + /wd4577 \ + /wd4625 \ + /wd4626 \ /wd4668 \ /wd4701 \ /wd4710 \ /wd4711 \ + /wd4774 \ /wd4820 \ /wd4986 \ /wd4987 \ /wd4996 \ + /wd5026 \ + /wd5027 \ /WX # Here you can turn on warnings. diff --git a/test/dtest.cpp b/test/dtest.cpp index 9e16fb6b..a32c7c8f 100644 --- a/test/dtest.cpp +++ b/test/dtest.cpp @@ -16,11 +16,13 @@ int main(int argc, char * argv[]) { int ncores = 0; - if (argc == 4) + if (argc >= 4) ncores = atoi(argv[3]); - SetMaxThreads(ncores); + if (argc >= 5) + SetThreading(threadingCode(argv[4])); + DDSInfo info; GetDDSInfo(&info); printf("%s", info.systemString); @@ -32,7 +34,7 @@ int main(int argc, char * argv[]) printf("_WIN32\n"); fflush(stdout); #elif defined(_WIN64) - printf("_WIN32\n"); + printf("_WIN64\n"); fflush(stdout); #else printf("No WIN\n"); diff --git a/test/testcommon.cpp b/test/testcommon.cpp index 35dcdb91..34534d5c 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -12,10 +12,14 @@ #include #include #include +#include +#include #include "../include/dll.h" #include "../include/portab.h" #include "testStats.h" +using namespace std; + #ifdef _WIN32 LARGE_INTEGER frequency, tu0, tu1; @@ -59,7 +63,7 @@ int realMain(int argc, char * argv[]) TestSetTimerName("Timer title"); - if (argc != 3 && argc != 4) + if (argc != 3 && argc != 4 && argc != 5) { printf( "Usage: dtest file.txt solve|calc|par|dealerpar|play [ncores]\n"); @@ -258,6 +262,25 @@ void set_constants() } +int threadingCode(char * arg) +{ + string str(arg); + transform(str.begin(), str.end(), str.begin(), ::tolower); + if (str == "basic") + return 0; + else if (str == "winapi") + return 1; + else if (str == "openmp") + return 2; + else if (str == "gcd") + return 3; + else if (str == "boost") + return 4; + else + return 5; +} + + bool read_file( char * fname, int * number, diff --git a/test/testcommon.h b/test/testcommon.h index a8e0cf95..b067403f 100644 --- a/test/testcommon.h +++ b/test/testcommon.h @@ -10,3 +10,4 @@ int realMain(int argc, char * argv[]); +int threadingCode(char * arg); From 66897a131acef4733b4318cfba75f0596025550b Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Wed, 14 Mar 2018 22:06:46 +0100 Subject: [PATCH 008/132] Cygwin works with basic, boost, openmp --- src/Init.cpp | 4 - src/Makefiles/Makefile_Visual_all | 185 ++++++++++++++++++++++++++++++ src/Makefiles/Makefile_cygwin_all | 185 ++++++++++++++++++++++++++++++ src/PlayAnalyser.cpp | 8 +- src/SolveBoard.cpp | 23 ---- src/SolveBoard_OpenMP.cpp | 20 +++- src/System.cpp | 33 +++--- src/System.h | 6 +- test/testcommon.cpp | 4 +- 9 files changed, 415 insertions(+), 53 deletions(-) create mode 100644 src/Makefiles/Makefile_Visual_all create mode 100644 src/Makefiles/Makefile_cygwin_all diff --git a/src/Init.cpp b/src/Init.cpp index 52f7512b..b2aeb9d5 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -91,9 +91,6 @@ void STDCALL SetMaxThreads( unsigned long long kilobytesFree = 0; int ncores = 1; -#ifdef DDS_THREADS_SINGLE - noOfThreads = 1; -#else #if defined(_WIN32) || defined(__CYGWIN__) /* Using GlobalMemoryStatusEx instead of GlobalMemoryStatus was suggested by Lorne Anderson. */ @@ -138,7 +135,6 @@ void STDCALL SetMaxThreads( fclose(fifo); ncores = sysconf(_SC_NPROCESSORS_ONLN); -#endif #endif // 70%, capped at 2 GB. diff --git a/src/Makefiles/Makefile_Visual_all b/src/Makefiles/Makefile_Visual_all new file mode 100644 index 00000000..63d2d82e --- /dev/null +++ b/src/Makefiles/Makefile_Visual_all @@ -0,0 +1,185 @@ +# This the DDS Makefile for Windows and the Microsoft Visual C++ +# compiler. It assumes a Unix-like setup for some commands. + +# The "windres" and "cvtres" tools are used for putting version +# information into the DLL in a way that Windows can see. +# It is not mandatory, and if you don't have those tools, +# You can remove $(VFILE).obj in the target line below. + +# If you want to compile a single-threaded version or a small-memory +# version, change flags below. + +# The boost paths on my systems. + +BOOST32_PATH1 = \User\sheins\boost_1_66_0_x32 +BOOST32_LIB1 = $(BOOST32_PATH1)\lib32-msvc-14.0 + +BOOST32_PATH2 = \Users\s.hein\Documents\Programs\boost_1_66_0_x32 +BOOST32_LIB2 = $(BOOST32_PATH2)\lib32-msvc-14.0 + +CC_BOOST_INCL = /I$(BOOST32_PATH1) /I$(BOOST32_PATH2) +CC_BOOST_LINK = /link /LIBPATH:$(BOOST32_LIB1) /LIBPATH:$(BOOST32_LIB2) + +# If your Microsoft compiler is not called cl, change it here. +CC = cl +CC_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs /openmp /DDDS_THREADS_BOOST + +# These flags are not turned on by default, but DDS should pass them. +# Turn them on below. +WARN_FLAGS = \ + /Wall \ + /wd4127 \ + /wd4365 \ + /wd4464 \ + /wd4555 \ + /wd4571 \ + /wd4623 \ + /wd4625 \ + /wd4626 \ + /wd4668 \ + /wd4701 \ + /wd4710 \ + /wd4711 \ + /wd4774 \ + /wd4820 \ + /wd4986 \ + /wd4987 \ + /wd4996 \ + /wd5026 \ + /wd5027 \ + /wd5031 \ + /WX + +# Here you can turn on/off warnings. +# You can also add /DDDS_THREADS_SINGLE and add /DSMALL_MEMORY_OPTION. +CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) + +LIB_FLAGS = $(CC_BOOST_LINK) + +DLLBASE = dds +DLL = $(DLLBASE).dll +DLIB = $(DLLBASE).lib +EXPORTER = Exports.def + +VFILE = ddsres + +SOURCE_FILES = \ + dds.cpp \ + ABsearch.cpp \ + ABstats.cpp \ + CalcTables.cpp \ + DealerPar.cpp \ + Init.cpp \ + LaterTricks.cpp \ + Moves.cpp \ + Par.cpp \ + PlayAnalyser.cpp \ + PBN.cpp \ + QuickTricks.cpp \ + Scheduler.cpp \ + SolveBoard.cpp \ + SolveBoard_basic.cpp \ + SolveBoard_boost.cpp \ + SolveBoard_GCD.cpp \ + SolveBoard_OpenMP.cpp \ + SolveBoard_WinAPI.cpp \ + SolverIF.cpp \ + Stats.cpp \ + System.cpp \ + Timer.cpp \ + TransTable.cpp + +OBJ_FILES = $(subst .cpp,.obj,$(SOURCE_FILES)) $(VFILE).obj + +vs: $(OBJ_FILES) + $(CC) $(CC_FULL_FLAGS) $(OBJ_FILES) $(EXPORTER) $(LIB_FLAGS) /out:$(DLL) + +%.obj: %.cpp + $(CC) $(CC_FULL_FLAGS) $(CC_BOOST_INCL) /c $< + +$(DLLBASE).res: $(DLLBASE).rc + windres $(DLLBASE).rc $(DLLBASE).res + +$(VFILE).obj: $(DLLBASE).res + cvtres /MACHINE:X86 /OUT:$(VFILE).obj $(DLLBASE).res + +depend: + makedepend -Y -o.obj -- $(CC_FLAGS) -- $(SOURCE_FILES) + +clean: + rm -f $(OBJ_FILES) $(DLL) $(DLLBASE).{lib,exp,def,obj,res} + +install: + test -d ../test || mkdir ../test + test -d ../examples || mkdir ../examples + cp $(DLL) $(DLIB) ../test + cp $(DLL) $(DLIB) ../examples + +# DO NOT DELETE + +dds.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +dds.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h +ABsearch.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABsearch.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h +ABsearch.obj: QuickTricks.h LaterTricks.h ABsearch.h +ABstats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABstats.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +CalcTables.obj: dds.h debug.h ../include/portab.h TransTable.h +CalcTables.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +CalcTables.obj: Scheduler.h SolveBoard.h PBN.h +DealerPar.obj: dds.h debug.h ../include/portab.h TransTable.h +DealerPar.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h +Init.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Init.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h +Init.obj: ABsearch.h System.h +LaterTricks.obj: dds.h debug.h ../include/portab.h TransTable.h +LaterTricks.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +LaterTricks.obj: Scheduler.h threadmem.h LaterTricks.h +Moves.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Moves.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h +Par.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Par.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +PlayAnalyser.obj: dds.h debug.h ../include/portab.h TransTable.h +PlayAnalyser.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +PlayAnalyser.obj: Scheduler.h threadmem.h SolverIF.h PBN.h +PBN.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +PBN.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h +QuickTricks.obj: dds.h debug.h ../include/portab.h TransTable.h +QuickTricks.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +QuickTricks.obj: Scheduler.h threadmem.h QuickTricks.h +Scheduler.obj: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h +Scheduler.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard.obj: Scheduler.h threadmem.h SolverIF.h SolveBoard.h PBN.h +SolveBoard.obj: SolveBoard_basic.h SolveBoard_boost.h SolveBoard_GCD.h +SolveBoard.obj: SolveBoard_OpenMP.h SolveBoard_WinAPI.h +SolveBoard_basic.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_basic.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_basic.obj: Scheduler.h SolveBoard.h SolveBoard_basic.h +SolveBoard_boost.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_boost.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_boost.obj: Scheduler.h SolveBoard.h SolveBoard_boost.h +SolveBoard_GCD.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_GCD.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_GCD.obj: Scheduler.h SolveBoard.h SolveBoard_GCD.h +SolveBoard_OpenMP.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_OpenMP.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_OpenMP.obj: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h +SolveBoard_WinAPI.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_WinAPI.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_WinAPI.obj: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h +SolverIF.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +SolverIF.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h +SolverIF.obj: threadmem.h ABsearch.h SolverIF.h +Stats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Stats.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +System.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +System.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h System.h +System.obj: SolveBoard.h +Timer.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Timer.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +TransTable.obj: dds.h debug.h ../include/portab.h TransTable.h +TransTable.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +TransTable.obj: Scheduler.h + diff --git a/src/Makefiles/Makefile_cygwin_all b/src/Makefiles/Makefile_cygwin_all new file mode 100644 index 00000000..e176484c --- /dev/null +++ b/src/Makefiles/Makefile_cygwin_all @@ -0,0 +1,185 @@ +# This the DDS Makefile for Cygwin under Windows and the +# GNU g++ compiler. It assumes a Unix-like setup for some commands. + +# The "windres" and "cvtres" tools are used for putting version +# information into the DLL in a way that Windows can see. +# It is not mandatory, and if you don't have those tools, +# You can remove $(VFILE).obj in the target line below. + +# If you want to compile a single-threaded version or a small-memory +# version, change flags below. + +# If your compiler name is not given here, change it. +CC = g++ + +CC_FLAGS = -O3 -flto -fopenmp -mtune=generic -fno-use-linker-plugin + +LD_FLAGS = \ + -Wl,--subsystem,windows \ + -Wl,--output-def,$(DLLBASE).def \ + -Wl,--dynamicbase \ + -Wl,--nxcompat \ + -Wl,--no-seh \ + -Wl,--enable-stdcall-fixup \ + -lboost_system \ + -lboost_thread + +# These flags are not turned on be default, but DDS should pass them. +# Turn them on below. +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Wformat=2 \ + -Winit-self \ + -Wlogical-op \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wnoexcept \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wredundant-decls \ + -Wsign-promo \ + -Wstrict-null-sentinel \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long + +# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION +# and/or -DDDS_THREADS_SINGLE. +CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) -DDDS_THREADS_BOOST + +LIB_FLAGS = -shared + +DLLBASE = dds +DLL = $(DLLBASE).dll +EXPORTER = Exports.def + +VFILE = ddsres +WINDRES_FLAG = + +SOURCE_FILES = \ + dds.cpp \ + ABsearch.cpp \ + ABstats.cpp \ + CalcTables.cpp \ + DealerPar.cpp \ + Init.cpp \ + LaterTricks.cpp \ + Moves.cpp \ + Par.cpp \ + PlayAnalyser.cpp \ + PBN.cpp \ + QuickTricks.cpp \ + Scheduler.cpp \ + SolveBoard.cpp \ + SolveBoard_basic.cpp \ + SolveBoard_boost.cpp \ + SolveBoard_GCD.cpp \ + SolveBoard_OpenMP.cpp \ + SolveBoard_WinAPI.cpp \ + SolverIF.cpp \ + Stats.cpp \ + System.cpp \ + Timer.cpp \ + TransTable.cpp + +O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o + + +cygwin: $(O_FILES) + $(CC) $(LIB_FLAGS) $(CC_FULL_FLAGS) $(O_FILES) $(LD_FLAGS) $(EXPORTER) -o $(DLL) + +%.o: %.cpp + $(CC) $(CC_FULL_FLAGS) -c $< + +$(DLLBASE).res: $(DLLBASE).rc + windres $(DLLBASE).rc $(DLLBASE).res + +$(VFILE).o: $(DLLBASE).rc + windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o + +depend: + makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) + +clean: + rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} + +install: + test -d ../test || mkdir ../test + test -d ../examples || mkdir ../examples + cp $(DLL) $(DLLBASE).def ../test + cp $(DLL) $(DLLBASE).def ../examples + + +# DO NOT DELETE + +dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +dds.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h +ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABsearch.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h +ABsearch.o: QuickTricks.h LaterTricks.h ABsearch.h +ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABstats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +CalcTables.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h +CalcTables.o: PBN.h +DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +DealerPar.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Init.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h +Init.o: ABsearch.h System.h +LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h +LaterTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h +LaterTricks.o: threadmem.h LaterTricks.h +Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Moves.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h +Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Par.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h +PlayAnalyser.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +PlayAnalyser.o: Scheduler.h threadmem.h SolverIF.h PBN.h +PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +PBN.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h +QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h +QuickTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h +QuickTricks.o: threadmem.h QuickTricks.h +Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h +Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h +SolveBoard.o: SolverIF.h SolveBoard.h System.h PBN.h SolveBoard_basic.h +SolveBoard.o: SolveBoard_boost.h SolveBoard_GCD.h SolveBoard_OpenMP.h +SolveBoard.o: SolveBoard_WinAPI.h +SolveBoard_basic.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_basic.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_basic.o: Scheduler.h SolveBoard.h SolveBoard_basic.h +SolveBoard_boost.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_boost.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_boost.o: Scheduler.h SolveBoard.h SolveBoard_boost.h +SolveBoard_GCD.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_GCD.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_GCD.o: Scheduler.h SolveBoard.h SolveBoard_GCD.h +SolveBoard_OpenMP.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_OpenMP.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_OpenMP.o: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h +SolveBoard_WinAPI.o: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard_WinAPI.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard_WinAPI.o: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h +SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h +SolverIF.o: ABsearch.h SolverIF.h +Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +System.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +System.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h System.h SolveBoard.h +Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +TransTable.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 494cd225..5578d951 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -465,10 +465,15 @@ int STDCALL AnalyseAllPlaysBin( START_BLOCK_TIMER; + const int n = noOfThreads; #pragma omp parallel default(none) shared(scheduler, bop, plp, solvedp, solved, pchunk, pfail) private(st, index, thid, res) { - #pragma omp while schedule(dynamic, pchunk) + // #pragma omp while schedule(dynamic, pchunk) + #pragma omp for schedule(dynamic, pchunk) + // TODO + for (int nt = 0; nt < 999; nt++) + { while (1) { #if defined (_OPENMP) && !defined(DDS_THREADS_SINGLE) @@ -494,6 +499,7 @@ int STDCALL AnalyseAllPlaysBin( else pfail = res; } + } } END_BLOCK_TIMER; diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 00ebc2c6..57a98d87 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -30,27 +30,6 @@ paramType param; extern System sysdep; -#if (defined(DDS_THREADS_SINGLE)) - auto initPtr = SolveInitThreadsNone; - auto runPtr = SolveRunThreadsNone; -#elif (defined(DDS_THREADS_BOOST)) - auto initPtr = SolveInitThreadsBoost; - auto runPtr = SolveRunThreadsBoost; -#elif (defined(_OPENMP)) - auto initPtr = SolveInitThreadsOpenMP; - auto runPtr = SolveRunThreadsOpenMP; -#elif (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) - auto initPtr = SolveInitThreadsGCD; - auto runPtr = SolveRunThreadsGCD; -#elif (defined(_WIN32) || defined(__CYGWIN__)) - auto initPtr = SolveInitThreadsWinAPI; - auto runPtr = SolveRunThreadsWinAPI; -#else - auto initPtr = nullptr; - auto runPtr = nullptr; -#endif - - void SolveChunkCommon( const int thid) { @@ -200,14 +179,12 @@ int SolveAllBoardsN( for (int k = 0; k < MAXNOOFBOARDS; k++) solvedp->solvedBoard[k].cards = 0; - // int retInit = (* initPtr)(); int retInit = sysdep.InitThreads(); if (retInit != RETURN_NO_FAULT) return retInit; START_BLOCK_TIMER; - // int retRun = (* runPtr)(chunkSize); int retRun = sysdep.RunThreads(chunkSize); END_BLOCK_TIMER; diff --git a/src/SolveBoard_OpenMP.cpp b/src/SolveBoard_OpenMP.cpp index e4050e21..e03de9da 100644 --- a/src/SolveBoard_OpenMP.cpp +++ b/src/SolveBoard_OpenMP.cpp @@ -38,18 +38,26 @@ int SolveRunThreadsOpenMP( { #pragma omp parallel default(none) private(thid) { - #pragma omp while schedule(dynamic, chunk) - thid = omp_get_thread_num(); - SolveChunkCommon(thid); + #pragma omp for schedule(dynamic) + // TODO + for (int k = 0; k < 999; k++) + { + thid = omp_get_thread_num(); + SolveChunkCommon(thid); + } } } else { #pragma omp parallel default(none) private(thid) { - #pragma omp while schedule(dynamic, chunk) - thid = omp_get_thread_num(); - SolveChunkDDtableCommon(thid); + #pragma omp for schedule(dynamic) + for (int k = 0; k < 999; k++) + { + // TODO + thid = omp_get_thread_num(); + SolveChunkDDtableCommon(thid); + } } } END_BLOCK_TIMER; diff --git a/src/System.cpp b/src/System.cpp index cab93990..39ce3dff 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -83,25 +83,27 @@ void System::Reset() availableSystem[DDS_SYSTEM_THREAD_BASIC] = true; -#ifdef _MSC_VER +#if (defined(_MSC_VER) && !defined(DDS_THREADS_SINGLE)) availableSystem[DDS_SYSTEM_THREAD_WINAPI] = true; #else availableSystem[DDS_SYSTEM_THREAD_WINAPI] = false; #endif -#ifdef _OPENMP +#if (defined(_OPENMP) && !defined(DDS_THREADS_SINGLE)) availableSystem[DDS_SYSTEM_THREAD_OPENMP] = true; #else availableSystem[DDS_SYSTEM_THREAD_OPENMP] = false; #endif -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) +#if ((defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || \ + defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) && \ + !defined(DDS_THREADS_SINGLE)) availableSystem[DDS_SYSTEM_THREAD_GCD] = true; #else availableSystem[DDS_SYSTEM_THREAD_GCD] = false; #endif -#ifdef BOOST_VERSION +#if (defined(DDS_THREADS_BOOST) && !defined(DDS_THREADS_SINGLE)) availableSystem[DDS_SYSTEM_THREAD_BOOST] = true; #else availableSystem[DDS_SYSTEM_THREAD_BOOST] = false; @@ -187,7 +189,7 @@ int System::RunThreadsBasic() int System::InitThreadsWinAPI() { -#ifdef _WIN32 +#if (defined(_WIN32) && !defined(DDS_THREADS_SINGLE)) threadIndex = -1; for (int k = 0; k < numThreads; k++) { @@ -201,8 +203,7 @@ int System::InitThreadsWinAPI() } -#ifdef _WIN32 - +#if (defined(_WIN32) && !defined(DDS_THREADS_SINGLE)) struct WinWrapType { int thid; @@ -225,7 +226,7 @@ DWORD CALLBACK WinCallback(void * p) int System::RunThreadsWinAPI() { -#ifdef _WIN32 +#if (defined(_WIN32) && !defined(DDS_THREADS_SINGLE)) vector winWrap; winWrap.resize(numThreads); @@ -263,7 +264,7 @@ int System::RunThreadsWinAPI() int System::InitThreadsOpenMP() { // Added after suggestion by Dirk Willecke. -#ifdef _OPENMP +#if (defined(_OPENMP) && !defined(DDS_THREADS_SINGLE)) if (omp_get_dynamic()) omp_set_dynamic(0); @@ -276,12 +277,12 @@ int System::InitThreadsOpenMP() int System::RunThreadsOpenMP() { -#ifdef _OPENMP +#if (defined(_OPENMP) && !defined(DDS_THREADS_SINGLE)) int thid; #pragma omp parallel default(none) private(thid) { - #pragma omp while schedule(dynamic, chunk) - while (1) + #pragma omp for schedule(dynamic) + for (int k = 0; k < numThreads; k++) { thid = omp_get_thread_num(); (*fptr)(thid); @@ -305,7 +306,9 @@ int System::InitThreadsGCD() int System::RunThreadsGCD() { -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) +#if ((defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || \ + defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) && \ + !defined(DDS_THREADS_SINGLE)) dispatch_apply(static_cast(noOfThreads), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^(size_t t) @@ -325,7 +328,7 @@ int System::RunThreadsGCD() int System::InitThreadsBoost() { -#ifdef BOOST_VERSION +#if (defined(DDS_THREADS_BOOST) && !defined(DDS_THREADS_SINGLE)) threads.resize(static_cast(numThreads)); #endif return RETURN_NO_FAULT; @@ -334,7 +337,7 @@ int System::InitThreadsBoost() int System::RunThreadsBoost() { -#ifdef BOOST_VERSION +#if (defined(DDS_THREADS_BOOST) && !defined(DDS_THREADS_SINGLE)) const unsigned nu = static_cast(numThreads); for (unsigned k = 0; k < nu; k++) threads[k] = new thread(fptr, k); diff --git a/src/System.h b/src/System.h index 05f40e26..188bb8ef 100644 --- a/src/System.h +++ b/src/System.h @@ -19,13 +19,14 @@ // Boost: Disable some header warnings. -#ifdef BOOST_VERSION +#ifdef DDS_THREADS_BOOST #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4061 4191 4365 4571 4619 4625 4626 5026 5027 50 31) #endif #include + using boost::thread; #ifdef _MSC_VER #pragma warning(pop) @@ -67,8 +68,7 @@ class System fptrType fptr; -#ifdef BOOST_VERSION - using boost::thread; +#ifdef DDS_THREADS_BOOST vector threads; #endif diff --git a/test/testcommon.cpp b/test/testcommon.cpp index 34534d5c..091d2e6e 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -66,7 +66,7 @@ int realMain(int argc, char * argv[]) if (argc != 3 && argc != 4 && argc != 5) { printf( - "Usage: dtest file.txt solve|calc|par|dealerpar|play [ncores]\n"); + "Usage: dtest file.txt solve|calc|par|dealerpar|play [ncores [threading]]\n"); return 1; } @@ -262,6 +262,8 @@ void set_constants() } +int threadingCode(char * arg); + int threadingCode(char * arg) { string str(arg); From 181248e78e699b208920f6836ba2e9c8577bb6ac Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Wed, 14 Mar 2018 23:23:06 +0100 Subject: [PATCH 009/132] Some cleanup, still only works for cygwin --- src/IFDEFS | 28 +++++++ src/Makefiles/Makefile_Visual_all | 25 +------ src/NOTES | 23 ++++-- src/SolveBoard.cpp | 6 -- src/SolveBoard_GCD.cpp | 63 ---------------- src/SolveBoard_GCD.h | 18 ----- src/SolveBoard_OpenMP.cpp | 71 ------------------ src/SolveBoard_OpenMP.h | 18 ----- src/SolveBoard_WinAPI.cpp | 117 ------------------------------ src/SolveBoard_WinAPI.h | 18 ----- src/SolveBoard_basic.cpp | 35 --------- src/SolveBoard_basic.h | 18 ----- src/SolveBoard_boost.cpp | 79 -------------------- src/SolveBoard_boost.h | 18 ----- src/System.cpp | 29 ++++++-- src/System.h | 20 ----- 16 files changed, 68 insertions(+), 518 deletions(-) create mode 100644 src/IFDEFS delete mode 100644 src/SolveBoard_GCD.cpp delete mode 100644 src/SolveBoard_GCD.h delete mode 100644 src/SolveBoard_OpenMP.cpp delete mode 100644 src/SolveBoard_OpenMP.h delete mode 100644 src/SolveBoard_WinAPI.cpp delete mode 100644 src/SolveBoard_WinAPI.h delete mode 100644 src/SolveBoard_basic.cpp delete mode 100644 src/SolveBoard_basic.h delete mode 100644 src/SolveBoard_boost.cpp delete mode 100644 src/SolveBoard_boost.h diff --git a/src/IFDEFS b/src/IFDEFS new file mode 100644 index 00000000..7be2bced --- /dev/null +++ b/src/IFDEFS @@ -0,0 +1,28 @@ +Init.cpp:#if defined(_WIN32) || defined(__CYGWIN__) +Init.cpp:#ifdef __APPLE__ +Init.cpp:#ifdef __linux__ +PlayAnalyser.cpp:#if (defined(_WIN32) || defined(__CYGWIN__)) && \ +Scheduler.cpp:#ifdef _WIN32 +Scheduler.cpp:#ifdef _WIN32 +Scheduler.cpp:#ifdef _WIN32 +Scheduler.cpp:#ifdef _WIN32 +Scheduler.cpp:#ifndef _WIN32 +Stats.cpp:#ifdef _WIN32 +Stats.cpp:#ifdef _WIN32 +Stats.cpp:#ifdef _WIN32 +Stats.cpp:#ifdef _WIN32 +Stats.cpp:#ifdef _WIN32 +Stats.cpp:#ifdef _WIN32 +Stats.cpp:#ifndef _WIN32 +System.cpp:#if (defined(_WIN32) && !defined(DDS_THREADS_SINGLE)) +System.cpp:#if (defined(_WIN32) && !defined(DDS_THREADS_SINGLE)) +System.cpp:#if (defined(_WIN32) && !defined(DDS_THREADS_SINGLE)) +System.cpp:#if defined(_WIN32) +System.cpp:#if defined(_MSC_VER) +Timer.cpp:#ifdef _WIN32 +Timer.cpp:#ifdef _WIN32 +Scheduler.h:#ifndef _WIN32 +Scheduler.h:#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) +Scheduler.h:#ifdef _WIN32 +Timer.h:#ifdef _WIN32 +Timer.h:#ifdef _WIN32 diff --git a/src/Makefiles/Makefile_Visual_all b/src/Makefiles/Makefile_Visual_all index 63d2d82e..695467ca 100644 --- a/src/Makefiles/Makefile_Visual_all +++ b/src/Makefiles/Makefile_Visual_all @@ -78,11 +78,6 @@ SOURCE_FILES = \ QuickTricks.cpp \ Scheduler.cpp \ SolveBoard.cpp \ - SolveBoard_basic.cpp \ - SolveBoard_boost.cpp \ - SolveBoard_GCD.cpp \ - SolveBoard_OpenMP.cpp \ - SolveBoard_WinAPI.cpp \ SolverIF.cpp \ Stats.cpp \ System.cpp \ @@ -151,24 +146,9 @@ Scheduler.obj: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h Scheduler.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h SolveBoard.obj: dds.h debug.h ../include/portab.h TransTable.h SolveBoard.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.obj: Scheduler.h threadmem.h SolverIF.h SolveBoard.h PBN.h -SolveBoard.obj: SolveBoard_basic.h SolveBoard_boost.h SolveBoard_GCD.h +SolveBoard.obj: Scheduler.h threadmem.h SolverIF.h SolveBoard.h System.h +SolveBoard.obj: PBN.h SolveBoard_basic.h SolveBoard_boost.h SolveBoard_GCD.h SolveBoard.obj: SolveBoard_OpenMP.h SolveBoard_WinAPI.h -SolveBoard_basic.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_basic.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_basic.obj: Scheduler.h SolveBoard.h SolveBoard_basic.h -SolveBoard_boost.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_boost.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_boost.obj: Scheduler.h SolveBoard.h SolveBoard_boost.h -SolveBoard_GCD.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_GCD.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_GCD.obj: Scheduler.h SolveBoard.h SolveBoard_GCD.h -SolveBoard_OpenMP.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_OpenMP.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_OpenMP.obj: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h -SolveBoard_WinAPI.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_WinAPI.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_WinAPI.obj: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h SolverIF.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h SolverIF.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h SolverIF.obj: threadmem.h ABsearch.h SolverIF.h @@ -182,4 +162,3 @@ Timer.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h TransTable.obj: dds.h debug.h ../include/portab.h TransTable.h TransTable.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h TransTable.obj: Scheduler.h - diff --git a/src/NOTES b/src/NOTES index bae766f1..69b3406a 100644 --- a/src/NOTES +++ b/src/NOTES @@ -1,9 +1,15 @@ -11.03.2018 +14.03.2018 + +Do we need System: Init and Run, or can we combine? -Move away from SolveBoard_*.cpp to System.cpp -- Move Init.cpp (ncores, kilobytesfree) to System +Cygwin works on laptop for Solve with boost, openmp, basic. +VC++ does not compile with boost version, try 14.1? +mingw has undefined symbols, eliminate system defines as +much as possible. +Move Init.cpp (ncores, kilobytesfree) to System +Localize the boost warnings from the Makefile to System.cpp list -Death to all ifdef's that are not for debug and timing +11.03.2018 Scheduler.cpp and .h --- @@ -20,7 +26,10 @@ PlayAnalyser On laptop, fold dtest timing functions back into dtest -Use SetThreading() from dtest and itest -Read from *test command line, recognize right number - More modular Makefiles + +Scheduler: Do a really simple user Timer like in dtest. +Timer becomes TimerList. +Timer (new) gets used in Scheduler and for debugging. +Generate output timing files first for comparison. +Diff. diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 57a98d87..a4373e81 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -17,12 +17,6 @@ #include "PBN.h" #include "debug.h" -#include "SolveBoard_basic.h" -#include "SolveBoard_boost.h" -#include "SolveBoard_GCD.h" -#include "SolveBoard_OpenMP.h" -#include "SolveBoard_WinAPI.h" - extern int noOfThreads; long chunk; diff --git a/src/SolveBoard_GCD.cpp b/src/SolveBoard_GCD.cpp deleted file mode 100644 index 85166c64..00000000 --- a/src/SolveBoard_GCD.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - - -#include "dds.h" -#include "SolveBoard.h" -#include "SolveBoard_GCD.h" - - -extern int noOfThreads; - - -int SolveInitThreadsGCD() -{ - return RETURN_NO_FAULT; -} - - -int SolveRunThreadsGCD( - const int chunkSize) -{ - // This code for LLVM multi-threading on the Mac was kindly - // contributed by Pierre Cossard. - -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) - int thid; - - START_BLOCK_TIMER; - if (chunkSize == 1) - { - dispatch_apply(static_cast(noOfThreads), - dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), - ^(size_t t) - { - thid = omp_get_thread_num(); - SolveChunkCommon(thid); - }); - } - else - { - dispatch_apply(static_cast(noOfThreads), - dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), - ^(size_t t) - { - thid = omp_get_thread_num(); - SolveChunkDDtableCommon(thid); - }); - } - END_BLOCK_TIMER; - - return RETURN_NO_FAULT; - -#else - UNUSED(chunkSize); - return RETURN_NO_FAULT; -#endif -} diff --git a/src/SolveBoard_GCD.h b/src/SolveBoard_GCD.h deleted file mode 100644 index 4618f12c..00000000 --- a/src/SolveBoard_GCD.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - -#ifndef DDS_SOLVEBOARD_GCD_H -#define DDS_SOLVEBOARD_GCD_H - -int SolveInitThreadsGCD(); - -int SolveRunThreadsGCD( - const int chunkSize); - -#endif diff --git a/src/SolveBoard_OpenMP.cpp b/src/SolveBoard_OpenMP.cpp deleted file mode 100644 index e03de9da..00000000 --- a/src/SolveBoard_OpenMP.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - - -#include "dds.h" -#include "SolveBoard.h" -#include "SolveBoard_OpenMP.h" - - -int SolveInitThreadsOpenMP() -{ - /* Added after suggestion by Dirk Willecke. */ -#ifdef _OPENMP - if (omp_get_dynamic()) - omp_set_dynamic(0); - - omp_set_num_threads(noOfThreads); -#endif - - return RETURN_NO_FAULT; -} - - -int SolveRunThreadsOpenMP( - const int chunkSize) -{ -#ifdef _OPENMP - int thid; - - START_BLOCK_TIMER; - if (chunkSize == 1) - { - #pragma omp parallel default(none) private(thid) - { - #pragma omp for schedule(dynamic) - // TODO - for (int k = 0; k < 999; k++) - { - thid = omp_get_thread_num(); - SolveChunkCommon(thid); - } - } - } - else - { - #pragma omp parallel default(none) private(thid) - { - #pragma omp for schedule(dynamic) - for (int k = 0; k < 999; k++) - { - // TODO - thid = omp_get_thread_num(); - SolveChunkDDtableCommon(thid); - } - } - } - END_BLOCK_TIMER; - - return RETURN_NO_FAULT; - -#else - UNUSED(chunkSize); - return RETURN_NO_FAULT; -#endif -} diff --git a/src/SolveBoard_OpenMP.h b/src/SolveBoard_OpenMP.h deleted file mode 100644 index ae00aaad..00000000 --- a/src/SolveBoard_OpenMP.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - -#ifndef DDS_SOLVEBOARD_OPENMP_H -#define DDS_SOLVEBOARD_OPENMP_H - -int SolveInitThreadsOpenMP(); - -int SolveRunThreadsOpenMP( - const int chunkSize); - -#endif diff --git a/src/SolveBoard_WinAPI.cpp b/src/SolveBoard_WinAPI.cpp deleted file mode 100644 index 6e6e5a38..00000000 --- a/src/SolveBoard_WinAPI.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - - -#include "dds.h" -#include "SolveBoard.h" -#include "SolveBoard_WinAPI.h" - - -extern int noOfThreads; - -#ifdef _WIN32 -HANDLE solveAllEvents[MAXNOOFTHREADS]; -LONG threadIndex; - -DWORD CALLBACK SolveChunkWinAPI(void *); -DWORD CALLBACK SolveChunkDDtableWinAPI(void *); -#endif - - -#ifdef _WIN32 -DWORD CALLBACK SolveChunkWinAPI(void *) -{ - int thid; - thid = InterlockedIncrement(&threadIndex); - - SolveChunkCommon(thid); - - if (SetEvent(solveAllEvents[thid]) == 0) - return 0; - - return 1; -} -#endif - - -#ifdef _WIN32 -DWORD CALLBACK SolveChunkDDtableWinAPI(void *) -{ - int thid; - thid = InterlockedIncrement(&threadIndex); - - SolveChunkDDtableCommon(thid); - - if (SetEvent(solveAllEvents[thid]) == 0) - return 0; - - return 1; -} -#endif - - -int SolveInitThreadsWinAPI() -{ -#ifdef _WIN32 - threadIndex = -1; - - for (int k = 0; k < noOfThreads; k++) - { - solveAllEvents[k] = CreateEvent(NULL, FALSE, FALSE, 0); - if (solveAllEvents[k] == 0) - return RETURN_THREAD_CREATE; - } -#endif - - return RETURN_NO_FAULT; -} - - -int SolveRunThreadsWinAPI( - const int chunkSize) -{ -#ifdef _WIN32 - if (chunkSize == 1) - { - for (int k = 0; k < noOfThreads; k++) - { - int res = QueueUserWorkItem(SolveChunkWinAPI, NULL, - WT_EXECUTELONGFUNCTION); - if (res != 1) - return res; - } - } - else - { - for (int k = 0; k < noOfThreads; k++) - { - int res = QueueUserWorkItem(SolveChunkDDtableWinAPI, NULL, - WT_EXECUTELONGFUNCTION); - if (res != 1) - return res; - } - } - - START_BLOCK_TIMER; - DWORD solveAllWaitResult; - solveAllWaitResult = WaitForMultipleObjects( - static_cast(noOfThreads), - solveAllEvents, TRUE, INFINITE); - END_BLOCK_TIMER; - - if (solveAllWaitResult != WAIT_OBJECT_0) - return RETURN_THREAD_WAIT; - - for (int k = 0; k < noOfThreads; k++) - CloseHandle(solveAllEvents[k]); -#endif - - return RETURN_NO_FAULT; -} - diff --git a/src/SolveBoard_WinAPI.h b/src/SolveBoard_WinAPI.h deleted file mode 100644 index 7661a0cd..00000000 --- a/src/SolveBoard_WinAPI.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - -#ifndef DDS_SOLVEBOARD_WINAPI_H -#define DDS_SOLVEBOARD_WINAPI_H - -int SolveInitThreadsWinAPI(); - -int SolveRunThreadsWinAPI( - const int chunkSize); - -#endif diff --git a/src/SolveBoard_basic.cpp b/src/SolveBoard_basic.cpp deleted file mode 100644 index 27d8d888..00000000 --- a/src/SolveBoard_basic.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - - -#include "dds.h" -#include "SolveBoard.h" -#include "SolveBoard_basic.h" - - -int SolveInitThreadsNone() -{ - return RETURN_NO_FAULT; -} - - -int SolveRunThreadsNone( - const int chunkSize) -{ - START_BLOCK_TIMER; - - if (chunkSize == 1) - SolveChunkCommon(0); - else - SolveChunkDDtableCommon(0); - END_BLOCK_TIMER; - - return RETURN_NO_FAULT; -} - diff --git a/src/SolveBoard_basic.h b/src/SolveBoard_basic.h deleted file mode 100644 index c1b2ce3a..00000000 --- a/src/SolveBoard_basic.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - -#ifndef DDS_SOLVEBOARD_BASIC_H -#define DDS_SOLVEBOARD_BASIC_H - -int SolveInitThreadsNone(); - -int SolveRunThreadsNone( - const int chunkSize); - -#endif diff --git a/src/SolveBoard_boost.cpp b/src/SolveBoard_boost.cpp deleted file mode 100644 index 2fec3084..00000000 --- a/src/SolveBoard_boost.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - - -// Disable some boost header warnings. -#ifdef DDS_THREADS_BOOST - #if (defined(_WIN32) && !defined(__CYGWIN__)) - #pragma warning(push) - #pragma warning(disable: 4061 4191 4365 4571 4619 4625 4626 5026 5027 5031) - #endif - - #include - using boost::thread; - - #include - using namespace std; - vector threads; - - #ifdef _WIN32 - #pragma warning(pop) - #endif -#endif - - - -#include "dds.h" -#include "SolveBoard.h" -#include "SolveBoard_boost.h" - - -extern int noOfThreads; - - -int SolveInitThreadsBoost() -{ -#ifdef DDS_THREADS_BOOST - threads.resize(static_cast(noOfThreads)); -#endif - return RETURN_NO_FAULT; -} - - -int SolveRunThreadsBoost( - const int chunkSize) -{ -#ifdef DDS_THREADS_BOOST - const unsigned noth = static_cast(noOfThreads); - START_BLOCK_TIMER; - if (chunkSize == 1) - { - for (unsigned k = 0; k < noth; k++) - threads[k] = new thread(SolveChunkCommon, k); - } - else - { - for (unsigned k = 0; k < noth; k++) - threads[k] = new thread(SolveChunkDDtableCommon, k); - } - END_BLOCK_TIMER; - - for (unsigned k = 0; k < noth; k++) - { - threads[k]->join(); - delete threads[k]; - } - return RETURN_NO_FAULT; - -#else - UNUSED(chunkSize); - return RETURN_NO_FAULT; - -#endif -} diff --git a/src/SolveBoard_boost.h b/src/SolveBoard_boost.h deleted file mode 100644 index 2c558af5..00000000 --- a/src/SolveBoard_boost.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - -#ifndef DDS_SOLVEBOARD_BOOST_H -#define DDS_SOLVEBOARD_BOOST_H - -int SolveInitThreadsBoost(); - -int SolveRunThreadsBoost( - const int chunkSize); - -#endif diff --git a/src/System.cpp b/src/System.cpp index 39ce3dff..0ae80567 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -12,6 +12,21 @@ #include #include +// Boost: Disable some header warnings. + +#ifdef DDS_THREADS_BOOST + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable: 4061 4191 4365 4571 4619 4625 4626 5026 5027 50 31) + #endif + + #include + + #ifdef _MSC_VER + #pragma warning(pop) + #endif +#endif + #include "../include/dll.h" #include "dds.h" @@ -189,7 +204,7 @@ int System::RunThreadsBasic() int System::InitThreadsWinAPI() { -#if (defined(_WIN32) && !defined(DDS_THREADS_SINGLE)) +#if (defined(_MSC_VER) && !defined(DDS_THREADS_SINGLE)) threadIndex = -1; for (int k = 0; k < numThreads; k++) { @@ -203,7 +218,7 @@ int System::InitThreadsWinAPI() } -#if (defined(_WIN32) && !defined(DDS_THREADS_SINGLE)) +#if (defined(_MSC_VER) && !defined(DDS_THREADS_SINGLE)) struct WinWrapType { int thid; @@ -226,7 +241,7 @@ DWORD CALLBACK WinCallback(void * p) int System::RunThreadsWinAPI() { -#if (defined(_WIN32) && !defined(DDS_THREADS_SINGLE)) +#if (defined(_MSC_VER) && !defined(DDS_THREADS_SINGLE)) vector winWrap; winWrap.resize(numThreads); @@ -328,9 +343,6 @@ int System::RunThreadsGCD() int System::InitThreadsBoost() { -#if (defined(DDS_THREADS_BOOST) && !defined(DDS_THREADS_SINGLE)) - threads.resize(static_cast(numThreads)); -#endif return RETURN_NO_FAULT; } @@ -338,9 +350,12 @@ int System::InitThreadsBoost() int System::RunThreadsBoost() { #if (defined(DDS_THREADS_BOOST) && !defined(DDS_THREADS_SINGLE)) + vector threads; + threads.resize(static_cast(numThreads)); + const unsigned nu = static_cast(numThreads); for (unsigned k = 0; k < nu; k++) - threads[k] = new thread(fptr, k); + threads[k] = new boost::thread(fptr, k); for (unsigned k = 0; k < nu; k++) { diff --git a/src/System.h b/src/System.h index 188bb8ef..f37630b8 100644 --- a/src/System.h +++ b/src/System.h @@ -17,22 +17,6 @@ #include #include -// Boost: Disable some header warnings. - -#ifdef DDS_THREADS_BOOST - #ifdef _MSC_VER - #pragma warning(push) - #pragma warning(disable: 4061 4191 4365 4571 4619 4625 4626 5026 5027 50 31) - #endif - - #include - using boost::thread; - - #ifdef _MSC_VER - #pragma warning(pop) - #endif -#endif - #include "dds.h" using namespace std; @@ -68,10 +52,6 @@ class System fptrType fptr; -#ifdef DDS_THREADS_BOOST - vector threads; -#endif - #ifdef _MSC_VER HANDLE solveAllEvents[MAXNOOFTHREADS]; LONG threadIndex; From db92e40f37d3b507781fa5153da067717af29aa5 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Thu, 15 Mar 2018 11:32:17 +0100 Subject: [PATCH 010/132] Now Visual C++ with basic, boost, openmp, winapi --- src/Makefiles/Makefile_Visual_all | 7 +- src/Makefiles/Makefile_cygwin_all | 24 +---- src/Makefiles/Makefile_mingw_all | 170 ++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+), 27 deletions(-) create mode 100644 src/Makefiles/Makefile_mingw_all diff --git a/src/Makefiles/Makefile_Visual_all b/src/Makefiles/Makefile_Visual_all index 695467ca..810006f9 100644 --- a/src/Makefiles/Makefile_Visual_all +++ b/src/Makefiles/Makefile_Visual_all @@ -14,8 +14,8 @@ BOOST32_PATH1 = \User\sheins\boost_1_66_0_x32 BOOST32_LIB1 = $(BOOST32_PATH1)\lib32-msvc-14.0 -BOOST32_PATH2 = \Users\s.hein\Documents\Programs\boost_1_66_0_x32 -BOOST32_LIB2 = $(BOOST32_PATH2)\lib32-msvc-14.0 +BOOST32_PATH2 = \Users\s.hein\Documents\Programs\boost_1_66_0_x32_14_1 +BOOST32_LIB2 = $(BOOST32_PATH2)\lib32-msvc-14.1 CC_BOOST_INCL = /I$(BOOST32_PATH1) /I$(BOOST32_PATH2) CC_BOOST_LINK = /link /LIBPATH:$(BOOST32_LIB1) /LIBPATH:$(BOOST32_LIB2) @@ -147,8 +147,7 @@ Scheduler.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h SolveBoard.obj: dds.h debug.h ../include/portab.h TransTable.h SolveBoard.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h SolveBoard.obj: Scheduler.h threadmem.h SolverIF.h SolveBoard.h System.h -SolveBoard.obj: PBN.h SolveBoard_basic.h SolveBoard_boost.h SolveBoard_GCD.h -SolveBoard.obj: SolveBoard_OpenMP.h SolveBoard_WinAPI.h +SolveBoard.obj: PBN.h SolverIF.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h SolverIF.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h SolverIF.obj: threadmem.h ABsearch.h SolverIF.h diff --git a/src/Makefiles/Makefile_cygwin_all b/src/Makefiles/Makefile_cygwin_all index e176484c..0593c597 100644 --- a/src/Makefiles/Makefile_cygwin_all +++ b/src/Makefiles/Makefile_cygwin_all @@ -79,11 +79,6 @@ SOURCE_FILES = \ QuickTricks.cpp \ Scheduler.cpp \ SolveBoard.cpp \ - SolveBoard_basic.cpp \ - SolveBoard_boost.cpp \ - SolveBoard_GCD.cpp \ - SolveBoard_OpenMP.cpp \ - SolveBoard_WinAPI.cpp \ SolverIF.cpp \ Stats.cpp \ System.cpp \ @@ -154,24 +149,7 @@ Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -SolveBoard.o: SolverIF.h SolveBoard.h System.h PBN.h SolveBoard_basic.h -SolveBoard.o: SolveBoard_boost.h SolveBoard_GCD.h SolveBoard_OpenMP.h -SolveBoard.o: SolveBoard_WinAPI.h -SolveBoard_basic.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_basic.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_basic.o: Scheduler.h SolveBoard.h SolveBoard_basic.h -SolveBoard_boost.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_boost.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_boost.o: Scheduler.h SolveBoard.h SolveBoard_boost.h -SolveBoard_GCD.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_GCD.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_GCD.o: Scheduler.h SolveBoard.h SolveBoard_GCD.h -SolveBoard_OpenMP.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_OpenMP.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_OpenMP.o: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h -SolveBoard_WinAPI.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_WinAPI.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_WinAPI.o: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h +SolveBoard.o: SolverIF.h SolveBoard.h System.h PBN.h SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h SolverIF.o: ABsearch.h SolverIF.h diff --git a/src/Makefiles/Makefile_mingw_all b/src/Makefiles/Makefile_mingw_all new file mode 100644 index 00000000..71e00b00 --- /dev/null +++ b/src/Makefiles/Makefile_mingw_all @@ -0,0 +1,170 @@ +# This the DDS Makefile for Windows and the MinGW compiler. +# It assumes a Unix-like setup for some commands. + +# The "windres" and "cvtres" tools are used for putting version +# information into the DLL in a way that Windows can see. +# It is not mandatory, and if you don't have those tools, +# You can remove $(VFILE).obj in the target line below. +# +# If you want to compile a single-threaded version, use +# DDS_THREADS=none + +# If your exact compiler name is not given here, change it. +# CC = mingw32-g++ +# CC = i686-w64-mingw32-g++ +CC = g++ + +# Use this one to get Windows multi-threading +# CC_FLAGS = -O3 -flto -mtune=generic +# Use this one to get OpenMP multi-threading +CC_FLAGS = -O3 -flto -fopenmp -mtune=generic + +LD_FLAGS = \ + -Wl,--subsystem,windows \ + -Wl,--output-def,$(DLLBASE).def \ + -Wl,--dynamicbase \ + -Wl,--nxcompat \ + -Wl,--no-seh \ + -Wl,--enable-stdcall-fixup \ + -lpthread \ + -lboost_system \ + -lboost_thread + + +# These flags are not turned on be default, but DDS should pass them. +# Turn them on below. +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wlogical-op \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wnoexcept \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wsign-promo \ + -Wstrict-null-sentinel \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-format + +# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION +# -DDDS_THREADS_SINGLE +CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) -DDDS_THREADS_BOOST + +LIB_FLAGS = -mdll + +DLLBASE = dds +DLL = $(DLLBASE).dll +EXPORTER = Exports.def + +VFILE = ddsres +WINDRES_FLAG = -F pe-x86-64 + +SOURCE_FILES = \ + dds.cpp \ + ABsearch.cpp \ + ABstats.cpp \ + CalcTables.cpp \ + DealerPar.cpp \ + Init.cpp \ + LaterTricks.cpp \ + Moves.cpp \ + Par.cpp \ + PlayAnalyser.cpp \ + PBN.cpp \ + QuickTricks.cpp \ + Scheduler.cpp \ + SolveBoard.cpp \ + SolverIF.cpp \ + Stats.cpp \ + System.cpp \ + Timer.cpp \ + TransTable.cpp + +O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o + + + +mingw: $(O_FILES) + $(CC) $(LIB_FLAGS) $(CC_FULL_FLAGS) $(O_FILES) $(LD_FLAGS) $(EXPORTER) -o $(DLL) + +%.o: %.cpp + $(CC) $(CC_FULL_FLAGS) -c $< + +$(DLLBASE).res: $(DLLBASE).rc + windres $(DLLBASE).rc $(DLLBASE).res + +$(VFILE).o: $(DLLBASE).rc + windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o + +depend: + makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) + +clean: + rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} + +install: + test -d ../test || mkdir ../test + test -d ../examples || mkdir ../examples + cp $(DLL) $(DLLBASE).def ../test + cp $(DLL) $(DLLBASE).def ../examples + + +# DO NOT DELETE + +dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +dds.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h +ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABsearch.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h +ABsearch.o: QuickTricks.h LaterTricks.h ABsearch.h +ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABstats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +CalcTables.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h +CalcTables.o: PBN.h +DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +DealerPar.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Init.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h +Init.o: ABsearch.h System.h +LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h +LaterTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h +LaterTricks.o: threadmem.h LaterTricks.h +Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Moves.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h +Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Par.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h +PlayAnalyser.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +PlayAnalyser.o: Scheduler.h threadmem.h SolverIF.h PBN.h +PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +PBN.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h +QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h +QuickTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h +QuickTricks.o: threadmem.h QuickTricks.h +Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h +Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h +SolveBoard.o: SolverIF.h SolveBoard.h System.h PBN.h +SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h +SolverIF.o: ABsearch.h SolverIF.h +Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +System.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +System.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h System.h SolveBoard.h +Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +TransTable.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h From 567533bc2d5528e54f956afdf85d4b8ed358fdc3 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Fri, 16 Mar 2018 00:26:22 +0100 Subject: [PATCH 011/132] Visual C++ and Cygwin work on PC and laptop for solve, calc and play --- src/Exports.def | 2 + src/Makefiles/Makefile_Visual_all | 4 +- src/NOTES | 7 +- src/PlayAnalyser.cpp | 241 +++--------------------------- src/PlayAnalyser.h | 20 +++ src/SolveBoard.cpp | 2 +- src/SolveBoard.h | 12 -- src/System.cpp | 12 +- src/dds.h | 1 + src/debug.h | 13 ++ 10 files changed, 72 insertions(+), 242 deletions(-) create mode 100644 src/PlayAnalyser.h diff --git a/src/Exports.def b/src/Exports.def index 1566f0ca..edd0d388 100644 --- a/src/Exports.def +++ b/src/Exports.def @@ -2,6 +2,8 @@ LIBRARY dds EXPORTS SetMaxThreads SetMaxThreads@4 = SetMaxThreads + PreferThreading + PreferThreading@4 = PreferThreading FreeMemory FreeMemory@0 = FreeMemory ErrorMessage diff --git a/src/Makefiles/Makefile_Visual_all b/src/Makefiles/Makefile_Visual_all index 810006f9..c3abbfb3 100644 --- a/src/Makefiles/Makefile_Visual_all +++ b/src/Makefiles/Makefile_Visual_all @@ -136,7 +136,7 @@ Par.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Par.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PlayAnalyser.obj: dds.h debug.h ../include/portab.h TransTable.h PlayAnalyser.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.obj: Scheduler.h threadmem.h SolverIF.h PBN.h +PlayAnalyser.obj: Scheduler.h threadmem.h SolverIF.h System.h PBN.h PBN.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h PBN.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h QuickTricks.obj: dds.h debug.h ../include/portab.h TransTable.h @@ -155,7 +155,7 @@ Stats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Stats.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h System.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h System.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h System.h -System.obj: SolveBoard.h +System.obj: SolveBoard.h PlayAnalyser.h Timer.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h TransTable.obj: dds.h debug.h ../include/portab.h TransTable.h diff --git a/src/NOTES b/src/NOTES index 69b3406a..b2228e66 100644 --- a/src/NOTES +++ b/src/NOTES @@ -2,11 +2,13 @@ Do we need System: Init and Run, or can we combine? -Cygwin works on laptop for Solve with boost, openmp, basic. -VC++ does not compile with boost version, try 14.1? +Do we need System globals at all? + mingw has undefined symbols, eliminate system defines as much as possible. + Move Init.cpp (ncores, kilobytesfree) to System + Localize the boost warnings from the Makefile to System.cpp list 11.03.2018 @@ -22,7 +24,6 @@ Timer functions do not go by _WIN32 alone PlayAnalyser --- - Check all _WIN32 -- Same structure as usual: Boost, OpenMP, ... On laptop, fold dtest timing functions back into dtest diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 5578d951..1422a889 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -11,28 +11,21 @@ #include "dds.h" #include "threadmem.h" #include "SolverIF.h" -#include "PBN.h" #include "Scheduler.h" +#include "System.h" +#include "PBN.h" +#include "debug.h" // Only single-threaded debugging here. #define DEBUG 0 -#ifdef DDS_SCHEDULER - #define START_BLOCK_TIMER scheduler.StartBlockTimer() - #define END_BLOCK_TIMER scheduler.EndBlockTimer() - #define START_THREAD_TIMER(a) scheduler.StartThreadTimer(a) - #define END_THREAD_TIMER(a) scheduler.EndThreadTimer(a) -#else - #define START_BLOCK_TIMER 1 - #define END_BLOCK_TIMER 1 - #define START_THREAD_TIMER(a) 1 - #define END_THREAD_TIMER(a) 1 -#endif - #if DEBUG FILE * fp; #endif +paramType playparam; +playparamType traceparam; +extern System sysdep; int STDCALL AnalysePlayBin( @@ -250,30 +243,12 @@ int STDCALL AnalysePlayPBN( } -long pchunk = 0; -int pfail; - - -#if (defined(_WIN32) || defined(__CYGWIN__)) && \ - !defined(_OPENMP) && !defined(DDS_THREADS_SINGLE) - -HANDLE solveAllPlayEvents[MAXNOOFTHREADS]; -LONG volatile pthreadIndex; -LONG volatile pcurrent; -paramType playparam; -playparamType traceparam; - -DWORD CALLBACK SolveChunkTracePlay (void *); - -DWORD CALLBACK SolveChunkTracePlay (void *) +void PlayChunkCommon(const int thid) { solvedPlay solved[MAXNOOFBOARDS]; - int thid; - - thid = InterlockedIncrement(&pthreadIndex); - int index; schedType st; + while (1) { st = scheduler.GetNumber(thid); @@ -281,50 +256,35 @@ DWORD CALLBACK SolveChunkTracePlay (void *) if (index == -1) break; - START_THREAD_TIMER(thid); int res = AnalysePlayBin( playparam.bop->deals[index], traceparam.plp->plays[index], &solved[index], thid); - END_THREAD_TIMER(thid); + // If there are multiple errors, this will catch one of them. if (res == 1) traceparam.solvedp->solved[index] = solved[index]; else - pfail = res; - /* If there are multiple errors, this will catch one of them */ + playparam.error = res; } - - if (SetEvent(solveAllPlayEvents[thid]) == 0) - return 0; - - return 1; } - int STDCALL AnalyseAllPlaysBin( boards * bop, playTracesBin * plp, solvedPlays * solvedp, int chunkSize) { + playparam.error = 0; + if (bop->noOfBoards > MAXNOOFBOARDS) return RETURN_TOO_MANY_BOARDS; if (bop->noOfBoards != plp->noOfBoards) return RETURN_UNKNOWN_FAULT; - pchunk = chunkSize; - pfail = 1; - - int res; - DWORD solveAllWaitResult; - - pcurrent = 0; - pthreadIndex = -1; - playparam.bop = bop; traceparam.plp = plp; playparam.noOfBoards = bop->noOfBoards; @@ -333,182 +293,27 @@ int STDCALL AnalyseAllPlaysBin( scheduler.RegisterTraceDepth(plp, bop->noOfBoards); scheduler.Register(bop, SCHEDULER_TRACE); + sysdep.Register(DDS_SYSTEM_PLAY, noOfThreads); - for (int k = 0; k < noOfThreads; k++) - { - solveAllPlayEvents[k] = CreateEvent(NULL, FALSE, FALSE, 0); - if (solveAllPlayEvents[k] == 0) - return RETURN_THREAD_CREATE; - } - - for (int k = 0; k < noOfThreads; k++) - { - res = QueueUserWorkItem(SolveChunkTracePlay, NULL, - WT_EXECUTELONGFUNCTION); - if (res != 1) - return res; - } + int retInit = sysdep.InitThreads(); + if (retInit != RETURN_NO_FAULT) + return retInit; START_BLOCK_TIMER; - solveAllWaitResult = WaitForMultipleObjects( - static_cast(noOfThreads), - solveAllPlayEvents, TRUE, INFINITE); + int retRun = sysdep.RunThreads(chunkSize); END_BLOCK_TIMER; - if (solveAllWaitResult != WAIT_OBJECT_0) - return RETURN_THREAD_WAIT; - - for (int k = 0; k < noOfThreads; k++) - CloseHandle(solveAllPlayEvents[k]); + if (retRun != RETURN_NO_FAULT) + return retRun; solvedp->noOfBoards = bop->noOfBoards; - return pfail; + if (playparam.error == 0) + return RETURN_NO_FAULT; + else + return playparam.error; } -#elif (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) && !defined(_OPENMP) && !defined(DDDS_THREADS_SINGLE) - -// This code for LLVM multi-threading on the Mac was kindly -// contributed by Pierre Cossard. - -int STDCALL AnalyseAllPlaysBin( - boards * bop, - playTracesBin * plp, - solvedPlays * solvedp, - int chunkSize) -{ - if (bop->noOfBoards > MAXNOOFBOARDS) - return RETURN_TOO_MANY_BOARDS; - - if (bop->noOfBoards != plp->noOfBoards) - return RETURN_UNKNOWN_FAULT; - - pchunk = chunkSize; - pfail = 1; - - solvedPlay *solved = static_cast - (calloc(MAXNOOFBOARDS, sizeof(solvedPlay))); - - scheduler.RegisterTraceDepth(plp, bop->noOfBoards); - scheduler.Register(bop, SCHEDULER_TRACE); - - - START_BLOCK_TIMER; - dispatch_apply(static_cast(noOfThreads), - dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), - ^(size_t t) - { - while (1) - { - int thid = static_cast(t); - - schedType st = scheduler.GetNumber(thid); - int index = st.number; - if (index == -1) - break; - - START_THREAD_TIMER(thid); - int res = AnalysePlayBin(bop->deals[index], - plp->plays[index], - &solved[index], - thid); - END_THREAD_TIMER(thid); - - if (res == 1) - solvedp->solved[index] = solved[index]; - else - pfail = res; - } - }); - - END_BLOCK_TIMER; - free(solved); - - solvedp->noOfBoards = bop->noOfBoards; - - return pfail; -} - -#else - -int STDCALL AnalyseAllPlaysBin( - boards * bop, - playTracesBin * plp, - solvedPlays * solvedp, - int chunkSize) -{ - if (bop->noOfBoards > MAXNOOFBOARDS) - return RETURN_TOO_MANY_BOARDS; - - if (bop->noOfBoards != plp->noOfBoards) - return RETURN_UNKNOWN_FAULT; - - pchunk = chunkSize; - pfail = 1; - - int res; - solvedPlay solved[MAXNOOFBOARDS]; - - scheduler.RegisterTraceDepth(plp, bop->noOfBoards); - scheduler.Register(bop, SCHEDULER_TRACE); - -#if defined (_OPENMP) && !defined(DDS_THREADS_SINGLE) - if (omp_get_dynamic()) - omp_set_dynamic(0); - omp_set_num_threads(noOfThreads); -#elif defined (_OPENMP) - omp_set_num_threads(1); -#endif - - int index, thid; - schedType st; - - START_BLOCK_TIMER; - - const int n = noOfThreads; - #pragma omp parallel default(none) shared(scheduler, bop, plp, solvedp, solved, pchunk, pfail) private(st, index, thid, res) - { - // #pragma omp while schedule(dynamic, pchunk) - #pragma omp for schedule(dynamic, pchunk) - - // TODO - for (int nt = 0; nt < 999; nt++) - { - while (1) - { -#if defined (_OPENMP) && !defined(DDS_THREADS_SINGLE) - thid = omp_get_thread_num(); -#else - thid = 0; -#endif - - st = scheduler.GetNumber(thid); - index = st.number; - if (index == -1) - break; - - START_THREAD_TIMER(thid); - res = AnalysePlayBin(bop->deals[index], - plp->plays[index], - &solved[index], - thid); - END_THREAD_TIMER(thid); - - if (res == 1) - solvedp->solved[index] = solved[index]; - else - pfail = res; - } - } - } - - END_BLOCK_TIMER; - - solvedp->noOfBoards = bop->noOfBoards; - - return pfail; -} -#endif int STDCALL AnalyseAllPlaysPBN( boardsPBN * bopPBN, diff --git a/src/PlayAnalyser.h b/src/PlayAnalyser.h new file mode 100644 index 00000000..063af50c --- /dev/null +++ b/src/PlayAnalyser.h @@ -0,0 +1,20 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2016 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_PLAYANALYSER_H +#define DDS_PLAYANALYSER_H + + +#include "Scheduler.h" + + +void PlayChunkCommon( + const int thid); + +#endif diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index a4373e81..b0868548 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -189,7 +189,7 @@ int SolveAllBoardsN( solvedp->noOfBoards = param.noOfBoards; if (param.error == 0) - return 1; + return RETURN_NO_FAULT; else return param.error; } diff --git a/src/SolveBoard.h b/src/SolveBoard.h index 53655497..cf7becd4 100644 --- a/src/SolveBoard.h +++ b/src/SolveBoard.h @@ -13,18 +13,6 @@ #include "Scheduler.h" -#ifdef DDS_SCHEDULER - #define START_BLOCK_TIMER scheduler.StartBlockTimer() - #define END_BLOCK_TIMER scheduler.EndBlockTimer() - #define START_THREAD_TIMER(a) scheduler.StartThreadTimer(a) - #define END_THREAD_TIMER(a) scheduler.EndThreadTimer(a) -#else - #define START_BLOCK_TIMER 1 - #define END_BLOCK_TIMER 1 - #define START_THREAD_TIMER(a) 1 - #define END_THREAD_TIMER(a) 1 -#endif - void SolveChunkCommon( const int thid); diff --git a/src/System.cpp b/src/System.cpp index 0ae80567..171c1c17 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -32,6 +32,7 @@ #include "System.h" #include "SolveBoard.h" +#include "PlayAnalyser.h" extern int noOfThreads; @@ -142,12 +143,12 @@ void System::Reset() CallbackSimpleList.resize(DDS_SYSTEM_SIZE); CallbackSimpleList[DDS_SYSTEM_SOLVE] = SolveChunkCommon; CallbackSimpleList[DDS_SYSTEM_CALC] = SolveChunkCommon; - CallbackSimpleList[DDS_SYSTEM_PLAY] = SolveChunkCommon; + CallbackSimpleList[DDS_SYSTEM_PLAY] = PlayChunkCommon; CallbackComplexList.resize(DDS_SYSTEM_SIZE); CallbackComplexList[DDS_SYSTEM_SOLVE] = SolveChunkDDtableCommon; CallbackComplexList[DDS_SYSTEM_CALC] = SolveChunkDDtableCommon; - CallbackComplexList[DDS_SYSTEM_PLAY] = SolveChunkDDtableCommon; + CallbackComplexList[DDS_SYSTEM_PLAY] = PlayChunkCommon; } @@ -293,13 +294,12 @@ int System::InitThreadsOpenMP() int System::RunThreadsOpenMP() { #if (defined(_OPENMP) && !defined(DDS_THREADS_SINGLE)) - int thid; - #pragma omp parallel default(none) private(thid) + #pragma omp parallel default(none) { #pragma omp for schedule(dynamic) for (int k = 0; k < numThreads; k++) { - thid = omp_get_thread_num(); + int thid = omp_get_thread_num(); (*fptr)(thid); } } @@ -328,7 +328,7 @@ int System::RunThreadsGCD() dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^(size_t t) { - thid = omp_get_thread_num(); + thid = static_cast(t); (*fptr)(thid); } #endif diff --git a/src/dds.h b/src/dds.h index e59804b9..35ea3576 100644 --- a/src/dds.h +++ b/src/dds.h @@ -91,6 +91,7 @@ struct playparamType int noOfBoards; struct playTracesBin * plp; struct solvedPlays * solvedp; + int error; }; diff --git a/src/debug.h b/src/debug.h index d246e7fe..5403ef66 100644 --- a/src/debug.h +++ b/src/debug.h @@ -143,4 +143,17 @@ extern long long counter[COUNTER_SLOTS]; + +#ifdef DDS_SCHEDULER + #define START_BLOCK_TIMER scheduler.StartBlockTimer() + #define END_BLOCK_TIMER scheduler.EndBlockTimer() + #define START_THREAD_TIMER(a) scheduler.StartThreadTimer(a) + #define END_THREAD_TIMER(a) scheduler.EndThreadTimer(a) +#else + #define START_BLOCK_TIMER 1 + #define END_BLOCK_TIMER 1 + #define START_THREAD_TIMER(a) 1 + #define END_THREAD_TIMER(a) 1 +#endif + #endif From f34257e49f056b40a9a700fa2c7d2c4a139ae1f8 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Fri, 16 Mar 2018 18:58:15 +0100 Subject: [PATCH 012/132] Moved part of Init to System --- src/IFDEFS | 4 -- src/Init.cpp | 110 ++++++++++++++++--------------------------------- src/NOTES | 8 +--- src/System.cpp | 58 ++++++++++++++++++++++++++ src/System.h | 9 ++++ 5 files changed, 105 insertions(+), 84 deletions(-) diff --git a/src/IFDEFS b/src/IFDEFS index 7be2bced..c23fb6e9 100644 --- a/src/IFDEFS +++ b/src/IFDEFS @@ -1,7 +1,3 @@ -Init.cpp:#if defined(_WIN32) || defined(__CYGWIN__) -Init.cpp:#ifdef __APPLE__ -Init.cpp:#ifdef __linux__ -PlayAnalyser.cpp:#if (defined(_WIN32) || defined(__CYGWIN__)) && \ Scheduler.cpp:#ifdef _WIN32 Scheduler.cpp:#ifdef _WIN32 Scheduler.cpp:#ifdef _WIN32 diff --git a/src/Init.cpp b/src/Init.cpp index b2aeb9d5..0b1bc1e0 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -76,81 +76,13 @@ moveGroupType groupData[8192]; int _initialized = 0; -void STDCALL SetMaxThreads( - int userThreads) +void CalcThreadMemory( + const int oldNoOfThreads, + const int kilobytesUsable, + int& mem_def, + int& mem_max) { - if (! _initialized) - noOfThreads = 0; - - InitTimer(); - InitTimerList(); - - // First figure out how much memory we have available - // and how many cores the system has. - int oldNoOfThreads = noOfThreads; - unsigned long long kilobytesFree = 0; - int ncores = 1; - -#if defined(_WIN32) || defined(__CYGWIN__) - /* Using GlobalMemoryStatusEx instead of GlobalMemoryStatus - was suggested by Lorne Anderson. */ - MEMORYSTATUSEX statex; - statex.dwLength = sizeof(statex); - GlobalMemoryStatusEx(&statex); - kilobytesFree = static_cast( - statex.ullTotalPhys / 1024); - - SYSTEM_INFO sysinfo; - GetSystemInfo(&sysinfo); - ncores = static_cast(sysinfo.dwNumberOfProcessors); -#endif - -#ifdef __APPLE__ - // The code for Mac OS X was suggested by Matthew Kidd. - - // This is physical memory, rather than "free" memory as below for Linux. - // Always leave 0.5 GB for the OS and other stuff. It would be better to - // find free memory (how?) but in practice the number of cores rather than - // free memory is almost certainly the limit for Macs which have - // standardized hardware (whereas say a 32 core Linux server is hardly - // unusual). - FILE * fifo = popen("sysctl -n hw.memsize", "r"); - fscanf(fifo, "%lld", &kilobytesFree); - fclose(fifo); - - kilobytesFree /= 1024; - if (kilobytesFree > 500000) - { - kilobytesFree -= 500000; - } - - ncores = sysconf(_SC_NPROCESSORS_ONLN); -#endif - -#ifdef __linux__ - /* The code for linux was suggested by Antony Lee. */ - FILE * fifo = popen( - "free -k | tail -n+3 | head -n1 | awk '{print $NF}'", "r"); - int ignore = fscanf(fifo, "%llu", &kilobytesFree); - fclose(fifo); - - ncores = sysconf(_SC_NPROCESSORS_ONLN); -#endif - - // 70%, capped at 2 GB. - int kilobytesUsable = static_cast(0.70 * kilobytesFree); - if (kilobytesUsable > 2000000) - kilobytesUsable = 2000000; - - if (userThreads) - noOfThreads = Min(ncores, userThreads); - else - noOfThreads = ncores; - - int deltaThreads = noOfThreads - oldNoOfThreads; - - int mem_def, mem_max; - + const int deltaThreads = noOfThreads - oldNoOfThreads; if (deltaThreads <= 0) { // We already have the memory. @@ -186,6 +118,36 @@ void STDCALL SetMaxThreads( mem_def = THREADMEM_DEF_MB; mem_max = THREADMEM_DEF_MB; } +} + +void STDCALL SetMaxThreads( + int userThreads) +{ + if (! _initialized) + noOfThreads = 0; + + InitTimer(); + InitTimerList(); + + // First figure out how much memory we have available + // and how many cores the system has. + int ncores; + unsigned long long kilobytesFree; + sysdep.GetHardware(ncores, kilobytesFree); + + // 70%, capped at 2 GB. + int kilobytesUsable = static_cast(0.70 * kilobytesFree); + if (kilobytesUsable > 2000000) + kilobytesUsable = 2000000; + + int oldNoOfThreads = noOfThreads; + if (userThreads) + noOfThreads = Min(ncores, userThreads); + else + noOfThreads = ncores; + + int mem_def, mem_max; + CalcThreadMemory(oldNoOfThreads, kilobytesUsable, mem_def, mem_max); for (int k = 0; k < noOfThreads; k++) { diff --git a/src/NOTES b/src/NOTES index b2228e66..b09f574f 100644 --- a/src/NOTES +++ b/src/NOTES @@ -1,5 +1,7 @@ 14.03.2018 +Do we need extern int noOfThreads in System at all? + Do we need System: Init and Run, or can we combine? Do we need System globals at all? @@ -7,8 +9,6 @@ Do we need System globals at all? mingw has undefined symbols, eliminate system defines as much as possible. -Move Init.cpp (ncores, kilobytesfree) to System - Localize the boost warnings from the Makefile to System.cpp list 11.03.2018 @@ -21,10 +21,6 @@ Timer functions do not go by _WIN32 alone - MAC - __MINGW32__, maybe also __MINGW64__? -PlayAnalyser ---- -- Check all _WIN32 - On laptop, fold dtest timing functions back into dtest More modular Makefiles diff --git a/src/System.cpp b/src/System.cpp index 171c1c17..5ee686a7 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -152,6 +152,64 @@ void System::Reset() } +void System::GetHardware( + int& ncores, + unsigned long long& kilobytesFree) const +{ + kilobytesFree = 0; + ncores = 1; + +#if defined(_WIN32) || defined(__CYGWIN__) + // Using GlobalMemoryStatusEx instead of GlobalMemoryStatus + // was suggested by Lorne Anderson. + MEMORYSTATUSEX statex; + statex.dwLength = sizeof(statex); + GlobalMemoryStatusEx(&statex); + kilobytesFree = static_cast( + statex.ullTotalPhys / 1024); + + SYSTEM_INFO sysinfo; + GetSystemInfo(&sysinfo); + ncores = static_cast(sysinfo.dwNumberOfProcessors); + return; +#endif + +#ifdef __APPLE__ + // The code for Mac OS X was suggested by Matthew Kidd. + + // This is physical memory, rather than "free" memory as below + // for Linux. Always leave 0.5 GB for the OS and other stuff. + // It would be better to find free memory (how?) but in practice + // the number of cores rather than free memory is almost certainly + // the limit for Macs which have standardized hardware (whereas + // say a 32 core Linux server is hardly unusual). + FILE * fifo = popen("sysctl -n hw.memsize", "r"); + fscanf(fifo, "%lld", &kilobytesFree); + fclose(fifo); + + kilobytesFree /= 1024; + if (kilobytesFree > 500000) + { + kilobytesFree -= 500000; + } + + ncores = sysconf(_SC_NPROCESSORS_ONLN); + return; +#endif + +#ifdef __linux__ + // The code for linux was suggested by Antony Lee. + FILE * fifo = popen( + "free -k | tail -n+3 | head -n1 | awk '{print $NF}'", "r"); + int ignore = fscanf(fifo, "%llu", &kilobytesFree); + fclose(fifo); + + ncores = sysconf(_SC_NPROCESSORS_ONLN); + return; +#endif +} + + int System::Register( const unsigned code, const int nThreads) diff --git a/src/System.h b/src/System.h index f37630b8..95699eaa 100644 --- a/src/System.h +++ b/src/System.h @@ -17,10 +17,12 @@ #include #include +// TODO not needed? #include "dds.h" using namespace std; +// TODO enum #define DDS_SYSTEM_SOLVE 0 #define DDS_SYSTEM_CALC 1 #define DDS_SYSTEM_PLAY 2 @@ -44,6 +46,7 @@ class System vector CallbackSimpleList; vector CallbackComplexList; + // TODO no inits? typedef int (System::*InitPtr)(); vector InitPtrList; @@ -53,10 +56,12 @@ class System fptrType fptr; #ifdef _MSC_VER + // TODO not needed? HANDLE solveAllEvents[MAXNOOFTHREADS]; LONG threadIndex; #endif + // TODO no inits? int InitThreadsBasic(); int InitThreadsBoost(); int InitThreadsOpenMP(); @@ -81,6 +86,10 @@ class System const unsigned code, const int noOfThreads = 1); + void GetHardware( + int& ncores, + unsigned long long& kilobytesFree) const; + int PreferThreading(const unsigned code); int InitThreads(); From 27bb150879141da4cafee30dcd653476315cdaed Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 17 Mar 2018 14:25:35 +0100 Subject: [PATCH 013/132] TimerList, TimerGroup, Timer are now clean and work with Visual C++ --- src/ABsearch.cpp | 149 ++++++++--------- src/FILES | 48 ++++++ src/IFDEFS | 11 +- src/Init.cpp | 9 +- src/NOTES | 18 +-- src/SolverIF.cpp | 30 ++-- src/Timer.cpp | 391 ++++++++++----------------------------------- src/Timer.h | 136 +++++----------- src/TimerGroup.cpp | 178 +++++++++++++++++++++ src/TimerGroup.h | 58 +++++++ src/TimerList.cpp | 140 ++++++++++++++++ src/TimerList.h | 103 ++++++++++++ src/dds.h | 5 +- src/threadmem.h | 2 +- test/dtest.cpp | 27 ++-- test/itest.cpp | 5 +- 16 files changed, 767 insertions(+), 543 deletions(-) create mode 100644 src/FILES create mode 100644 src/TimerGroup.cpp create mode 100644 src/TimerGroup.h create mode 100644 src/TimerList.cpp create mode 100644 src/TimerList.h diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index ca00adb8..1d45e897 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -8,6 +8,9 @@ */ +#include +#include + #include "dds.h" #include "TransTable.h" #include "Moves.h" @@ -200,21 +203,7 @@ void InitFileTTstats(int thrId) void InitFileTimer(int thrId) { -#ifdef DDS_TIMING - Timer * timerp = &localVar[thrId].timer; - - char fname[DDS_FNAME_LEN]; - sprintf(fname, "%s%d%s\0", - DDS_TIMING_PREFIX, - thrId, - DDS_DEBUG_SUFFIX); - - timerp->SetFile(fname); - - timerp->SetNames(); -#else UNUSED(thrId); -#endif } @@ -294,7 +283,7 @@ bool ABsearch( thrp->nodes++; #endif - TIMER_START(TIMER_MOVEGEN + depth); + TIMER_START(TIMER_NO_MOVEGEN, depth); for (int ss = 0; ss < DDS_SUITS; ss++) thrp->lowestWin[depth][ss] = 0; @@ -306,7 +295,7 @@ bool ABsearch( thrp->rel); thrp->moves.Purge(tricks, 0, thrp->forbiddenMoves); - TIMER_END(TIMER_MOVEGEN + depth); + TIMER_END(TIMER_NO_MOVEGEN, depth); moveType * mply; for (int ss = 0; ss < DDS_SUITS; ss++) @@ -314,26 +303,26 @@ bool ABsearch( while (1) { - TIMER_START(TIMER_MAKE + depth); + TIMER_START(TIMER_NO_MAKE, depth); mply = thrp->moves.MakeNext(tricks, 0, posPoint->winRanks[depth]); #ifdef DDS_AB_STATS thrp->ABStats.IncrNode(depth); #endif - TIMER_END(TIMER_MAKE + depth); + TIMER_END(TIMER_NO_MAKE, depth); if (mply == NULL) break; Make0(posPoint, depth, mply); - TIMER_START(TIMER_AB + depth - 1); + TIMER_START(TIMER_NO_AB, depth - 1); value = ABsearch1(posPoint, target, depth - 1, thrp); - TIMER_END(TIMER_AB + depth - 1); + TIMER_END(TIMER_NO_AB, depth - 1); - TIMER_START(TIMER_UNDO + depth); + TIMER_START(TIMER_NO_UNDO, depth); Undo1(posPoint, depth, mply); - TIMER_END(TIMER_UNDO + depth); + TIMER_END(TIMER_NO_UNDO, depth); if (value == success) /* A cut-off? */ { @@ -351,8 +340,8 @@ bool ABsearch( posPoint->winRanks[depth][ss] |= posPoint->winRanks[depth - 1][ss]; - TIMER_START(TIMER_NEXTMOVE + depth); - TIMER_END(TIMER_NEXTMOVE + depth); + TIMER_START(TIMER_NO_NEXTMOVE, depth); + TIMER_END(TIMER_NO_NEXTMOVE, depth); } ABexit: @@ -399,12 +388,12 @@ bool ABsearch0( limit = tricks - (target - posPoint->tricksMAX - 1); bool lowerFlag; - TIMER_START(TIMER_LOOKUP + depth); + TIMER_START(TIMER_NO_LOOKUP, depth); nodeCardsType * cardsP = thrp->transTable.Lookup( tricks, hand, posPoint->aggr, posPoint->handDist, limit, &lowerFlag); - TIMER_END(TIMER_LOOKUP + depth); + TIMER_END(TIMER_NO_LOOKUP, depth); if (cardsP) { @@ -443,9 +432,9 @@ bool ABsearch0( } else if (depth == 0) /* Maximum depth? */ { - TIMER_START(TIMER_EVALUATE + depth); + TIMER_START(TIMER_NO_EVALUATE, depth); evalType evalData = Evaluate(posPoint, trump, thrp); - TIMER_END(TIMER_EVALUATE + depth); + TIMER_END(TIMER_NO_EVALUATE, depth); bool value = (evalData.tricks >= target ? true : false); @@ -457,10 +446,10 @@ bool ABsearch0( } bool res; - TIMER_START(TIMER_QT + depth); + TIMER_START(TIMER_NO_QT, depth); int qtricks = QuickTricks(posPoint, hand, depth, target, trump, &res, thrp); - TIMER_END(TIMER_QT + depth); + TIMER_END(TIMER_NO_QT, depth); if (thrp->nodeTypeStore[hand] == MAXNODE) { @@ -470,9 +459,9 @@ bool ABsearch0( return (qtricks == 0 ? false : true); } - TIMER_START(TIMER_LT + depth); + TIMER_START(TIMER_NO_LT, depth); res = LaterTricksMIN(posPoint, hand, depth, target, trump, thrp); - TIMER_END(TIMER_LT + depth); + TIMER_END(TIMER_NO_LT, depth); if (! res) { @@ -489,9 +478,9 @@ bool ABsearch0( return (qtricks == 0 ? true : false); } - TIMER_START(TIMER_LT + depth); + TIMER_START(TIMER_NO_LT, depth); res = LaterTricksMAX(posPoint, hand, depth, target, trump, thrp); - TIMER_END(TIMER_LT + depth); + TIMER_END(TIMER_NO_LT, depth); if (res) { @@ -526,12 +515,12 @@ bool ABsearch0( limit = tricks - (target - posPoint->tricksMAX - 1); bool lowerFlag; - TIMER_START(TIMER_LOOKUP + depth); + TIMER_START(TIMER_NO_LOOKUP, depth); nodeCardsType * cardsP = thrp->transTable.Lookup( tricks, hand, posPoint->aggr, posPoint->handDist, limit, &lowerFlag); - TIMER_END(TIMER_LOOKUP + depth); + TIMER_END(TIMER_NO_LOOKUP, depth); if (cardsP) { @@ -561,7 +550,7 @@ bool ABsearch0( bool success = (thrp->nodeTypeStore[hand] == MAXNODE ? true : false); bool value = ! success; - TIMER_START(TIMER_MOVEGEN + depth); + TIMER_START(TIMER_NO_MOVEGEN, depth); for (int ss = 0; ss < DDS_SUITS; ss++) thrp->lowestWin[depth][ss] = 0; @@ -572,7 +561,7 @@ bool ABsearch0( &thrp->bestMoveTT[depth], thrp->rel); - TIMER_END(TIMER_MOVEGEN + depth); + TIMER_END(TIMER_NO_MOVEGEN, depth); for (int ss = 0; ss < DDS_SUITS; ss++) posPoint->winRanks[depth][ss] = 0; @@ -580,26 +569,26 @@ bool ABsearch0( moveType * mply; while (1) { - TIMER_START(TIMER_MAKE + depth); + TIMER_START(TIMER_NO_MAKE, depth); mply = thrp->moves.MakeNext(tricks, 0, posPoint->winRanks[depth]); #ifdef DDS_AB_STATS thrp->ABStats.IncrNode(depth); #endif - TIMER_END(TIMER_MAKE + depth); + TIMER_END(TIMER_NO_MAKE, depth); if (mply == NULL) break; Make0(posPoint, depth, mply); - TIMER_START(TIMER_AB + depth - 1); + TIMER_START(TIMER_NO_AB, depth - 1); value = ABsearch1(posPoint, target, depth - 1, thrp); - TIMER_END(TIMER_AB + depth - 1); + TIMER_END(TIMER_NO_AB, depth - 1); - TIMER_START(TIMER_UNDO + depth); + TIMER_START(TIMER_NO_UNDO, depth); Undo1(posPoint, depth, mply); - TIMER_END(TIMER_UNDO + depth); + TIMER_END(TIMER_NO_UNDO, depth); if (value == success) /* A cut-off? */ { @@ -617,8 +606,8 @@ bool ABsearch0( posPoint->winRanks[depth][ss] |= posPoint->winRanks[depth - 1][ss]; - TIMER_START(TIMER_NEXTMOVE + depth); - TIMER_END(TIMER_NEXTMOVE + depth); + TIMER_START(TIMER_NO_NEXTMOVE, depth); + TIMER_END(TIMER_NO_NEXTMOVE, depth); } ABexit: @@ -661,7 +650,7 @@ bool ABsearch0( (thrp->nodeTypeStore[hand] == MINNODE && !value)) ? true : false; - TIMER_START(TIMER_BUILD + depth); + TIMER_START(TIMER_NO_BUILD, depth); thrp->transTable.Add( tricks, hand, @@ -669,7 +658,7 @@ bool ABsearch0( posPoint->winRanks[depth], &first, flag); - TIMER_END(TIMER_BUILD + depth); + TIMER_END(TIMER_NO_BUILD, depth); #ifdef DDS_AB_HITS DumpStored(thrp->fpStored, posPoint, &thrp->moves, @@ -697,13 +686,13 @@ bool ABsearch1( thrp->nodes++; #endif - TIMER_START(TIMER_QT + depth); + TIMER_START(TIMER_NO_QT, depth); int res = QuickTricksSecondHand(posPoint, hand, depth, target, trump, thrp); - TIMER_END(TIMER_QT + depth); + TIMER_END(TIMER_NO_QT, depth); if (res) return success; - TIMER_START(TIMER_MOVEGEN + depth); + TIMER_START(TIMER_NO_MOVEGEN, depth); for (int ss = 0; ss < DDS_SUITS; ss++) thrp->lowestWin[depth][ss] = 0; @@ -711,7 +700,7 @@ bool ABsearch1( if (depth == thrp->iniDepth) thrp->moves.Purge(tricks, 1, thrp->forbiddenMoves); - TIMER_END(TIMER_MOVEGEN + depth); + TIMER_END(TIMER_NO_MOVEGEN, depth); for (int ss = 0; ss < DDS_SUITS; ss++) posPoint->winRanks[depth][ss] = 0; @@ -719,26 +708,26 @@ bool ABsearch1( moveType * mply; while (1) { - TIMER_START(TIMER_MAKE + depth); + TIMER_START(TIMER_NO_MAKE, depth); mply = thrp->moves.MakeNext(tricks, 1, posPoint->winRanks[depth]); #ifdef DDS_AB_STATS thrp->ABStats.IncrNode(depth); #endif - TIMER_END(TIMER_MAKE + depth); + TIMER_END(TIMER_NO_MAKE, depth); if (mply == NULL) break; Make1(posPoint, depth, mply); - TIMER_START(TIMER_AB + depth - 1); + TIMER_START(TIMER_NO_AB, depth - 1); value = ABsearch2(posPoint, target, depth - 1, thrp); - TIMER_END(TIMER_AB + depth - 1); + TIMER_END(TIMER_NO_AB, depth - 1); - TIMER_START(TIMER_UNDO + depth); + TIMER_START(TIMER_NO_UNDO, depth); Undo2(posPoint, depth, mply); - TIMER_END(TIMER_UNDO + depth); + TIMER_END(TIMER_NO_UNDO, depth); if (value == success) /* A cut-off? */ { @@ -757,8 +746,8 @@ bool ABsearch1( posPoint->winRanks[depth][ss] |= posPoint->winRanks[depth - 1][ss]; - TIMER_START(TIMER_NEXTMOVE + depth); - TIMER_END(TIMER_NEXTMOVE + depth); + TIMER_START(TIMER_NO_NEXTMOVE, depth); + TIMER_END(TIMER_NO_NEXTMOVE, depth); } ABexit: @@ -782,7 +771,7 @@ bool ABsearch2( thrp->nodes++; #endif - TIMER_START(TIMER_MOVEGEN + depth); + TIMER_START(TIMER_NO_MOVEGEN, depth); for (int ss = 0; ss < DDS_SUITS; ss++) thrp->lowestWin[depth][ss] = 0; @@ -790,7 +779,7 @@ bool ABsearch2( if (depth == thrp->iniDepth) thrp->moves.Purge(tricks, 2, thrp->forbiddenMoves); - TIMER_END(TIMER_MOVEGEN + depth); + TIMER_END(TIMER_NO_MOVEGEN, depth); for (int ss = 0; ss < DDS_SUITS; ss++) posPoint->winRanks[depth][ss] = 0; @@ -798,7 +787,7 @@ bool ABsearch2( moveType * mply; while (1) { - TIMER_START(TIMER_MAKE + depth); + TIMER_START(TIMER_NO_MAKE, depth); mply = thrp->moves.MakeNext(tricks, 2, posPoint->winRanks[depth]); @@ -810,15 +799,15 @@ bool ABsearch2( #ifdef DDS_AB_STATS thrp->ABStats.IncrNode(depth); #endif - TIMER_END(TIMER_MAKE + depth); + TIMER_END(TIMER_NO_MAKE, depth); - TIMER_START(TIMER_AB + depth - 1); + TIMER_START(TIMER_NO_AB, depth - 1); value = ABsearch3(posPoint, target, depth - 1, thrp); - TIMER_END(TIMER_AB + depth - 1); + TIMER_END(TIMER_NO_AB, depth - 1); - TIMER_START(TIMER_UNDO + depth); + TIMER_START(TIMER_NO_UNDO, depth); Undo3(posPoint, depth, mply); - TIMER_END(TIMER_UNDO + depth); + TIMER_END(TIMER_NO_UNDO, depth); if (value == success) /* A cut-off? */ @@ -838,8 +827,8 @@ bool ABsearch2( posPoint->winRanks[depth][ss] |= posPoint->winRanks[depth - 1][ss]; - TIMER_START(TIMER_NEXTMOVE + depth); - TIMER_END(TIMER_NEXTMOVE + depth); + TIMER_START(TIMER_NO_NEXTMOVE, depth); + TIMER_END(TIMER_NO_NEXTMOVE, depth); } ABexit: @@ -866,7 +855,7 @@ bool ABsearch3( thrp->nodes++; #endif - TIMER_START(TIMER_MOVEGEN + depth); + TIMER_START(TIMER_NO_MOVEGEN, depth); for (int ss = 0; ss < DDS_SUITS; ss++) thrp->lowestWin[depth][ss] = 0; int tricks = (depth + 3) >> 2; @@ -875,7 +864,7 @@ bool ABsearch3( if (depth == thrp->iniDepth) thrp->moves.Purge(tricks, 3, thrp->forbiddenMoves); - TIMER_END(TIMER_MOVEGEN + depth); + TIMER_END(TIMER_NO_MOVEGEN, depth); moveType * mply; @@ -884,13 +873,13 @@ bool ABsearch3( while (1) { - TIMER_START(TIMER_MAKE + depth); + TIMER_START(TIMER_NO_MAKE, depth); mply = thrp->moves.MakeNext(tricks, 3, posPoint->winRanks[depth]); #ifdef DDS_AB_STATS thrp->ABStats.IncrNode(depth); #endif - TIMER_END(TIMER_MAKE + depth); + TIMER_END(TIMER_NO_MAKE, depth); if (mply == NULL) break; @@ -902,17 +891,17 @@ bool ABsearch3( if (thrp->nodeTypeStore[posPoint->first[depth - 1]] == MAXNODE) posPoint->tricksMAX++; - TIMER_START(TIMER_AB + depth - 1); + TIMER_START(TIMER_NO_AB, depth - 1); value = ABsearch0(posPoint, target, depth - 1, thrp); - TIMER_END(TIMER_AB + depth - 1); + TIMER_END(TIMER_NO_AB, depth - 1); - TIMER_START(TIMER_UNDO + depth); + TIMER_START(TIMER_NO_UNDO, depth); Undo0(posPoint, depth, mply, thrp); if (thrp->nodeTypeStore[posPoint->first[depth - 1]] == MAXNODE) posPoint->tricksMAX--; - TIMER_END(TIMER_UNDO + depth); + TIMER_END(TIMER_NO_UNDO, depth); if (value == success) /* A cut-off? */ { @@ -930,8 +919,8 @@ bool ABsearch3( posPoint->winRanks[depth][ss] |= posPoint->winRanks[depth - 1][ss] | makeWinRank[ss]; - TIMER_START(TIMER_NEXTMOVE + depth); - TIMER_END(TIMER_NEXTMOVE + depth); + TIMER_START(TIMER_NO_NEXTMOVE, depth); + TIMER_END(TIMER_NO_NEXTMOVE, depth); } ABexit: diff --git a/src/FILES b/src/FILES new file mode 100644 index 00000000..fd5477fd --- /dev/null +++ b/src/FILES @@ -0,0 +1,48 @@ + 1629 4047 38763 ABsearch.cpp + 336 830 7449 ABstats.cpp + 213 590 4551 CalcTables.cpp + 87 131 1430 dds.cpp + 632 2321 15594 DealerPar.cpp + 709 1983 16902 Init.cpp + 286 794 8193 LaterTricks.cpp + 2621 8138 73561 Moves.cpp + 1565 4449 40086 Par.cpp + 184 487 3660 PBN.cpp + 364 1016 9116 PlayAnalyser.cpp + 1209 3449 30221 QuickTricks.cpp + 1103 3334 26153 Scheduler.cpp + 297 665 6655 SolveBoard.cpp + 1291 3194 30732 SolverIF.cpp + 283 605 6226 Stats.cpp + 519 1126 12679 System.cpp + 2968 8140 72454 TransTable.cpp + 117 239 1985 ABsearch.h + 76 165 1517 ABstats.h + 204 480 3918 dds.h + 159 484 4477 debug.h + 35 77 597 Init.h + 30 67 509 LaterTricks.h + 304 543 5744 Moves.h + 22 49 408 PBN.h + 20 38 288 PlayAnalyser.h + 31 70 530 QuickTricks.h + 232 355 3954 Scheduler.h + 29 62 494 SolveBoard.h + 28 58 444 SolverIF.h + 37 62 537 Stats.h + 102 186 1866 System.h + 81 155 1390 threadmem.h + 519 1108 11141 TransTable.h + 19052 51196 458259 insgesamt + + + Final: + + 164 441 3323 Timer.cpp + 74 119 1094 Timer.h + + 183 421 3171 TimerGroup.cpp + 58 103 966 TimerGroup.h + + 139 276 2928 TimerList.cpp + 112 339 2553 TimerList.h diff --git a/src/IFDEFS b/src/IFDEFS index c23fb6e9..ed3ec54f 100644 --- a/src/IFDEFS +++ b/src/IFDEFS @@ -3,6 +3,7 @@ Scheduler.cpp:#ifdef _WIN32 Scheduler.cpp:#ifdef _WIN32 Scheduler.cpp:#ifdef _WIN32 Scheduler.cpp:#ifndef _WIN32 + Stats.cpp:#ifdef _WIN32 Stats.cpp:#ifdef _WIN32 Stats.cpp:#ifdef _WIN32 @@ -10,15 +11,7 @@ Stats.cpp:#ifdef _WIN32 Stats.cpp:#ifdef _WIN32 Stats.cpp:#ifdef _WIN32 Stats.cpp:#ifndef _WIN32 -System.cpp:#if (defined(_WIN32) && !defined(DDS_THREADS_SINGLE)) -System.cpp:#if (defined(_WIN32) && !defined(DDS_THREADS_SINGLE)) -System.cpp:#if (defined(_WIN32) && !defined(DDS_THREADS_SINGLE)) -System.cpp:#if defined(_WIN32) -System.cpp:#if defined(_MSC_VER) -Timer.cpp:#ifdef _WIN32 -Timer.cpp:#ifdef _WIN32 + Scheduler.h:#ifndef _WIN32 Scheduler.h:#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) Scheduler.h:#ifdef _WIN32 -Timer.h:#ifdef _WIN32 -Timer.h:#ifdef _WIN32 diff --git a/src/Init.cpp b/src/Init.cpp index 0b1bc1e0..ea8e77cb 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -120,15 +120,15 @@ void CalcThreadMemory( } } +#include +#include +#include void STDCALL SetMaxThreads( int userThreads) { if (! _initialized) noOfThreads = 0; - InitTimer(); - InitTimerList(); - // First figure out how much memory we have available // and how many cores the system has. int ncores; @@ -170,6 +170,9 @@ void STDCALL SetMaxThreads( localVar[k].transTable.ReturnAllMemory(); } + InitTimer(); + InitTimerList(); + if (! _initialized) { _initialized = 1; diff --git a/src/NOTES b/src/NOTES index b09f574f..6f7599cf 100644 --- a/src/NOTES +++ b/src/NOTES @@ -15,18 +15,18 @@ Localize the boost warnings from the Makefile to System.cpp list Scheduler.cpp and .h --- -Timer functions do not go by _WIN32 alone -- _WIN32: Yes -- __CYGWIN__ -- MAC -- __MINGW32__, maybe also __MINGW64__? - On laptop, fold dtest timing functions back into dtest More modular Makefiles Scheduler: Do a really simple user Timer like in dtest. -Timer becomes TimerList. Timer (new) gets used in Scheduler and for debugging. -Generate output timing files first for comparison. -Diff. + +Move away from printf etc to out. + +It's a bit annoying that SetMaxThreads() gets called once with 0 +automatically, once with 1 from dtest. So lots of debug text files +are created. Probably generate at the end, like with TimerList. + +Makefile: One -D for each option, all user-controlled. Modify +System.cpp accordingly. diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 84a54ffe..690f8462 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -345,13 +345,13 @@ int STDCALL SolveBoard( { ResetBestMoves(thrp); - TIMER_START(TIMER_AB + iniDepth); + TIMER_START(TIMER_NO_AB, iniDepth); thrp->val = (* AB_ptr_list[handRelFirst])( &thrp->lookAheadPos, guess, iniDepth, thrp); - TIMER_END(TIMER_AB + iniDepth); + TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL DumpTopLevel(thrp, guess, lowerbound, upperbound, 1); @@ -439,12 +439,12 @@ int STDCALL SolveBoard( { ResetBestMoves(thrp); - TIMER_START(TIMER_AB + iniDepth); + TIMER_START(TIMER_NO_AB, iniDepth); thrp->val = (* AB_ptr_list[handRelFirst])(&thrp->lookAheadPos, guess, iniDepth, thrp); - TIMER_END(TIMER_AB + iniDepth); + TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL DumpTopLevel(thrp, guess, lowerbound, upperbound, 1); @@ -504,13 +504,13 @@ int STDCALL SolveBoard( else { - TIMER_START(TIMER_AB + iniDepth); + TIMER_START(TIMER_NO_AB, iniDepth); thrp->val = (* AB_ptr_list[handRelFirst])( &thrp->lookAheadPos, target, iniDepth, thrp); - TIMER_END(TIMER_AB + iniDepth); + TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL DumpTopLevel(thrp, target, -1, -1, 0); @@ -569,13 +569,13 @@ int STDCALL SolveBoard( ResetBestMoves(thrp); - TIMER_START(TIMER_AB + iniDepth); + TIMER_START(TIMER_NO_AB, iniDepth); thrp->val = (* AB_ptr_list[handRelFirst])( &thrp->lookAheadPos, futp->score[0], iniDepth, thrp); - TIMER_END(TIMER_AB + iniDepth); + TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL DumpTopLevel(thrp, target, -1, -1, 2); @@ -602,7 +602,7 @@ int STDCALL SolveBoard( } #ifdef DDS_TIMING - thrp->timer.PrintStats(); + thrp->timerList.PrintStats(thrId); #endif #ifdef DDS_TT_STATS @@ -691,13 +691,13 @@ int SolveSameBoard( { ResetBestMoves(thrp); - TIMER_START(TIMER_AB + iniDepth); + TIMER_START(TIMER_NO_AB, iniDepth); thrp->val = ABsearch( &thrp->lookAheadPos, guess, iniDepth, thrp); - TIMER_END(TIMER_AB + iniDepth); + TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL DumpTopLevel(thrp, guess, lowerbound, upperbound, 1); @@ -717,7 +717,7 @@ int SolveSameBoard( ThreadMemoryUsed(); #ifdef DDS_TIMING - thrp->timer.PrintStats(); + thrp->timerList.PrintStats(thrId); #endif #ifdef DDS_TT_STATS @@ -843,13 +843,13 @@ int AnalyseLaterBoard( { ResetBestMoves(thrp); - TIMER_START(TIMER_AB + iniDepth); + TIMER_START(TIMER_NO_AB, iniDepth); thrp->val = (* AB_ptr_trace_list[handRelFirst])( &thrp->lookAheadPos, guess, iniDepth, thrp); - TIMER_END(TIMER_AB + iniDepth); + TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL DumpTopLevel(thrp, guess, lowerbound, upperbound, 1); @@ -870,7 +870,7 @@ int AnalyseLaterBoard( ThreadMemoryUsed(); #ifdef DDS_TIMING - thrp->timer.PrintStats(); + thrp->timerList.PrintStats(thrId); #endif #ifdef DDS_TT_STATS diff --git a/src/Timer.cpp b/src/Timer.cpp index 94312ff8..12a7ebc9 100644 --- a/src/Timer.cpp +++ b/src/Timer.cpp @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -12,25 +12,13 @@ See Timer.h for some description. */ -#include +#include +#include +#include -#include "dds.h" #include "Timer.h" - -const char * TIMER_NAMES[TIMER_GROUPS] = -{ - "AB", - "Make", - "Undo", - "Evaluate", - "NextMove", - "QuickTricks", - "LaterTricks", - "MoveGen", - "Lookup", - "Build" -}; +using namespace std; Timer::Timer() @@ -41,347 +29,136 @@ Timer::Timer() Timer::~Timer() { - if (fp != stdout && fp != nullptr) - fclose(fp); } void Timer::Reset() { - strcpy(fname, ""); - - for (int i = 0; i < DDS_TIMERS; i++) - { - sprintf(name[i], "Timer %4d", i); - count[i] = 0; - userCum[i] = 0; - systCum[i] = 0.; - } -} - - -void Timer::SetFile(char * ourFname) -{ - if (strlen(ourFname) > DDS_FNAME_LEN) - return; - - strncpy(fname, ourFname, strlen(ourFname)); - - fp = fopen(fname, "w"); - if (!fp) - fp = stdout; + count = 0; + userCum = 0; + systCum = 0.; } -void Timer::SetName(int no, char * ourName) +void Timer::SetName(const string& s) { - if (no < 0 || no >= DDS_TIMERS) - return; - - sprintf(name[no], "%s", ourName); + name = s; } -void Timer::SetNames() +void Timer::Start() { - char tag[LINE_LEN]; - - for (int d = 0; d < TIMER_SPACING; d++) - { - int c = d % 4; - sprintf(tag, "AB%d %d", c, d); - Timer::SetName(TIMER_AB + d, tag); - - for (int n = 1; n < TIMER_GROUPS; n++) - { - sprintf(tag, "%s %d", TIMER_NAMES[n], d); - Timer::SetName(n * TIMER_SPACING + d, tag); - } - } -} + systTimes0 = clock(); -void Timer::Start(int no) -{ - if (no < 0 || no >= DDS_TIMERS) - return; - - systTimes0[no] = clock(); - -#ifdef _WIN32 - QueryPerformanceCounter(&userTimes0[no]); +#ifdef _MSC_VER + QueryPerformanceCounter(&userTimes0); #else - gettimeofday(&userTimes0[no], nullptr); + gettimeofday(&userTimes0, nullptr); #endif } -void Timer::End(int no) +void Timer::End() { - if (no < 0 || no >= DDS_TIMERS) - return; - - systTimes1[no] = clock(); + systTimes1 = clock(); -#ifdef _WIN32 - QueryPerformanceCounter(&userTimes1[no]); +#ifdef _MSC_VER + QueryPerformanceCounter(&userTimes1); int timeUser = static_cast - (userTimes1[no].QuadPart - userTimes0[no].QuadPart); + (userTimes1.QuadPart - userTimes0.QuadPart); #else - gettimeofday(&userTimes1[no], nullptr); - int timeUser = Timer::TimevalDiff(userTimes1[no], - userTimes0[no]); + gettimeofday(&userTimes1, nullptr); + return 1000 * (userTimes1.tv_sec - userTimer0.tv_sec ) + + (userTimes1.tv_usec - userTimer0.tv_usec) / 1000; #endif - count[no]++; + count++; // This is more or less in milli-seconds except on Windows, // where it is in "wall ticks". It is possible to convert // to milli-seconds, but the resolution is so poor for fast // functions that I leave it in integer form. - userCum[no] += timeUser; - systCum[no] += systTimes1[no] - systTimes0[no]; + userCum += timeUser; + systCum += systTimes1 - systTimes0; } -void Timer::OutputDetails() +bool Timer::Used() const { - fprintf(fp, "%-14s %10s %10s %10s %10s %10s\n", - "Name", - "Number", - "User ticks", - "Avg", - "System", - "Avg ms"); - - for (int no = 0; no < DDS_TIMERS; no++) - { - if (count[no] == 0) - continue; - - fprintf(fp, "%-14s %10d %10lld %10.2f %10.0f %10.2f\n", - name[no], - count[no], - static_cast(userCum[no]), - static_cast(userCum[no]) / - static_cast(count[no]), - 1000. * systCum[no], - 1000. * static_cast(systCum[no]) / - static_cast(count[no])); - } - fprintf(fp, "\n"); + return (count > 0); } -void Timer::PrintStats() +void Timer::operator +=(const Timer& add) { - bool used = false; - for (int no = 0; no < DDS_TIMERS; no++) - { - if (count[no]) - { - used = true; - break; - } - } - - if (! used) - return; - - // Approximate the exclusive times of each function. - // The ABsearch*() functions are recursively nested, - // so subtract out the one below. - // The other ones are subtracted out based on knowledge - // of the functions. - - int64_t AB_userCum[TIMER_SPACING]; - double AB_systCum[TIMER_SPACING]; + count += add.count; + userCum += add.userCum; + systCum += add.systCum; +} - AB_userCum[0] = userCum[0]; - AB_systCum[0] = systCum[0]; - int64_t AB_ct = count[0]; - int64_t AB_ucum = AB_userCum[0]; - double AB_scum = AB_systCum[0]; +void Timer::operator -=(const Timer& deduct) +{ + if (deduct.userCum > userCum) + userCum = 0; + else + userCum -= deduct.userCum; - for (int d = 1; d < TIMER_SPACING; d++) - { - AB_ct += count[d]; - - if (userCum[d - 1] > userCum[d]) - { - AB_userCum[d] = 0; - AB_systCum[d] = 0; - continue; - } - - AB_userCum[d] = userCum[d] - userCum[d - 1]; - AB_systCum[d] = systCum[d] - systCum[d - 1]; - - for (int no = 1; no < TIMER_GROUPS; no++) - { - int offset = no * TIMER_SPACING; - AB_userCum[d] -= userCum[offset + d ]; - AB_systCum[d] -= systCum[offset + d ]; - } - - AB_ucum += AB_userCum[d]; - AB_scum += AB_systCum[d]; - } + if (deduct.systCum > systCum) + systCum = 0; + else + systCum -= deduct.systCum; +} - int64_t all_ucum = AB_ucum; - double all_scum = AB_scum; - for (int no = TIMER_SPACING; no < DDS_TIMERS; no++) - { - all_ucum += userCum[no]; - all_scum += systCum[no]; - } - fprintf(fp, "%-14s %8s %10s %6s %4s %10s %6s %4s\n", - "Name", - "Count", - "User", - "Avg", - "%", - "Syst", - "Avg", - "%"); - - if (AB_ct) +string Timer::SumLine( + const Timer& divisor, + const string& bname) const +{ + stringstream ss; + if (count > 0) { - fprintf(fp, "%-14s %8lld %10lld %6.2f %4.1f %10.0f %6.2f %4.1f\n", - TIMER_NAMES[0], - static_cast(AB_ct), - static_cast(AB_ucum), - AB_ucum / static_cast(AB_ct), - 100. * AB_ucum / all_ucum, - 1000. * AB_scum, - 1000. * AB_scum / static_cast(AB_ct), - 100. * AB_scum / all_scum); + ss << setw(14) << left << (bname == "" ? name : bname) << + setw(9) << right << count << + setw(11) << userCum << + setw(7) << setprecision(2) << fixed << + userCum / static_cast(count) << + setw(5) << setprecision(1) << fixed << + 100. * userCum / divisor.userCum << + setw(11) << setprecision(0) << fixed << 1000. * systCum << + setw(7) << setprecision(2) << fixed << + 1000. * systCum / static_cast(count) << + setw(5) << setprecision(1) << fixed << + 100. * systCum / divisor.systCum << "\n"; } else { - fprintf(fp, "%-14s %8lld %10lld %6s %4s %10.0f %6s %4s\n", - TIMER_NAMES[0], - static_cast(AB_ct), - static_cast(AB_ucum), - "-", - "-", - 1000. * AB_scum, - "-", - "-"); + ss << setw(14) << left << (bname == "" ? name : bname) << + setw(9) << right << count << + setw(11) << userCum << + setw(7) << "-" << + setw(5) << "-" << + setw(11) << 1000 * systCum << + setw(7) << "-" << + setw(5) << "-" << "\n"; } - - int64_t ct[TIMER_GROUPS]; - for (int no = 1; no < TIMER_GROUPS; no++) - { - int offset = no * TIMER_SPACING; - - int64_t ucum = 0; - double scum = 0; - ct[no] = 0; - - for (int d = 0; d < TIMER_SPACING; d++) - { - ct[no] += count[offset + d]; - ucum += userCum[offset + d]; - scum += systCum[offset + d]; - } - - if (ct[no]) - { - fprintf(fp, "%-14s %8lld %10lld %6.2f %4.1f %10.0f %6.2f %4.1f\n", - TIMER_NAMES[no], - static_cast(ct[no]), - static_cast(ucum), - ucum / static_cast(ct[no]), - 100. * ucum / all_ucum, - 1000. * scum, - 1000. * scum / static_cast(ct[no]), - 100. * scum / all_scum); - } - else - { - fprintf(fp, "%-14s %8lld %10lld %6s %4s %10.0f %6s %4s\n", - TIMER_NAMES[no], - static_cast(ct[no]), - static_cast(ucum), - "-", - "-", - 1000. * scum, - "-", - "-"); - } - } - fprintf(fp, "----------------------------------"); - fprintf(fp, "-----------------------------------\n"); - fprintf(fp, "%-14s %8s %10lld %6s %4s %10.0f\n\n\n", - "Sum", - "", - static_cast(all_ucum), - "", - "", - 1000. * all_scum); - - // This doesn't work properly yet. The issue is that on some - // loops there is no success, and in that case we have to try - // all moves to see this. But no move ordering could have done - // better. So we need to know the proportion for the successes - // only. This probably becomes more natural when there is a Move - // object. It doesn't really belong in Timer anyway. - - //double genMoves = ct[TIMER_NO_MOVEGEN] + ct[TIMER_NO_NEXTMOVE]; - //if (genMoves) - //fprintf(fp, "Move generation quality %.1f%%\n\n\n", - //100. * (1. - ct[TIMER_NO_MAKE] / genMoves)); - - if (AB_ucum > 0. && AB_scum > 0.) - { - fprintf(fp, "%-14s %8s %10s %6s %4s %10s %6s %4s\n", - "Name", - "Count", - "User", - "Avg", - "%", - "Syst", - "Avg", - "%"); - - for (int no = TIMER_SPACING - 1; no >= 0; no--) - { - if (count[no] == 0) - continue; - - fprintf(fp, "%-14s %8d %10lld %6.2f %4.1f %10.0f %6.2f %4.1f\n", - name[TIMER_AB + no], - count[no], - static_cast(AB_userCum[no]), - AB_userCum[no] / static_cast(count[no]), - 100. * AB_userCum[no] / AB_ucum, - 1000. * AB_systCum[no], - 1000. * AB_systCum[no] / static_cast(count[no]), - 100. * AB_systCum[no] / static_cast(AB_scum)); - - } - fprintf(fp, "----------------------------------"); - fprintf(fp, "-----------------------------------\n"); - fprintf(fp, "%-14s %8lld %10lld %6s %4s %10.0f\n\n\n", - "Sum", - static_cast(AB_ct), - static_cast(AB_ucum), - "", - "", - 1000. * AB_scum); - } - -#ifdef DDS_TIMING_DETAILS - Timer::OutputDetails(); -#endif + return ss.str(); } -int Timer::TimevalDiff(timeval x, timeval y) +string Timer::DetailLine() const { - return 1000 * (x.tv_sec - y.tv_sec ) - + (x.tv_usec - y.tv_usec) / 1000; + stringstream ss; + ss << setw(15) << left << name << + setw(10) << right << count << + setw(11) << right << userCum << + setw(11) << setprecision(2) << fixed << + userCum / static_cast(count) << + setw(11) << setprecision(0) << fixed << + 1000. * systCum << + setw(11) << setprecision(2) << fixed << + 1000. * systCum / static_cast(count) << "\n"; + + return ss.str(); } diff --git a/src/Timer.h b/src/Timer.h index b54a2d27..1a88ae8f 100644 --- a/src/Timer.h +++ b/src/Timer.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -10,129 +10,65 @@ #ifndef DDS_TIMING_H #define DDS_TIMING_H -/* - It is a simple object for timing functions or code pieces. - As it stands, it is somewhat specific to AB searches, - but it can of course be generalized. - - There are groups of 50 timers. - - Each group corresponds to something that should be timed at - multiple AB depths, i.e. cards played. The first card of a - new game is number 48, and the last card is number 0. - - The AB timer is special, as the AB functions are recursive - and so their timing includes not only the other functions they - contain, but also their own recursive calls at lower depths. - The AB timer group must be the first one. - - The object calculates an approximation to exclusive function - times, so it is a "poor man's profiler". - - For AB, first the times at depth-1 are subtracted out, and then - the times for all calls at the same depth are subtracted out. - This still leaves the overhead of the timing itself. As an - approximation, there is one timing overhead left for each - function, and it is on the order of the execution time of - Evaluate(), which is a very fast function. - */ - +#include -#include -#include #include #include -#ifdef _WIN32 +#ifdef _MSC_VER #include #else #include #endif -/* - TIMER_START and TIMER_END are macros for bracketing code - to be timed, so - - TIMER_START(TIMER_AB + depth); - ABsearch(...); - TIMER_END; - - This avoid the tedious #ifdef's at every place of a timer. -*/ - -#ifdef DDS_TIMING - #define TIMER_START(a) thrp->timer.Start(a) - #define TIMER_END(a) thrp->timer.End(a) -#else - #define TIMER_START(a) 1 - #define TIMER_END(a) 1 -#endif - -#define LINE_LEN 20 -#define TIMER_SPACING 50 -#define TIMER_GROUPS 10 - -#define TIMER_NO_AB 0 -#define TIMER_NO_MAKE 1 -#define TIMER_NO_UNDO 2 -#define TIMER_NO_EVALUATE 3 -#define TIMER_NO_NEXTMOVE 4 -#define TIMER_NO_QT 5 -#define TIMER_NO_LT 6 -#define TIMER_NO_MOVEGEN 7 -#define TIMER_NO_LOOKUP 8 -#define TIMER_NO_BUILD 9 - -#define TIMER_AB TIMER_NO_AB -#define TIMER_MAKE ( TIMER_NO_MAKE * TIMER_SPACING) -#define TIMER_UNDO ( TIMER_NO_UNDO * TIMER_SPACING) -#define TIMER_EVALUATE ( TIMER_NO_EVALUATE * TIMER_SPACING) -#define TIMER_NEXTMOVE ( TIMER_NO_NEXTMOVE * TIMER_SPACING) -#define TIMER_QT ( TIMER_NO_QT * TIMER_SPACING) -#define TIMER_LT ( TIMER_NO_LT * TIMER_SPACING) -#define TIMER_MOVEGEN ( TIMER_NO_MOVEGEN * TIMER_SPACING) -#define TIMER_LOOKUP ( TIMER_NO_LOOKUP * TIMER_SPACING) -#define TIMER_BUILD ( TIMER_NO_BUILD * TIMER_SPACING) - -#define DDS_TIMERS (TIMER_GROUPS * TIMER_SPACING) +using namespace std; class Timer { private: - FILE * fp; - char fname[DDS_FNAME_LEN]; - char name[DDS_TIMERS][LINE_LEN]; - clock_t systTimes0[DDS_TIMERS]; - clock_t systTimes1[DDS_TIMERS]; + clock_t systTimes0; + clock_t systTimes1; -#ifdef _WIN32 - LARGE_INTEGER userTimes0[DDS_TIMERS]; - LARGE_INTEGER userTimes1[DDS_TIMERS]; +#ifdef _MSC_VER + LARGE_INTEGER userTimes0; + LARGE_INTEGER userTimes1; #else - timeval userTimes0[DDS_TIMERS], - userTimes1[DDS_TIMERS]; + timeval userTimes0; + timeval userTimes1; #endif - int count[DDS_TIMERS]; - int64_t userCum[DDS_TIMERS]; - double systCum[DDS_TIMERS]; - - void OutputStats(char * t); - int TimevalDiff(timeval x, timeval y); - void OutputDetails(); + string name; + int count; + int64_t userCum; + double systCum; public: + Timer(); + ~Timer(); + void Reset(); - void SetFile(char * fname); - void SetName(int no, char * name); - void SetNames(); - void Start(int no); - void End(int no); - void PrintStats(); + + void SetName(const string& s); + + void Start(); + + void End(); + + bool Used() const; + + void operator += (const Timer& add); + + void operator -= (const Timer& deduct); + + string SumLine( + const Timer& divisor, + const string& bname = "") const; + + string DetailLine() const; }; #endif diff --git a/src/TimerGroup.cpp b/src/TimerGroup.cpp new file mode 100644 index 00000000..40476d60 --- /dev/null +++ b/src/TimerGroup.cpp @@ -0,0 +1,178 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#define TIMER_DEPTH 50 + +#include +#include +#include + +#include "TimerGroup.h" +#include "dds.h" + + +TimerGroup::TimerGroup() +{ + TimerGroup::Reset(); +} + + +TimerGroup::~TimerGroup() +{ +} + + +void TimerGroup::Reset() +{ + timers.resize(TIMER_DEPTH); + for (unsigned i = 0; i < timers.size(); i++) + timers[i].Reset(); +} + + +void TimerGroup::SetNames(const string& s) +{ + string st; + if (s == "AB") + { + // Special format emphasizing the card number within the trick. + for (unsigned i = 0; i < timers.size(); i++) + { + st = s + STR(i % 4) + " " + STR(i); + timers[i].SetName(st); + } + } + else + { + for (unsigned i = 0; i < timers.size(); i++) + { + st = s + STR(i); + timers[i].SetName(st); + } + } + bname = s; +} + + +void TimerGroup::Start(const unsigned no) +{ + timers[no].Start(); +} + + +void TimerGroup::End(const unsigned no) +{ + timers[no].End(); +} + + +bool TimerGroup::Used() const +{ + for (unsigned i = 0; i < timers.size(); i++) + { + if (timers[i].Used()) + return true; + } + return false; +} + + +void TimerGroup::Differentiate() +{ + for (unsigned r = 0; r < timers.size()-1; r++) + { + unsigned i = timers.size() - 1 - r; + timers[i] -= timers[i-1]; + } +} + + +void TimerGroup::Sum(Timer& sum) const +{ + sum = timers[0]; + for (unsigned i = 1; i < timers.size(); i++) + sum += timers[i]; +} + + +void TimerGroup::operator -= (const TimerGroup& deduct) +{ + for (unsigned i = 0; i < timers.size(); i++) + timers[i] -= deduct.timers[i]; +} + + +string TimerGroup::Header() const +{ + stringstream ss; + ss << setw(14) << left << "Name" << + setw(9) << right << "Count" << + setw(11) << "User" << + setw(7) << "Avg" << + setw(5) << "%" << + setw(11) << "Syst" << + setw(7) << "Avg" << + setw(5) << "%" << "\n"; + return ss.str(); +} + + +string TimerGroup::DetailHeader() const +{ + stringstream ss; + ss << setw(14) << left << "Name " << + setw(11) << right << "Number" << + setw(11) << "User ticks" << + setw(11) << "Avg" << + setw(11) << "System" << + setw(11) << "Avg ms" << "\n"; + return ss.str(); +} + + +string TimerGroup::SumLine(const Timer& sumTotal) const +{ + Timer ownSum; + TimerGroup::Sum(ownSum); + + return ownSum.SumLine(sumTotal, bname); +} + + +string TimerGroup::TimerLines(const Timer& sumTotal) const +{ + string st = ""; + for (unsigned r = 0; r < timers.size(); r++) + { + unsigned i = timers.size() - r - 1; + if (timers[i].Used()) + st += timers[i].SumLine(sumTotal); + } + return st; +} + + +string TimerGroup::DetailLines() const +{ + stringstream ss; + for (unsigned i = 0; i < timers.size(); i++) + { + if (timers[i].Used()) + ss << timers[i].DetailLine(); + } + + return ss.str(); +} + + +string TimerGroup::DashLine() const +{ + return string(69, '-') + "\n"; +} + diff --git a/src/TimerGroup.h b/src/TimerGroup.h new file mode 100644 index 00000000..6356a510 --- /dev/null +++ b/src/TimerGroup.h @@ -0,0 +1,58 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_TIMERGROUP_H +#define DDS_TIMERGROUP_H + +#include +#include + +#include "Timer.h" + +using namespace std; + + +class TimerGroup +{ + private: + + vector timers; + string bname; + + public: + + TimerGroup(); + + ~TimerGroup(); + + void Reset(); + + void SetNames(const string& s); + + void Start(const unsigned no); + + void End(const unsigned no); + + bool Used() const; + + void Differentiate(); + + void Sum(Timer& sum) const; + + void operator -= (const TimerGroup& deduct); + + string Header() const; + string DetailHeader() const; + string SumLine(const Timer& sumTotal) const; + string TimerLines(const Timer& sumTotal) const; + string DetailLines() const; + string DashLine() const; +}; + +#endif diff --git a/src/TimerList.cpp b/src/TimerList.cpp new file mode 100644 index 00000000..c76b7fa4 --- /dev/null +++ b/src/TimerList.cpp @@ -0,0 +1,140 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +/* + See TimerList.h for some description. +*/ + +#include + +#include "TimerList.h" +#include "dds.h" + +#define DDS_TIMERS 50 + + +TimerList::TimerList() +{ + TimerList::Reset(); +} + + +TimerList::~TimerList() +{ +} + + +void TimerList::Reset() +{ + timerGroups.resize(TIMER_GROUPS); + + timerGroups[TIMER_NO_AB].SetNames("AB"); + timerGroups[TIMER_NO_MAKE].SetNames("Make"); + timerGroups[TIMER_NO_UNDO].SetNames("Undo"); + timerGroups[TIMER_NO_EVALUATE].SetNames("Evaluate"); + timerGroups[TIMER_NO_NEXTMOVE].SetNames("NextMove"); + timerGroups[TIMER_NO_QT].SetNames("QuickTricks"); + timerGroups[TIMER_NO_LT].SetNames("LaterTricks"); + timerGroups[TIMER_NO_MOVEGEN].SetNames("MoveGen"); + timerGroups[TIMER_NO_LOOKUP].SetNames("Lookup"); + timerGroups[TIMER_NO_BUILD].SetNames("Build"); +} + + +void TimerList::Start( + const unsigned groupno, + const unsigned timerno) +{ + if (groupno >= TIMER_GROUPS) + return; + timerGroups[groupno].Start(timerno); +} + + +void TimerList::End( + const unsigned groupno, + const unsigned timerno) +{ + if (groupno >= TIMER_GROUPS) + return; + timerGroups[groupno].End(timerno); +} + + +bool TimerList::Used() const +{ + for (unsigned g = 0; g < TIMER_GROUPS; g++) + { + if (timerGroups[g].Used()) + return true; + } + return false; +} + + +void TimerList::PrintStats(const int thrId) +{ + if (! TimerList::Used()) + return; + + // Approximate the exclusive times of each function. + // The ABsearch*() functions are recursively nested, + // so subtract out the one below. + // The other ones are subtracted out based on knowledge + // of the functions. + + TimerGroup ABGroup; + ABGroup = timerGroups[0]; + ABGroup.Differentiate(); + for (unsigned g = 1; g < TIMER_GROUPS; g++) + ABGroup -= timerGroups[g]; + + Timer ABTotal; + ABGroup.SetNames("AB"); + ABGroup.Sum(ABTotal); + ABTotal.SetName("Sum"); + + Timer sumTotal = ABTotal; + for (unsigned g = 1; g < TIMER_GROUPS; g++) + { + Timer t; + timerGroups[g].Sum(t); + sumTotal += t; + } + + const string fname = DDS_TIMING_PREFIX + STR(thrId) + DDS_DEBUG_SUFFIX; + ofstream fout; + fout.open(fname); + + fout << timerGroups[0].Header(); + fout << ABGroup.SumLine(sumTotal); + for (unsigned g = 1; g < TIMER_GROUPS; g++) + fout << timerGroups[g].SumLine(sumTotal); + fout << timerGroups[0].DashLine(); + fout << sumTotal.SumLine(sumTotal) << endl; + + if (ABGroup.Used()) + { + fout << ABGroup.Header(); + fout << ABGroup.TimerLines(ABTotal); + fout << ABGroup.DashLine(); + fout << ABTotal.SumLine(ABTotal) << endl; + } + +#ifdef DDS_TIMING_DETAILS + fout << timerGroups[0].DetailHeader(); + for (unsigned g = 0; g < TIMER_GROUPS; g++) + fout << timerGroups[g].DetailLines(); + fout << endl; +#endif + + fout.close(); +} + diff --git a/src/TimerList.h b/src/TimerList.h new file mode 100644 index 00000000..7b9ed0e6 --- /dev/null +++ b/src/TimerList.h @@ -0,0 +1,103 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +/* + TimerList consists of a number of groups, one for each piece + of the code being timed (ABsearch etc). + + Each group corresponds to something that should be timed at + multiple AB depths, i.e. cards played. The first card of a + new game is number 48, and the last card is number 0. + + The AB timer is special, as the AB functions are recursive + and so their timing includes not only the other functions they + contain, but also their own recursive calls at lower depths. + The AB timer group must be the first one. + + The object calculates an approximation to exclusive function + times, so it is a "poor man's profiler". + + For AB, first the times at depth-1 are subtracted out, and then + the times for all calls at the same depth are subtracted out. + This still leaves the overhead of the timing itself. As an + approximation, there is one timing overhead left for each + function, and it is on the order of the execution time of + Evaluate(), which is a very fast function. + + TIMER_START and TIMER_END are macros for bracketing code + to be timed, so + + TIMER_START(TIMER_NO_AB, depth); + ABsearch(...); + TIMER_END(TIMER_NO_AB, depth); + + This avoids the tedious #ifdef's at every place of a timer. + */ + +#ifndef DDS_TIMERLIST_H +#define DDS_TIMERLIST_H + +#include +#include +#include + +#include "TimerGroup.h" + +using namespace std; + + +#ifdef DDS_TIMING + #define TIMER_START(g, a) thrp->timerList.Start(g, a) + #define TIMER_END(g, a) thrp->timerList.End(g, a) +#else + #define TIMER_START(g, a) 1 + #define TIMER_END(g, a) 1 +#endif + +#define TIMER_NO_AB 0 +#define TIMER_NO_MAKE 1 +#define TIMER_NO_UNDO 2 +#define TIMER_NO_EVALUATE 3 +#define TIMER_NO_NEXTMOVE 4 +#define TIMER_NO_QT 5 +#define TIMER_NO_LT 6 +#define TIMER_NO_MOVEGEN 7 +#define TIMER_NO_LOOKUP 8 +#define TIMER_NO_BUILD 9 + +#define TIMER_GROUPS 10 + + +class TimerList +{ + private: + + vector timerGroups; + + public: + TimerList(); + + ~TimerList(); + + void Reset(); + + void Start( + const unsigned groupno, + const unsigned timerno); + + void End( + const unsigned groupno, + const unsigned timerno); + + bool Used() const; + + void PrintStats(const int thrId); +}; + +#endif diff --git a/src/dds.h b/src/dds.h index 35ea3576..7ef330ed 100644 --- a/src/dds.h +++ b/src/dds.h @@ -21,7 +21,7 @@ #include "../include/portab.h" #include "TransTable.h" -#include "Timer.h" +#include "TimerList.h" #include "ABstats.h" @@ -54,6 +54,9 @@ #define Max(x, y) (((x) >= (y)) ? (x) : (y)) #define Min(x, y) (((x) <= (y)) ? (x) : (y)) +#define STR(x) \ + static_cast(&(ostringstream() << x))->str() + #define DDS_NOTRUMP 4 /* "hand" is leading hand, "relative" is hand relative leading diff --git a/src/threadmem.h b/src/threadmem.h index 243a00ab..9ea9996f 100644 --- a/src/threadmem.h +++ b/src/threadmem.h @@ -60,7 +60,7 @@ struct localVarType #endif #ifdef DDS_TIMING - Timer timer; // Object + TimerList timerList; // Object #endif #ifdef DDS_TOP_LEVEL diff --git a/test/dtest.cpp b/test/dtest.cpp index a32c7c8f..87a708ff 100644 --- a/test/dtest.cpp +++ b/test/dtest.cpp @@ -8,11 +8,15 @@ */ -#include -#include +#include +#include + #include "../include/dll.h" #include "testcommon.h" +using namespace std; + + int main(int argc, char * argv[]) { int ncores = 0; @@ -25,21 +29,10 @@ int main(int argc, char * argv[]) DDSInfo info; GetDDSInfo(&info); - printf("%s", info.systemString); - printf("%-12s %20s\n\n", "Version", info.versionString); - fflush(stdout); - -// TODO -#if defined(_WIN32) - printf("_WIN32\n"); - fflush(stdout); -#elif defined(_WIN64) - printf("_WIN64\n"); - fflush(stdout); -#else - printf("No WIN\n"); - fflush(stdout); -#endif + cout << info.systemString; + cout << setw(12) << left << "Version" << + setw(20) << right << info.versionString << "\n\n"; + cout.flush(); realMain(argc, argv); diff --git a/test/itest.cpp b/test/itest.cpp index 0b5c685a..e615263b 100644 --- a/test/itest.cpp +++ b/test/itest.cpp @@ -18,11 +18,14 @@ int main(int argc, char * argv[]) { int ncores = 0; - if (argc == 4) + if (argc >= 4) ncores = atoi(argv[3]); SetMaxThreads(ncores); + if (argc >= 5) + SetThreading(threadingCode(argv[4])); + DDSInfo info; GetDDSInfo(&info); printf("%s", info.systemString); From d7928d69cb2946d4526088a80eb8a86cf3998cb8 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 17 Mar 2018 20:17:32 +0100 Subject: [PATCH 014/132] Removed Stats --- src/FILES | 2 - src/IFDEFS | 8 -- src/Init.cpp | 4 - src/Moves.h | 1 - src/NOTES | 4 + src/Scheduler.cpp | 2 +- src/Scheduler.h | 5 - src/SolverIF.cpp | 1 - src/Stats.cpp | 283 ---------------------------------------------- src/Stats.h | 37 ------ src/TimerList.cpp | 2 +- src/TimerList.h | 2 +- 12 files changed, 7 insertions(+), 344 deletions(-) delete mode 100644 src/Stats.cpp delete mode 100644 src/Stats.h diff --git a/src/FILES b/src/FILES index fd5477fd..fa1cc2d3 100644 --- a/src/FILES +++ b/src/FILES @@ -13,7 +13,6 @@ 1103 3334 26153 Scheduler.cpp 297 665 6655 SolveBoard.cpp 1291 3194 30732 SolverIF.cpp - 283 605 6226 Stats.cpp 519 1126 12679 System.cpp 2968 8140 72454 TransTable.cpp 117 239 1985 ABsearch.h @@ -29,7 +28,6 @@ 232 355 3954 Scheduler.h 29 62 494 SolveBoard.h 28 58 444 SolverIF.h - 37 62 537 Stats.h 102 186 1866 System.h 81 155 1390 threadmem.h 519 1108 11141 TransTable.h diff --git a/src/IFDEFS b/src/IFDEFS index ed3ec54f..c9d8ffa1 100644 --- a/src/IFDEFS +++ b/src/IFDEFS @@ -4,14 +4,6 @@ Scheduler.cpp:#ifdef _WIN32 Scheduler.cpp:#ifdef _WIN32 Scheduler.cpp:#ifndef _WIN32 -Stats.cpp:#ifdef _WIN32 -Stats.cpp:#ifdef _WIN32 -Stats.cpp:#ifdef _WIN32 -Stats.cpp:#ifdef _WIN32 -Stats.cpp:#ifdef _WIN32 -Stats.cpp:#ifdef _WIN32 -Stats.cpp:#ifndef _WIN32 - Scheduler.h:#ifndef _WIN32 Scheduler.h:#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) Scheduler.h:#ifdef _WIN32 diff --git a/src/Init.cpp b/src/Init.cpp index ea8e77cb..270e7f83 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -11,7 +11,6 @@ #include "dds.h" #include "threadmem.h" #include "Init.h" -#include "Stats.h" #include "ABsearch.h" #include "Scheduler.h" #include "System.h" @@ -170,9 +169,6 @@ void STDCALL SetMaxThreads( localVar[k].transTable.ReturnAllMemory(); } - InitTimer(); - InitTimerList(); - if (! _initialized) { _initialized = 1; diff --git a/src/Moves.h b/src/Moves.h index e46dee8e..a28c7ab1 100644 --- a/src/Moves.h +++ b/src/Moves.h @@ -15,7 +15,6 @@ #include #include "dds.h" #include "../include/dll.h" -#include "Stats.h" #define CMP_SWAP(i, j) if (a[i].weight < a[j].weight) \ { moveType tmp = a[i]; a[i] = a[j]; a[j] = tmp; } diff --git a/src/NOTES b/src/NOTES index 6f7599cf..26d9bdce 100644 --- a/src/NOTES +++ b/src/NOTES @@ -30,3 +30,7 @@ are created. Probably generate at the end, like with TimerList. Makefile: One -D for each option, all user-controlled. Modify System.cpp accordingly. + +Eliminate portab.h? + +Put now timer in System as well diff --git a/src/Scheduler.cpp b/src/Scheduler.cpp index db3f4413..f21d4096 100644 --- a/src/Scheduler.cpp +++ b/src/Scheduler.cpp @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ diff --git a/src/Scheduler.h b/src/Scheduler.h index c37944ea..a116875e 100644 --- a/src/Scheduler.h +++ b/src/Scheduler.h @@ -30,11 +30,6 @@ #define HASH_MAX 200 -// TODO Can probably be deleted -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) - #include -#endif - struct schedType { diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 690f8462..5871eb11 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -14,7 +14,6 @@ #include "Moves.h" #include "threadmem.h" #include "ABsearch.h" -#include "Stats.h" #include "SolverIF.h" diff --git a/src/Stats.cpp b/src/Stats.cpp deleted file mode 100644 index dcc7101a..00000000 --- a/src/Stats.cpp +++ /dev/null @@ -1,283 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - -#include - -#include "dds.h" -#include "Stats.h" - -#define NUM_TIMERS 2000 -#define COUNTER_SLOTS 200 - -#include - -#ifdef _WIN32 -LARGE_INTEGER timerFreq; -LARGE_INTEGER timerUser0; -LARGE_INTEGER timerUser1; -LARGE_INTEGER timerListUser0[NUM_TIMERS]; -LARGE_INTEGER timerListUser1[NUM_TIMERS]; -#else -#include -int timevalDiff(timeval x, timeval y); - -timeval timerUser0; -timeval timerUser1; -timeval timerListUser0[NUM_TIMERS]; -timeval timerListUser1[NUM_TIMERS]; -#endif - -clock_t timerSys0; -clock_t timerSys1; -clock_t timerListSys0[NUM_TIMERS]; -clock_t timerListSys1[NUM_TIMERS]; - -int timerCount; -int timerListCount[NUM_TIMERS]; - -int timerNameSet; - -char timerName[80]; - -long long timerUserCum; -long long timerSysCum; -long long timerListUserCum[NUM_TIMERS]; -long long timerListSysCum[NUM_TIMERS]; -long long predError; -long long predAbsError; - - -void InitTimer() -{ - timerCount = 0; - timerUserCum = 0; - timerSysCum = 0; - timerNameSet = 0; - - predError = 0; - predAbsError = 0; -} - - -void SetTimerName(char * name) -{ - strcpy(timerName, name); - timerNameSet = 1; -} - - -void StartTimer() -{ - timerCount++; - timerSys0 = clock(); - -#ifdef _WIN32 - QueryPerformanceCounter(&timerUser0); -#else - gettimeofday(&timerUser0, nullptr); -#endif -} - - -void EndTimer() -{ - timerSys1 = clock(); - -#ifdef _WIN32 - // To get "real" seconds we would have to divide by - // timerFreq.QuadPart which needs to be initialized. - QueryPerformanceCounter(&timerUser1); - int timeUser = static_cast - ((timerUser1.QuadPart - timerUser0.QuadPart)); -#else - gettimeofday(&timerUser1, nullptr); - int timeUser = timevalDiff(timerUser1, timerUser0); -#endif - - timerUserCum += timeUser; - - timerSysCum += static_cast((1000 * (timerSys1 - timerSys0)) / - static_cast(CLOCKS_PER_SEC)); -} - - -void PrintTimer() -{ - if (timerNameSet) - printf("%-18s : %s\n", "Timer name", timerName); - - printf("%-18s : %10d\n", "Number of calls", timerCount); - if (timerCount == 0) return; - - if (timerUserCum == 0) - printf("%-18s : %s\n", "User time", "zero"); - else - { - printf("%-18s : %10lld\n", "User time/ticks", timerUserCum); - printf("%-18s : %10.2f\n", "User per call", - static_cast(timerUserCum / timerCount)); - } - - if (timerSysCum == 0) - printf("%-18s : %s\n", "Sys time", "zero"); - else - { - printf("%-18s : %10lld\n", "Sys time/ticks", timerSysCum); - printf("%-18s : %10.2f\n", "Sys per call", - static_cast(timerSysCum / timerCount)); - printf("%-18s : %10.2f\n", "Ratio", - static_cast(timerSysCum / timerUserCum)); - } - printf("\n"); -} - - -void InitTimerList() -{ - for (int i = 0; i < NUM_TIMERS; i++) - { - timerListCount [i] = 0; - timerListUserCum[i] = 0; - timerListSysCum [i] = 0; - } -} - - -void StartTimerNo(int no) -{ - timerListCount[no]++; - timerListSys0[no] = clock(); - -#ifdef _WIN32 - QueryPerformanceCounter(&timerListUser0[no]); -#else - gettimeofday(&timerListUser0[no], nullptr); -#endif -} - - -void EndTimerNo(int no) -{ - timerListSys1[no] = clock(); - -#ifdef _WIN32 - QueryPerformanceCounter(&timerListUser1[no]); - int timeUser = static_cast - ((timerListUser1[no].QuadPart - timerListUser0[no].QuadPart)); -#else - gettimeofday(&timerListUser1[no], nullptr); - int timeUser = timevalDiff(timerListUser1[no], timerListUser0[no]); -#endif - - timerListUserCum[no] += static_cast(timeUser); - - timerListSysCum[no] += - static_cast((1000 * - (timerListSys1[no] - timerListSys0[no])) / - static_cast(CLOCKS_PER_SEC)); -} - - -void EndTimerNoAndComp(int no, int pred) -{ - timerListSys1[no] = clock(); - -#ifdef _WIN32 - QueryPerformanceCounter(&timerListUser1[no]); - int timeUser = static_cast - ((timerListUser1[no].QuadPart - timerListUser0[no].QuadPart)); -#else - gettimeofday(&timerListUser1[no], nullptr); - int timeUser = timevalDiff(timerListUser1[no], timerListUser0[no]); -#endif - - timerListUserCum[no] += static_cast(timeUser); - - predError += timeUser - pred; - - predAbsError += (timeUser >= pred ? - timeUser - pred : pred - timeUser); - - timerListSysCum[no] += - static_cast( - (1000 * (timerListSys1[no] - timerListSys0[no])) / - static_cast(CLOCKS_PER_SEC)); -} - - -void PrintTimerList() -{ - printf("%5s %10s %12s %10s %10s\n", - "n", "Number", "User ticks", "Avg", "Syst time"); - - int totNum = 0; - for (int no = 0; no < NUM_TIMERS; no++) - { - if (timerListCount[no] == 0) - continue; - - totNum += timerListCount[no]; - - double avg = static_cast(timerListUserCum[no]) / - static_cast(timerListCount[no]); - - // For some reason I have trouble when putting it on one line... - printf("%5d %10d %12lld ", - no, - timerListCount[no], - timerListUserCum[no]); - printf(" %10.2f %10lld\n", - avg, - timerListSysCum[no]); - } - printf("\n"); - if (predError != 0) - { - printf("Total number %10d\n", totNum); - printf("Prediction mean %10.0f\n", - static_cast(predError) / - static_cast(totNum)); - printf("Prediction abs mean %10.0f\n", - static_cast(predAbsError) / - static_cast(totNum)); - printf("\n"); - } -} - - -#ifndef _WIN32 -int timevalDiff(timeval x, timeval y) -{ - /* Elapsed time, x-y, in milliseconds */ - return 1000 * (x.tv_sec - y.tv_sec ) - + (x.tv_usec - y.tv_usec) / 1000; -} -#endif - - -long long counter[COUNTER_SLOTS]; - -void InitCounter() -{ - for (int i = 0; i < COUNTER_SLOTS; i++) - counter[i] = 0; -} - - -void PrintCounter() -{ - for (int i = 0; i < COUNTER_SLOTS; i++) - { - if (counter[i]) - printf("%d\t%12lld\n", i, counter[i]); - } - printf("\n"); -} - - diff --git a/src/Stats.h b/src/Stats.h deleted file mode 100644 index c4a62bf9..00000000 --- a/src/Stats.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - -#ifndef DDS_STATS_H -#define DDS_STATS_H - -void InitTimer(); - -void SetTimerName(char * name); - -void StartTimer(); - -void EndTimer(); - -void PrintTimer(); - -void InitTimerList(); - -void StartTimerNo(int n); - -void EndTimerNo(int n); - -void EndTimerNoAndComp(int n, int pred); - -void PrintTimerList(); - -void InitCounter(); - -void PrintCounter(); - -#endif diff --git a/src/TimerList.cpp b/src/TimerList.cpp index c76b7fa4..be1b9b6e 100644 --- a/src/TimerList.cpp +++ b/src/TimerList.cpp @@ -79,7 +79,7 @@ bool TimerList::Used() const } -void TimerList::PrintStats(const int thrId) +void TimerList::PrintStats(const int thrId) const { if (! TimerList::Used()) return; diff --git a/src/TimerList.h b/src/TimerList.h index 7b9ed0e6..cfa6c8ea 100644 --- a/src/TimerList.h +++ b/src/TimerList.h @@ -97,7 +97,7 @@ class TimerList bool Used() const; - void PrintStats(const int thrId); + void PrintStats(const int thrId) const; }; #endif From c81f4b81d7c01e052e6f136e4d10b250b147c6f5 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 17 Mar 2018 20:19:06 +0100 Subject: [PATCH 015/132] Update Visual Makefiles --- src/Makefiles/Makefile_Visual_all | 75 +++++++++++++++++-------------- test/Makefiles/Makefile_Visual | 18 ++++++-- 2 files changed, 57 insertions(+), 36 deletions(-) diff --git a/src/Makefiles/Makefile_Visual_all b/src/Makefiles/Makefile_Visual_all index c3abbfb3..2a017ee6 100644 --- a/src/Makefiles/Makefile_Visual_all +++ b/src/Makefiles/Makefile_Visual_all @@ -23,6 +23,7 @@ CC_BOOST_LINK = /link /LIBPATH:$(BOOST32_LIB1) /LIBPATH:$(BOOST32_LIB2) # If your Microsoft compiler is not called cl, change it here. CC = cl CC_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs /openmp /DDDS_THREADS_BOOST +# CC_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs /openmp /DDDS_THREADS_BOOST /DDDS_DEBUG_ALL /DDDS_TIMING # These flags are not turned on by default, but DDS should pass them. # Turn them on below. @@ -79,9 +80,10 @@ SOURCE_FILES = \ Scheduler.cpp \ SolveBoard.cpp \ SolverIF.cpp \ - Stats.cpp \ System.cpp \ Timer.cpp \ + TimerGroup.cpp \ + TimerList.cpp \ TransTable.cpp OBJ_FILES = $(subst .cpp,.obj,$(SOURCE_FILES)) $(VFILE).obj @@ -113,51 +115,58 @@ install: # DO NOT DELETE dds.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h +dds.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +dds.obj: Init.h ABsearch.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -ABsearch.obj: QuickTricks.h LaterTricks.h ABsearch.h +ABsearch.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +ABsearch.obj: threadmem.h QuickTricks.h LaterTricks.h ABsearch.h ABstats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +ABstats.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h CalcTables.obj: dds.h debug.h ../include/portab.h TransTable.h -CalcTables.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -CalcTables.obj: Scheduler.h SolveBoard.h PBN.h +CalcTables.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +CalcTables.obj: Moves.h Scheduler.h SolveBoard.h PBN.h DealerPar.obj: dds.h debug.h ../include/portab.h TransTable.h -DealerPar.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h +DealerPar.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +DealerPar.obj: Moves.h Scheduler.h Init.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.obj: ABsearch.h System.h +Init.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +Init.obj: threadmem.h Init.h ABsearch.h System.h LaterTricks.obj: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -LaterTricks.obj: Scheduler.h threadmem.h LaterTricks.h +LaterTricks.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +LaterTricks.obj: Moves.h Scheduler.h threadmem.h LaterTricks.h Moves.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h +Moves.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +Moves.obj: ABsearch.h Par.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +Par.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h PlayAnalyser.obj: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.obj: Scheduler.h threadmem.h SolverIF.h System.h PBN.h +PlayAnalyser.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +PlayAnalyser.obj: Moves.h Scheduler.h threadmem.h SolverIF.h System.h PBN.h PBN.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h +PBN.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h PBN.h QuickTricks.obj: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -QuickTricks.obj: Scheduler.h threadmem.h QuickTricks.h +QuickTricks.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +QuickTricks.obj: Moves.h Scheduler.h threadmem.h QuickTricks.h Scheduler.obj: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h +Scheduler.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +Scheduler.obj: Moves.h SolveBoard.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.obj: Scheduler.h threadmem.h SolverIF.h SolveBoard.h System.h -SolveBoard.obj: PBN.h +SolveBoard.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +SolveBoard.obj: Moves.h Scheduler.h threadmem.h SolverIF.h SolveBoard.h +SolveBoard.obj: System.h PBN.h SolverIF.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -SolverIF.obj: threadmem.h ABsearch.h SolverIF.h -Stats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Stats.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +SolverIF.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +SolverIF.obj: Init.h threadmem.h ABsearch.h SolverIF.h System.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -System.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h System.h -System.obj: SolveBoard.h PlayAnalyser.h -Timer.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Timer.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +System.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +System.obj: System.h SolveBoard.h PlayAnalyser.h +Timer.obj: Timer.h +TimerGroup.obj: TimerGroup.h Timer.h dds.h debug.h ../include/portab.h +TimerGroup.obj: TransTable.h ../include/dll.h TimerList.h ABstats.h Moves.h +TimerGroup.obj: Scheduler.h +TimerList.obj: TimerList.h TimerGroup.h Timer.h dds.h debug.h +TimerList.obj: ../include/portab.h TransTable.h ../include/dll.h ABstats.h +TimerList.obj: Moves.h Scheduler.h TransTable.obj: dds.h debug.h ../include/portab.h TransTable.h -TransTable.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -TransTable.obj: Scheduler.h +TransTable.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +TransTable.obj: Moves.h Scheduler.h diff --git a/test/Makefiles/Makefile_Visual b/test/Makefiles/Makefile_Visual index c3cd1994..f3ce58ca 100644 --- a/test/Makefiles/Makefile_Visual +++ b/test/Makefiles/Makefile_Visual @@ -14,6 +14,15 @@ # uses the source and object files in the src directory... # Use "make itest" at your own risk. +BOOST32_PATH1 = \User\sheins\boost_1_66_0_x32 +BOOST32_LIB1 = $(BOOST32_PATH1)\lib32-msvc-14.0 + +BOOST32_PATH2 = \Users\s.hein\Documents\Programs\boost_1_66_0_x32_14_1 +BOOST32_LIB2 = $(BOOST32_PATH2)\lib32-msvc-14.1 + +CC_BOOST_INCL = /I$(BOOST32_PATH1) /I$(BOOST32_PATH2) +CC_BOOST_LINK = /LIBPATH:$(BOOST32_LIB1) /LIBPATH:$(BOOST32_LIB2) + # If your Microsoft compiler is not called cl, change it here. CC = cl CC_FLAGS = /O2 /Oi /Ot /Oy /GL @@ -86,7 +95,10 @@ STOLEN_SOURCE_FILES = \ $(SRC)/SolveBoard.cpp \ $(SRC)/SolverIF.cpp \ $(SRC)/Stats.cpp \ + $(SRC)/System.cpp \ $(SRC)/Timer.cpp \ + $(SRC)/TimerGroup.cpp \ + $(SRC)/TimerList.cpp \ $(SRC)/TransTable.cpp ITEST_SOURCE_FILES = \ @@ -97,13 +109,13 @@ ITEST_SOURCE_FILES = \ ITEST_OBJ_FILES = $(subst .cpp,.obj,$(ITEST_SOURCE_FILES)) dtest: $(DTEST_OBJ_FILES) - link /LTCG $(DTEST_OBJ_FILES) $(DLIB) /out:$(DTEST).exe + link /LTCG $(DTEST_OBJ_FILES) $(DLIB) $(CC_BOOST_LINK) /out:$(DTEST).exe itest: $(ITEST_OBJ_FILES) - link /LTCG $(ITEST_OBJ_FILES) /out:$(ITEST).exe + link /LTCG $(ITEST_OBJ_FILES) $(CC_BOOST_LINK) /out:$(ITEST).exe %.obj: %.cpp - $(CC) $(CC_FULL_FLAGS) /c $< /Fo$*.obj + $(CC) $(CC_FULL_FLAGS) $(CC_BOOST_INCL) /c $< /Fo$*.obj depend: makedepend -Y -o.obj -- $(ITEST_SOURCE_FILES) $(DTEST).cpp From 712c0225ffa2ec0c4e5833aefa7a032830e49875 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 18 Mar 2018 10:26:35 +0100 Subject: [PATCH 016/132] Scheduler works with new timing code --- hands/list2.txt | 15 ++ src/ABsearch.cpp | 10 +- src/FILES | 18 +- src/NOTES | 61 +++--- src/PlayAnalyser.cpp | 4 + src/Scheduler.cpp | 299 ++++++++---------------------- src/Scheduler.h | 70 ++----- src/SolveBoard.cpp | 4 + src/SolverIF.cpp | 2 + src/TimeStat.cpp | 102 +++++++++++ src/TimeStat.h | 47 +++++ src/TimeStatList.cpp | 86 +++++++++ src/TimeStatList.h | 50 +++++ src/Timer.cpp | 64 +++---- src/Timer.h | 31 +--- src/Timer_new.cpp | 154 ++++++++++++++++ src/Timer_new.h | 63 +++++++ src/Timer_old.cpp | 170 +++++++++++++++++ src/Timer_old.h | 76 ++++++++ test/dtest.cpp | 2 +- test/ref/sched.txt | 75 ++++++++ test/ref/timer0_chrono.txt | 367 +++++++++++++++++++++++++++++++++++++ test/ref/timer0_old.txt | 367 +++++++++++++++++++++++++++++++++++++ 23 files changed, 1742 insertions(+), 395 deletions(-) create mode 100644 hands/list2.txt create mode 100644 src/TimeStat.cpp create mode 100644 src/TimeStat.h create mode 100644 src/TimeStatList.cpp create mode 100644 src/TimeStatList.h create mode 100644 src/Timer_new.cpp create mode 100644 src/Timer_new.h create mode 100644 src/Timer_old.cpp create mode 100644 src/Timer_old.h create mode 100644 test/ref/sched.txt create mode 100644 test/ref/timer0_chrono.txt create mode 100644 test/ref/timer0_old.txt diff --git a/hands/list2.txt b/hands/list2.txt new file mode 100644 index 00000000..55ed58da --- /dev/null +++ b/hands/list2.txt @@ -0,0 +1,15 @@ +NUMBER 2 +PBN 0 0 0 0 "N:QJ6.K652.J85.T98 873.J97.AT764.Q4 K5.T83.KQ9.A7652 AT942.AQ4.32.KJ3" +FUT 9 2 2 2 3 0 0 1 1 1 5 8 11 10 6 12 2 6 13 0 0 0 768 0 2048 0 32 0 5 5 5 5 5 5 4 4 4 +TABLE 5 8 5 8 6 6 6 6 5 7 5 7 7 5 7 5 6 6 6 6 +PAR "NS -110" "EW 110" "NS:EW 2S" "EW:EW 2S" +PAR2 "-110" "2S-EW" +PLAY 45 "CTC4CACJH8H4HKH9D5DAD9D2S7S5S2SQD8D4DQD3H3HAH6H7C3C8CQC2S3SKSAS6HQH5HJHTCKC9D6C5S4SJS8C6DJ" +TRACE 46 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 +PBN 1 2 4 1 "E:QJT5432.T.6.QJ82 .J97543.K7532.94 87.A62.QJT4.AT75 AK96.KQ8.A98.K63" +FUT 7 3 3 3 1 2 0 0 2 8 12 10 6 12 5 0 0 2048 0 0 3072 28 4 4 4 3 3 3 2 +TABLE 4 9 4 9 10 2 10 2 8 3 8 3 6 7 6 7 9 3 9 3 +PAR "NS 100" "EW -100" "NS:EW 4Sx" "EW:EW 4Sx" +PAR2 "100" "4S*-EW-1" +PLAY 52 "SQD2S8SAHKHTH3H2HQS2H4H6H8D6HJHAS7SKS4C4D8C2DKD4H9C5S6S3H7C7C3S5H5CTD9STD3DQDAC8S9SJC9DTCQD5CAC6DJCKCJD7" +TRACE 49 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 9 9 9 9 9 9 9 9 9 9 9 9 diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index 1d45e897..48fcd3d3 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -203,6 +203,7 @@ void InitFileTTstats(int thrId) void InitFileTimer(int thrId) { + // TODO: Remove UNUSED(thrId); } @@ -227,14 +228,7 @@ void InitFileMoves(int thrId) void InitFileScheduler() { -#ifdef DDS_SCHEDULER - char fname[DDS_FNAME_LEN]; - sprintf(fname, "%s%s\0", - DDS_SCHEDULER_PREFIX, - DDS_DEBUG_SUFFIX); - - scheduler.SetFile(fname); -#endif + // TODO: Remove } diff --git a/src/FILES b/src/FILES index fa1cc2d3..2c543922 100644 --- a/src/FILES +++ b/src/FILES @@ -10,7 +10,6 @@ 184 487 3660 PBN.cpp 364 1016 9116 PlayAnalyser.cpp 1209 3449 30221 QuickTricks.cpp - 1103 3334 26153 Scheduler.cpp 297 665 6655 SolveBoard.cpp 1291 3194 30732 SolverIF.cpp 519 1126 12679 System.cpp @@ -25,7 +24,6 @@ 22 49 408 PBN.h 20 38 288 PlayAnalyser.h 31 70 530 QuickTricks.h - 232 355 3954 Scheduler.h 29 62 494 SolveBoard.h 28 58 444 SolverIF.h 102 186 1866 System.h @@ -33,14 +31,14 @@ 519 1108 11141 TransTable.h 19052 51196 458259 insgesamt +For now: - Final: +Scheduler - 164 441 3323 Timer.cpp - 74 119 1094 Timer.h +Final: - 183 421 3171 TimerGroup.cpp - 58 103 966 TimerGroup.h - - 139 276 2928 TimerList.cpp - 112 339 2553 TimerList.h +Timer +TimerGroup +TimerList +TimeStat +TimeStatList diff --git a/src/NOTES b/src/NOTES index 26d9bdce..00e15d35 100644 --- a/src/NOTES +++ b/src/NOTES @@ -1,36 +1,25 @@ -14.03.2018 - -Do we need extern int noOfThreads in System at all? - -Do we need System: Init and Run, or can we combine? - -Do we need System globals at all? - -mingw has undefined symbols, eliminate system defines as -much as possible. - -Localize the boost warnings from the Makefile to System.cpp list - -11.03.2018 - -Scheduler.cpp and .h ---- -On laptop, fold dtest timing functions back into dtest - -More modular Makefiles - -Scheduler: Do a really simple user Timer like in dtest. -Timer (new) gets used in Scheduler and for debugging. - -Move away from printf etc to out. - -It's a bit annoying that SetMaxThreads() gets called once with 0 -automatically, once with 1 from dtest. So lots of debug text files -are created. Probably generate at the end, like with TimerList. - -Makefile: One -D for each option, all user-controlled. Modify -System.cpp accordingly. - -Eliminate portab.h? - -Put now timer in System as well +17.03.2018 + +System +- Combine Init and Run +- No more globals? +- Move boost errors from Makefile to here +- Do we need noOfThreads at all here? + +Makefile +- One for each system +- Clean define's, WE control what gets compiled, not compiler +- Source files centrally +- Depends centrally + +dtest +- Get laptop changes, no more time function calls + +General +- Need Stats.cpp after all?! (in #ifdef's...) +- Move away from printf etc to out. +- It's a bit annoying that SetMaxThreads() gets called once with 0 + automatically, once with 1 from dtest. So lots of debug text files + are created. Probably generate at the end, like with TimerList. +- mingw has undefined symbols, eliminate system defines as +- much as possible. diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 1422a889..aa56c046 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -308,6 +308,10 @@ int STDCALL AnalyseAllPlaysBin( solvedp->noOfBoards = bop->noOfBoards; +#ifdef DDS_SCHEDULER + scheduler.PrintTiming(); +#endif + if (playparam.error == 0) return RETURN_NO_FAULT; else diff --git a/src/Scheduler.cpp b/src/Scheduler.cpp index f21d4096..57f8a8ae 100644 --- a/src/Scheduler.cpp +++ b/src/Scheduler.cpp @@ -8,6 +8,10 @@ */ +#include +#include +#include + #include "Scheduler.h" @@ -41,27 +45,7 @@ Scheduler::Scheduler() timeHistSuit[i] = 0; } - sprintf(fname, ""); - fp = stdout; -#endif -} - - -void Scheduler::SetFile(char * ourFname) -{ -#ifdef DDS_SCHEDULER - if (strlen(ourFname) > 80) - return; - - if (fp != stdout) // Already set - return; - strncpy(fname, ourFname, strlen(ourFname)); - - fp = fopen(fname, "w"); - if (! fp) - fp = stdout; -#else - UNUSED(ourFname); + timersThread.resize(MAXNOOFTHREADS); #endif } @@ -69,59 +53,16 @@ void Scheduler::SetFile(char * ourFname) #ifdef DDS_SCHEDULER void Scheduler::InitTimes() { - for (int s = 0; s < 2; s++) - { - timeStrain[s].cum = 0; - timeStrain[s].cumsq = 0; - timeStrain[s].number = 0; - - timeGroupActualStrain[s].cum = 0; - timeGroupActualStrain[s].cumsq = 0; - timeGroupActualStrain[s].number = 0; - - timeGroupPredStrain[s].cum = 0; - timeGroupPredStrain[s].cumsq = 0; - timeGroupPredStrain[s].number = 0; - - timeGroupDiffStrain[s].cum = 0; - timeGroupDiffStrain[s].cumsq = 0; - timeGroupDiffStrain[s].number = 0; - } - - for (int s = 0; s < 16; s++) - { - timeRepeat[s].cum = 0; - timeRepeat[s].cumsq = 0; - timeRepeat[s].number = 0; - } - - for (int s = 0; s < 60; s++) - { - timeDepth[s].cum = 0; - timeDepth[s].cumsq = 0; - timeDepth[s].number = 0; - } - - for (int s = 0; s < 60; s++) - { - timeStrength[s].cum = 0; - timeStrength[s].cumsq = 0; - timeStrength[s].number = 0; - } + timeStrain.Init("Suit/NT", 2); + timeRepeat.Init("Repeat number", 16); + timeDepth.Init("Trace depth", 60); + timeStrength.Init("Evenness", 60); + timeFanout.Init("Fanout", 100); + timeThread.Init("Threads", MAXNOOFTHREADS); - for (int s = 0; s < 100; s++) - { - timeFanout[s].cum = 0; - timeFanout[s].cumsq = 0; - timeFanout[s].number = 0; - } - - for (int s = 0; s < MAXNOOFTHREADS; s++) - { - timeThread[s].cum = 0; - timeThread[s].cumsq = 0; - timeThread[s].number = 0; - } + timeGroupActualStrain.Init("Group actual suit/NT", 2); + timeGroupPredStrain.Init("Group predicted suit/NT", 2); + timeGroupDiffStrain.Init("Group diff suit/NT", 2); blockMax = 0; timeBlock = 0; @@ -131,10 +72,6 @@ void Scheduler::InitTimes() Scheduler::~Scheduler() { -#ifdef DDS_SCHEDULER - if (fp != stdout && fp != nullptr) - fclose(fp); -#endif } @@ -834,24 +771,15 @@ schedType Scheduler::GetNumber( #ifdef DDS_SCHEDULER void Scheduler::StartThreadTimer(int thrId) { -#ifdef _WIN32 - QueryPerformanceCounter(&timeStart[thrId]); -#else - gettimeofday(&timeStart[thrId], NULL); -#endif + timersThread[thrId].Reset(); + timersThread[thrId].Start(); } void Scheduler::EndThreadTimer(int thrId) { -#ifdef _WIN32 - QueryPerformanceCounter(&timeEnd[thrId]); - int timeUser = (timeEnd [thrId].QuadPart - - timeStart[thrId].QuadPart); -#else - gettimeofday(&timerListUser1[no], NULL); - int timeUser = Scheduler::timeDiff(timeEnd[thrId], timeStart[thrId]); -#endif + timersThread[thrId].End(); + int timeUser = timersThread[thrId].UserTime(); hands[ threadToHand[thrId] ].time = timeUser; hands[ threadToHand[thrId] ].thread = thrId; @@ -862,24 +790,15 @@ void Scheduler::EndThreadTimer(int thrId) void Scheduler::StartBlockTimer() { -#ifdef _WIN32 - QueryPerformanceCounter(&blockStart); -#else - gettimeofday(&blockStart, NULL); -#endif + timerBlock.Reset(); + timerBlock.Start(); } void Scheduler::EndBlockTimer() { -#ifdef _WIN32 - QueryPerformanceCounter(&blockEnd); - int timeUser = (blockEnd .QuadPart - - blockStart.QuadPart); -#else - gettimeofday(&blockEnd, NULL); - int timeUser = Scheduler::timeDiff(blockEnd, blockStart); -#endif + timerBlock.End(); + const int timeUserBlock = timerBlock.UserTime(); handType * hp; for (int b = 0; b < numHands; b++) @@ -890,29 +809,15 @@ void Scheduler::EndBlockTimer() if (hp->selectFlag) { - timeStrain [ hp->NTflag ].number++; - timeStrain [ hp->NTflag ].cum += timeUser; - timeStrain [ hp->NTflag ].cumsq += timesq; - - timeRepeat [ hp->repeatNo ].number++; - timeRepeat [ hp->repeatNo ].cum += timeUser; - timeRepeat [ hp->repeatNo ].cumsq += timesq; - - timeDepth [ hp->depth ].number++; - timeDepth [ hp->depth ].cum += timeUser; - timeDepth [ hp->depth ].cumsq += timesq; - - timeStrength[ hp->strength ].number++; - timeStrength[ hp->strength ].cum += timeUser; - timeStrength[ hp->strength ].cumsq += timesq; - - timeFanout [ hp->fanout ].number++; - timeFanout [ hp->fanout ].cum += timeUser; - timeFanout [ hp->fanout ].cumsq += timesq; - - timeThread [ hp->thread ].number++; - timeThread [ hp->thread ].cum += timeUser; - timeThread [ hp->thread ].cumsq += timesq; + TimeStat ts; + ts.Set(timeUser, timesq); + + timeStrain.Add(hp->NTflag, ts); + timeRepeat.Add(hp->repeatNo, ts); + timeDepth.Add(hp->depth, ts); + timeStrength.Add(hp->strength, ts); + timeFanout.Add(hp->fanout, ts); + timeThread.Add(hp->thread, ts); } if (timeUser > blockMax) @@ -934,129 +839,70 @@ void Scheduler::EndBlockTimer() int head = group[g].head; int NTflag = (hands[head].strain == 4 ? 1 : 0); - timeGroupActualStrain[NTflag].number++; - timeGroupActualStrain[NTflag].cum += group[g].actual; - timeGroupActualStrain[NTflag].cumsq += - (double) group[g].actual * (double) group[g].actual; + TimeStat ts; - timeGroupPredStrain [NTflag].number++; - timeGroupPredStrain [NTflag].cum += group[g].pred; - timeGroupPredStrain [NTflag].cumsq += - group[g].pred * group[g].pred; + ts.Set(group[g].actual); + timeGroupActualStrain.Add(NTflag, ts); - double diff = group[g].actual - group[g].pred; + ts.Set(group[g].pred); + timeGroupPredStrain.Add(NTflag, ts); - timeGroupDiffStrain [NTflag].number++; - timeGroupDiffStrain [NTflag].cum += diff; - timeGroupDiffStrain [NTflag].cumsq += diff * diff; + int diff = group[g].actual - group[g].pred; + ts.Set(diff); + timeGroupDiffStrain.Add(NTflag, ts); } - timeBlock += timeUser; + + timeBlock += timeUserBlock; timeMax += blockMax; blockMax = 0; } -void Scheduler::PrintTimingList( - timeType * tp, - int length, - const char title[]) -{ - bool empty = true; - for (int no = 0; no < length && empty; no++) - { - if (tp[no].number) - empty = false; - } - if (empty) - return; - - fprintf(fp, "%s\n\n", title); - fprintf(fp, "%5s %8s %12s %12s %12s %12s\n", - "n", "Number", "Cum time", "Average", "Sdev", "Sdev/mu"); - - long long sn = 0, st = 0; - double sq = 0; - - for (int no = 0; no < length; no++) - { - if (tp[no].number == 0) - continue; - - sn += tp[no].number; - st += tp[no].cum; - sq += tp[no].cumsq; - - double avg = (double) tp[no].cum / (double) tp[no].number; - double arg = (tp[no].cumsq / (double) tp[no].number) - - (double) avg * (double) avg; - double sdev = (arg >= 0. ? sqrt(arg) : 0.); - - fprintf(fp, "%5d %8d %12lld ", - no, - tp[no].number, - tp[no].cum); - fprintf(fp, "%12.0f %12.0f %12.2f\n", avg, sdev, sdev / avg); - } - - if (sn) - { - double avg = (double) st / (double) sn; - double arg = (sq / (double) sn) - (double) avg * (double) avg; - double sdev = (arg >= 0. ? sqrt(arg) : 0.); - fprintf(fp, " Avg %8lld %12lld ", sn, st); - fprintf(fp, "%12.0f %12.0f %12.2f\n", avg, sdev, sdev / avg); - } - - fprintf(fp, "\n"); -} - - void Scheduler::PrintTiming() { - Scheduler::PrintTimingList(timeStrain , 2, "Suit/NT"); - Scheduler::PrintTimingList(timeRepeat , 16, "Repeat number"); - Scheduler::PrintTimingList(timeDepth , 60, "Trace depth"); - Scheduler::PrintTimingList(timeStrength, 60, "Evenness"); - Scheduler::PrintTimingList(timeFanout , 100, "Fanout"); - Scheduler::PrintTimingList(timeThread , MAXNOOFTHREADS, "Threads"); - - Scheduler::PrintTimingList(timeGroupActualStrain, 2, - "Group actual suit/NT"); - Scheduler::PrintTimingList(timeGroupPredStrain , 2, - "Group predicted suit/NT"); - Scheduler::PrintTimingList(timeGroupDiffStrain , 2, - "Group diff suit/NT"); + const string fname = string(DDS_SCHEDULER_PREFIX) + DDS_DEBUG_SUFFIX; + ofstream fout; + fout.open(fname); + + fout << timeStrain.List(); + fout << timeRepeat.List(); + fout << timeDepth.List(); + fout << timeStrength.List(); + fout << timeFanout.List(); + fout << timeThread.List(); + fout << timeGroupActualStrain.List(); + fout << timeGroupPredStrain.List(); + fout << timeGroupDiffStrain.List(); #if 0 + fout << setw(13) << "Hist" << + setw(10) << "Hist suit" << + setw(10) << "Hist NT" << "\n"; for (int i = 0; i < 10000; i++) + { if (timeHist[i] || timeHistSuit[i] || timeHistNT[i]) - fprintf(fp, "%4d %8d %8d %8d\n", - i, timeHist[i], timeHistSuit[i], timeHistNT[i]); - fprintf(fp, "\n"); + { + fout << setw(4) << i << + setw(9) << timeHist[i] << + setw(10) << timeHistSuit[i] << + setw(10) << timeHistNT[i] << "\n"; + } + } + fout << endl; #endif if (timeBlock == 0) return; - // Continuing problems with ld in long fprintf's... - double avg = 100. * (double) timeMax / (double) timeBlock; - fprintf(fp, "Largest hand %12lld ", timeMax); - fprintf(fp, "%12lld ", timeBlock); - fprintf(fp, "%5.2f%%\n\n", avg); -} + const double avg = 100. * (double) timeMax / (double) timeBlock; + fout << "Largest hand" << + setw(13) << timeMax << + setw(13) << timeBlock << + setw(6) << setprecision(2) << fixed << avg << "%\n\n"; - -#ifndef _WIN32 -int Scheduler::timeDiff( - timeval x, - timeval y) -{ - /* Elapsed time, x-y, in milliseconds */ - return 1000 * (x.tv_sec - y.tv_sec ) - + (x.tv_usec - y.tv_usec) / 1000; + fout.close(); } -#endif #endif // DDS_SCHEDULER @@ -1100,4 +946,3 @@ int Scheduler::PredictedTime( return pred; } - diff --git a/src/Scheduler.h b/src/Scheduler.h index a116875e..5f4c4fc2 100644 --- a/src/Scheduler.h +++ b/src/Scheduler.h @@ -12,16 +12,11 @@ #include -#include -#include -#include -#include +#include "TimeStatList.h" #include "dds.h" -#include "../include/dll.h" -#ifndef _WIN32 - #include -#endif +using namespace std; + #define SCHEDULER_NOSORT 0 #define SCHEDULER_SOLVE 1 @@ -88,7 +83,7 @@ class Scheduler int numGroups; int extraGroups; - std::atomic currGroup; + atomic currGroup; listType list[DDS_SUITS + 2][HASH_MAX]; @@ -112,25 +107,8 @@ class Scheduler void Reset(); -#ifdef _WIN32 - LARGE_INTEGER timeStart[MAXNOOFTHREADS]; - LARGE_INTEGER timeEnd[MAXNOOFTHREADS]; - LARGE_INTEGER blockStart; - LARGE_INTEGER blockEnd; -#else - int timeDiff( - timeval x, - timeval y); - - timeval startTime[MAXNOOFTHREADS]; - timeval endTime[MAXNOOFTHREADS]; - timeval blockStart; - timeval blockEnd; -#endif - - void CreateLock(); - - void DestroyLock(); + vector timersThread; + Timer timerBlock; void MakeGroups( boards * bop); @@ -146,42 +124,26 @@ class Scheduler SortTrace(); #ifdef DDS_SCHEDULER - FILE * fp; - - char fname[80]; int timeHist[10000]; int timeHistNT[10000]; int timeHistSuit[10000]; - struct timeType - { - long long cum; - double cumsq; - int number; - }; - - timeType timeStrain[2]; - timeType timeRepeat[16]; - timeType timeDepth[60]; - timeType timeStrength[60]; - timeType timeFanout[100]; - timeType timeThread[MAXNOOFTHREADS]; + TimeStatList timeStrain; + TimeStatList timeRepeat; + TimeStatList timeDepth; + TimeStatList timeStrength; + TimeStatList timeFanout; + TimeStatList timeThread; + TimeStatList timeGroupActualStrain; + TimeStatList timeGroupPredStrain; + TimeStatList timeGroupDiffStrain; long long timeMax; long long blockMax; long long timeBlock; - timeType timeGroupActualStrain[2]; - timeType timeGroupPredStrain[2]; - timeType timeGroupDiffStrain[2]; - void InitTimes(); - - void PrintTimingList( - timeType * tp, - int length, - const char title[]); #endif int PredictedTime( @@ -195,8 +157,6 @@ class Scheduler ~Scheduler(); - void SetFile(char * fname); - void RegisterTraceDepth( playTracesBin * plp, int number); diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index b0868548..521eff14 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -188,6 +188,10 @@ int SolveAllBoardsN( /* Calculate number of solved boards. */ solvedp->noOfBoards = param.noOfBoards; +#ifdef DDS_SCHEDULER + scheduler.PrintTiming(); +#endif + if (param.error == 0) return RETURN_NO_FAULT; else diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 5871eb11..681115b6 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -16,6 +16,8 @@ #include "ABsearch.h" #include "SolverIF.h" +extern Scheduler scheduler; + int BoardRangeChecks( deal * dl, diff --git a/src/TimeStat.cpp b/src/TimeStat.cpp new file mode 100644 index 00000000..38caee28 --- /dev/null +++ b/src/TimeStat.cpp @@ -0,0 +1,102 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#include +#include +#include + +#include + +#include "../include/portab.h" +#include "TimeStat.h" + + +TimeStat::TimeStat() +{ + TimeStat::Reset(); +} + + +TimeStat::~TimeStat() +{ +} + + +void TimeStat::Reset() +{ + number = 0; + cum = 0; + cumsq = 0.; +} + + +void TimeStat::Set(const int timeUser) +{ + number = 1; + cum = timeUser; + cumsq = static_cast(timeUser) * static_cast(timeUser); +} + + +void TimeStat::Set( + const int timeUser, + const double timesq) +{ + number = 1; + cum = timeUser; + cumsq = timesq; +} + + +void TimeStat::operator +=(const TimeStat& add) +{ + number += add.number; + cum += add.cum; + cumsq += add.cumsq; +} + + +bool TimeStat::Used() const +{ + return (number > 0); +} + +string TimeStat::Header() const +{ + stringstream ss; + ss << setw(5) << right << "n" << + setw(9) << right << "Number" << + setw(13) << "Cum time" << + setw(13) << "Average" << + setw(13) << "Sdev" << + setw(13) << "Sdev/mu" << "\n"; + + return ss.str(); +} + + +string TimeStat::Line() const +{ + if (number == 0) + return ""; + + double avg = static_cast(cum) / static_cast(number); + double arg = (cumsq / static_cast(number)) - avg * avg; + double sdev = (arg >= 0. ? sqrt(arg) : 0.); + + stringstream ss; + ss << setw(9) << right << number << + setw(13) << cum << + setw(13) << setprecision(0) << fixed << avg << + setw(13) << setprecision(0) << fixed << sdev << + setw(13) << setprecision(2) << fixed << sdev/avg << "\n"; + + return ss.str(); +} diff --git a/src/TimeStat.h b/src/TimeStat.h new file mode 100644 index 00000000..0a3b630a --- /dev/null +++ b/src/TimeStat.h @@ -0,0 +1,47 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_TIMESTAT_H +#define DDS_TIMESTAT_H + +#include + +using namespace std; + + +class TimeStat +{ + private: + + int number; + long long cum; + double cumsq; + + public: + + TimeStat(); + + ~TimeStat(); + + void Reset(); + + void Set(const int timeUser); + void Set( + const int timeUser, + const double timesq); + + void operator += (const TimeStat& add); + + bool Used() const; + + string Header() const; + string Line() const; +}; + +#endif diff --git a/src/TimeStatList.cpp b/src/TimeStatList.cpp new file mode 100644 index 00000000..5c832493 --- /dev/null +++ b/src/TimeStatList.cpp @@ -0,0 +1,86 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#include +#include +#include + +#include "TimeStatList.h" +#include "../include/portab.h" + + +TimeStatList::TimeStatList() +{ + TimeStatList::Reset(); +} + + +TimeStatList::~TimeStatList() +{ +} + + +void TimeStatList::Reset() +{ +} + + +void TimeStatList::Init( + const string& tname, + const unsigned len) +{ + name = tname; + list.resize(len); +} + + +void TimeStatList::Add( + const unsigned pos, + const TimeStat& add) +{ + list[pos] += add; +} + + +bool TimeStatList::Used() const +{ + for (unsigned i = 0; i < list.size(); i++) + { + if (list[i].Used()) + return true; + } + return false; +} + + +string TimeStatList::List() const +{ + if (! TimeStatList::Used()) + return ""; + + stringstream ss; + ss << name << "\n\n"; + ss << list[0].Header(); + + TimeStat tsum; + for (unsigned i = 0; i < list.size(); i++) + { + if (! list[i].Used()) + continue; + + tsum += list[i]; + ss << setw(5) << right << i << list[i].Line(); + } + + ss << setw(5) << right << "Avg" << tsum.Line() << "\n"; + + return ss.str(); +} + diff --git a/src/TimeStatList.h b/src/TimeStatList.h new file mode 100644 index 00000000..53bb20c7 --- /dev/null +++ b/src/TimeStatList.h @@ -0,0 +1,50 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_TIMESTATLIST_H +#define DDS_TIMESTATLIST_H + +#include +#include + +#include "TimeStat.h" + +using namespace std; + + +class TimeStatList +{ + private: + + vector list; + + string name; + + public: + + TimeStatList(); + + ~TimeStatList(); + + void Reset(); + + void Init( + const string& tname, + const unsigned len); + + void Add( + const unsigned pos, + const TimeStat& add); + + bool Used() const; + + string List() const; +}; + +#endif diff --git a/src/Timer.cpp b/src/Timer.cpp index 12a7ebc9..59608b2d 100644 --- a/src/Timer.cpp +++ b/src/Timer.cpp @@ -8,17 +8,15 @@ */ -/* - See Timer.h for some description. -*/ - #include #include #include #include "Timer.h" +#include "../include/portab.h" -using namespace std; +using std::chrono::duration_cast; +using std::chrono::microseconds; Timer::Timer() @@ -34,9 +32,10 @@ Timer::~Timer() void Timer::Reset() { + name = ""; count = 0; userCum = 0; - systCum = 0.; + systCum = 0; } @@ -48,39 +47,22 @@ void Timer::SetName(const string& s) void Timer::Start() { - systTimes0 = clock(); - -#ifdef _MSC_VER - QueryPerformanceCounter(&userTimes0); -#else - gettimeofday(&userTimes0, nullptr); -#endif + user0 = Clock::now(); + syst0 = clock(); } void Timer::End() { - systTimes1 = clock(); - -#ifdef _MSC_VER - QueryPerformanceCounter(&userTimes1); - int timeUser = static_cast - (userTimes1.QuadPart - userTimes0.QuadPart); -#else - gettimeofday(&userTimes1, nullptr); - return 1000 * (userTimes1.tv_sec - userTimer0.tv_sec ) - + (userTimes1.tv_usec - userTimer0.tv_usec) / 1000; -#endif - - count++; + time_point user1 = Clock::now(); + clock_t syst1 = clock(); - // This is more or less in milli-seconds except on Windows, - // where it is in "wall ticks". It is possible to convert - // to milli-seconds, but the resolution is so poor for fast - // functions that I leave it in integer form. + chrono::duration d = user1 - user0; + int tuser = static_cast(d.count()); - userCum += timeUser; - systCum += systTimes1 - systTimes0; + count++; + userCum += tuser; + systCum += syst1 - syst0; } @@ -90,6 +72,12 @@ bool Timer::Used() const } +int Timer::UserTime() const +{ + return static_cast(userCum); +} + + void Timer::operator +=(const Timer& add) { count += add.count; @@ -126,9 +114,10 @@ string Timer::SumLine( userCum / static_cast(count) << setw(5) << setprecision(1) << fixed << 100. * userCum / divisor.userCum << - setw(11) << setprecision(0) << fixed << 1000. * systCum << + setw(11) << setprecision(0) << fixed << + 1000000 * systCum / static_cast(CLOCKS_PER_SEC) << setw(7) << setprecision(2) << fixed << - 1000. * systCum / static_cast(count) << + 1000000 * systCum / static_cast(count * CLOCKS_PER_SEC) << setw(5) << setprecision(1) << fixed << 100. * systCum / divisor.systCum << "\n"; } @@ -139,7 +128,7 @@ string Timer::SumLine( setw(11) << userCum << setw(7) << "-" << setw(5) << "-" << - setw(11) << 1000 * systCum << + setw(11) << 1000000 * systCum / static_cast(CLOCKS_PER_SEC) << setw(7) << "-" << setw(5) << "-" << "\n"; } @@ -156,9 +145,10 @@ string Timer::DetailLine() const setw(11) << setprecision(2) << fixed << userCum / static_cast(count) << setw(11) << setprecision(0) << fixed << - 1000. * systCum << + 1000000 * systCum / static_cast(CLOCKS_PER_SEC) << setw(11) << setprecision(2) << fixed << - 1000. * systCum / static_cast(count) << "\n"; + 1000000 * systCum / + static_cast(count * CLOCKS_PER_SEC) << "\n"; return ss.str(); } diff --git a/src/Timer.h b/src/Timer.h index 1a88ae8f..ac9589e2 100644 --- a/src/Timer.h +++ b/src/Timer.h @@ -11,15 +11,10 @@ #define DDS_TIMING_H #include +#include -#include -#include - -#ifdef _MSC_VER - #include -#else - #include -#endif +using Clock = std::chrono::steady_clock; +using std::chrono::time_point; using namespace std; @@ -28,21 +23,13 @@ class Timer { private: - clock_t systTimes0; - clock_t systTimes1; - -#ifdef _MSC_VER - LARGE_INTEGER userTimes0; - LARGE_INTEGER userTimes1; -#else - timeval userTimes0; - timeval userTimes1; -#endif - string name; int count; - int64_t userCum; - double systCum; + long userCum; + long systCum; + + time_point user0; + clock_t syst0; public: @@ -60,6 +47,8 @@ class Timer bool Used() const; + int UserTime() const; + void operator += (const Timer& add); void operator -= (const Timer& deduct); diff --git a/src/Timer_new.cpp b/src/Timer_new.cpp new file mode 100644 index 00000000..65aa95a7 --- /dev/null +++ b/src/Timer_new.cpp @@ -0,0 +1,154 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#include +#include +#include + +#include "Timer.h" +#include "../include/portab.h" + +using std::chrono::duration_cast; +using std::chrono::microseconds; + + +Timer::Timer() +{ + Timer::Reset(); +} + + +Timer::~Timer() +{ +} + + +void Timer::Reset() +{ + name = ""; + count = 0; + userCum = 0; + systCum = 0; +} + + +void Timer::SetName(const string& s) +{ + name = s; +} + + +void Timer::Start() +{ + user0 = Clock::now(); + syst0 = clock(); +} + + +void Timer::End() +{ + time_point user1 = Clock::now(); + clock_t syst1 = clock(); + + chrono::duration d = user1 - user0; + int tuser = static_cast(d.count()); + // int tuser = static_cast(1000. * d.count()); + + count++; + userCum += tuser; + systCum += static_cast((1000 * (syst1 - syst0)) / + static_cast(CLOCKS_PER_SEC)); +} + + +bool Timer::Used() const +{ + return (count > 0); +} + + +int Timer::UserTime() const +{ + return static_cast(userCum); +} + + +void Timer::operator +=(const Timer& add) +{ + count += add.count; + userCum += add.userCum; + systCum += add.systCum; +} + + +void Timer::operator -=(const Timer& deduct) +{ + if (deduct.userCum > userCum) + userCum = 0; + else + userCum -= deduct.userCum; + + if (deduct.systCum > systCum) + systCum = 0; + else + systCum -= deduct.systCum; +} + + +string Timer::SumLine( + const Timer& divisor, + const string& bname) const +{ + stringstream ss; + if (count > 0) + { + ss << setw(14) << left << (bname == "" ? name : bname) << + setw(9) << right << count << + setw(11) << userCum << + setw(7) << setprecision(2) << fixed << + userCum / static_cast(count) << + setw(5) << setprecision(1) << fixed << + 100. * userCum / divisor.userCum << + setw(11) << setprecision(0) << fixed << 1000. * systCum << + setw(7) << setprecision(2) << fixed << + 1000. * systCum / static_cast(count) << + setw(5) << setprecision(1) << fixed << + 100. * systCum / divisor.systCum << "\n"; + } + else + { + ss << setw(14) << left << (bname == "" ? name : bname) << + setw(9) << right << count << + setw(11) << userCum << + setw(7) << "-" << + setw(5) << "-" << + setw(11) << 1000 * systCum << + setw(7) << "-" << + setw(5) << "-" << "\n"; + } + return ss.str(); +} + + +string Timer::DetailLine() const +{ + stringstream ss; + ss << setw(15) << left << name << + setw(10) << right << count << + setw(11) << right << userCum << + setw(11) << setprecision(2) << fixed << + userCum / static_cast(count) << + setw(11) << setprecision(0) << fixed << + 1000. * systCum << + setw(11) << setprecision(2) << fixed << + 1000. * systCum / static_cast(count) << "\n"; + + return ss.str(); +} diff --git a/src/Timer_new.h b/src/Timer_new.h new file mode 100644 index 00000000..ac9589e2 --- /dev/null +++ b/src/Timer_new.h @@ -0,0 +1,63 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_TIMING_H +#define DDS_TIMING_H + +#include +#include + +using Clock = std::chrono::steady_clock; +using std::chrono::time_point; + +using namespace std; + + +class Timer +{ + private: + + string name; + int count; + long userCum; + long systCum; + + time_point user0; + clock_t syst0; + + public: + + Timer(); + + ~Timer(); + + void Reset(); + + void SetName(const string& s); + + void Start(); + + void End(); + + bool Used() const; + + int UserTime() const; + + void operator += (const Timer& add); + + void operator -= (const Timer& deduct); + + string SumLine( + const Timer& divisor, + const string& bname = "") const; + + string DetailLine() const; +}; + +#endif diff --git a/src/Timer_old.cpp b/src/Timer_old.cpp new file mode 100644 index 00000000..8e38a1aa --- /dev/null +++ b/src/Timer_old.cpp @@ -0,0 +1,170 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +/* + See Timer.h for some description. +*/ + +#include +#include +#include + +#include "Timer.h" + +using namespace std; + + +Timer::Timer() +{ + Timer::Reset(); +} + + +Timer::~Timer() +{ +} + + +void Timer::Reset() +{ + count = 0; + userCum = 0; + systCum = 0.; +} + + +void Timer::SetName(const string& s) +{ + name = s; +} + + +void Timer::Start() +{ + systTimes0 = clock(); + +#ifdef _MSC_VER + QueryPerformanceCounter(&userTimes0); +#else + gettimeofday(&userTimes0, nullptr); +#endif +} + + +void Timer::End() +{ + systTimes1 = clock(); + +#ifdef _MSC_VER + QueryPerformanceCounter(&userTimes1); + int timeUser = static_cast + (userTimes1.QuadPart - userTimes0.QuadPart); +#else + gettimeofday(&userTimes1, nullptr); + return 1000 * (userTimes1.tv_sec - userTimer0.tv_sec ) + + (userTimes1.tv_usec - userTimer0.tv_usec) / 1000; +#endif + + count++; + + // This is more or less in milli-seconds except on Windows, + // where it is in "wall ticks". It is possible to convert + // to milli-seconds, but the resolution is so poor for fast + // functions that I leave it in integer form. + + userCum += timeUser; + systCum += systTimes1 - systTimes0; +} + + +bool Timer::Used() const +{ + return (count > 0); +} + + +int Timer::UserTime() const +{ + return static_cast(userCum); +} + + +void Timer::operator +=(const Timer& add) +{ + count += add.count; + userCum += add.userCum; + systCum += add.systCum; +} + + +void Timer::operator -=(const Timer& deduct) +{ + if (deduct.userCum > userCum) + userCum = 0; + else + userCum -= deduct.userCum; + + if (deduct.systCum > systCum) + systCum = 0; + else + systCum -= deduct.systCum; +} + + +string Timer::SumLine( + const Timer& divisor, + const string& bname) const +{ + stringstream ss; + if (count > 0) + { + ss << setw(14) << left << (bname == "" ? name : bname) << + setw(9) << right << count << + setw(11) << userCum << + setw(7) << setprecision(2) << fixed << + userCum / static_cast(count) << + setw(5) << setprecision(1) << fixed << + 100. * userCum / divisor.userCum << + setw(11) << setprecision(0) << fixed << 1000. * systCum << + setw(7) << setprecision(2) << fixed << + 1000. * systCum / static_cast(count) << + setw(5) << setprecision(1) << fixed << + 100. * systCum / divisor.systCum << "\n"; + } + else + { + ss << setw(14) << left << (bname == "" ? name : bname) << + setw(9) << right << count << + setw(11) << userCum << + setw(7) << "-" << + setw(5) << "-" << + setw(11) << 1000 * systCum << + setw(7) << "-" << + setw(5) << "-" << "\n"; + } + return ss.str(); +} + + +string Timer::DetailLine() const +{ + stringstream ss; + ss << setw(15) << left << name << + setw(10) << right << count << + setw(11) << right << userCum << + setw(11) << setprecision(2) << fixed << + userCum / static_cast(count) << + setw(11) << setprecision(0) << fixed << + 1000. * systCum << + setw(11) << setprecision(2) << fixed << + 1000. * systCum / static_cast(count) << "\n"; + + return ss.str(); +} diff --git a/src/Timer_old.h b/src/Timer_old.h new file mode 100644 index 00000000..682f4c1b --- /dev/null +++ b/src/Timer_old.h @@ -0,0 +1,76 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_TIMING_H +#define DDS_TIMING_H + +#include + +#include +#include + +#ifdef _MSC_VER + #include +#else + #include +#endif + +using namespace std; + + +class Timer +{ + private: + + clock_t systTimes0; + clock_t systTimes1; + +#ifdef _MSC_VER + LARGE_INTEGER userTimes0; + LARGE_INTEGER userTimes1; +#else + timeval userTimes0; + timeval userTimes1; +#endif + + string name; + int count; + int64_t userCum; + double systCum; + + public: + + Timer(); + + ~Timer(); + + void Reset(); + + void SetName(const string& s); + + void Start(); + + void End(); + + bool Used() const; + + int UserTime() const; + + void operator += (const Timer& add); + + void operator -= (const Timer& deduct); + + string SumLine( + const Timer& divisor, + const string& bname = "") const; + + string DetailLine() const; +}; + +#endif diff --git a/test/dtest.cpp b/test/dtest.cpp index 87a708ff..96acebb8 100644 --- a/test/dtest.cpp +++ b/test/dtest.cpp @@ -30,7 +30,7 @@ int main(int argc, char * argv[]) DDSInfo info; GetDDSInfo(&info); cout << info.systemString; - cout << setw(12) << left << "Version" << + cout << setw(13) << left << "Version" << setw(20) << right << info.versionString << "\n\n"; cout.flush(); diff --git a/test/ref/sched.txt b/test/ref/sched.txt new file mode 100644 index 00000000..17b274c1 --- /dev/null +++ b/test/ref/sched.txt @@ -0,0 +1,75 @@ +Suit/NT + + n Number Cum time Average Sdev Sdev/mu + 1 29 9259313 319287 317668 0.99 + Avg 29 9259313 319287 317668 0.99 + +Repeat number + + n Number Cum time Average Sdev Sdev/mu + 0 29 9259313 319287 317668 0.99 + Avg 29 9259313 319287 317668 0.99 + +Trace depth + + n Number Cum time Average Sdev Sdev/mu + 0 29 9259313 319287 317668 0.99 + Avg 29 9259313 319287 317668 0.99 + +Evenness + + n Number Cum time Average Sdev Sdev/mu + 0 29 9259313 319287 317668 0.99 + Avg 29 9259313 319287 317668 0.99 + +Fanout + + n Number Cum time Average Sdev Sdev/mu + 33 1 69048 69048 0 0.00 + 37 1 80923 80923 0 0.00 + 38 1 255068 255068 0 0.00 + 39 2 46833 23417 2937 0.13 + 40 5 1559141 311828 275274 0.88 + 41 2 402088 201044 129519 0.64 + 42 4 296512 74128 39114 0.53 + 43 1 264389 264389 0 0.00 + 44 1 107856 107856 0 0.00 + 45 2 952402 476201 408513 0.86 + 46 3 1769324 589775 147521 0.25 + 47 4 2341648 585412 400295 0.68 + 51 1 863492 863492 0 0.00 + 58 1 250589 250589 0 0.00 + Avg 29 9259313 319287 317668 0.99 + +Threads + + n Number Cum time Average Sdev Sdev/mu + 0 12 2372153 197679 179588 0.91 + 1 4 1951266 487817 387100 0.79 + 2 4 2445013 611253 251235 0.41 + 3 9 2490881 276765 339816 1.23 + Avg 29 9259313 319287 317668 0.99 + +Group actual suit/NT + + n Number Cum time Average Sdev Sdev/mu + 0 71 10404968 146549 218153 1.49 + 1 29 9259313 319287 317668 0.99 + Avg 100 19664281 196643 263055 1.34 + +Group predicted suit/NT + + n Number Cum time Average Sdev Sdev/mu + 0 71 17391714 244954 0 0.00 + 1 29 12314015 424621 0 0.00 + Avg 100 29705729 297057 0 0.00 + +Group diff suit/NT + + n Number Cum time Average Sdev Sdev/mu + 0 71 -6986746 -98405 207932 -2.11 + 1 29 -3054702 -105335 314316 -2.98 + Avg 100 -10041448 -100414 243634 -2.43 + +Largest hand 1406984 4978740 28.26% + diff --git a/test/ref/timer0_chrono.txt b/test/ref/timer0_chrono.txt new file mode 100644 index 00000000..096c0444 --- /dev/null +++ b/test/ref/timer0_chrono.txt @@ -0,0 +1,367 @@ +Name Count User Avg % Syst Avg % +AB 211580 2160877 10.21 98.9 1872000 8.85 85.6 +Make 245448 577 0.00 0.0 64000 0.26 2.9 +Undo 211568 357 0.00 0.0 56000 0.26 2.6 +Evaluate 376 2 0.01 0.0 1000 2.66 0.0 +NextMove 111234 212 0.00 0.0 33000 0.30 1.5 +QuickTricks 83871 2904 0.03 0.1 33000 0.39 1.5 +LaterTricks 30190 69 0.00 0.0 9000 0.30 0.4 +MoveGen 163187 9047 0.06 0.4 65000 0.40 3.0 +Lookup 52724 10837 0.21 0.5 43000 0.82 2.0 +Build 17975 1090 0.06 0.0 11000 0.61 0.5 +--------------------------------------------------------------------- +Sum 1128153 2185972 1.94100.0 2187000 1.94100.0 + +Name Count User Avg % Syst Avg % +AB0 48 12 6651 554.25 0.3 6000 500.00 0.3 +AB3 47 29 133 4.59 0.0 0 0.00 0.0 +AB2 46 42 173 4.12 0.0 0 0.00 0.0 +AB1 45 63 262 4.16 0.0 0 0.00 0.0 +AB0 44 90 3300 36.67 0.2 3000 33.33 0.2 +AB3 43 175 788 4.50 0.0 1000 5.71 0.1 +AB2 42 230 1055 4.59 0.0 0 0.00 0.0 +AB1 41 333 1193 3.58 0.1 0 0.00 0.0 +AB0 40 385 14639 38.02 0.7 13000 33.77 0.7 +AB3 39 674 2950 4.38 0.1 0 0.00 0.0 +AB2 38 875 3602 4.12 0.2 2000 2.29 0.1 +AB1 37 1237 4305 3.48 0.2 4000 3.23 0.2 +AB0 36 1363 51103 37.49 2.4 42000 30.81 2.2 +AB3 35 2284 8812 3.86 0.4 7000 3.06 0.4 +AB2 34 2715 11351 4.18 0.5 8000 2.95 0.4 +AB1 33 4049 12160 3.00 0.6 7000 1.73 0.4 +AB0 32 4307 138004 32.04 6.4 123000 28.56 6.6 +AB3 31 4621 17585 3.81 0.8 9000 1.95 0.5 +AB2 30 5555 20504 3.69 0.9 16000 2.88 0.9 +AB1 29 7561 21956 2.90 1.0 12000 1.59 0.6 +AB0 28 8021 251870 31.40 11.7 234000 29.17 12.5 +AB3 27 7047 25787 3.66 1.2 16000 2.27 0.9 +AB2 26 8254 30197 3.66 1.4 18000 2.18 1.0 +AB1 25 11153 31803 2.85 1.5 27000 2.42 1.4 +AB0 24 11695 328848 28.12 15.2 307000 26.25 16.4 +AB3 23 7833 26905 3.43 1.2 18000 2.30 1.0 +AB2 22 8727 32162 3.69 1.5 18000 2.06 1.0 +AB1 21 12103 33166 2.74 1.5 20000 1.65 1.1 +AB0 20 12649 330978 26.17 15.3 325000 25.69 17.4 +AB3 19 7278 23311 3.20 1.1 14000 1.92 0.7 +AB2 18 7660 27656 3.61 1.3 12000 1.57 0.6 +AB1 17 10430 29080 2.79 1.3 19000 1.82 1.0 +AB0 16 10893 252805 23.21 11.7 241000 22.12 12.9 +AB3 15 5610 16994 3.03 0.8 13000 2.32 0.7 +AB2 14 5654 20521 3.63 0.9 7000 1.24 0.4 +AB1 13 7731 21944 2.84 1.0 13000 1.68 0.7 +AB0 12 8189 157752 19.26 7.3 149000 18.20 8.0 +AB3 11 3377 10343 3.06 0.5 11000 3.26 0.6 +AB2 10 3351 12046 3.59 0.6 6000 1.79 0.3 +AB1 9 4389 13040 2.97 0.6 9000 2.05 0.5 +AB0 8 4707 117939 25.06 5.5 116000 24.64 6.2 +AB3 7 1462 4874 3.33 0.2 1000 0.68 0.1 +AB2 6 1443 5205 3.61 0.2 1000 0.69 0.1 +AB1 5 1787 5871 3.29 0.3 5000 2.80 0.3 +AB0 4 1960 25241 12.88 1.2 19000 9.69 1.0 +AB3 3 378 1295 3.43 0.1 0 0.00 0.0 +AB2 2 360 1217 3.38 0.1 0 0.00 0.0 +AB1 1 400 1332 3.33 0.1 0 0.00 0.0 +AB0 0 439 169 0.38 0.0 0 0.00 0.0 +--------------------------------------------------------------------- +Sum 211580 2160877 10.21100.0 1872000 8.85100.0 + +Name Number User ticks Avg System Avg ms +AB0 0 439 171 0.39 1000 2.28 +AB1 1 400 1503 3.76 1000 2.50 +AB2 2 360 2736 7.60 1000 2.78 +AB3 3 378 4033 10.67 1000 2.65 +AB0 4 1960 30063 15.34 25000 12.76 +AB1 5 1787 35945 20.11 31000 17.35 +AB2 6 1443 41168 28.53 34000 23.56 +AB3 7 1462 46066 31.51 37000 25.31 +AB0 8 4707 165749 35.21 162000 34.42 +AB1 9 4389 178804 40.74 175000 39.87 +AB2 10 3351 190902 56.97 183000 54.61 +AB3 11 3377 201308 59.61 205000 60.70 +AB0 12 8189 361319 44.12 367000 44.82 +AB1 13 7731 383380 49.59 388000 50.19 +AB2 14 5654 404008 71.46 401000 70.92 +AB3 15 5610 421163 75.07 419000 74.69 +AB0 16 10893 676950 62.15 682000 62.61 +AB1 17 10430 706280 67.72 713000 68.36 +AB2 18 7660 734140 95.84 730000 95.30 +AB3 19 7278 757601 104.09 754000 103.60 +AB0 20 12649 1092284 86.35 1098000 86.81 +AB1 21 12103 1125617 93.00 1132000 93.53 +AB2 22 8727 1157975 132.69 1168000 133.84 +AB3 23 7833 1185036 151.29 1193000 152.30 +AB0 24 11695 1517326 129.74 1516000 129.63 +AB1 25 11153 1549233 138.91 1556000 139.51 +AB2 26 8254 1579633 191.38 1586000 192.15 +AB3 27 7047 1605573 227.84 1614000 229.03 +AB0 28 8021 1860615 231.97 1866000 232.64 +AB1 29 7561 1882640 248.99 1888000 249.70 +AB2 30 5555 1903208 342.61 1913000 344.37 +AB3 31 4621 1920915 415.69 1930000 417.66 +AB0 32 4307 2061204 478.57 2065000 479.45 +AB1 33 4049 2073459 512.09 2076000 512.72 +AB2 34 2715 2084858 767.90 2090000 769.80 +AB3 35 2284 2093719 916.69 2100000 919.44 +AB0 36 1363 2146043 1574.50 2147000 1575.20 +AB1 37 1237 2150357 1738.36 2152000 1739.69 +AB2 38 875 2153968 2461.68 2157000 2465.14 +AB3 39 674 2156964 3200.24 2160000 3204.75 +AB0 40 385 2172124 5641.88 2175000 5649.35 +AB1 41 333 2173319 6526.48 2176000 6534.53 +AB2 42 230 2174387 9453.86 2176000 9460.87 +AB3 43 175 2175199 12429.71 2178000 12445.71 +AB0 44 90 2178714 24207.93 2181000 24233.33 +AB1 45 63 2178978 34586.95 2181000 34619.05 +AB2 46 42 2179153 51884.60 2181000 51928.57 +AB3 47 29 2179294 75148.07 2181000 75206.90 +AB0 48 12 2185972 182164.33 2187000 182250.00 +Make1 570 0 0.00 0 0.00 +Make2 400 0 0.00 0 0.00 +Make3 457 0 0.00 0 0.00 +Make4 549 0 0.00 0 0.00 +Make5 2492 3 0.00 1000 0.40 +Make6 1787 0 0.00 0 0.00 +Make7 1828 0 0.00 0 0.00 +Make8 1933 3 0.00 2000 1.03 +Make9 5780 1 0.00 3000 0.52 +Make10 4389 13 0.00 0 0.00 +Make11 4079 5 0.00 4000 0.98 +Make12 4322 4 0.00 2000 0.46 +Make13 9891 1 0.00 0 0.00 +Make14 7731 44 0.01 1000 0.13 +Make15 6837 5 0.00 2000 0.29 +Make16 6972 47 0.01 2000 0.29 +Make17 13463 89 0.01 8000 0.59 +Make18 10430 44 0.00 1000 0.10 +Make19 9428 25 0.00 4000 0.42 +Make20 8775 1 0.00 1000 0.11 +Make21 15711 58 0.00 7000 0.45 +Make22 12103 30 0.00 4000 0.33 +Make23 10723 7 0.00 0 0.00 +Make24 9233 14 0.00 1000 0.11 +Make25 14833 12 0.00 3000 0.20 +Make26 11153 17 0.00 1000 0.09 +Make27 10171 10 0.00 5000 0.49 +Make28 8106 20 0.00 2000 0.25 +Make29 10203 29 0.00 2000 0.20 +Make30 7561 8 0.00 2000 0.26 +Make31 6803 9 0.00 0 0.00 +Make32 5229 0 0.00 1000 0.19 +Make33 5267 40 0.01 1000 0.19 +Make34 4049 15 0.00 0 0.00 +Make35 3244 2 0.00 0 0.00 +Make36 2555 0 0.00 0 0.00 +Make37 1783 0 0.00 1000 0.56 +Make38 1237 0 0.00 1000 0.81 +Make39 1094 13 0.01 1000 0.91 +Make40 734 8 0.01 0 0.00 +Make41 486 0 0.00 1000 2.06 +Make42 333 0 0.00 0 0.00 +Make43 276 0 0.00 0 0.00 +Make44 190 0 0.00 0 0.00 +Make45 112 0 0.00 0 0.00 +Make46 63 0 0.00 0 0.00 +Make47 51 0 0.00 0 0.00 +Make48 32 0 0.00 0 0.00 +Undo1 439 0 0.00 0 0.00 +Undo2 400 11 0.03 0 0.00 +Undo3 360 0 0.00 0 0.00 +Undo4 378 0 0.00 0 0.00 +Undo5 1960 2 0.00 0 0.00 +Undo6 1787 13 0.01 1000 0.56 +Undo7 1443 12 0.01 1000 0.69 +Undo8 1462 24 0.02 0 0.00 +Undo9 4707 3 0.00 0 0.00 +Undo10 4389 14 0.00 0 0.00 +Undo11 3351 3 0.00 1000 0.30 +Undo12 3377 25 0.01 1000 0.30 +Undo13 8189 18 0.00 3000 0.37 +Undo14 7731 0 0.00 3000 0.39 +Undo15 5654 24 0.00 0 0.00 +Undo16 5610 10 0.00 0 0.00 +Undo17 10893 43 0.00 2000 0.18 +Undo18 10430 7 0.00 0 0.00 +Undo19 7660 21 0.00 0 0.00 +Undo20 7278 0 0.00 2000 0.27 +Undo21 12649 35 0.00 3000 0.24 +Undo22 12103 14 0.00 5000 0.41 +Undo23 8727 19 0.00 4000 0.46 +Undo24 7833 0 0.00 2000 0.26 +Undo25 11695 2 0.00 5000 0.43 +Undo26 11153 37 0.00 3000 0.27 +Undo27 8254 0 0.00 3000 0.36 +Undo28 7047 0 0.00 0 0.00 +Undo29 8021 2 0.00 3000 0.37 +Undo30 7561 1 0.00 3000 0.40 +Undo31 5555 0 0.00 1000 0.18 +Undo32 4621 1 0.00 0 0.00 +Undo33 4307 0 0.00 3000 0.70 +Undo34 4049 0 0.00 4000 0.99 +Undo35 2715 12 0.00 1000 0.37 +Undo36 2284 0 0.00 0 0.00 +Undo37 1363 0 0.00 0 0.00 +Undo38 1237 0 0.00 1000 0.81 +Undo39 875 0 0.00 1000 1.14 +Undo40 674 0 0.00 0 0.00 +Undo41 385 2 0.01 0 0.00 +Undo42 333 0 0.00 0 0.00 +Undo43 230 0 0.00 0 0.00 +Undo44 175 2 0.01 0 0.00 +Undo45 90 0 0.00 0 0.00 +Undo46 63 0 0.00 0 0.00 +Undo47 42 0 0.00 0 0.00 +Undo48 29 0 0.00 0 0.00 +Evaluate0 376 2 0.01 1000 2.66 +NextMove1 170 0 0.00 0 0.00 +NextMove2 269 0 0.00 0 0.00 +NextMove3 131 0 0.00 0 0.00 +NextMove4 281 0 0.00 0 0.00 +NextMove5 705 0 0.00 0 0.00 +NextMove6 1255 0 0.00 0 0.00 +NextMove7 532 0 0.00 0 0.00 +NextMove8 1077 15 0.01 0 0.00 +NextMove9 1391 0 0.00 0 0.00 +NextMove10 3316 13 0.00 1000 0.30 +NextMove11 1073 0 0.00 1000 0.93 +NextMove12 2649 0 0.00 0 0.00 +NextMove13 2160 0 0.00 2000 0.93 +NextMove14 6029 12 0.00 2000 0.33 +NextMove15 1702 0 0.00 0 0.00 +NextMove16 4427 0 0.00 3000 0.68 +NextMove17 3033 5 0.00 0 0.00 +NextMove18 7860 35 0.00 1000 0.13 +NextMove19 2570 1 0.00 0 0.00 +NextMove20 5510 0 0.00 0 0.00 +NextMove21 3608 1 0.00 2000 0.55 +NextMove22 9041 3 0.00 5000 0.55 +NextMove23 3062 0 0.00 0 0.00 +NextMove24 5837 13 0.00 0 0.00 +NextMove25 3680 20 0.01 1000 0.27 +NextMove26 8015 45 0.01 4000 0.50 +NextMove27 3138 16 0.01 0 0.00 +NextMove28 5130 12 0.00 3000 0.58 +NextMove29 2642 3 0.00 1000 0.38 +NextMove30 5379 6 0.00 3000 0.56 +NextMove31 2182 0 0.00 0 0.00 +NextMove32 3373 0 0.00 2000 0.59 +NextMove33 1218 0 0.00 0 0.00 +NextMove34 3089 0 0.00 1000 0.32 +NextMove35 960 0 0.00 0 0.00 +NextMove36 1755 0 0.00 0 0.00 +NextMove37 546 0 0.00 0 0.00 +NextMove38 817 0 0.00 0 0.00 +NextMove39 420 0 0.00 1000 2.38 +NextMove40 455 0 0.00 0 0.00 +NextMove41 153 0 0.00 0 0.00 +NextMove42 232 12 0.05 0 0.00 +NextMove43 101 0 0.00 0 0.00 +NextMove44 129 0 0.00 0 0.00 +NextMove45 49 0 0.00 0 0.00 +NextMove46 41 0 0.00 0 0.00 +NextMove47 22 0 0.00 0 0.00 +NextMove48 20 0 0.00 0 0.00 +QuickTricks3 378 0 0.00 0 0.00 +QuickTricks4 1791 39 0.02 2000 1.12 +QuickTricks7 1462 0 0.00 1000 0.68 +QuickTricks8 4374 106 0.02 0 0.00 +QuickTricks11 3377 0 0.00 2000 0.59 +QuickTricks12 7644 204 0.03 2000 0.26 +QuickTricks15 5610 16 0.00 0 0.00 +QuickTricks16 10249 390 0.04 5000 0.49 +QuickTricks19 7278 1 0.00 3000 0.41 +QuickTricks20 6148 451 0.07 2000 0.33 +QuickTricks23 7833 6 0.00 1000 0.13 +QuickTricks24 5383 489 0.09 3000 0.56 +QuickTricks27 7047 2 0.00 3000 0.43 +QuickTricks28 4038 545 0.13 4000 0.99 +QuickTricks31 4621 45 0.01 3000 0.65 +QuickTricks32 2292 349 0.15 1000 0.44 +QuickTricks35 2284 0 0.00 1000 0.44 +QuickTricks36 844 153 0.18 0 0.00 +QuickTricks39 674 1 0.00 0 0.00 +QuickTricks40 279 58 0.21 0 0.00 +QuickTricks43 175 12 0.07 0 0.00 +QuickTricks44 61 36 0.59 0 0.00 +QuickTricks47 29 1 0.03 0 0.00 +LaterTricks4 911 0 0.00 0 0.00 +LaterTricks8 2742 12 0.00 0 0.00 +LaterTricks12 5346 4 0.00 2000 0.37 +LaterTricks16 7609 21 0.00 2000 0.26 +LaterTricks20 3841 8 0.00 1000 0.26 +LaterTricks24 3689 0 0.00 2000 0.54 +LaterTricks28 3052 23 0.01 0 0.00 +LaterTricks32 1860 1 0.00 1000 0.54 +LaterTricks36 800 0 0.00 1000 1.25 +LaterTricks40 279 0 0.00 0 0.00 +LaterTricks44 61 0 0.00 0 0.00 +MoveGen1 400 0 0.00 0 0.00 +MoveGen2 360 5 0.01 0 0.00 +MoveGen3 326 2 0.01 0 0.00 +MoveGen4 268 41 0.15 0 0.00 +MoveGen5 1787 6 0.00 0 0.00 +MoveGen6 1443 5 0.00 1000 0.69 +MoveGen7 1296 12 0.01 0 0.00 +MoveGen8 856 190 0.22 0 0.00 +MoveGen9 4389 11 0.00 1000 0.23 +MoveGen10 3351 12 0.00 1000 0.30 +MoveGen11 3006 55 0.02 3000 1.00 +MoveGen12 1673 391 0.23 2000 1.20 +MoveGen13 7731 98 0.01 3000 0.39 +MoveGen14 5654 51 0.01 0 0.00 +MoveGen15 5135 116 0.02 3000 0.58 +MoveGen16 2545 786 0.31 1000 0.39 +MoveGen17 10430 113 0.01 2000 0.19 +MoveGen18 7660 118 0.02 3000 0.39 +MoveGen19 6858 102 0.01 3000 0.44 +MoveGen20 3265 1175 0.36 2000 0.61 +MoveGen21 12103 73 0.01 2000 0.17 +MoveGen22 8727 149 0.02 4000 0.46 +MoveGen23 7661 124 0.02 2000 0.26 +MoveGen24 3396 1334 0.39 1000 0.29 +MoveGen25 11153 70 0.01 4000 0.36 +MoveGen26 8254 104 0.01 4000 0.48 +MoveGen27 7033 125 0.02 1000 0.14 +MoveGen28 2976 1343 0.45 3000 1.01 +MoveGen29 7561 35 0.00 4000 0.53 +MoveGen30 5555 49 0.01 1000 0.18 +MoveGen31 4621 68 0.01 4000 0.87 +MoveGen32 1856 1067 0.57 3000 1.62 +MoveGen33 4049 55 0.01 0 0.00 +MoveGen34 2715 33 0.01 1000 0.37 +MoveGen35 2284 35 0.02 1000 0.44 +MoveGen36 800 609 0.76 2000 2.50 +MoveGen37 1237 9 0.01 0 0.00 +MoveGen38 875 9 0.01 1000 1.14 +MoveGen39 674 32 0.05 0 0.00 +MoveGen40 279 295 1.06 1000 3.58 +MoveGen41 333 0 0.00 0 0.00 +MoveGen42 230 1 0.00 0 0.00 +MoveGen43 175 12 0.07 1000 5.71 +MoveGen44 61 89 1.46 0 0.00 +MoveGen45 63 2 0.03 0 0.00 +MoveGen46 42 2 0.05 0 0.00 +MoveGen47 29 7 0.24 0 0.00 +MoveGen48 12 27 2.25 0 0.00 +Lookup4 639 692 1.08 2000 3.13 +Lookup8 2142 1313 0.61 6000 2.80 +Lookup12 4591 1556 0.34 2000 0.44 +Lookup16 6842 1611 0.24 9000 1.32 +Lookup20 12649 1887 0.15 9000 0.71 +Lookup24 11695 1442 0.12 6000 0.51 +Lookup28 8021 1003 0.13 4000 0.50 +Lookup32 4307 709 0.16 3000 0.70 +Lookup36 1363 390 0.29 2000 1.47 +Lookup40 385 153 0.40 0 0.00 +Lookup44 90 81 0.90 0 0.00 +Build4 268 17 0.06 1000 3.73 +Build8 856 81 0.09 1000 1.17 +Build12 1673 75 0.04 2000 1.20 +Build16 2545 117 0.05 0 0.00 +Build20 3265 183 0.06 2000 0.61 +Build24 3396 150 0.04 1000 0.29 +Build28 2976 226 0.08 2000 0.67 +Build32 1856 158 0.09 1000 0.54 +Build36 800 69 0.09 0 0.00 +Build40 279 7 0.03 1000 3.58 +Build44 61 7 0.11 0 0.00 + diff --git a/test/ref/timer0_old.txt b/test/ref/timer0_old.txt new file mode 100644 index 00000000..6c219029 --- /dev/null +++ b/test/ref/timer0_old.txt @@ -0,0 +1,367 @@ +Name Count User Avg % Syst Avg % +AB 211580 4252337 20.10 87.5 1364000 6.45 87.5 +Make 245448 130675 0.53 2.7 51000 0.21 3.3 +Undo 211568 96593 0.46 2.0 29000 0.14 1.9 +Evaluate 376 226 0.60 0.0 0 0.00 0.0 +NextMove 111234 46222 0.42 1.0 9000 0.08 0.6 +QuickTricks 83871 70808 0.84 1.5 19000 0.23 1.2 +LaterTricks 30190 15553 0.52 0.3 8000 0.26 0.5 +MoveGen 163187 151486 0.93 3.1 49000 0.30 3.1 +Lookup 52724 75011 1.42 1.5 26000 0.49 1.7 +Build 17975 18632 1.04 0.4 4000 0.22 0.3 +--------------------------------------------------------------------- +Sum 1128153 4857543 4.31100.0 1559000 1.38100.0 + +Name Count User Avg % Syst Avg % +AB0 48 12 156041300.33 0.4 5000 416.67 0.4 +AB3 47 29 128 4.41 0.0 0 0.00 0.0 +AB2 46 42 181 4.31 0.0 0 0.00 0.0 +AB1 45 63 272 4.32 0.0 0 0.00 0.0 +AB0 44 90 8367 92.97 0.2 3000 33.33 0.2 +AB3 43 175 721 4.12 0.0 0 0.00 0.0 +AB2 42 230 980 4.26 0.0 1000 4.35 0.1 +AB1 41 333 1194 3.59 0.0 0 0.00 0.0 +AB0 40 385 31776 82.54 0.7 9000 23.38 0.7 +AB3 39 674 2657 3.94 0.1 0 0.00 0.0 +AB2 38 875 3305 3.78 0.1 0 0.00 0.0 +AB1 37 1237 4216 3.41 0.1 0 0.00 0.0 +AB0 36 1363 108491 79.60 2.6 39000 28.61 2.9 +AB3 35 2284 7588 3.32 0.2 4000 1.75 0.3 +AB2 34 2715 10104 3.72 0.2 4000 1.47 0.3 +AB1 33 4049 11947 2.95 0.3 4000 0.99 0.3 +AB0 32 4307 305061 70.83 7.2 102000 23.68 7.5 +AB3 31 4621 15742 3.41 0.4 2000 0.43 0.1 +AB2 30 5555 19496 3.51 0.5 9000 1.62 0.7 +AB1 29 7561 22894 3.03 0.5 7000 0.93 0.5 +AB0 28 8021 544094 67.83 12.8 160000 19.95 11.7 +AB3 27 7047 23138 3.28 0.5 10000 1.42 0.7 +AB2 26 8254 28457 3.45 0.7 9000 1.09 0.7 +AB1 25 11153 32306 2.90 0.8 4000 0.36 0.3 +AB0 24 11695 785033 67.13 18.5 242000 20.69 17.7 +AB3 23 7833 25304 3.23 0.6 7000 0.89 0.5 +AB2 22 8727 31203 3.58 0.7 8000 0.92 0.6 +AB1 21 12103 35369 2.92 0.8 13000 1.07 1.0 +AB0 20 12649 783256 61.92 18.4 265000 20.95 19.4 +AB3 19 7278 22874 3.14 0.5 4000 0.55 0.3 +AB2 18 7660 27732 3.62 0.7 11000 1.44 0.8 +AB1 17 10430 31267 3.00 0.7 11000 1.05 0.8 +AB0 16 10893 573871 52.68 13.5 197000 18.09 14.4 +AB3 15 5610 17410 3.10 0.4 5000 0.89 0.4 +AB2 14 5654 20906 3.70 0.5 6000 1.06 0.4 +AB1 13 7731 23627 3.06 0.6 11000 1.42 0.8 +AB0 12 8189 385465 47.07 9.1 113000 13.80 8.3 +AB3 11 3377 10470 3.10 0.2 3000 0.89 0.2 +AB2 10 3351 12063 3.60 0.3 4000 1.19 0.3 +AB1 9 4389 13838 3.15 0.3 7000 1.59 0.5 +AB0 8 4707 184563 39.21 4.3 63000 13.38 4.6 +AB3 7 1462 4360 2.98 0.1 0 0.00 0.0 +AB2 6 1443 4708 3.26 0.1 2000 1.39 0.1 +AB1 5 1787 5621 3.15 0.1 3000 1.68 0.2 +AB0 4 1960 51055 26.05 1.2 15000 7.65 1.1 +AB3 3 378 1050 2.78 0.0 0 0.00 0.0 +AB2 2 360 1021 2.84 0.0 1000 2.78 0.1 +AB1 1 400 1208 3.02 0.0 1000 2.50 0.1 +AB0 0 439 344 0.78 0.0 0 0.00 0.0 +--------------------------------------------------------------------- +Sum 211580 4252337 20.10100.0 1364000 6.45100.0 + +Name Number User ticks Avg System Avg ms +AB0 0 439 570 1.30 0 0.00 +AB1 1 400 2549 6.37 1000 2.50 +AB2 2 360 4223 11.73 2000 5.56 +AB3 3 378 6094 16.12 2000 5.29 +AB0 4 1960 62630 31.95 18000 9.18 +AB1 5 1787 72132 40.36 23000 12.87 +AB2 6 1443 80085 55.50 26000 18.02 +AB3 7 1462 88001 60.19 27000 18.47 +AB0 8 4707 288149 61.22 99000 21.03 +AB1 9 4389 311525 70.98 108000 24.61 +AB2 10 3351 332100 99.10 115000 34.32 +AB3 11 3377 350941 103.92 120000 35.53 +AB0 12 8189 765184 93.44 246000 30.04 +AB1 13 7731 805035 104.13 262000 33.89 +AB2 14 5654 840779 148.71 272000 48.11 +AB3 15 5610 872333 155.50 280000 49.91 +AB0 16 10893 1487986 136.60 498000 45.72 +AB1 17 10430 1540473 147.70 514000 49.28 +AB2 18 7660 1587918 207.30 529000 69.06 +AB3 19 7278 1629556 223.90 539000 74.06 +AB0 20 12649 2458235 194.34 814000 64.35 +AB1 21 12103 2517712 208.02 833000 68.83 +AB2 22 8727 2571236 294.63 849000 97.28 +AB3 23 7833 2617312 334.14 863000 110.17 +AB0 24 11695 3446492 294.70 1120000 95.77 +AB1 25 11153 3501067 313.91 1128000 101.14 +AB2 26 8254 3549605 430.05 1148000 139.08 +AB3 27 7047 3592327 509.77 1166000 165.46 +AB0 28 8021 4173114 520.27 1335000 166.44 +AB1 29 7561 4211435 556.99 1345000 177.89 +AB2 30 5555 4244866 764.15 1361000 245.00 +AB3 31 4621 4273763 924.86 1368000 296.04 +AB0 32 4307 4602058 1068.51 1476000 342.70 +AB1 33 4049 4622211 1141.57 1483000 366.26 +AB2 34 2715 4639706 1708.92 1491000 549.17 +AB3 35 2284 4653820 2037.57 1495000 654.55 +AB0 36 1363 4772945 3501.79 1535000 1126.19 +AB1 37 1237 4780105 3864.27 1536000 1241.71 +AB2 38 875 4785797 5469.48 1537000 1756.57 +AB3 39 674 4790649 7107.79 1538000 2281.90 +AB0 40 385 4826130 12535.40 1548000 4020.78 +AB1 41 333 4828208 14499.12 1549000 4651.65 +AB2 42 230 4829929 20999.69 1550000 6739.13 +AB3 43 175 4831264 27607.22 1550000 8857.14 +AB0 44 90 4840816 53786.84 1554000 17266.67 +AB1 45 63 4841279 76845.70 1554000 24666.67 +AB2 46 42 4841577 115275.64 1554000 37000.00 +AB3 47 29 4841824 166959.45 1554000 53586.21 +AB0 48 12 4857543 404795.25 1559000 129916.67 +Make1 570 254 0.45 0 0.00 +Make2 400 175 0.44 0 0.00 +Make3 457 216 0.47 0 0.00 +Make4 549 296 0.54 0 0.00 +Make5 2492 1351 0.54 0 0.00 +Make6 1787 912 0.51 0 0.00 +Make7 1828 907 0.50 0 0.00 +Make8 1933 977 0.51 0 0.00 +Make9 5780 3300 0.57 1000 0.17 +Make10 4389 2429 0.55 2000 0.46 +Make11 4079 2121 0.52 1000 0.25 +Make12 4322 2282 0.53 2000 0.46 +Make13 9891 5562 0.56 2000 0.20 +Make14 7731 4336 0.56 3000 0.39 +Make15 6837 3505 0.51 1000 0.15 +Make16 6972 3753 0.54 4000 0.57 +Make17 13463 7292 0.54 1000 0.07 +Make18 10430 5622 0.54 2000 0.19 +Make19 9428 4754 0.50 3000 0.32 +Make20 8775 4821 0.55 1000 0.11 +Make21 15711 8423 0.54 2000 0.13 +Make22 12103 6456 0.53 2000 0.17 +Make23 10723 5367 0.50 5000 0.47 +Make24 9233 4856 0.53 2000 0.22 +Make25 14833 8045 0.54 1000 0.07 +Make26 11153 5854 0.52 3000 0.27 +Make27 10171 5131 0.50 1000 0.10 +Make28 8106 4235 0.52 1000 0.12 +Make29 10203 5466 0.54 2000 0.20 +Make30 7561 3982 0.53 0 0.00 +Make31 6803 3401 0.50 3000 0.44 +Make32 5229 2887 0.55 1000 0.19 +Make33 5267 2852 0.54 2000 0.38 +Make34 4049 2191 0.54 0 0.00 +Make35 3244 1630 0.50 0 0.00 +Make36 2555 1326 0.52 0 0.00 +Make37 1783 1049 0.59 1000 0.56 +Make38 1237 720 0.58 0 0.00 +Make39 1094 593 0.54 1000 0.91 +Make40 734 388 0.53 0 0.00 +Make41 486 323 0.66 0 0.00 +Make42 333 221 0.66 0 0.00 +Make43 276 140 0.51 0 0.00 +Make44 190 125 0.66 1000 5.26 +Make45 112 72 0.64 0 0.00 +Make46 63 30 0.48 0 0.00 +Make47 51 24 0.47 0 0.00 +Make48 32 23 0.72 0 0.00 +Undo1 439 215 0.49 0 0.00 +Undo2 400 148 0.37 0 0.00 +Undo3 360 138 0.38 0 0.00 +Undo4 378 135 0.36 0 0.00 +Undo5 1960 1013 0.52 0 0.00 +Undo6 1787 780 0.44 1000 0.56 +Undo7 1443 623 0.43 0 0.00 +Undo8 1462 649 0.44 1000 0.68 +Undo9 4707 2496 0.53 0 0.00 +Undo10 4389 1987 0.45 0 0.00 +Undo11 3351 1492 0.45 0 0.00 +Undo12 3377 1464 0.43 0 0.00 +Undo13 8189 4324 0.53 0 0.00 +Undo14 7731 3491 0.45 1000 0.13 +Undo15 5654 2555 0.45 1000 0.18 +Undo16 5610 2566 0.46 0 0.00 +Undo17 10893 5606 0.51 3000 0.28 +Undo18 10430 4589 0.44 1000 0.10 +Undo19 7660 3329 0.43 1000 0.13 +Undo20 7278 3234 0.44 2000 0.27 +Undo21 12649 6336 0.50 1000 0.08 +Undo22 12103 5230 0.43 3000 0.25 +Undo23 8727 3784 0.43 1000 0.11 +Undo24 7833 3543 0.45 1000 0.13 +Undo25 11695 5667 0.48 0 0.00 +Undo26 11153 4675 0.42 4000 0.36 +Undo27 8254 3475 0.42 2000 0.24 +Undo28 7047 2908 0.41 0 0.00 +Undo29 8021 4056 0.51 0 0.00 +Undo30 7561 3192 0.42 2000 0.26 +Undo31 5555 2350 0.42 1000 0.18 +Undo32 4621 1915 0.41 1000 0.22 +Undo33 4307 2135 0.50 1000 0.23 +Undo34 4049 1700 0.42 0 0.00 +Undo35 2715 1167 0.43 0 0.00 +Undo36 2284 957 0.42 0 0.00 +Undo37 1363 766 0.56 0 0.00 +Undo38 1237 552 0.45 0 0.00 +Undo39 875 395 0.45 0 0.00 +Undo40 674 288 0.43 0 0.00 +Undo41 385 204 0.53 1000 2.60 +Undo42 333 154 0.46 0 0.00 +Undo43 230 117 0.51 0 0.00 +Undo44 175 92 0.53 0 0.00 +Undo45 90 47 0.52 0 0.00 +Undo46 63 21 0.33 0 0.00 +Undo47 42 21 0.50 0 0.00 +Undo48 29 12 0.41 0 0.00 +Evaluate0 376 226 0.60 0 0.00 +NextMove1 170 74 0.44 0 0.00 +NextMove2 269 98 0.36 0 0.00 +NextMove3 131 50 0.38 0 0.00 +NextMove4 281 102 0.36 0 0.00 +NextMove5 705 298 0.42 0 0.00 +NextMove6 1255 511 0.41 0 0.00 +NextMove7 532 218 0.41 0 0.00 +NextMove8 1077 437 0.41 0 0.00 +NextMove9 1391 583 0.42 0 0.00 +NextMove10 3316 1446 0.44 0 0.00 +NextMove11 1073 448 0.42 0 0.00 +NextMove12 2649 1160 0.44 0 0.00 +NextMove13 2160 900 0.42 0 0.00 +NextMove14 6029 2563 0.43 0 0.00 +NextMove15 1702 716 0.42 0 0.00 +NextMove16 4427 1916 0.43 0 0.00 +NextMove17 3033 1207 0.40 0 0.00 +NextMove18 7860 3362 0.43 0 0.00 +NextMove19 2570 1052 0.41 0 0.00 +NextMove20 5510 2355 0.43 0 0.00 +NextMove21 3608 1439 0.40 2000 0.55 +NextMove22 9041 3728 0.41 2000 0.22 +NextMove23 3062 1246 0.41 0 0.00 +NextMove24 5837 2426 0.42 0 0.00 +NextMove25 3680 1517 0.41 1000 0.27 +NextMove26 8015 3188 0.40 1000 0.12 +NextMove27 3138 1324 0.42 0 0.00 +NextMove28 5130 2047 0.40 0 0.00 +NextMove29 2642 1094 0.41 0 0.00 +NextMove30 5379 2276 0.42 1000 0.19 +NextMove31 2182 845 0.39 0 0.00 +NextMove32 3373 1422 0.42 1000 0.30 +NextMove33 1218 533 0.44 0 0.00 +NextMove34 3089 1225 0.40 0 0.00 +NextMove35 960 406 0.42 0 0.00 +NextMove36 1755 692 0.39 0 0.00 +NextMove37 546 248 0.45 0 0.00 +NextMove38 817 353 0.43 1000 1.22 +NextMove39 420 176 0.42 0 0.00 +NextMove40 455 214 0.47 0 0.00 +NextMove41 153 60 0.39 0 0.00 +NextMove42 232 107 0.46 0 0.00 +NextMove43 101 32 0.32 0 0.00 +NextMove44 129 69 0.53 0 0.00 +NextMove45 49 24 0.49 0 0.00 +NextMove46 41 17 0.41 0 0.00 +NextMove47 22 8 0.36 0 0.00 +NextMove48 20 10 0.50 0 0.00 +QuickTricks3 378 187 0.49 0 0.00 +QuickTricks4 1791 1660 0.93 1000 0.56 +QuickTricks7 1462 813 0.56 0 0.00 +QuickTricks8 4374 4310 0.99 0 0.00 +QuickTricks11 3377 1824 0.54 0 0.00 +QuickTricks12 7644 7759 1.02 4000 0.52 +QuickTricks15 5610 3134 0.56 0 0.00 +QuickTricks16 10249 10994 1.07 8000 0.78 +QuickTricks19 7278 4013 0.55 1000 0.14 +QuickTricks20 6148 6937 1.13 0 0.00 +QuickTricks23 7833 4179 0.53 1000 0.13 +QuickTricks24 5383 6540 1.21 1000 0.19 +QuickTricks27 7047 3790 0.54 1000 0.14 +QuickTricks28 4038 5310 1.32 1000 0.25 +QuickTricks31 4621 2580 0.56 1000 0.22 +QuickTricks32 2292 3156 1.38 0 0.00 +QuickTricks35 2284 1246 0.55 0 0.00 +QuickTricks36 844 1271 1.51 0 0.00 +QuickTricks39 674 377 0.56 0 0.00 +QuickTricks40 279 457 1.64 0 0.00 +QuickTricks43 175 116 0.66 0 0.00 +QuickTricks44 61 133 2.18 0 0.00 +QuickTricks47 29 22 0.76 0 0.00 +LaterTricks4 911 486 0.53 0 0.00 +LaterTricks8 2742 1457 0.53 1000 0.36 +LaterTricks12 5346 2817 0.53 1000 0.19 +LaterTricks16 7609 3840 0.50 2000 0.26 +LaterTricks20 3841 1914 0.50 1000 0.26 +LaterTricks24 3689 1818 0.49 3000 0.81 +LaterTricks28 3052 1557 0.51 0 0.00 +LaterTricks32 1860 1013 0.54 0 0.00 +LaterTricks36 800 460 0.57 0 0.00 +LaterTricks40 279 154 0.55 0 0.00 +LaterTricks44 61 37 0.61 0 0.00 +MoveGen1 400 228 0.57 0 0.00 +MoveGen2 360 232 0.64 0 0.00 +MoveGen3 326 230 0.71 0 0.00 +MoveGen4 268 345 1.29 0 0.00 +MoveGen5 1787 1219 0.68 2000 1.12 +MoveGen6 1443 1042 0.72 0 0.00 +MoveGen7 1296 995 0.77 1000 0.77 +MoveGen8 856 1350 1.58 1000 1.17 +MoveGen9 4389 3159 0.72 1000 0.23 +MoveGen10 3351 2650 0.79 1000 0.30 +MoveGen11 3006 2486 0.83 1000 0.33 +MoveGen12 1673 2984 1.78 3000 1.79 +MoveGen13 7731 5438 0.70 3000 0.39 +MoveGen14 5654 4448 0.79 0 0.00 +MoveGen15 5135 4234 0.82 1000 0.19 +MoveGen16 2545 5180 2.04 2000 0.79 +MoveGen17 10430 7115 0.68 1000 0.10 +MoveGen18 7660 6140 0.80 1000 0.13 +MoveGen19 6858 5616 0.82 1000 0.15 +MoveGen20 3265 7125 2.18 1000 0.31 +MoveGen21 12103 7910 0.65 1000 0.08 +MoveGen22 8727 6907 0.79 1000 0.11 +MoveGen23 7661 6196 0.81 0 0.00 +MoveGen24 3396 7980 2.35 6000 1.77 +MoveGen25 11153 7040 0.63 2000 0.18 +MoveGen26 8254 6364 0.77 3000 0.36 +MoveGen27 7033 5864 0.83 4000 0.57 +MoveGen28 2976 7815 2.63 3000 1.01 +MoveGen29 7561 4811 0.64 1000 0.13 +MoveGen30 5555 4485 0.81 4000 0.72 +MoveGen31 4621 3979 0.86 0 0.00 +MoveGen32 1856 5361 2.89 0 0.00 +MoveGen33 4049 2686 0.66 0 0.00 +MoveGen34 2715 2275 0.84 4000 1.47 +MoveGen35 2284 2077 0.91 0 0.00 +MoveGen36 800 2840 3.55 0 0.00 +MoveGen37 1237 881 0.71 0 0.00 +MoveGen38 875 762 0.87 0 0.00 +MoveGen39 674 654 0.97 0 0.00 +MoveGen40 279 1117 4.00 0 0.00 +MoveGen41 333 297 0.89 0 0.00 +MoveGen42 230 259 1.13 0 0.00 +MoveGen43 175 209 1.19 0 0.00 +MoveGen44 61 290 4.75 0 0.00 +MoveGen45 63 48 0.76 0 0.00 +MoveGen46 42 49 1.17 0 0.00 +MoveGen47 29 44 1.52 0 0.00 +MoveGen48 12 70 5.83 0 0.00 +Lookup4 639 2221 3.48 0 0.00 +Lookup8 2142 5578 2.60 6000 2.80 +Lookup12 4591 8596 1.87 3000 0.65 +Lookup16 6842 11075 1.62 3000 0.44 +Lookup20 12649 15665 1.24 4000 0.32 +Lookup24 11695 13635 1.17 2000 0.17 +Lookup28 8021 9555 1.19 4000 0.50 +Lookup32 4307 5390 1.25 3000 0.70 +Lookup36 1363 2164 1.59 1000 0.73 +Lookup40 385 790 2.05 0 0.00 +Lookup44 90 342 3.80 0 0.00 +Build4 268 236 0.88 0 0.00 +Build8 856 827 0.97 0 0.00 +Build12 1673 1716 1.03 0 0.00 +Build16 2545 2458 0.97 2000 0.79 +Build20 3265 3372 1.03 1000 0.31 +Build24 3396 3349 0.99 0 0.00 +Build28 2976 3266 1.10 0 0.00 +Build32 1856 2090 1.13 0 0.00 +Build36 800 924 1.16 0 0.00 +Build40 279 297 1.06 1000 3.58 +Build44 61 97 1.59 0 0.00 + From 1f45bfb23e639b0283ee993c0fc549ed8bdbfd78 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 18 Mar 2018 10:47:02 +0100 Subject: [PATCH 017/132] Took out some Visual warning, checking on notebook --- src/Makefiles/Makefile_Visual_all | 32 +++++++++++++++++++------------ src/NOTES | 1 - src/System.cpp | 21 ++++++++++---------- 3 files changed, 31 insertions(+), 23 deletions(-) diff --git a/src/Makefiles/Makefile_Visual_all b/src/Makefiles/Makefile_Visual_all index 2a017ee6..d122e328 100644 --- a/src/Makefiles/Makefile_Visual_all +++ b/src/Makefiles/Makefile_Visual_all @@ -23,32 +23,38 @@ CC_BOOST_LINK = /link /LIBPATH:$(BOOST32_LIB1) /LIBPATH:$(BOOST32_LIB2) # If your Microsoft compiler is not called cl, change it here. CC = cl CC_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs /openmp /DDDS_THREADS_BOOST -# CC_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs /openmp /DDDS_THREADS_BOOST /DDDS_DEBUG_ALL /DDDS_TIMING +# CC_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs /openmp /DDDS_THREADS_BOOST /DDDS_DEBUG_ALL /DDDS_TIMING /DDDS_SCHEDULER # These flags are not turned on by default, but DDS should pass them. # Turn them on below. +# WARN_FLAGS = \ + # /Wall \ + # /wd4127 \ + # /wd4365 \ + # /wd4571 \ + # /wd4623 \ + # /wd4701 \ + # /wd4774 \ + # /wd4986 \ + # /wd4987 \ + # /wd5026 \ + # /wd5027 \ + # /wd5031 \ + # /WX + +# TODO: 4996 is strncpy, sprintf etc. Shouldn't use anyway. + WARN_FLAGS = \ /Wall \ - /wd4127 \ - /wd4365 \ /wd4464 \ /wd4555 \ - /wd4571 \ - /wd4623 \ /wd4625 \ /wd4626 \ /wd4668 \ - /wd4701 \ /wd4710 \ /wd4711 \ - /wd4774 \ /wd4820 \ - /wd4986 \ - /wd4987 \ /wd4996 \ - /wd5026 \ - /wd5027 \ - /wd5031 \ /WX # Here you can turn on/off warnings. @@ -84,6 +90,8 @@ SOURCE_FILES = \ Timer.cpp \ TimerGroup.cpp \ TimerList.cpp \ + TimeStat.cpp \ + TimeStatList.cpp \ TransTable.cpp OBJ_FILES = $(subst .cpp,.obj,$(SOURCE_FILES)) $(VFILE).obj diff --git a/src/NOTES b/src/NOTES index 00e15d35..4963b14f 100644 --- a/src/NOTES +++ b/src/NOTES @@ -16,7 +16,6 @@ dtest - Get laptop changes, no more time function calls General -- Need Stats.cpp after all?! (in #ifdef's...) - Move away from printf etc to out. - It's a bit annoying that SetMaxThreads() gets called once with 0 automatically, once with 1 from dtest. So lots of debug text files diff --git a/src/System.cpp b/src/System.cpp index 5ee686a7..52330dce 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -15,16 +15,16 @@ // Boost: Disable some header warnings. #ifdef DDS_THREADS_BOOST - #ifdef _MSC_VER - #pragma warning(push) - #pragma warning(disable: 4061 4191 4365 4571 4619 4625 4626 5026 5027 50 31) - #endif + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable: 4061 4191 4365 4571 4619 5026 5027 5031) + #endif #include - #ifdef _MSC_VER - #pragma warning(pop) - #endif + #ifdef _MSC_VER + #pragma warning(pop) + #endif #endif #include "../include/dll.h" @@ -302,11 +302,12 @@ int System::RunThreadsWinAPI() { #if (defined(_MSC_VER) && !defined(DDS_THREADS_SINGLE)) vector winWrap; - winWrap.resize(numThreads); + const unsigned nt = static_cast(numThreads); + winWrap.resize(nt); - for (int k = 0; k < numThreads; k++) + for (unsigned k = 0; k < nt; k++) { - winWrap[k].thid = k; + winWrap[k].thid = static_cast(k); winWrap[k].fptr = fptr; winWrap[k].waitPtr = solveAllEvents; From ea0207053c6f320e25049d1dcba61b60773d614b Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 18 Mar 2018 11:12:46 +0100 Subject: [PATCH 018/132] Now warnings work on notebook as well --- src/ABsearch.cpp | 3 +-- src/Makefiles/Makefile_Visual_all | 22 ++++++---------------- src/System.cpp | 2 +- src/dds.cpp | 2 -- src/dds.h | 2 +- 5 files changed, 9 insertions(+), 22 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index 48fcd3d3..c658aeb4 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -7,11 +7,11 @@ See LICENSE and README. */ - #include #include #include "dds.h" + #include "TransTable.h" #include "Moves.h" #include "threadmem.h" @@ -19,7 +19,6 @@ #include "LaterTricks.h" #include "ABsearch.h" - #define DDS_POS_LINES 5 #define DDS_HAND_LINES 12 #define DDS_NODE_LINES 4 diff --git a/src/Makefiles/Makefile_Visual_all b/src/Makefiles/Makefile_Visual_all index d122e328..33d303b9 100644 --- a/src/Makefiles/Makefile_Visual_all +++ b/src/Makefiles/Makefile_Visual_all @@ -27,34 +27,24 @@ CC_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs /openmp /DDDS_THREADS_BOOST # These flags are not turned on by default, but DDS should pass them. # Turn them on below. -# WARN_FLAGS = \ - # /Wall \ - # /wd4127 \ - # /wd4365 \ - # /wd4571 \ - # /wd4623 \ - # /wd4701 \ - # /wd4774 \ - # /wd4986 \ - # /wd4987 \ - # /wd5026 \ - # /wd5027 \ - # /wd5031 \ - # /WX - -# TODO: 4996 is strncpy, sprintf etc. Shouldn't use anyway. WARN_FLAGS = \ /Wall \ + /wd4365 \ /wd4464 \ + /wd4514 \ /wd4555 \ + /wd4571 \ /wd4625 \ /wd4626 \ /wd4668 \ /wd4710 \ /wd4711 \ + /wd4774 \ /wd4820 \ /wd4996 \ + /wd5026 \ + /wd5027 \ /WX # Here you can turn on/off warnings. diff --git a/src/System.cpp b/src/System.cpp index 52330dce..76e64ba5 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -17,7 +17,7 @@ #ifdef DDS_THREADS_BOOST #ifdef _MSC_VER #pragma warning(push) - #pragma warning(disable: 4061 4191 4365 4571 4619 5026 5027 5031) + #pragma warning(disable: 4061 4191 4619 4623 5031) #endif #include diff --git a/src/dds.cpp b/src/dds.cpp index 7cc34340..d9472e80 100644 --- a/src/dds.cpp +++ b/src/dds.cpp @@ -8,12 +8,10 @@ */ - #include "../include/dll.h" #include "dds.h" #include "Init.h" - #ifdef _MANAGED #pragma managed(push, off) #endif diff --git a/src/dds.h b/src/dds.h index 7ef330ed..eabc232a 100644 --- a/src/dds.h +++ b/src/dds.h @@ -17,6 +17,7 @@ #include #include + #include "debug.h" #include "../include/portab.h" @@ -24,7 +25,6 @@ #include "TimerList.h" #include "ABstats.h" - #if defined(DDS_MEMORY_LEAKS) && defined(_MSC_VER) #define DDS_MEMORY_LEAKS_WIN32 #define _CRTDBG_MAP_ALLOC From 35417e4986ae7fa7cf78a8a071d81e5f63605067 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 18 Mar 2018 11:21:02 +0100 Subject: [PATCH 019/132] System no longer has InitThreads functions --- src/NOTES | 2 -- src/PlayAnalyser.cpp | 4 --- src/SolveBoard.cpp | 5 ---- src/System.cpp | 68 +++++++------------------------------------- src/System.h | 21 +------------- 5 files changed, 12 insertions(+), 88 deletions(-) diff --git a/src/NOTES b/src/NOTES index 4963b14f..fd95f022 100644 --- a/src/NOTES +++ b/src/NOTES @@ -1,9 +1,7 @@ 17.03.2018 System -- Combine Init and Run - No more globals? -- Move boost errors from Makefile to here - Do we need noOfThreads at all here? Makefile diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index aa56c046..c8161bda 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -295,10 +295,6 @@ int STDCALL AnalyseAllPlaysBin( scheduler.Register(bop, SCHEDULER_TRACE); sysdep.Register(DDS_SYSTEM_PLAY, noOfThreads); - int retInit = sysdep.InitThreads(); - if (retInit != RETURN_NO_FAULT) - return retInit; - START_BLOCK_TIMER; int retRun = sysdep.RunThreads(chunkSize); END_BLOCK_TIMER; diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 521eff14..b4c388e9 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -173,11 +173,6 @@ int SolveAllBoardsN( for (int k = 0; k < MAXNOOFBOARDS; k++) solvedp->solvedBoard[k].cards = 0; - int retInit = sysdep.InitThreads(); - if (retInit != RETURN_NO_FAULT) - return retInit; - - START_BLOCK_TIMER; int retRun = sysdep.RunThreads(chunkSize); END_BLOCK_TIMER; diff --git a/src/System.cpp b/src/System.cpp index 76e64ba5..2eb07b12 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -125,13 +125,6 @@ void System::Reset() availableSystem[DDS_SYSTEM_THREAD_BOOST] = false; #endif - InitPtrList.resize(DDS_SYSTEM_THREAD_SIZE); - InitPtrList[DDS_SYSTEM_THREAD_BASIC] = &System::InitThreadsBasic; - InitPtrList[DDS_SYSTEM_THREAD_WINAPI] = &System::InitThreadsWinAPI; - InitPtrList[DDS_SYSTEM_THREAD_OPENMP] = &System::InitThreadsOpenMP; - InitPtrList[DDS_SYSTEM_THREAD_GCD] = &System::InitThreadsGCD; - InitPtrList[DDS_SYSTEM_THREAD_BOOST] = &System::InitThreadsBoost; - RunPtrList.resize(DDS_SYSTEM_THREAD_SIZE); RunPtrList[DDS_SYSTEM_THREAD_BASIC] = &System::RunThreadsBasic; RunPtrList[DDS_SYSTEM_THREAD_WINAPI] = &System::RunThreadsWinAPI; @@ -244,12 +237,6 @@ int System::PreferThreading(const unsigned code) // Basic // ////////////////////////////////////////////////////////////////////// -int System::InitThreadsBasic() -{ - return RETURN_NO_FAULT; -} - - int System::RunThreadsBasic() { (*fptr)(0); @@ -261,22 +248,6 @@ int System::RunThreadsBasic() // WinAPI // ////////////////////////////////////////////////////////////////////// -int System::InitThreadsWinAPI() -{ -#if (defined(_MSC_VER) && !defined(DDS_THREADS_SINGLE)) - threadIndex = -1; - for (int k = 0; k < numThreads; k++) - { - solveAllEvents[k] = CreateEvent(NULL, FALSE, FALSE, 0); - if (solveAllEvents[k] == 0) - return RETURN_THREAD_CREATE; - } -#endif - - return RETURN_NO_FAULT; -} - - #if (defined(_MSC_VER) && !defined(DDS_THREADS_SINGLE)) struct WinWrapType { @@ -301,6 +272,15 @@ DWORD CALLBACK WinCallback(void * p) int System::RunThreadsWinAPI() { #if (defined(_MSC_VER) && !defined(DDS_THREADS_SINGLE)) + HANDLE solveAllEvents[MAXNOOFTHREADS]; + + for (int k = 0; k < numThreads; k++) + { + solveAllEvents[k] = CreateEvent(NULL, FALSE, FALSE, 0); + if (solveAllEvents[k] == 0) + return RETURN_THREAD_CREATE; + } + vector winWrap; const unsigned nt = static_cast(numThreads); winWrap.resize(nt); @@ -336,23 +316,15 @@ int System::RunThreadsWinAPI() // OpenMP // ////////////////////////////////////////////////////////////////////// -int System::InitThreadsOpenMP() +int System::RunThreadsOpenMP() { - // Added after suggestion by Dirk Willecke. #if (defined(_OPENMP) && !defined(DDS_THREADS_SINGLE)) + // Added after suggestion by Dirk Willecke. if (omp_get_dynamic()) omp_set_dynamic(0); omp_set_num_threads(numThreads); -#endif - return RETURN_NO_FAULT; -} - - -int System::RunThreadsOpenMP() -{ -#if (defined(_OPENMP) && !defined(DDS_THREADS_SINGLE)) #pragma omp parallel default(none) { #pragma omp for schedule(dynamic) @@ -372,12 +344,6 @@ int System::RunThreadsOpenMP() // GCD // ////////////////////////////////////////////////////////////////////// -int System::InitThreadsGCD() -{ - return RETURN_NO_FAULT; -} - - int System::RunThreadsGCD() { #if ((defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || \ @@ -400,12 +366,6 @@ int System::RunThreadsGCD() // Boost // ////////////////////////////////////////////////////////////////////// -int System::InitThreadsBoost() -{ - return RETURN_NO_FAULT; -} - - int System::RunThreadsBoost() { #if (defined(DDS_THREADS_BOOST) && !defined(DDS_THREADS_SINGLE)) @@ -427,12 +387,6 @@ int System::RunThreadsBoost() } -int System::InitThreads() -{ - return (this->*InitPtrList[preferredSystem])(); -} - - int System::RunThreads(const int chunkSize) { // TODO Add timing on the caller side, not here in System diff --git a/src/System.h b/src/System.h index 95699eaa..980f4e01 100644 --- a/src/System.h +++ b/src/System.h @@ -18,7 +18,7 @@ #include // TODO not needed? -#include "dds.h" +// #include "dds.h" using namespace std; @@ -46,28 +46,11 @@ class System vector CallbackSimpleList; vector CallbackComplexList; - // TODO no inits? - typedef int (System::*InitPtr)(); - vector InitPtrList; - typedef int (System::*RunPtr)(); vector RunPtrList; fptrType fptr; -#ifdef _MSC_VER - // TODO not needed? - HANDLE solveAllEvents[MAXNOOFTHREADS]; - LONG threadIndex; -#endif - - // TODO no inits? - int InitThreadsBasic(); - int InitThreadsBoost(); - int InitThreadsOpenMP(); - int InitThreadsGCD(); - int InitThreadsWinAPI(); - int RunThreadsBasic(); int RunThreadsBoost(); int RunThreadsOpenMP(); @@ -92,8 +75,6 @@ class System int PreferThreading(const unsigned code); - int InitThreads(); - int RunThreads(const int chunkSize); string str(DDSInfo * info) const; From 4ca30e769f4c2700aeafc5068deeada802f9c067 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 18 Mar 2018 12:11:34 +0100 Subject: [PATCH 020/132] System a bit cleaner --- src/NOTES | 4 -- src/System.cpp | 178 ++++++++++++++++++++++++++++++------------------- src/System.h | 16 +++-- test/dtest.cpp | 2 - 4 files changed, 121 insertions(+), 79 deletions(-) diff --git a/src/NOTES b/src/NOTES index fd95f022..89edc57b 100644 --- a/src/NOTES +++ b/src/NOTES @@ -1,9 +1,5 @@ 17.03.2018 -System -- No more globals? -- Do we need noOfThreads at all here? - Makefile - One for each system - Clean define's, WE control what gets compiled, not compiler diff --git a/src/System.cpp b/src/System.cpp index 2eb07b12..12ce85af 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -34,15 +34,6 @@ #include "SolveBoard.h" #include "PlayAnalyser.h" -extern int noOfThreads; - -#define DDS_SYSTEM_THREAD_BASIC 0 -#define DDS_SYSTEM_THREAD_WINAPI 1 -#define DDS_SYSTEM_THREAD_OPENMP 2 -#define DDS_SYSTEM_THREAD_GCD 3 -#define DDS_SYSTEM_THREAD_BOOST 4 -#define DDS_SYSTEM_THREAD_SIZE 5 - const vector DDS_SYSTEM_PLATFORM = { "", @@ -77,6 +68,13 @@ const vector DDS_SYSTEM_THREADING = "Boost" }; +#define DDS_SYSTEM_THREAD_BASIC 0 +#define DDS_SYSTEM_THREAD_WINAPI 1 +#define DDS_SYSTEM_THREAD_OPENMP 2 +#define DDS_SYSTEM_THREAD_GCD 3 +#define DDS_SYSTEM_THREAD_BOOST 4 +#define DDS_SYSTEM_THREAD_SIZE 5 + System::System() { @@ -99,27 +97,25 @@ void System::Reset() availableSystem[DDS_SYSTEM_THREAD_BASIC] = true; -#if (defined(_MSC_VER) && !defined(DDS_THREADS_SINGLE)) +#ifdef DDS_THREADS_WINAPI availableSystem[DDS_SYSTEM_THREAD_WINAPI] = true; #else availableSystem[DDS_SYSTEM_THREAD_WINAPI] = false; #endif -#if (defined(_OPENMP) && !defined(DDS_THREADS_SINGLE)) +#ifdef DDS_THREADS_OPENMP availableSystem[DDS_SYSTEM_THREAD_OPENMP] = true; #else availableSystem[DDS_SYSTEM_THREAD_OPENMP] = false; #endif -#if ((defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || \ - defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) && \ - !defined(DDS_THREADS_SINGLE)) +#ifdef DDS_THREADS_GCD availableSystem[DDS_SYSTEM_THREAD_GCD] = true; #else availableSystem[DDS_SYSTEM_THREAD_GCD] = false; #endif -#if (defined(DDS_THREADS_BOOST) && !defined(DDS_THREADS_SINGLE)) +#ifdef DDS_THREADS_BOOST availableSystem[DDS_SYSTEM_THREAD_BOOST] = true; #else availableSystem[DDS_SYSTEM_THREAD_BOOST] = false; @@ -132,7 +128,7 @@ void System::Reset() RunPtrList[DDS_SYSTEM_THREAD_GCD] = &System::RunThreadsGCD; RunPtrList[DDS_SYSTEM_THREAD_BOOST] = &System::RunThreadsBoost; - // TODO Correct functions + // DDS_SYSTEM_CALC_ doesn't happen. CallbackSimpleList.resize(DDS_SYSTEM_SIZE); CallbackSimpleList[DDS_SYSTEM_SOLVE] = SolveChunkCommon; CallbackSimpleList[DDS_SYSTEM_CALC] = SolveChunkCommon; @@ -248,7 +244,7 @@ int System::RunThreadsBasic() // WinAPI // ////////////////////////////////////////////////////////////////////// -#if (defined(_MSC_VER) && !defined(DDS_THREADS_SINGLE)) +#ifdef DDS_THREADS_WINAPI struct WinWrapType { int thid; @@ -271,7 +267,7 @@ DWORD CALLBACK WinCallback(void * p) int System::RunThreadsWinAPI() { -#if (defined(_MSC_VER) && !defined(DDS_THREADS_SINGLE)) +#ifdef DDS_THREADS_WINAPI HANDLE solveAllEvents[MAXNOOFTHREADS]; for (int k = 0; k < numThreads; k++) @@ -304,7 +300,7 @@ int System::RunThreadsWinAPI() if (solveAllWaitResult != WAIT_OBJECT_0) return RETURN_THREAD_WAIT; - for (int k = 0; k < noOfThreads; k++) + for (int k = 0; k < numThreads; k++) CloseHandle(solveAllEvents[k]); #endif @@ -318,7 +314,7 @@ int System::RunThreadsWinAPI() int System::RunThreadsOpenMP() { -#if (defined(_OPENMP) && !defined(DDS_THREADS_SINGLE)) +#ifdef DDS_THREADS_OPENMP // Added after suggestion by Dirk Willecke. if (omp_get_dynamic()) omp_set_dynamic(0); @@ -346,10 +342,8 @@ int System::RunThreadsOpenMP() int System::RunThreadsGCD() { -#if ((defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || \ - defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) && \ - !defined(DDS_THREADS_SINGLE)) - dispatch_apply(static_cast(noOfThreads), +#ifdef DDS_THREADS_GCD + dispatch_apply(static_cast(numThreads), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^(size_t t) { @@ -368,7 +362,7 @@ int System::RunThreadsGCD() int System::RunThreadsBoost() { -#if (defined(DDS_THREADS_BOOST) && !defined(DDS_THREADS_SINGLE)) +#ifdef DDS_THREADS_BOOST vector threads; threads.resize(static_cast(numThreads)); @@ -389,8 +383,6 @@ int System::RunThreadsBoost() int System::RunThreads(const int chunkSize) { - // TODO Add timing on the caller side, not here in System - fptr = (chunkSize == 1 ? CallbackSimpleList[runCat] : CallbackComplexList[runCat]); @@ -398,77 +390,127 @@ int System::RunThreads(const int chunkSize) } -string System::str(DDSInfo * info) const +////////////////////////////////////////////////////////////////////// +// Self-identification // +////////////////////////////////////////////////////////////////////// + +string System::GetVersion( + int& major, + int& minor, + int& patch) const { - info->major = DDS_VERSION / 10000; - info->minor = (DDS_VERSION - info->major * 10000) / 100; - info->patch = DDS_VERSION % 100; + major = DDS_VERSION / 10000; + minor = (DDS_VERSION - major * 10000) / 100; + patch = DDS_VERSION % 100; - sprintf(info->versionString, "%d.%d.%d", - info->major, info->minor, info->patch); + string st = STR(major) + "." + STR(minor) + "." + STR(patch); + return st; +} - info->system = 0; - info->compiler = 0; - info->constructor = 0; - info->threading = 0; - info->noOfThreads = numThreads; +string System::GetSystem(int& sys) const +{ #if defined(_WIN32) - info->system = 1; + sys = 1; #elif defined(__CYGWIN__) - info->system = 2; + sys = 2; #elif defined(__linux) - info->system = 3; + sys = 3; #elif defined(__APPLE__) - info->system = 4; + sys = 4; +#elif + sys = 0; #endif + + return DDS_SYSTEM_PLATFORM[static_cast(sys)]; +} - stringstream ss; - ss << "DDS DLL\n-------\n"; - ss << left << setw(13) << "System" << - setw(20) << right << - DDS_SYSTEM_PLATFORM[static_cast(info->system)] << "\n"; +string System::GetCompiler(int& comp) const +{ #if defined(_MSC_VER) - info->compiler = 1; + comp = 1; #elif defined(__MINGW32__) - info->compiler = 2; + comp = 2; #elif defined(__GNUC__) - info->compiler = 3; + comp = 3; #elif defined(__clang__) - info->compiler = 4; + comp = 4; +#elif + comp = 0; #endif - ss << left << setw(13) << "Compiler" << - setw(20) << right << - DDS_SYSTEM_COMPILER[static_cast(info->compiler)] << "\n"; + return DDS_SYSTEM_COMPILER[static_cast(comp)]; +} + + +string System::GetConstructor(int& cons) const +{ #if defined(USES_DLLMAIN) - info->constructor = 1; + cons = 1; #elif defined(USES_CONSTRUCTOR) - info->constructor = 2; + cons = 2; +#elif + cons = 0; #endif - ss << left << setw(13) << "Constructor" << - setw(20) << right << - DDS_SYSTEM_CONSTRUCTOR[static_cast(info->constructor)] << - "\n"; - ss << left << setw(9) << "Threading"; - string sy = ""; + return DDS_SYSTEM_CONSTRUCTOR[static_cast(cons)]; +} + + +string System::GetThreading(int& thr) const +{ + string st = ""; + thr = 0; for (unsigned k = 0; k < DDS_SYSTEM_THREAD_SIZE; k++) { if (availableSystem[k]) { - sy += " " + DDS_SYSTEM_THREADING[k]; + st += " " + DDS_SYSTEM_THREADING[k]; if (k == preferredSystem) - sy += "(*)"; + { + st += "(*)"; + thr = k; + } } } - ss << setw(24) << right << sy << "\n"; + return st; +} + +string System::str(DDSInfo * info) const +{ + stringstream ss; + ss << "DDS DLL\n-------\n"; + + const string strSystem = System::GetSystem(info->system); + ss << left << setw(13) << "System" << + setw(20) << right << strSystem << "\n"; + + const string strCompiler = System::GetCompiler(info->compiler); + ss << left << setw(13) << "Compiler" << + setw(20) << right << strCompiler << "\n"; + + const string strConstructor = System::GetCompiler(info->constructor); + ss << left << setw(13) << "Constructor" << + setw(20) << right << strConstructor << "\n"; + + const string strThreading = System::GetThreading(info->threading); + ss << left << setw(9) << "Threading" << + setw(24) << right << strThreading << "\n"; + + info->noOfThreads = numThreads; ss << left << setw(17) << "Number of threads" << - setw(16) << right << noOfThreads << "\n"; + setw(16) << right << numThreads << "\n"; + + const string strVersion = System::GetVersion(info->major, + info->minor, info->patch); + ss << left << setw(13) << "Version" << + setw(20) << right << strVersion << "\n"; + strcpy(info->versionString, strVersion.c_str()); - strcpy(info->systemString, ss.str().c_str()); - return ss.str(); + const string st = ss.str(); + strcpy(info->systemString, st.c_str()); + return st; } diff --git a/src/System.h b/src/System.h index 980f4e01..5670fa53 100644 --- a/src/System.h +++ b/src/System.h @@ -11,18 +11,14 @@ #define DDS_SYSTEM_H /* - This class encapsulates all(?) the system-dependent stuff. + This class encapsulates all the system-dependent stuff. */ #include #include -// TODO not needed? -// #include "dds.h" - using namespace std; -// TODO enum #define DDS_SYSTEM_SOLVE 0 #define DDS_SYSTEM_CALC 1 #define DDS_SYSTEM_PLAY 2 @@ -57,6 +53,15 @@ class System int RunThreadsGCD(); int RunThreadsWinAPI(); + string GetVersion( + int& major, + int& minor, + int& patch) const; + string GetSystem(int& sys) const; + string GetCompiler(int& comp) const; + string GetConstructor(int& cons) const; + string GetThreading(int &thr) const; + public: System(); @@ -81,3 +86,4 @@ class System }; #endif + diff --git a/test/dtest.cpp b/test/dtest.cpp index 96acebb8..1a6eb490 100644 --- a/test/dtest.cpp +++ b/test/dtest.cpp @@ -30,8 +30,6 @@ int main(int argc, char * argv[]) DDSInfo info; GetDDSInfo(&info); cout << info.systemString; - cout << setw(13) << left << "Version" << - setw(20) << right << info.versionString << "\n\n"; cout.flush(); realMain(argc, argv); From fb14924c7bfcdaac2a9122da13cb66e1fee12c99 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 18 Mar 2018 13:00:07 +0100 Subject: [PATCH 021/132] Clean Makefile for Visual C++ --- src/FILES | 3 +- src/IFDEFS | 9 -- src/Makefiles/Makefile_Visual_all | 163 ++++++++++++---------------- src/Makefiles/depends_obj.txt | 67 ++++++++++++ src/Makefiles/sources.txt | 23 ++++ src/NOTES | 3 - src/System.cpp | 10 ++ src/Timer_new.cpp | 154 --------------------------- src/Timer_new.h | 63 ----------- src/Timer_old.cpp | 170 ------------------------------ src/Timer_old.h | 76 ------------- 11 files changed, 169 insertions(+), 572 deletions(-) delete mode 100644 src/IFDEFS create mode 100644 src/Makefiles/depends_obj.txt create mode 100644 src/Makefiles/sources.txt delete mode 100644 src/Timer_new.cpp delete mode 100644 src/Timer_new.h delete mode 100644 src/Timer_old.cpp delete mode 100644 src/Timer_old.h diff --git a/src/FILES b/src/FILES index 2c543922..d283f0a3 100644 --- a/src/FILES +++ b/src/FILES @@ -12,7 +12,6 @@ 1209 3449 30221 QuickTricks.cpp 297 665 6655 SolveBoard.cpp 1291 3194 30732 SolverIF.cpp - 519 1126 12679 System.cpp 2968 8140 72454 TransTable.cpp 117 239 1985 ABsearch.h 76 165 1517 ABstats.h @@ -26,7 +25,6 @@ 31 70 530 QuickTricks.h 29 62 494 SolveBoard.h 28 58 444 SolverIF.h - 102 186 1866 System.h 81 155 1390 threadmem.h 519 1108 11141 TransTable.h 19052 51196 458259 insgesamt @@ -37,6 +35,7 @@ Scheduler Final: +System Timer TimerGroup TimerList diff --git a/src/IFDEFS b/src/IFDEFS deleted file mode 100644 index c9d8ffa1..00000000 --- a/src/IFDEFS +++ /dev/null @@ -1,9 +0,0 @@ -Scheduler.cpp:#ifdef _WIN32 -Scheduler.cpp:#ifdef _WIN32 -Scheduler.cpp:#ifdef _WIN32 -Scheduler.cpp:#ifdef _WIN32 -Scheduler.cpp:#ifndef _WIN32 - -Scheduler.h:#ifndef _WIN32 -Scheduler.h:#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) || defined(__MAC_OS_X_VERSION_MAX_ALLOWED)) -Scheduler.h:#ifdef _WIN32 diff --git a/src/Makefiles/Makefile_Visual_all b/src/Makefiles/Makefile_Visual_all index 33d303b9..0283aaf5 100644 --- a/src/Makefiles/Makefile_Visual_all +++ b/src/Makefiles/Makefile_Visual_all @@ -1,3 +1,5 @@ +# --------------------- INFORMATION -------------------------------- + # This the DDS Makefile for Windows and the Microsoft Visual C++ # compiler. It assumes a Unix-like setup for some commands. @@ -6,10 +8,14 @@ # It is not mandatory, and if you don't have those tools, # You can remove $(VFILE).obj in the target line below. -# If you want to compile a single-threaded version or a small-memory -# version, change flags below. +# --------------------- CONFIGURATION ------------------------------ -# The boost paths on my systems. +# You can configure the following: +# +# 1. The location of the Boost libraries (you can leave the +# variables blank if you don't have or want Boost). All that +# matters are CC_BOOST_INCL and CC_BOOST_LINK. +# On my systems (there are two), they are here: BOOST32_PATH1 = \User\sheins\boost_1_66_0_x32 BOOST32_LIB1 = $(BOOST32_PATH1)\lib32-msvc-14.0 @@ -20,13 +26,56 @@ BOOST32_LIB2 = $(BOOST32_PATH2)\lib32-msvc-14.1 CC_BOOST_INCL = /I$(BOOST32_PATH1) /I$(BOOST32_PATH2) CC_BOOST_LINK = /link /LIBPATH:$(BOOST32_LIB1) /LIBPATH:$(BOOST32_LIB2) +# 2. The threading systems that you want in the DLL/executable. +# You will always get single-threading. If you have multiple +# threading systems, the default will be the multi-threading one +# with the lowest number (see System.cpp). All that matters is +# CC_THREADING. + +# GCD doesn't work on Windows. +THR_BOOST = /DDDS_THREADS_BOOST +THR_GCD = /DDDS_THREADS_GCD +THR_OPENMP = /DDDS_THREADS_OPENMP +THR_WINAPI = /DDDS_THREADS_WINAPI + +THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_WINAPI) + +# If you need to add something for a threading system, this is +# the place. + +THREAD_COMPILE = /openmp $(CC_BOOST_INCL) +THREAD_LINK = $(CC_BOOST_LINK) + +# 3. The small memory option, which causes DDS to consume a lot less +# memory and to run somewhat more slowly. + +SMALL_MEMORY = /DSMALL_MEMORY_OPTION + +# 4. Debugging options. (There are more granular options in debug.h.) + +DEBUG_ALL = /DDDS_DEBUG_ALL +TIMING = /DDDS_TIMING +SCHEDULER = /DDDS_SCHEDULER + +# All that matters from no. 3 and no. 4 is the following. Here you +# can add $(SMALL_MEMORY) etc. + +DDS_BEHAVIOR = + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_SOURCE = Makefiles/sources.txt +INCL_DEPENDS = Makefiles/depends_obj.txt + # If your Microsoft compiler is not called cl, change it here. CC = cl -CC_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs /openmp /DDDS_THREADS_BOOST -# CC_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs /openmp /DDDS_THREADS_BOOST /DDDS_DEBUG_ALL /DDDS_TIMING /DDDS_SCHEDULER -# These flags are not turned on by default, but DDS should pass them. -# Turn them on below. +# We compile with aggressive waqrning, but we have to turn off some +# of them as they appear in Windows libraries in great numbers... WARN_FLAGS = \ /Wall \ @@ -47,11 +96,12 @@ WARN_FLAGS = \ /wd5027 \ /WX -# Here you can turn on/off warnings. -# You can also add /DDDS_THREADS_SINGLE and add /DSMALL_MEMORY_OPTION. -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) +COMPILE_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs \ + $(WARN_FLAGS) \ + $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) -LIB_FLAGS = $(CC_BOOST_LINK) +LINK_FLAGS1 = /O2 /Oi /Ot /Oy /GL /EHs $(WARN_FLAGS) +LINK_FLAGS2 = $(THREAD_LINK) DLLBASE = dds DLL = $(DLLBASE).dll @@ -60,37 +110,16 @@ EXPORTER = Exports.def VFILE = ddsres -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolverIF.cpp \ - System.cpp \ - Timer.cpp \ - TimerGroup.cpp \ - TimerList.cpp \ - TimeStat.cpp \ - TimeStatList.cpp \ - TransTable.cpp +include $(INCL_SOURCE) OBJ_FILES = $(subst .cpp,.obj,$(SOURCE_FILES)) $(VFILE).obj vs: $(OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(OBJ_FILES) $(EXPORTER) $(LIB_FLAGS) /out:$(DLL) + $(CC) $(LINK_FLAGS1) $(OBJ_FILES) $(EXPORTER) \ + $(LINK_FLAGS2) /out:$(DLL) %.obj: %.cpp - $(CC) $(CC_FULL_FLAGS) $(CC_BOOST_INCL) /c $< + $(CC) $(COMPILE_FLAGS) /c $< $(DLLBASE).res: $(DLLBASE).rc windres $(DLLBASE).rc $(DLLBASE).res @@ -99,7 +128,7 @@ $(VFILE).obj: $(DLLBASE).res cvtres /MACHINE:X86 /OUT:$(VFILE).obj $(DLLBASE).res depend: - makedepend -Y -o.obj -- $(CC_FLAGS) -- $(SOURCE_FILES) + makedepend -Y -o.obj -- $(SOURCE_FILES) clean: rm -f $(OBJ_FILES) $(DLL) $(DLLBASE).{lib,exp,def,obj,res} @@ -110,61 +139,5 @@ install: cp $(DLL) $(DLIB) ../test cp $(DLL) $(DLIB) ../examples -# DO NOT DELETE - -dds.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -dds.obj: Init.h -ABsearch.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -ABsearch.obj: threadmem.h QuickTricks.h LaterTricks.h ABsearch.h -ABstats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -CalcTables.obj: dds.h debug.h ../include/portab.h TransTable.h -CalcTables.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -CalcTables.obj: Moves.h Scheduler.h SolveBoard.h PBN.h -DealerPar.obj: dds.h debug.h ../include/portab.h TransTable.h -DealerPar.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -DealerPar.obj: Moves.h Scheduler.h -Init.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -Init.obj: threadmem.h Init.h ABsearch.h System.h -LaterTricks.obj: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -LaterTricks.obj: Moves.h Scheduler.h threadmem.h LaterTricks.h -Moves.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -Moves.obj: ABsearch.h -Par.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -PlayAnalyser.obj: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -PlayAnalyser.obj: Moves.h Scheduler.h threadmem.h SolverIF.h System.h PBN.h -PBN.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h PBN.h -QuickTricks.obj: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -QuickTricks.obj: Moves.h Scheduler.h threadmem.h QuickTricks.h -Scheduler.obj: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -Scheduler.obj: Moves.h -SolveBoard.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -SolveBoard.obj: Moves.h Scheduler.h threadmem.h SolverIF.h SolveBoard.h -SolveBoard.obj: System.h PBN.h -SolverIF.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -SolverIF.obj: Init.h threadmem.h ABsearch.h SolverIF.h -System.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -System.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -System.obj: System.h SolveBoard.h PlayAnalyser.h -Timer.obj: Timer.h -TimerGroup.obj: TimerGroup.h Timer.h dds.h debug.h ../include/portab.h -TimerGroup.obj: TransTable.h ../include/dll.h TimerList.h ABstats.h Moves.h -TimerGroup.obj: Scheduler.h -TimerList.obj: TimerList.h TimerGroup.h Timer.h dds.h debug.h -TimerList.obj: ../include/portab.h TransTable.h ../include/dll.h ABstats.h -TimerList.obj: Moves.h Scheduler.h -TransTable.obj: dds.h debug.h ../include/portab.h TransTable.h -TransTable.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -TransTable.obj: Moves.h Scheduler.h +include $(INCL_DEPENDS) + diff --git a/src/Makefiles/depends_obj.txt b/src/Makefiles/depends_obj.txt new file mode 100644 index 00000000..ca16e40a --- /dev/null +++ b/src/Makefiles/depends_obj.txt @@ -0,0 +1,67 @@ +dds.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +dds.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +dds.obj: TimeStatList.h TimeStat.h Init.h +ABsearch.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABsearch.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +ABsearch.obj: TimeStatList.h TimeStat.h threadmem.h QuickTricks.h +ABsearch.obj: LaterTricks.h ABsearch.h +ABstats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABstats.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +ABstats.obj: TimeStatList.h TimeStat.h +CalcTables.obj: dds.h debug.h ../include/portab.h TransTable.h +CalcTables.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +CalcTables.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h SolveBoard.h +CalcTables.obj: PBN.h +DealerPar.obj: dds.h debug.h ../include/portab.h TransTable.h +DealerPar.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +DealerPar.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h +Init.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Init.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +Init.obj: TimeStatList.h TimeStat.h threadmem.h Init.h ABsearch.h System.h +LaterTricks.obj: dds.h debug.h ../include/portab.h TransTable.h +LaterTricks.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +LaterTricks.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +LaterTricks.obj: LaterTricks.h +Moves.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Moves.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +Moves.obj: TimeStatList.h TimeStat.h ABsearch.h +Par.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Par.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +Par.obj: TimeStatList.h TimeStat.h +PlayAnalyser.obj: dds.h debug.h ../include/portab.h TransTable.h +PlayAnalyser.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +PlayAnalyser.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +PlayAnalyser.obj: SolverIF.h System.h PBN.h +PBN.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +PBN.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +PBN.obj: TimeStatList.h TimeStat.h PBN.h +QuickTricks.obj: dds.h debug.h ../include/portab.h TransTable.h +QuickTricks.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +QuickTricks.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +QuickTricks.obj: QuickTricks.h +Scheduler.obj: Scheduler.h TimeStatList.h TimeStat.h dds.h debug.h +Scheduler.obj: ../include/portab.h TransTable.h ../include/dll.h TimerList.h +Scheduler.obj: TimerGroup.h Timer.h ABstats.h Moves.h +SolveBoard.obj: dds.h debug.h ../include/portab.h TransTable.h +SolveBoard.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +SolveBoard.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +SolveBoard.obj: SolverIF.h SolveBoard.h System.h PBN.h +SolverIF.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +SolverIF.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +SolverIF.obj: TimeStatList.h TimeStat.h Init.h threadmem.h ABsearch.h +SolverIF.obj: SolverIF.h +System.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +System.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +System.obj: TimeStatList.h TimeStat.h System.h SolveBoard.h PlayAnalyser.h +Timer.obj: Timer.h ../include/portab.h +TimerGroup.obj: TimerGroup.h Timer.h dds.h debug.h ../include/portab.h +TimerGroup.obj: TransTable.h ../include/dll.h TimerList.h ABstats.h Moves.h +TimerGroup.obj: Scheduler.h TimeStatList.h TimeStat.h +TimerList.obj: TimerList.h TimerGroup.h Timer.h dds.h debug.h +TimerList.obj: ../include/portab.h TransTable.h ../include/dll.h ABstats.h +TimerList.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h +TimeStat.obj: ../include/portab.h TimeStat.h +TimeStatList.obj: TimeStatList.h TimeStat.h ../include/portab.h +TransTable.obj: dds.h debug.h ../include/portab.h TransTable.h +TransTable.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +TransTable.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h diff --git a/src/Makefiles/sources.txt b/src/Makefiles/sources.txt new file mode 100644 index 00000000..e16fdc27 --- /dev/null +++ b/src/Makefiles/sources.txt @@ -0,0 +1,23 @@ +SOURCE_FILES = \ + dds.cpp \ + ABsearch.cpp \ + ABstats.cpp \ + CalcTables.cpp \ + DealerPar.cpp \ + Init.cpp \ + LaterTricks.cpp \ + Moves.cpp \ + Par.cpp \ + PlayAnalyser.cpp \ + PBN.cpp \ + QuickTricks.cpp \ + Scheduler.cpp \ + SolveBoard.cpp \ + SolverIF.cpp \ + System.cpp \ + Timer.cpp \ + TimerGroup.cpp \ + TimerList.cpp \ + TimeStat.cpp \ + TimeStatList.cpp \ + TransTable.cpp diff --git a/src/NOTES b/src/NOTES index 89edc57b..774f94f8 100644 --- a/src/NOTES +++ b/src/NOTES @@ -2,9 +2,6 @@ Makefile - One for each system -- Clean define's, WE control what gets compiled, not compiler -- Source files centrally -- Depends centrally dtest - Get laptop changes, no more time function calls diff --git a/src/System.cpp b/src/System.cpp index 12ce85af..4e3dba6a 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -120,6 +120,16 @@ void System::Reset() #else availableSystem[DDS_SYSTEM_THREAD_BOOST] = false; #endif + + // Take the first of any multi-threading system defined. + for (unsigned k = 1; k < availableSystem.size(); k++) + { + if (availableSystem[k]) + { + preferredSystem = k; + break; + } + } RunPtrList.resize(DDS_SYSTEM_THREAD_SIZE); RunPtrList[DDS_SYSTEM_THREAD_BASIC] = &System::RunThreadsBasic; diff --git a/src/Timer_new.cpp b/src/Timer_new.cpp deleted file mode 100644 index 65aa95a7..00000000 --- a/src/Timer_new.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2018 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - - -#include -#include -#include - -#include "Timer.h" -#include "../include/portab.h" - -using std::chrono::duration_cast; -using std::chrono::microseconds; - - -Timer::Timer() -{ - Timer::Reset(); -} - - -Timer::~Timer() -{ -} - - -void Timer::Reset() -{ - name = ""; - count = 0; - userCum = 0; - systCum = 0; -} - - -void Timer::SetName(const string& s) -{ - name = s; -} - - -void Timer::Start() -{ - user0 = Clock::now(); - syst0 = clock(); -} - - -void Timer::End() -{ - time_point user1 = Clock::now(); - clock_t syst1 = clock(); - - chrono::duration d = user1 - user0; - int tuser = static_cast(d.count()); - // int tuser = static_cast(1000. * d.count()); - - count++; - userCum += tuser; - systCum += static_cast((1000 * (syst1 - syst0)) / - static_cast(CLOCKS_PER_SEC)); -} - - -bool Timer::Used() const -{ - return (count > 0); -} - - -int Timer::UserTime() const -{ - return static_cast(userCum); -} - - -void Timer::operator +=(const Timer& add) -{ - count += add.count; - userCum += add.userCum; - systCum += add.systCum; -} - - -void Timer::operator -=(const Timer& deduct) -{ - if (deduct.userCum > userCum) - userCum = 0; - else - userCum -= deduct.userCum; - - if (deduct.systCum > systCum) - systCum = 0; - else - systCum -= deduct.systCum; -} - - -string Timer::SumLine( - const Timer& divisor, - const string& bname) const -{ - stringstream ss; - if (count > 0) - { - ss << setw(14) << left << (bname == "" ? name : bname) << - setw(9) << right << count << - setw(11) << userCum << - setw(7) << setprecision(2) << fixed << - userCum / static_cast(count) << - setw(5) << setprecision(1) << fixed << - 100. * userCum / divisor.userCum << - setw(11) << setprecision(0) << fixed << 1000. * systCum << - setw(7) << setprecision(2) << fixed << - 1000. * systCum / static_cast(count) << - setw(5) << setprecision(1) << fixed << - 100. * systCum / divisor.systCum << "\n"; - } - else - { - ss << setw(14) << left << (bname == "" ? name : bname) << - setw(9) << right << count << - setw(11) << userCum << - setw(7) << "-" << - setw(5) << "-" << - setw(11) << 1000 * systCum << - setw(7) << "-" << - setw(5) << "-" << "\n"; - } - return ss.str(); -} - - -string Timer::DetailLine() const -{ - stringstream ss; - ss << setw(15) << left << name << - setw(10) << right << count << - setw(11) << right << userCum << - setw(11) << setprecision(2) << fixed << - userCum / static_cast(count) << - setw(11) << setprecision(0) << fixed << - 1000. * systCum << - setw(11) << setprecision(2) << fixed << - 1000. * systCum / static_cast(count) << "\n"; - - return ss.str(); -} diff --git a/src/Timer_new.h b/src/Timer_new.h deleted file mode 100644 index ac9589e2..00000000 --- a/src/Timer_new.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2018 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - -#ifndef DDS_TIMING_H -#define DDS_TIMING_H - -#include -#include - -using Clock = std::chrono::steady_clock; -using std::chrono::time_point; - -using namespace std; - - -class Timer -{ - private: - - string name; - int count; - long userCum; - long systCum; - - time_point user0; - clock_t syst0; - - public: - - Timer(); - - ~Timer(); - - void Reset(); - - void SetName(const string& s); - - void Start(); - - void End(); - - bool Used() const; - - int UserTime() const; - - void operator += (const Timer& add); - - void operator -= (const Timer& deduct); - - string SumLine( - const Timer& divisor, - const string& bname = "") const; - - string DetailLine() const; -}; - -#endif diff --git a/src/Timer_old.cpp b/src/Timer_old.cpp deleted file mode 100644 index 8e38a1aa..00000000 --- a/src/Timer_old.cpp +++ /dev/null @@ -1,170 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2018 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - - -/* - See Timer.h for some description. -*/ - -#include -#include -#include - -#include "Timer.h" - -using namespace std; - - -Timer::Timer() -{ - Timer::Reset(); -} - - -Timer::~Timer() -{ -} - - -void Timer::Reset() -{ - count = 0; - userCum = 0; - systCum = 0.; -} - - -void Timer::SetName(const string& s) -{ - name = s; -} - - -void Timer::Start() -{ - systTimes0 = clock(); - -#ifdef _MSC_VER - QueryPerformanceCounter(&userTimes0); -#else - gettimeofday(&userTimes0, nullptr); -#endif -} - - -void Timer::End() -{ - systTimes1 = clock(); - -#ifdef _MSC_VER - QueryPerformanceCounter(&userTimes1); - int timeUser = static_cast - (userTimes1.QuadPart - userTimes0.QuadPart); -#else - gettimeofday(&userTimes1, nullptr); - return 1000 * (userTimes1.tv_sec - userTimer0.tv_sec ) - + (userTimes1.tv_usec - userTimer0.tv_usec) / 1000; -#endif - - count++; - - // This is more or less in milli-seconds except on Windows, - // where it is in "wall ticks". It is possible to convert - // to milli-seconds, but the resolution is so poor for fast - // functions that I leave it in integer form. - - userCum += timeUser; - systCum += systTimes1 - systTimes0; -} - - -bool Timer::Used() const -{ - return (count > 0); -} - - -int Timer::UserTime() const -{ - return static_cast(userCum); -} - - -void Timer::operator +=(const Timer& add) -{ - count += add.count; - userCum += add.userCum; - systCum += add.systCum; -} - - -void Timer::operator -=(const Timer& deduct) -{ - if (deduct.userCum > userCum) - userCum = 0; - else - userCum -= deduct.userCum; - - if (deduct.systCum > systCum) - systCum = 0; - else - systCum -= deduct.systCum; -} - - -string Timer::SumLine( - const Timer& divisor, - const string& bname) const -{ - stringstream ss; - if (count > 0) - { - ss << setw(14) << left << (bname == "" ? name : bname) << - setw(9) << right << count << - setw(11) << userCum << - setw(7) << setprecision(2) << fixed << - userCum / static_cast(count) << - setw(5) << setprecision(1) << fixed << - 100. * userCum / divisor.userCum << - setw(11) << setprecision(0) << fixed << 1000. * systCum << - setw(7) << setprecision(2) << fixed << - 1000. * systCum / static_cast(count) << - setw(5) << setprecision(1) << fixed << - 100. * systCum / divisor.systCum << "\n"; - } - else - { - ss << setw(14) << left << (bname == "" ? name : bname) << - setw(9) << right << count << - setw(11) << userCum << - setw(7) << "-" << - setw(5) << "-" << - setw(11) << 1000 * systCum << - setw(7) << "-" << - setw(5) << "-" << "\n"; - } - return ss.str(); -} - - -string Timer::DetailLine() const -{ - stringstream ss; - ss << setw(15) << left << name << - setw(10) << right << count << - setw(11) << right << userCum << - setw(11) << setprecision(2) << fixed << - userCum / static_cast(count) << - setw(11) << setprecision(0) << fixed << - 1000. * systCum << - setw(11) << setprecision(2) << fixed << - 1000. * systCum / static_cast(count) << "\n"; - - return ss.str(); -} diff --git a/src/Timer_old.h b/src/Timer_old.h deleted file mode 100644 index 682f4c1b..00000000 --- a/src/Timer_old.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2018 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - -#ifndef DDS_TIMING_H -#define DDS_TIMING_H - -#include - -#include -#include - -#ifdef _MSC_VER - #include -#else - #include -#endif - -using namespace std; - - -class Timer -{ - private: - - clock_t systTimes0; - clock_t systTimes1; - -#ifdef _MSC_VER - LARGE_INTEGER userTimes0; - LARGE_INTEGER userTimes1; -#else - timeval userTimes0; - timeval userTimes1; -#endif - - string name; - int count; - int64_t userCum; - double systCum; - - public: - - Timer(); - - ~Timer(); - - void Reset(); - - void SetName(const string& s); - - void Start(); - - void End(); - - bool Used() const; - - int UserTime() const; - - void operator += (const Timer& add); - - void operator -= (const Timer& deduct); - - string SumLine( - const Timer& divisor, - const string& bname = "") const; - - string DetailLine() const; -}; - -#endif From 7862d0f8b6ec5deaac1df7e841c4768bb0218248 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 18 Mar 2018 13:32:28 +0100 Subject: [PATCH 022/132] Now Makefile_Cygwin works for all threading systems --- src/Exports.def | 4 +- src/Init.cpp | 6 + src/Makefiles/Makefile_Visual | 200 +++++++++++---------------- src/Makefiles/Makefile_Visual_all | 143 -------------------- src/Makefiles/Makefile_Visual_boost | 179 ------------------------ src/Makefiles/Makefile_cygwin | 203 +++++++++++----------------- src/Makefiles/Makefile_cygwin_all | 163 ---------------------- src/Makefiles/Makefile_cygwin_boost | 194 -------------------------- src/Makefiles/depends_o.txt | 66 +++++++++ src/PlayAnalyser.cpp | 2 + src/System.cpp | 4 +- src/Timer.cpp | 3 +- test/dtest.cpp | 3 +- 13 files changed, 242 insertions(+), 928 deletions(-) delete mode 100644 src/Makefiles/Makefile_Visual_all delete mode 100644 src/Makefiles/Makefile_Visual_boost delete mode 100644 src/Makefiles/Makefile_cygwin_all delete mode 100644 src/Makefiles/Makefile_cygwin_boost create mode 100644 src/Makefiles/depends_o.txt diff --git a/src/Exports.def b/src/Exports.def index edd0d388..6ce2f452 100644 --- a/src/Exports.def +++ b/src/Exports.def @@ -2,8 +2,8 @@ LIBRARY dds EXPORTS SetMaxThreads SetMaxThreads@4 = SetMaxThreads - PreferThreading - PreferThreading@4 = PreferThreading + SetThreading + SetThreading@4 = SetThreading FreeMemory FreeMemory@0 = FreeMemory ErrorMessage diff --git a/src/Init.cpp b/src/Init.cpp index 270e7f83..88301008 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -23,6 +23,12 @@ double ConstantMemoryUsed(); void FreeThreadMem(); +void CalcThreadMemory( + const int oldNoOfThreads, + const int kilobytesUsable, + int& mem_def, + int& mem_max); + localVarType localVar[MAXNOOFTHREADS]; System sysdep; Scheduler scheduler; diff --git a/src/Makefiles/Makefile_Visual b/src/Makefiles/Makefile_Visual index 565017c0..5e127890 100644 --- a/src/Makefiles/Makefile_Visual +++ b/src/Makefiles/Makefile_Visual @@ -1,50 +1,107 @@ -# This the DDS Makefile for Windows and the Microsoft Visual C++ -# compiler. It does assume a Unix-like setup for some commands, -# but if you only want to call "make" with the default target, -# you should be OK. +# --------------------- INFORMATION -------------------------------- -# If you want to compile a single-threaded version, use -# DDS_THREADS=none +# This the DDS Makefile for Windows and the Microsoft Visual C++ +# compiler. It assumes a Unix-like setup for some commands. # The "windres" and "cvtres" tools are used for putting version # information into the DLL in a way that Windows can see. # It is not mandatory, and if you don't have those tools, # You can remove $(VFILE).obj in the target line below. +# --------------------- CONFIGURATION ------------------------------ + +# You can configure the following: +# +# 1. The location of the Boost libraries (you can leave the +# variables blank if you don't have or want Boost). All that +# matters are CC_BOOST_INCL and CC_BOOST_LINK. +# On my systems (there are two), they are here: + +BOOST32_PATH1 = \User\sheins\boost_1_66_0_x32 +BOOST32_LIB1 = $(BOOST32_PATH1)\lib32-msvc-14.0 + +BOOST32_PATH2 = \Users\s.hein\Documents\Programs\boost_1_66_0_x32_14_1 +BOOST32_LIB2 = $(BOOST32_PATH2)\lib32-msvc-14.1 + +CC_BOOST_INCL = /I$(BOOST32_PATH1) /I$(BOOST32_PATH2) +CC_BOOST_LINK = /link /LIBPATH:$(BOOST32_LIB1) /LIBPATH:$(BOOST32_LIB2) + +# 2. The threading systems that you want in the DLL/executable. +# You will always get single-threading. If you have multiple +# threading systems, the default will be the multi-threading one +# with the lowest number (see System.cpp). All that matters is +# CC_THREADING. + +# GCD doesn't work on Windows. +THR_BOOST = /DDDS_THREADS_BOOST +THR_GCD = /DDDS_THREADS_GCD +THR_OPENMP = /DDDS_THREADS_OPENMP +THR_WINAPI = /DDDS_THREADS_WINAPI + +THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_WINAPI) + +# If you need to add something for a threading system, this is +# the place. + +THREAD_COMPILE = /openmp $(CC_BOOST_INCL) +THREAD_LINK = $(CC_BOOST_LINK) + +# 3. The small memory option, which causes DDS to consume a lot less +# memory and to run somewhat more slowly. + +SMALL_MEMORY = /DSMALL_MEMORY_OPTION + +# 4. Debugging options. (There are more granular options in debug.h.) + +DEBUG_ALL = /DDDS_DEBUG_ALL +TIMING = /DDDS_TIMING +SCHEDULER = /DDDS_SCHEDULER + +# All that matters from no. 3 and no. 4 is the following. Here you +# can add $(SMALL_MEMORY) etc. + +DDS_BEHAVIOR = + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_SOURCE = Makefiles/sources.txt +INCL_DEPENDS = Makefiles/depends_obj.txt # If your Microsoft compiler is not called cl, change it here. CC = cl -CC_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs -# These flags are not turned on by default, but DDS should pass them. -# Turn them on below. +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in Windows libraries in great numbers... + WARN_FLAGS = \ /Wall \ - /wd4127 \ /wd4365 \ /wd4464 \ + /wd4514 \ /wd4555 \ /wd4571 \ /wd4625 \ /wd4626 \ /wd4668 \ - /wd4701 \ /wd4710 \ /wd4711 \ /wd4774 \ /wd4820 \ - /wd4986 \ - /wd4987 \ /wd4996 \ /wd5026 \ /wd5027 \ /WX -# Here you can turn on warnings and add /DSMALL_MEMORY_OPTION. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) +COMPILE_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs \ + $(WARN_FLAGS) \ + $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) -LIB_FLAGS = /link /DLL +LINK_FLAGS1 = /O2 /Oi /Ot /Oy /GL /EHs $(WARN_FLAGS) +LINK_FLAGS2 = $(THREAD_LINK) DLLBASE = dds DLL = $(DLLBASE).dll @@ -53,46 +110,16 @@ EXPORTER = Exports.def VFILE = ddsres -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolveBoard_basic.cpp \ - SolveBoard_boost.cpp \ - SolveBoard_GCD.cpp \ - SolveBoard_OpenMP.cpp \ - SolveBoard_WinAPI.cpp \ - SolverIF.cpp \ - Stats.cpp \ - System.cpp \ - Timer.cpp \ - TransTable.cpp +include $(INCL_SOURCE) OBJ_FILES = $(subst .cpp,.obj,$(SOURCE_FILES)) $(VFILE).obj -ifeq ($(DDS_THREADS),none) -DDS_THR = /DDDS_THREADS_SINGLE -else -DDS_THR = -endif - - vs: $(OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(OBJ_FILES) $(EXPORTER) $(LIB_FLAGS) /out:$(DLL) + $(CC) $(LINK_FLAGS1) $(OBJ_FILES) $(EXPORTER) \ + $(LINK_FLAGS2) /out:$(DLL) %.obj: %.cpp - $(CC) $(CC_FULL_FLAGS) $(DDS_THR) /c $< + $(CC) $(COMPILE_FLAGS) /c $< $(DLLBASE).res: $(DLLBASE).rc windres $(DLLBASE).rc $(DLLBASE).res @@ -101,7 +128,7 @@ $(VFILE).obj: $(DLLBASE).res cvtres /MACHINE:X86 /OUT:$(VFILE).obj $(DLLBASE).res depend: - makedepend -Y -o.obj -- $(CC_FLAGS) -- $(SOURCE_FILES) + makedepend -Y -o.obj -- $(SOURCE_FILES) clean: rm -f $(OBJ_FILES) $(DLL) $(DLLBASE).{lib,exp,def,obj,res} @@ -112,70 +139,5 @@ install: cp $(DLL) $(DLIB) ../test cp $(DLL) $(DLIB) ../examples -# DO NOT DELETE - -dds.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -ABsearch.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -ABsearch.obj: QuickTricks.h LaterTricks.h ABsearch.h -ABstats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.obj: dds.h debug.h ../include/portab.h TransTable.h -CalcTables.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -CalcTables.obj: Scheduler.h SolveBoard.h PBN.h -DealerPar.obj: dds.h debug.h ../include/portab.h TransTable.h -DealerPar.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Init.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.obj: ABsearch.h System.h -LaterTricks.obj: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -LaterTricks.obj: Scheduler.h threadmem.h LaterTricks.h -Moves.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -PlayAnalyser.obj: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.obj: Scheduler.h threadmem.h SolverIF.h PBN.h -PBN.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.obj: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -QuickTricks.obj: Scheduler.h threadmem.h QuickTricks.h -Scheduler.obj: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.obj: Scheduler.h threadmem.h SolverIF.h SolveBoard.h PBN.h -SolveBoard.obj: SolveBoard_basic.h SolveBoard_boost.h SolveBoard_GCD.h -SolveBoard.obj: SolveBoard_OpenMP.h SolveBoard_WinAPI.h -SolveBoard_basic.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_basic.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_basic.obj: Scheduler.h SolveBoard.h SolveBoard_basic.h -SolveBoard_boost.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_boost.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_boost.obj: Scheduler.h SolveBoard.h SolveBoard_boost.h -SolveBoard_GCD.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_GCD.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_GCD.obj: Scheduler.h SolveBoard.h SolveBoard_GCD.h -SolveBoard_OpenMP.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_OpenMP.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_OpenMP.obj: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h -SolveBoard_WinAPI.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_WinAPI.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_WinAPI.obj: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h -SolverIF.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -SolverIF.obj: threadmem.h ABsearch.h SolverIF.h -Stats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Stats.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -System.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -System.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h System.h -System.obj: SolveBoard.h -Timer.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Timer.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -TransTable.obj: dds.h debug.h ../include/portab.h TransTable.h -TransTable.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -TransTable.obj: Scheduler.h +include $(INCL_DEPENDS) + diff --git a/src/Makefiles/Makefile_Visual_all b/src/Makefiles/Makefile_Visual_all deleted file mode 100644 index 0283aaf5..00000000 --- a/src/Makefiles/Makefile_Visual_all +++ /dev/null @@ -1,143 +0,0 @@ -# --------------------- INFORMATION -------------------------------- - -# This the DDS Makefile for Windows and the Microsoft Visual C++ -# compiler. It assumes a Unix-like setup for some commands. - -# The "windres" and "cvtres" tools are used for putting version -# information into the DLL in a way that Windows can see. -# It is not mandatory, and if you don't have those tools, -# You can remove $(VFILE).obj in the target line below. - -# --------------------- CONFIGURATION ------------------------------ - -# You can configure the following: -# -# 1. The location of the Boost libraries (you can leave the -# variables blank if you don't have or want Boost). All that -# matters are CC_BOOST_INCL and CC_BOOST_LINK. -# On my systems (there are two), they are here: - -BOOST32_PATH1 = \User\sheins\boost_1_66_0_x32 -BOOST32_LIB1 = $(BOOST32_PATH1)\lib32-msvc-14.0 - -BOOST32_PATH2 = \Users\s.hein\Documents\Programs\boost_1_66_0_x32_14_1 -BOOST32_LIB2 = $(BOOST32_PATH2)\lib32-msvc-14.1 - -CC_BOOST_INCL = /I$(BOOST32_PATH1) /I$(BOOST32_PATH2) -CC_BOOST_LINK = /link /LIBPATH:$(BOOST32_LIB1) /LIBPATH:$(BOOST32_LIB2) - -# 2. The threading systems that you want in the DLL/executable. -# You will always get single-threading. If you have multiple -# threading systems, the default will be the multi-threading one -# with the lowest number (see System.cpp). All that matters is -# CC_THREADING. - -# GCD doesn't work on Windows. -THR_BOOST = /DDDS_THREADS_BOOST -THR_GCD = /DDDS_THREADS_GCD -THR_OPENMP = /DDDS_THREADS_OPENMP -THR_WINAPI = /DDDS_THREADS_WINAPI - -THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_WINAPI) - -# If you need to add something for a threading system, this is -# the place. - -THREAD_COMPILE = /openmp $(CC_BOOST_INCL) -THREAD_LINK = $(CC_BOOST_LINK) - -# 3. The small memory option, which causes DDS to consume a lot less -# memory and to run somewhat more slowly. - -SMALL_MEMORY = /DSMALL_MEMORY_OPTION - -# 4. Debugging options. (There are more granular options in debug.h.) - -DEBUG_ALL = /DDDS_DEBUG_ALL -TIMING = /DDDS_TIMING -SCHEDULER = /DDDS_SCHEDULER - -# All that matters from no. 3 and no. 4 is the following. Here you -# can add $(SMALL_MEMORY) etc. - -DDS_BEHAVIOR = - -# ----------------------- OFTEN OK ------------------------------ - -# From here on you you don't have to change anything to CONFIGURE -# the compilation. But you may well have to change something to -# get it to compile. - -INCL_SOURCE = Makefiles/sources.txt -INCL_DEPENDS = Makefiles/depends_obj.txt - -# If your Microsoft compiler is not called cl, change it here. -CC = cl - -# We compile with aggressive waqrning, but we have to turn off some -# of them as they appear in Windows libraries in great numbers... - -WARN_FLAGS = \ - /Wall \ - /wd4365 \ - /wd4464 \ - /wd4514 \ - /wd4555 \ - /wd4571 \ - /wd4625 \ - /wd4626 \ - /wd4668 \ - /wd4710 \ - /wd4711 \ - /wd4774 \ - /wd4820 \ - /wd4996 \ - /wd5026 \ - /wd5027 \ - /WX - -COMPILE_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs \ - $(WARN_FLAGS) \ - $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) - -LINK_FLAGS1 = /O2 /Oi /Ot /Oy /GL /EHs $(WARN_FLAGS) -LINK_FLAGS2 = $(THREAD_LINK) - -DLLBASE = dds -DLL = $(DLLBASE).dll -DLIB = $(DLLBASE).lib -EXPORTER = Exports.def - -VFILE = ddsres - -include $(INCL_SOURCE) - -OBJ_FILES = $(subst .cpp,.obj,$(SOURCE_FILES)) $(VFILE).obj - -vs: $(OBJ_FILES) - $(CC) $(LINK_FLAGS1) $(OBJ_FILES) $(EXPORTER) \ - $(LINK_FLAGS2) /out:$(DLL) - -%.obj: %.cpp - $(CC) $(COMPILE_FLAGS) /c $< - -$(DLLBASE).res: $(DLLBASE).rc - windres $(DLLBASE).rc $(DLLBASE).res - -$(VFILE).obj: $(DLLBASE).res - cvtres /MACHINE:X86 /OUT:$(VFILE).obj $(DLLBASE).res - -depend: - makedepend -Y -o.obj -- $(SOURCE_FILES) - -clean: - rm -f $(OBJ_FILES) $(DLL) $(DLLBASE).{lib,exp,def,obj,res} - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(DLL) $(DLIB) ../test - cp $(DLL) $(DLIB) ../examples - -include $(INCL_DEPENDS) - diff --git a/src/Makefiles/Makefile_Visual_boost b/src/Makefiles/Makefile_Visual_boost deleted file mode 100644 index 0c60d1f6..00000000 --- a/src/Makefiles/Makefile_Visual_boost +++ /dev/null @@ -1,179 +0,0 @@ -# This the DDS Makefile for Windows and the Microsoft Visual C++ -# compiler. It does assume a Unix-like setup for some commands, -# but if you only want to call "make" with the default target, -# you should be OK. If not, see Makefile_Visual_Windows. - -# Unlike Makefile_Visual, this Makefile uses Boost for -# multi-threading. You can still set -# DDS_THREADS=none - -BOOST32_PATH = \User\sheins\boost_1_66_0_x32 -BOOST32_LIB = $(BOOST32_PATH)\lib32-msvc-14.0 - -CC_BOOST_INCL = /I$(BOOST32_PATH) -CC_BOOST_LINK = /link /LIBPATH:$(BOOST32_LIB) - -# The "windres" and "cvtres" tools are used for putting version -# information into the DLL in a way that Windows can see. -# It is not mandatory, and if you don't have those tools, -# You can remove $(VFILE).obj in the target line below. - - -# If your Microsoft compiler is not called cl, change it here. -CC = cl -CC_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs - -# These flags are not turned on by default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - /Wall \ - /wd4127 \ - /wd4464 \ - /wd4555 \ - /wd4625 \ - /wd4626 \ - /wd4668 \ - /wd4701 \ - /wd4710 \ - /wd4711 \ - /wd4820 \ - /wd4986 \ - /wd4987 \ - /wd4996 \ - /WX - -# Here you can turn on warnings and add /DSMALL_MEMORY_OPTION. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -LIB_FLAGS = $(CC_BOOST_LINK) - -DLLBASE = dds -DLL = $(DLLBASE).dll -DLIB = $(DLLBASE).lib -EXPORTER = Exports.def - -VFILE = ddsres - -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolveBoard_basic.cpp \ - SolveBoard_boost.cpp \ - SolveBoard_GCD.cpp \ - SolveBoard_OpenMP.cpp \ - SolveBoard_WinAPI.cpp \ - SolverIF.cpp \ - Stats.cpp \ - Timer.cpp \ - TransTable.cpp - -OBJ_FILES = $(subst .cpp,.obj,$(SOURCE_FILES)) $(VFILE).obj - -ifeq ($(DDS_THREADS),none) -DDS_THR = /DDDS_THREADS_SINGLE -else -DDS_THR = /DDDS_THREADS_BOOST -endif - - -vs: $(OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(OBJ_FILES) $(EXPORTER) $(LIB_FLAGS) /DLL /out:$(DLL) - -%.obj: %.cpp - $(CC) $(CC_FULL_FLAGS) $(DDS_THR) $(CC_BOOST_INCL) /c $< - -$(DLLBASE).res: $(DLLBASE).rc - windres $(DLLBASE).rc $(DLLBASE).res - -$(VFILE).obj: $(DLLBASE).res - cvtres /MACHINE:X86 /OUT:$(VFILE).obj $(DLLBASE).res - -depend: - makedepend -Y -o.obj -- $(CC_FLAGS) -- $(SOURCE_FILES) - -clean: - rm -f $(OBJ_FILES) $(DLL) $(DLLBASE).{lib,exp,def,obj,res} - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(DLL) $(DLIB) ../test - cp $(DLL) $(DLIB) ../examples - -# DO NOT DELETE - -dds.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -ABsearch.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -ABsearch.obj: QuickTricks.h LaterTricks.h ABsearch.h -ABstats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.obj: dds.h debug.h ../include/portab.h TransTable.h -CalcTables.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -CalcTables.obj: Scheduler.h SolveBoard.h PBN.h -DealerPar.obj: dds.h debug.h ../include/portab.h TransTable.h -DealerPar.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Init.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.obj: ABsearch.h -LaterTricks.obj: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -LaterTricks.obj: Scheduler.h threadmem.h LaterTricks.h -Moves.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -PlayAnalyser.obj: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.obj: Scheduler.h threadmem.h SolverIF.h PBN.h -PBN.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.obj: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -QuickTricks.obj: Scheduler.h threadmem.h QuickTricks.h -Scheduler.obj: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.obj: Scheduler.h threadmem.h SolverIF.h SolveBoard.h PBN.h -SolveBoard.obj: SolveBoard_basic.h SolveBoard_boost.h SolveBoard_GCD.h -SolveBoard.obj: SolveBoard_OpenMP.h SolveBoard_WinAPI.h -SolveBoard_basic.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_basic.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_basic.obj: Scheduler.h SolveBoard.h SolveBoard_basic.h -SolveBoard_boost.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_boost.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_boost.obj: Scheduler.h SolveBoard.h SolveBoard_boost.h -SolveBoard_GCD.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_GCD.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_GCD.obj: Scheduler.h SolveBoard.h SolveBoard_GCD.h -SolveBoard_OpenMP.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_OpenMP.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_OpenMP.obj: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h -SolveBoard_WinAPI.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_WinAPI.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_WinAPI.obj: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h -SolverIF.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -SolverIF.obj: threadmem.h ABsearch.h SolverIF.h -Stats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Stats.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Timer.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Timer.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -TransTable.obj: dds.h debug.h ../include/portab.h TransTable.h -TransTable.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -TransTable.obj: Scheduler.h diff --git a/src/Makefiles/Makefile_cygwin b/src/Makefiles/Makefile_cygwin index a8648a0b..c09f2052 100644 --- a/src/Makefiles/Makefile_cygwin +++ b/src/Makefiles/Makefile_cygwin @@ -1,35 +1,70 @@ -# This the DDS Makefile for Cygwin under Windows and the -# GNU g++ compiler. It does assume a Unix-like setup for some -# commands, but if you only want to call "make" with the default -# target, you should be OK. +# --------------------- INFORMATION -------------------------------- -# If you want to compile a single-threaded version, use -# DDS_THREADS=none +# This the DDS Makefile for Windows and the Cygwin GNU g++ +# compiler. It assumes a Unix-like setup for some commands. # The "windres" and "cvtres" tools are used for putting version # information into the DLL in a way that Windows can see. # It is not mandatory, and if you don't have those tools, # You can remove $(VFILE).obj in the target line below. +# --------------------- CONFIGURATION ------------------------------ + +# You can configure the following: + +# 1. The threading systems that you want in the DLL/executable. +# You will always get single-threading. If you have multiple +# threading systems, the default will be the multi-threading one +# with the lowest number (see System.cpp). All that matters is +# CC_THREADING. + +# GCD doesn't work on Windows. +THR_BOOST = -DDDS_THREADS_BOOST +THR_GCD = -DDDS_THREADS_GCD +THR_OPENMP = -DDDS_THREADS_OPENMP +THR_WINAPI = -DDDS_THREADS_WINAPI + +THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_WINAPI) + +# If you need to add something for a threading system, this is +# the place. + +CC_BOOST_LINK = -lboost_system -lboost_thread + +THREAD_COMPILE = -fopenmp +THREAD_LINK = $(CC_BOOST_LINK) + +# 2. The small memory option, which causes DDS to consume a lot less +# memory and to run somewhat more slowly. + +SMALL_MEMORY = -DSMALL_MEMORY_OPTION + +# 3. Debugging options. (There are more granular options in debug.h.) + +DEBUG_ALL = -DDDS_DEBUG_ALL +TIMING = -DDDS_TIMING +SCHEDULER = -DDDS_SCHEDULER + +# All that matters from no. 3 and no. 4 is the following. Here you +# can add $(SMALL_MEMORY) etc. + +DDS_BEHAVIOR = + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_SOURCE = Makefiles/sources.txt +INCL_DEPENDS = Makefiles/depends_obj.txt # If your compiler name is not given here, change it. CC = g++ -# Use this one to get Windows multi-threading -# CC_FLAGS = -O3 -flto -mtune=generic -fno-use-linker-plugin -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -fopenmp -mtune=generic -fno-use-linker-plugin +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... -LD_FLAGS = \ - -Wl,--subsystem,windows \ - -Wl,--output-def,$(DLLBASE).def \ - -Wl,--dynamicbase \ - -Wl,--nxcompat \ - -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup - -# These flags are not turned on be default, but DDS should pass them. -# Turn them on below. WARN_FLAGS = \ -Wshadow \ -Wsign-conversion \ @@ -55,59 +90,38 @@ WARN_FLAGS = \ -Wno-unknown-pragmas \ -Wno-long-long -# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) +COMPILE_FLAGS = -O3 -flto -fopenmp -mtune=generic -fno-use-linker-plugin \ + $(WARN_FLAGS) \ + $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) -LIB_FLAGS = -shared +LINK1_FLAGS = -shared -fopenmp +LINK2_FLAGS = \ + -Wl,--subsystem,windows \ + -Wl,--output-def,$(DLLBASE).def \ + -Wl,--dynamicbase \ + -Wl,--nxcompat \ + -Wl,--no-seh \ + -Wl,--enable-stdcall-fixup \ + $(THREAD_LINK) DLLBASE = dds DLL = $(DLLBASE).dll +DLIB = $(DLLBASE).lib EXPORTER = Exports.def VFILE = ddsres WINDRES_FLAG = -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolveBoard_basic.cpp \ - SolveBoard_boost.cpp \ - SolveBoard_GCD.cpp \ - SolveBoard_OpenMP.cpp \ - SolveBoard_WinAPI.cpp \ - SolverIF.cpp \ - Stats.cpp \ - System.cpp \ - Timer.cpp \ - TransTable.cpp +include $(INCL_SOURCE) O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o -ifeq ($(DDS_THREADS),none) -DDS_THR = -DDDS_THREADS_SINGLE -else -DDS_THR = -endif - - cygwin: $(O_FILES) - $(CC) $(LIB_FLAGS) $(CC_FULL_FLAGS) $(O_FILES) $(LD_FLAGS) $(EXPORTER) -o $(DLL) + $(CC) $(LINK1_FLAGS) $(O_FILES) \ + $(LINK2_FLAGS) $(EXPORTER) -o $(DLL) %.o: %.cpp - $(CC) $(CC_FULL_FLAGS) $(DDS_THR) -c $< + $(CC) $(COMPILE_FLAGS) -c $< $(DLLBASE).res: $(DLLBASE).rc windres $(DLLBASE).rc $(DLLBASE).res @@ -116,7 +130,7 @@ $(VFILE).o: $(DLLBASE).rc windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o depend: - makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) + makedepend -Y -- $(SOURCE_FILES) clean: rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} @@ -127,69 +141,10 @@ install: cp $(DLL) $(DLLBASE).def ../test cp $(DLL) $(DLLBASE).def ../examples +include $(INCL_DEPENDS) + + -# DO NOT DELETE - -dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -ABsearch.o: QuickTricks.h LaterTricks.h ABsearch.h -ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -CalcTables.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h -CalcTables.o: PBN.h -DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -DealerPar.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.o: ABsearch.h -LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -LaterTricks.o: threadmem.h LaterTricks.h -Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.o: Scheduler.h threadmem.h SolverIF.h PBN.h -PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -QuickTricks.o: threadmem.h QuickTricks.h -Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -SolveBoard.o: SolverIF.h SolveBoard.h PBN.h SolveBoard_basic.h -SolveBoard.o: SolveBoard_boost.h SolveBoard_GCD.h SolveBoard_OpenMP.h -SolveBoard.o: SolveBoard_WinAPI.h -SolveBoard_basic.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_basic.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_basic.o: Scheduler.h SolveBoard.h SolveBoard_basic.h -SolveBoard_boost.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_boost.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_boost.o: Scheduler.h SolveBoard.h SolveBoard_boost.h -SolveBoard_GCD.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_GCD.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_GCD.o: Scheduler.h SolveBoard.h SolveBoard_GCD.h -SolveBoard_OpenMP.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_OpenMP.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_OpenMP.o: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h -SolveBoard_WinAPI.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_WinAPI.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_WinAPI.o: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h -SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h -SolverIF.o: ABsearch.h SolverIF.h -Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -System.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -System.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -TransTable.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h +vs: $(OBJ_FILES) + $(CC) $(LINK_FLAGS1) $(OBJ_FILES) $(EXPORTER) \ + $(LINK_FLAGS2) /out:$(DLL) diff --git a/src/Makefiles/Makefile_cygwin_all b/src/Makefiles/Makefile_cygwin_all deleted file mode 100644 index 0593c597..00000000 --- a/src/Makefiles/Makefile_cygwin_all +++ /dev/null @@ -1,163 +0,0 @@ -# This the DDS Makefile for Cygwin under Windows and the -# GNU g++ compiler. It assumes a Unix-like setup for some commands. - -# The "windres" and "cvtres" tools are used for putting version -# information into the DLL in a way that Windows can see. -# It is not mandatory, and if you don't have those tools, -# You can remove $(VFILE).obj in the target line below. - -# If you want to compile a single-threaded version or a small-memory -# version, change flags below. - -# If your compiler name is not given here, change it. -CC = g++ - -CC_FLAGS = -O3 -flto -fopenmp -mtune=generic -fno-use-linker-plugin - -LD_FLAGS = \ - -Wl,--subsystem,windows \ - -Wl,--output-def,$(DLLBASE).def \ - -Wl,--dynamicbase \ - -Wl,--nxcompat \ - -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup \ - -lboost_system \ - -lboost_thread - -# These flags are not turned on be default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Wformat=2 \ - -Winit-self \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wnoexcept \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wredundant-decls \ - -Wsign-promo \ - -Wstrict-null-sentinel \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long - -# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION -# and/or -DDDS_THREADS_SINGLE. -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) -DDDS_THREADS_BOOST - -LIB_FLAGS = -shared - -DLLBASE = dds -DLL = $(DLLBASE).dll -EXPORTER = Exports.def - -VFILE = ddsres -WINDRES_FLAG = - -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolverIF.cpp \ - Stats.cpp \ - System.cpp \ - Timer.cpp \ - TransTable.cpp - -O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o - - -cygwin: $(O_FILES) - $(CC) $(LIB_FLAGS) $(CC_FULL_FLAGS) $(O_FILES) $(LD_FLAGS) $(EXPORTER) -o $(DLL) - -%.o: %.cpp - $(CC) $(CC_FULL_FLAGS) -c $< - -$(DLLBASE).res: $(DLLBASE).rc - windres $(DLLBASE).rc $(DLLBASE).res - -$(VFILE).o: $(DLLBASE).rc - windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o - -depend: - makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) - -clean: - rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(DLL) $(DLLBASE).def ../test - cp $(DLL) $(DLLBASE).def ../examples - - -# DO NOT DELETE - -dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -ABsearch.o: QuickTricks.h LaterTricks.h ABsearch.h -ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -CalcTables.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h -CalcTables.o: PBN.h -DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -DealerPar.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.o: ABsearch.h System.h -LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -LaterTricks.o: threadmem.h LaterTricks.h -Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.o: Scheduler.h threadmem.h SolverIF.h PBN.h -PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -QuickTricks.o: threadmem.h QuickTricks.h -Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -SolveBoard.o: SolverIF.h SolveBoard.h System.h PBN.h -SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h -SolverIF.o: ABsearch.h SolverIF.h -Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -System.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -System.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h System.h SolveBoard.h -Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -TransTable.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h diff --git a/src/Makefiles/Makefile_cygwin_boost b/src/Makefiles/Makefile_cygwin_boost deleted file mode 100644 index 57a682cb..00000000 --- a/src/Makefiles/Makefile_cygwin_boost +++ /dev/null @@ -1,194 +0,0 @@ -# This the DDS Makefile for Cygwin under Windows and the -# GNU g++ compiler, using Boost for multi-threading. -# It does assume a Unix-like setup for some commands, but if you -# only want to call "make" with the default target, you should be OK. - -# If you want to compile a single-threaded version, use -# DDS_THREADS=none - -# BOOST32_PATH = /cygdrive/c/User/sheins/boost_1_66_0_unix -# BOOST32_LIB = $(BOOST32_PATH)\lib32-msvc-14.0 - -# The "windres" and "cvtres" tools are used for putting version -# information into the DLL in a way that Windows can see. -# It is not mandatory, and if you don't have those tools, -# You can remove $(VFILE).obj in the target line below. - - -# If your compiler name is not given here, change it. -CC = g++ - -CC_FLAGS = -O3 -flto -mtune=generic -fno-use-linker-plugin - -LD_FLAGS = \ - -Wl,--subsystem,windows \ - -Wl,--output-def,$(DLLBASE).def \ - -Wl,--dynamicbase \ - -Wl,--nxcompat \ - -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup \ - -lboost_system \ - -lboost_thread - -# These flags are not turned on be default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Wformat=2 \ - -Winit-self \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wnoexcept \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wredundant-decls \ - -Wsign-promo \ - -Wstrict-null-sentinel \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long - -# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -LIB_FLAGS = -shared - -DLLBASE = dds -DLL = $(DLLBASE).dll -EXPORTER = Exports.def - -VFILE = ddsres -WINDRES_FLAG = - -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolveBoard_basic.cpp \ - SolveBoard_boost.cpp \ - SolveBoard_GCD.cpp \ - SolveBoard_OpenMP.cpp \ - SolveBoard_WinAPI.cpp \ - SolverIF.cpp \ - Stats.cpp \ - Timer.cpp \ - TransTable.cpp - -O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o - -ifeq ($(DDS_THREADS),none) -DDS_THR = -DDDS_THREADS_SINGLE -else -DDS_THR = -DDDS_THREADS_BOOST -endif - - -cygwin: $(O_FILES) - $(CC) $(LIB_FLAGS) $(CC_FULL_FLAGS) $(O_FILES) $(LD_FLAGS) $(EXPORTER) -o $(DLL) - -%.o: %.cpp - $(CC) $(CC_FULL_FLAGS) $(DDS_THR) -c $< - -$(DLLBASE).res: $(DLLBASE).rc - windres $(DLLBASE).rc $(DLLBASE).res - -$(VFILE).o: $(DLLBASE).rc - windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o - -depend: - makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) - -clean: - rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(DLL) $(DLLBASE).def ../test - cp $(DLL) $(DLLBASE).def ../examples - - -# DO NOT DELETE - -dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -ABsearch.o: QuickTricks.h LaterTricks.h ABsearch.h -ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -CalcTables.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h -CalcTables.o: PBN.h -DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -DealerPar.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.o: ABsearch.h -LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -LaterTricks.o: threadmem.h LaterTricks.h -Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.o: Scheduler.h threadmem.h SolverIF.h PBN.h -PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -QuickTricks.o: threadmem.h QuickTricks.h -Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -SolveBoard.o: SolverIF.h SolveBoard.h PBN.h SolveBoard_basic.h -SolveBoard.o: SolveBoard_boost.h SolveBoard_GCD.h SolveBoard_OpenMP.h -SolveBoard.o: SolveBoard_WinAPI.h -SolveBoard_basic.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_basic.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_basic.o: Scheduler.h SolveBoard.h SolveBoard_basic.h -SolveBoard_boost.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_boost.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_boost.o: Scheduler.h SolveBoard.h SolveBoard_boost.h -SolveBoard_GCD.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_GCD.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_GCD.o: Scheduler.h SolveBoard.h SolveBoard_GCD.h -SolveBoard_OpenMP.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_OpenMP.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_OpenMP.o: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h -SolveBoard_WinAPI.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_WinAPI.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_WinAPI.o: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h -SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h -SolverIF.o: ABsearch.h SolverIF.h -Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -TransTable.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h diff --git a/src/Makefiles/depends_o.txt b/src/Makefiles/depends_o.txt new file mode 100644 index 00000000..9d17a41f --- /dev/null +++ b/src/Makefiles/depends_o.txt @@ -0,0 +1,66 @@ +dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +dds.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +dds.o: TimeStatList.h TimeStat.h Init.h +ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABsearch.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +ABsearch.o: TimeStatList.h TimeStat.h threadmem.h QuickTricks.h LaterTricks.h +ABsearch.o: ABsearch.h +ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABstats.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +ABstats.o: TimeStatList.h TimeStat.h +CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +CalcTables.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +CalcTables.o: TimeStatList.h TimeStat.h SolveBoard.h PBN.h +DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +DealerPar.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +DealerPar.o: TimeStatList.h TimeStat.h +Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Init.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +Init.o: TimeStatList.h TimeStat.h threadmem.h Init.h ABsearch.h System.h +LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h +LaterTricks.o: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +LaterTricks.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +LaterTricks.o: LaterTricks.h +Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Moves.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +Moves.o: TimeStatList.h TimeStat.h ABsearch.h +Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Par.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +Par.o: TimeStatList.h TimeStat.h +PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h +PlayAnalyser.o: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +PlayAnalyser.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +PlayAnalyser.o: SolverIF.h System.h PBN.h +PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +PBN.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +PBN.o: TimeStatList.h TimeStat.h PBN.h +QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h +QuickTricks.o: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +QuickTricks.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +QuickTricks.o: QuickTricks.h +Scheduler.o: Scheduler.h TimeStatList.h TimeStat.h dds.h debug.h +Scheduler.o: ../include/portab.h TransTable.h ../include/dll.h TimerList.h +Scheduler.o: TimerGroup.h Timer.h ABstats.h Moves.h +SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +SolveBoard.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +SolveBoard.o: TimeStatList.h TimeStat.h threadmem.h SolverIF.h SolveBoard.h +SolveBoard.o: System.h PBN.h +SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +SolverIF.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +SolverIF.o: TimeStatList.h TimeStat.h Init.h threadmem.h ABsearch.h +SolverIF.o: SolverIF.h +System.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +System.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +System.o: TimeStatList.h TimeStat.h System.h SolveBoard.h PlayAnalyser.h +Timer.o: Timer.h ../include/portab.h +TimerGroup.o: TimerGroup.h Timer.h dds.h debug.h ../include/portab.h +TimerGroup.o: TransTable.h ../include/dll.h TimerList.h ABstats.h Moves.h +TimerGroup.o: Scheduler.h TimeStatList.h TimeStat.h +TimerList.o: TimerList.h TimerGroup.h Timer.h dds.h debug.h +TimerList.o: ../include/portab.h TransTable.h ../include/dll.h ABstats.h +TimerList.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h +TimeStat.o: ../include/portab.h TimeStat.h +TimeStatList.o: TimeStatList.h TimeStat.h ../include/portab.h +TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +TransTable.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +TransTable.o: TimeStatList.h TimeStat.h diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index c8161bda..8868b7c0 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -27,6 +27,8 @@ paramType playparam; playparamType traceparam; extern System sysdep; +void PlayChunkCommon(const int thid); + int STDCALL AnalysePlayBin( deal dl, diff --git a/src/System.cpp b/src/System.cpp index 4e3dba6a..474bfcb5 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -262,6 +262,8 @@ struct WinWrapType HANDLE *waitPtr; }; +DWORD CALLBACK WinCallback(void * p); + DWORD CALLBACK WinCallback(void * p) { WinWrapType * winWrap = static_cast(p); @@ -480,7 +482,7 @@ string System::GetThreading(int& thr) const if (k == preferredSystem) { st += "(*)"; - thr = k; + thr = static_cast(k); } } } diff --git a/src/Timer.cpp b/src/Timer.cpp index 59608b2d..b7f3170d 100644 --- a/src/Timer.cpp +++ b/src/Timer.cpp @@ -62,7 +62,8 @@ void Timer::End() count++; userCum += tuser; - systCum += syst1 - syst0; + systCum += static_cast(syst1) - + static_cast(syst0); } diff --git a/test/dtest.cpp b/test/dtest.cpp index 1a6eb490..2eacff9a 100644 --- a/test/dtest.cpp +++ b/test/dtest.cpp @@ -29,8 +29,7 @@ int main(int argc, char * argv[]) DDSInfo info; GetDDSInfo(&info); - cout << info.systemString; - cout.flush(); + cout << info.systemString << endl; realMain(argc, argv); From 91d662f867f7e5aba79765d380cd50ea634fef9b Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 18 Mar 2018 15:05:49 +0100 Subject: [PATCH 023/132] Can't easily get mingw to work --- src/Makefile_mingw_stillbad | 117 ++++++++++++++++++ test/Makefile_mingw_stillbad | 222 +++++++++++++++++++++++++++++++++++ test/Makefiles/sources.txt | 23 ++++ 3 files changed, 362 insertions(+) create mode 100644 src/Makefile_mingw_stillbad create mode 100644 test/Makefile_mingw_stillbad create mode 100644 test/Makefiles/sources.txt diff --git a/src/Makefile_mingw_stillbad b/src/Makefile_mingw_stillbad new file mode 100644 index 00000000..089e2011 --- /dev/null +++ b/src/Makefile_mingw_stillbad @@ -0,0 +1,117 @@ +# This the DDS Makefile for Windows and the MinGW compiler. +# It assumes a Unix-like setup for some commands. + +# The "windres" and "cvtres" tools are used for putting version +# information into the DLL in a way that Windows can see. +# It is not mandatory, and if you don't have those tools, +# You can remove $(VFILE).obj in the target line below. +# +# If you want to compile a single-threaded version, use +# DDS_THREADS=none + +INCL_SOURCE = Makefiles/sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt + + +# If your exact compiler name is not given here, change it. +# CC = mingw32-g++ +# CC = i686-w64-mingw32-g++ +CC = g++ + +# Use this one to get Windows multi-threading +# CC_FLAGS = -O3 -flto -mtune=generic +# Use this one to get OpenMP multi-threading +CC_FLAGS = -O3 -flto -fopenmp -mtune=generic -DBUILDING_EXAMPLE_DLL + +LD_FLAGS = \ + -Wl,--subsystem,windows \ + -Wl,--output-def,$(DLLBASE).def \ + -Wl,--dynamicbase \ + -Wl,--nxcompat \ + -Wl,--no-seh \ + -Wl,--enable-stdcall-fixup \ + -lpthread \ + -lboost_system \ + -lboost_thread + + +# These flags are not turned on be default, but DDS should pass them. +# Turn them on below. +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wlogical-op \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wnoexcept \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wsign-promo \ + -Wstrict-null-sentinel \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-format + +# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION +# -DDDS_THREADS_SINGLE +CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) -DDDS_THREADS_BOOST + +LIB_FLAGS = -mdll + +DLLBASE = dds +DLL = $(DLLBASE).dll +EXPORTER = Exports.def + +VFILE = ddsres +WINDRES_FLAG = -F pe-x86-64 + +include $(INCL_SOURCE) + +O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o + + + # -O3 -flto -fopenmp -mtune=generic -DBUILDING_EXAMPLE_DLL \ + # -Wl,--out-implib,libdds.dll.a \ + # $(CC) $(LIB_FLAGS) $(CC_FULL_FLAGS) $(O_FILES) $(LD_FLAGS) $(EXPORTER) -o $(DLL) + +mingw: $(O_FILES) + $(CC) -shared \ + -o $(DLL) \ + $(O_FILES) \ + -Wl,--out-implib,libdds.a \ + -lboost_system -lboost_thread + + +%.o: %.cpp + $(CC) $(CC_FULL_FLAGS) -c $< + +$(DLLBASE).res: $(DLLBASE).rc + windres $(DLLBASE).rc $(DLLBASE).res + +$(VFILE).o: $(DLLBASE).rc + windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o + +depend: + makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) + +clean: + rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} + +install: + test -d ../test || mkdir ../test + test -d ../examples || mkdir ../examples + cp $(DLL) $(DLLBASE).def ../test + cp $(DLL) $(DLLBASE).def ../examples + + +include $(INCL_DEPENDS) + diff --git a/test/Makefile_mingw_stillbad b/test/Makefile_mingw_stillbad new file mode 100644 index 00000000..d63fdb7a --- /dev/null +++ b/test/Makefile_mingw_stillbad @@ -0,0 +1,222 @@ +# This is a Makefile for the dtest test program, +# for Windows and the minGW compiler. + +# It does assume a Unix-like setup for some commands, +# but if you only want to call "make" with the default target, +# you should be OK. + +# The test program itself does not use multi-threading, +# but the DLL might, depending on how it was compiled. + +# The Makefile also allows an "un-official" and ugly, but +# sometimes practical compilation of a directly integrated +# executable (i.e. not using the DLL). For this the Makefile +# uses the source and object files in the src directory... +# Use "make itest" at your own risk. + + +# If your exact compiler name is not given here, change it. +# CC = mingw32-g++ +# CC = i686-w64-mingw32-g++ +CC = g++ + +# Use this one to get Windows multi-threading +# CC_FLAGS = -O3 -flto -mtune=generic +# Use this one to get OpenMP multi-threading +CC_FLAGS = -O3 -flto -mtune=generic + +# These flags are not turned on by default, but DDS should pass them. +# Turn them on below. +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wlogical-op \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wnoexcept \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wredundant-decls \ + -Wsign-promo \ + -Wstrict-null-sentinel \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-format + +# Here you can turn on warnings. +# CC_FULL_FLAGS = $(CC_FLAGS) +CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) + +DTEST = dtest +ITEST = itest + +DLLBASE = dds +DLL = $(DLLBASE).dll +DLIB = $(DLLBASE).lib +EXPORTER = Exports.def + +# This is in addition to $(DTEST).cpp +DTEST_SOURCE_FILES = \ + testcommon.cpp \ + testStats.cpp + +LD_FLAGS = \ + -Wl,--dynamicbase \ + -Wl,--nxcompat \ + -Wl,--no-seh \ + -Wl,--enable-stdcall-fixup + +LIB_FLAGS = -L. -l$(DLLBASE) + +DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o + +# These are the files that we steal from the src directory. +include Makefiles/sources.txt + +# $(CC) $(CC_FULL_FLAGS) $(DTEST_OBJ_FILES) $(LD_FLAGS) $(LIB_FLAGS) -o $(DTEST) + +ITEST_SOURCE_FILES = \ + $(SOURCE_FILES) \ + $(DTEST_SOURCE_FILES) \ + itest.cpp + +ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) + +dtest: $(DTEST_OBJ_FILES) + $(CC) $(DTEST_OBJ_FILES) -L. -ldds.dll -o $(DTEST) + +itest: $(ITEST_OBJ_FILES) + $(CC) $(CC_FULL_FLAGS) $(ITEST_OBJ_FILES) $(LD_FLAGS) -o $(ITEST) + +%.o: %.cpp + $(CC) $(CC_FULL_FLAGS) -c $< -o $*.o + +depend: + makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp + +clean: + rm -f *.o *.exe $(DLLBASE).def $(DLL) + + +# DO NOT DELETE + +../src/dds.o: ../include/dll.h ../src/dds.h ../src/debug.h +../src/dds.o: ../include/portab.h ../src/TransTable.h ../src/Timer.h +../src/dds.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/dds.o: ../src/Scheduler.h ../src/Init.h +../src/ABsearch.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/ABsearch.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/ABsearch.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/ABsearch.o: ../src/Scheduler.h ../src/threadmem.h ../src/QuickTricks.h +../src/ABsearch.o: ../src/LaterTricks.h ../src/ABsearch.h +../src/ABstats.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/ABstats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/ABstats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/ABstats.o: ../src/Scheduler.h +../src/CalcTables.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/CalcTables.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/CalcTables.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/CalcTables.o: ../src/Scheduler.h ../src/SolveBoard.h ../src/PBN.h +../src/DealerPar.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/DealerPar.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/DealerPar.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/DealerPar.o: ../src/Scheduler.h +../src/Init.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Init.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/Init.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/Init.o: ../src/Scheduler.h ../src/threadmem.h ../src/Init.h +../src/Init.o: ../src/ABsearch.h +../src/LaterTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/LaterTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/LaterTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/LaterTricks.o: ../src/Scheduler.h ../src/threadmem.h +../src/LaterTricks.o: ../src/LaterTricks.h +../src/Moves.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Moves.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/Moves.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/Moves.o: ../src/Scheduler.h ../src/ABsearch.h +../src/Par.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Par.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/Par.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/Par.o: ../src/Scheduler.h +../src/PlayAnalyser.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/PlayAnalyser.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/PlayAnalyser.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/PlayAnalyser.o: ../src/Scheduler.h ../src/threadmem.h +../src/PlayAnalyser.o: ../src/SolverIF.h ../src/PBN.h +../src/PBN.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/PBN.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/PBN.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/PBN.o: ../src/Scheduler.h ../src/PBN.h +../src/QuickTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/QuickTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/QuickTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/QuickTricks.o: ../src/Scheduler.h ../src/threadmem.h +../src/QuickTricks.o: ../src/QuickTricks.h +../src/Scheduler.o: ../src/Scheduler.h ../src/dds.h ../src/debug.h +../src/Scheduler.o: ../include/portab.h ../src/TransTable.h ../include/dll.h +../src/Scheduler.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/Scheduler.o: ../src/Stats.h +../src/SolveBoard.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/SolveBoard.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/SolveBoard.o: ../src/Scheduler.h ../src/threadmem.h ../src/SolverIF.h +../src/SolveBoard.o: ../src/SolveBoard.h ../src/PBN.h +../src/SolveBoard.o: ../src/SolveBoard_basic.h ../src/SolveBoard_boost.h +../src/SolveBoard.o: ../src/SolveBoard_GCD.h ../src/SolveBoard_OpenMP.h +../src/SolveBoard.o: ../src/SolveBoard_WinAPI.h +../src/SolveBoard_basic.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard_basic.o: ../src/TransTable.h ../include/dll.h +../src/SolveBoard_basic.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/SolveBoard_basic.o: ../src/Stats.h ../src/Scheduler.h +../src/SolveBoard_basic.o: ../src/SolveBoard.h ../src/SolveBoard_basic.h +../src/SolveBoard_boost.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard_boost.o: ../src/TransTable.h ../include/dll.h +../src/SolveBoard_boost.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/SolveBoard_boost.o: ../src/Stats.h ../src/Scheduler.h +../src/SolveBoard_boost.o: ../src/SolveBoard.h ../src/SolveBoard_boost.h +../src/SolveBoard_GCD.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard_GCD.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/SolveBoard_GCD.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/SolveBoard_GCD.o: ../src/Scheduler.h ../src/SolveBoard.h +../src/SolveBoard_GCD.o: ../src/SolveBoard_GCD.h +../src/SolveBoard_OpenMP.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard_OpenMP.o: ../src/TransTable.h ../include/dll.h +../src/SolveBoard_OpenMP.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/SolveBoard_OpenMP.o: ../src/Stats.h ../src/Scheduler.h +../src/SolveBoard_OpenMP.o: ../src/SolveBoard.h ../src/SolveBoard_OpenMP.h +../src/SolveBoard_WinAPI.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard_WinAPI.o: ../src/TransTable.h ../include/dll.h +../src/SolveBoard_WinAPI.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/SolveBoard_WinAPI.o: ../src/Stats.h ../src/Scheduler.h +../src/SolveBoard_WinAPI.o: ../src/SolveBoard.h ../src/SolveBoard_WinAPI.h +../src/SolverIF.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolverIF.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/SolverIF.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/SolverIF.o: ../src/Scheduler.h ../src/Init.h ../src/threadmem.h +../src/SolverIF.o: ../src/ABsearch.h ../src/SolverIF.h +../src/Stats.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Stats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/Stats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/Stats.o: ../src/Scheduler.h +../src/Timer.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Timer.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/Timer.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/Timer.o: ../src/Scheduler.h +../src/TransTable.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/TransTable.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/TransTable.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/TransTable.o: ../src/Scheduler.h +testcommon.o: ../include/dll.h ../include/portab.h testStats.h dtest.h +testStats.o: ../include/portab.h testStats.h +itest.o: ../include/dll.h testcommon.h +dtest.o: ../include/dll.h testcommon.h diff --git a/test/Makefiles/sources.txt b/test/Makefiles/sources.txt new file mode 100644 index 00000000..a3e5d15c --- /dev/null +++ b/test/Makefiles/sources.txt @@ -0,0 +1,23 @@ +SOURCE_FILES = \ + ../src/dds.cpp \ + ../src/ABsearch.cpp \ + ../src/ABstats.cpp \ + ../src/CalcTables.cpp \ + ../src/DealerPar.cpp \ + ../src/Init.cpp \ + ../src/LaterTricks.cpp \ + ../src/Moves.cpp \ + ../src/Par.cpp \ + ../src/PlayAnalyser.cpp \ + ../src/PBN.cpp \ + ../src/QuickTricks.cpp \ + ../src/Scheduler.cpp \ + ../src/SolveBoard.cpp \ + ../src/SolverIF.cpp \ + ../src/System.cpp \ + ../src/Timer.cpp \ + ../src/TimerGroup.cpp \ + ../src/TimerList.cpp \ + ../src/TimeStat.cpp \ + ../src/TimeStatList.cpp \ + ../src/TransTable.cpp From 6835b131258d9db8ff5e2683e90e0708b813efa7 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 18 Mar 2018 15:35:06 +0100 Subject: [PATCH 024/132] Now also does STL threading --- include/dll.h | 3 ++- src/System.cpp | 42 ++++++++++++++++++++++++++++++++++++++++-- src/System.h | 1 + 3 files changed, 43 insertions(+), 3 deletions(-) diff --git a/include/dll.h b/include/dll.h index 66e3c583..87eec94d 100644 --- a/include/dll.h +++ b/include/dll.h @@ -360,7 +360,8 @@ struct DDSInfo // 1 = Windows (native), // 2 = OpenMP, // 3 = GCD, - // 4 = Boost + // 4 = Boost, + // 5 = STL int threading; // The actual number of threads configured diff --git a/src/System.cpp b/src/System.cpp index 474bfcb5..f07998c8 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -27,6 +27,10 @@ #endif #endif +#ifdef DDS_THREADS_STL + #include +#endif + #include "../include/dll.h" #include "dds.h" @@ -65,7 +69,8 @@ const vector DDS_SYSTEM_THREADING = "Windows", "OpenMP", "GCD", - "Boost" + "Boost", + "STL" }; #define DDS_SYSTEM_THREAD_BASIC 0 @@ -73,7 +78,8 @@ const vector DDS_SYSTEM_THREADING = #define DDS_SYSTEM_THREAD_OPENMP 2 #define DDS_SYSTEM_THREAD_GCD 3 #define DDS_SYSTEM_THREAD_BOOST 4 -#define DDS_SYSTEM_THREAD_SIZE 5 +#define DDS_SYSTEM_THREAD_STL 5 +#define DDS_SYSTEM_THREAD_SIZE 6 System::System() @@ -121,6 +127,12 @@ void System::Reset() availableSystem[DDS_SYSTEM_THREAD_BOOST] = false; #endif +#ifdef DDS_THREADS_STL + availableSystem[DDS_SYSTEM_THREAD_STL] = true; +#else + availableSystem[DDS_SYSTEM_THREAD_STL] = false; +#endif + // Take the first of any multi-threading system defined. for (unsigned k = 1; k < availableSystem.size(); k++) { @@ -137,6 +149,7 @@ void System::Reset() RunPtrList[DDS_SYSTEM_THREAD_OPENMP] = &System::RunThreadsOpenMP; RunPtrList[DDS_SYSTEM_THREAD_GCD] = &System::RunThreadsGCD; RunPtrList[DDS_SYSTEM_THREAD_BOOST] = &System::RunThreadsBoost; + RunPtrList[DDS_SYSTEM_THREAD_STL] = &System::RunThreadsSTL; // DDS_SYSTEM_CALC_ doesn't happen. CallbackSimpleList.resize(DDS_SYSTEM_SIZE); @@ -393,6 +406,31 @@ int System::RunThreadsBoost() } +////////////////////////////////////////////////////////////////////// +// STL // +////////////////////////////////////////////////////////////////////// + +int System::RunThreadsSTL() +{ +#ifdef DDS_THREADS_STL + vector threads; + threads.resize(static_cast(numThreads)); + + const unsigned nu = static_cast(numThreads); + for (unsigned k = 0; k < nu; k++) + threads[k] = new thread(fptr, k); + + for (unsigned k = 0; k < nu; k++) + { + threads[k]->join(); + delete threads[k]; + } +#endif + + return RETURN_NO_FAULT; +} + + int System::RunThreads(const int chunkSize) { fptr = (chunkSize == 1 ? diff --git a/src/System.h b/src/System.h index 5670fa53..d9a2d6ea 100644 --- a/src/System.h +++ b/src/System.h @@ -52,6 +52,7 @@ class System int RunThreadsOpenMP(); int RunThreadsGCD(); int RunThreadsWinAPI(); + int RunThreadsSTL(); string GetVersion( int& major, From c5fc69aa7d13fcb77e4325e596b7328e2e2cfa1e Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 18 Mar 2018 15:36:42 +0100 Subject: [PATCH 025/132] Added PPL to Visual and Cygwin Makefiles --- src/Makefiles/Makefile_Visual | 3 ++- src/Makefiles/Makefile_cygwin | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Makefiles/Makefile_Visual b/src/Makefiles/Makefile_Visual index 5e127890..182c018a 100644 --- a/src/Makefiles/Makefile_Visual +++ b/src/Makefiles/Makefile_Visual @@ -37,8 +37,9 @@ THR_BOOST = /DDDS_THREADS_BOOST THR_GCD = /DDDS_THREADS_GCD THR_OPENMP = /DDDS_THREADS_OPENMP THR_WINAPI = /DDDS_THREADS_WINAPI +THR_STL = /DDDS_THREADS_STL -THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_WINAPI) +THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_WINAPI) $(THR_STL) # If you need to add something for a threading system, this is # the place. diff --git a/src/Makefiles/Makefile_cygwin b/src/Makefiles/Makefile_cygwin index c09f2052..85cbcde0 100644 --- a/src/Makefiles/Makefile_cygwin +++ b/src/Makefiles/Makefile_cygwin @@ -23,8 +23,9 @@ THR_BOOST = -DDDS_THREADS_BOOST THR_GCD = -DDDS_THREADS_GCD THR_OPENMP = -DDDS_THREADS_OPENMP THR_WINAPI = -DDDS_THREADS_WINAPI +THR_STL = -DDDS_THREADS_STL -THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_WINAPI) +THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_WINAPI) $(THR_STL) # If you need to add something for a threading system, this is # the place. From 5c5aaa8b999f4d7fcde6b98598aedfa471143bb2 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 18 Mar 2018 20:57:43 +0100 Subject: [PATCH 026/132] Works on Linux --- include/dll.h | 2 +- src/FILES | 43 -------- src/Makefile_Mac_clang_shared | 128 ++++++++++++++++++++++++ src/Makefile_Mac_clang_static | 118 ++++++++++++++++++++++ src/Makefiles/Makefile_linux | 147 ---------------------------- src/Makefiles/Makefile_linux_static | 120 +++++++++++++++++++++++ src/NOTES | 15 --- test/Makefiles/Makefile_linux | 9 +- test/dtest.cpp | 1 + test/testStats.cpp | 10 +- test/testcommon.cpp | 32 +++--- 11 files changed, 397 insertions(+), 228 deletions(-) delete mode 100644 src/FILES create mode 100644 src/Makefile_Mac_clang_shared create mode 100644 src/Makefile_Mac_clang_static delete mode 100644 src/Makefiles/Makefile_linux create mode 100644 src/Makefiles/Makefile_linux_static delete mode 100644 src/NOTES diff --git a/include/dll.h b/include/dll.h index 87eec94d..b9c27a87 100644 --- a/include/dll.h +++ b/include/dll.h @@ -37,7 +37,7 @@ #define MAXNOOFBOARDS 200 -#define MAXNOOFTABLES 32 +#define MAXNOOFTABLES 40 // Error codes. See interface document for more detail. diff --git a/src/FILES b/src/FILES deleted file mode 100644 index d283f0a3..00000000 --- a/src/FILES +++ /dev/null @@ -1,43 +0,0 @@ - 1629 4047 38763 ABsearch.cpp - 336 830 7449 ABstats.cpp - 213 590 4551 CalcTables.cpp - 87 131 1430 dds.cpp - 632 2321 15594 DealerPar.cpp - 709 1983 16902 Init.cpp - 286 794 8193 LaterTricks.cpp - 2621 8138 73561 Moves.cpp - 1565 4449 40086 Par.cpp - 184 487 3660 PBN.cpp - 364 1016 9116 PlayAnalyser.cpp - 1209 3449 30221 QuickTricks.cpp - 297 665 6655 SolveBoard.cpp - 1291 3194 30732 SolverIF.cpp - 2968 8140 72454 TransTable.cpp - 117 239 1985 ABsearch.h - 76 165 1517 ABstats.h - 204 480 3918 dds.h - 159 484 4477 debug.h - 35 77 597 Init.h - 30 67 509 LaterTricks.h - 304 543 5744 Moves.h - 22 49 408 PBN.h - 20 38 288 PlayAnalyser.h - 31 70 530 QuickTricks.h - 29 62 494 SolveBoard.h - 28 58 444 SolverIF.h - 81 155 1390 threadmem.h - 519 1108 11141 TransTable.h - 19052 51196 458259 insgesamt - -For now: - -Scheduler - -Final: - -System -Timer -TimerGroup -TimerList -TimeStat -TimeStatList diff --git a/src/Makefile_Mac_clang_shared b/src/Makefile_Mac_clang_shared new file mode 100644 index 00000000..ec8f0c10 --- /dev/null +++ b/src/Makefile_Mac_clang_shared @@ -0,0 +1,128 @@ +# --------------------- INFORMATION -------------------------------- + +# This the DDS Makefile for MacOS and the clang compiler. +# It creates a dynamically linked (shared) library, libdds.so. + +# --------------------- CONFIGURATION ------------------------------ + +# You can configure the following: + +# 1. The threading systems that you want in the library. +# You will always get single-threading. If you have multiple +# threading systems, the default will be the multi-threading one +# with the lowest number (see System.cpp). All that matters is +# CC_THREADING. + +# GCD and WINAPI don't work on Windows. +THR_BOOST = -DDDS_THREADS_BOOST +THR_GCD = -DDDS_THREADS_GCD +THR_OPENMP = -DDDS_THREADS_OPENMP +THR_WINAPI = -DDDS_THREADS_WINAPI +THR_STL = -DDDS_THREADS_STL + +THREADING = $(THR_BOOST) $(THR_GCD) $(THR_OPENMP) $(THR_STL) + +# If you need to add something for a threading system, this is +# the place. + +CC_BOOST_LINK = -lboost_system -lboost_thread + +THREAD_COMPILE = -fopenmp +THREAD_LINK = -fopenmp $(CC_BOOST_LINK) + +# 2. The small memory option, which causes DDS to consume a lot less +# memory and to run somewhat more slowly. + +SMALL_MEMORY = -DSMALL_MEMORY_OPTION + +# 3. Debugging options. (There are more granular options in debug.h.) + +DEBUG_ALL = -DDDS_DEBUG_ALL +TIMING = -DDDS_TIMING +SCHEDULER = -DDDS_SCHEDULER + +# All that matters from no. 3 and no. 4 is the following. Here you +# can add $(SMALL_MEMORY) etc. + +DDS_BEHAVIOR = + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_SOURCE = Makefiles/sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt + +# If your compiler name is not given here, change it. +CC = g++ + +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... + +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wcomment \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wredundant-decls \ + -Wsign-promo \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-format + +COMPILE_FLAGS = -fPIC -O3 -flto -fopenmp -mtune=generic -std=c++11 \ + $(WARN_FLAGS) \ + $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) + +DLLBASE = dds +SHARED_LIB = lib$(DLLBASE).so + +LINK_FLAGS = \ + -shared \ + -Wl,-O2 \ + -Wl,--sort-common \ + -Wl,--as-needed \ + -Wl,z \ + -Wl,relro \ + $(THREAD_LINK) \ + -fPIC + +include $(INCL_SOURCE) + +O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) + + +macos: $(O_FILES) + $(CC) -o $(SHARED_LIB) $(O_FILES) $(LINK_FLAGS) + +%.o: %.cpp + $(CC) $(COMPILE_FLAGS) -c $< + +depend: + makedepend -Y -- $(SOURCE_FILES) + +clean: + rm -f $(O_FILES) $(SHARED_LIB) + +install: + test -d ../test || mkdir ../test + test -d ../examples || mkdir ../examples + cp $(STATIC_LIB) ../test + cp $(STATIC_LIB) ../examples + +include $(INCL_DEPENDS) + diff --git a/src/Makefile_Mac_clang_static b/src/Makefile_Mac_clang_static new file mode 100644 index 00000000..5128b5a9 --- /dev/null +++ b/src/Makefile_Mac_clang_static @@ -0,0 +1,118 @@ +# --------------------- INFORMATION -------------------------------- + +# This the DDS Makefile for MacOS and the clang compiler. +# It creates a statically linked library, libdds.a. + +# --------------------- CONFIGURATION ------------------------------ + +# You can configure the following: + +# 1. The threading systems that you want in the library. +# You will always get single-threading. If you have multiple +# threading systems, the default will be the multi-threading one +# with the lowest number (see System.cpp). All that matters is +# CC_THREADING. + +# GCD and WINAPI don't work on Windows. +THR_BOOST = -DDDS_THREADS_BOOST +THR_GCD = -DDDS_THREADS_GCD +THR_OPENMP = -DDDS_THREADS_OPENMP +THR_WINAPI = -DDDS_THREADS_WINAPI +THR_STL = -DDDS_THREADS_STL + +THREADING = $(THR_BOOST) $(THR_GCD) $(THR_OPENMP) $(THR_STL) + +# If you need to add something for a threading system, this is +# the place. + +CC_BOOST_LINK = -lboost_system -lboost_thread + +THREAD_COMPILE = -fopenmp +THREAD_LINK = $(CC_BOOST_LINK) + +# 2. The small memory option, which causes DDS to consume a lot less +# memory and to run somewhat more slowly. + +SMALL_MEMORY = -DSMALL_MEMORY_OPTION + +# 3. Debugging options. (There are more granular options in debug.h.) + +DEBUG_ALL = -DDDS_DEBUG_ALL +TIMING = -DDDS_TIMING +SCHEDULER = -DDDS_SCHEDULER + +# All that matters from no. 3 and no. 4 is the following. Here you +# can add $(SMALL_MEMORY) etc. + +DDS_BEHAVIOR = + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_SOURCE = Makefiles/sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt + +# If your compiler name is not given here, change it. +CC = g++ + +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... + +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wcomment \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wredundant-decls \ + -Wsign-promo \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-format + +COMPILE_FLAGS = -O3 -flto -fopenmp -mtune=generic -std=c++11 \ + $(WARN_FLAGS) \ + $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) + +DLLBASE = dds +STATIC_LIB = lib$(DLLBASE).a + +include $(INCL_SOURCE) + +O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) + + +macos: $(O_FILES) + ar rcs $(STATIC_LIB) $(O_FILES) + +%.o: %.cpp + $(CC) $(COMPILE_FLAGS) -c $< + +depend: + makedepend -Y -- $(SOURCE_FILES) + +clean: + rm -f $(O_FILES) $(STATIC_LIB) + +install: + test -d ../test || mkdir ../test + test -d ../examples || mkdir ../examples + cp $(STATIC_LIB) ../test + cp $(STATIC_LIB) ../examples + +include $(INCL_DEPENDS) + diff --git a/src/Makefiles/Makefile_linux b/src/Makefiles/Makefile_linux deleted file mode 100644 index 6cdc1ddb..00000000 --- a/src/Makefiles/Makefile_linux +++ /dev/null @@ -1,147 +0,0 @@ -# This the DDS Makefile for Linux and the GNU g++ compiler. -# Only OpenMP works here. - -# If you want to compile a single-threaded version, use -# make DDS_THREADS=none - -# If your compiler name is not given here, change it. -CC = g++ - -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -fopenmp -mtune=generic - -LD_FLAGS = \ - -Wl,--dynamicbase \ - -Wl,--nxcompat \ - -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup - - -# These flags are not turned on be default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wnoexcept \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wredundant-decls \ - -Wsign-promo \ - -Wstrict-null-sentinel \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -# Here you can turn on warnings. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -DLLBASE = dds -STATIC_LIB = lib$(DLLBASE).a - -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolverIF.cpp \ - Stats.cpp \ - Timer.cpp \ - TransTable.cpp - -O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) - -ifeq ($(DDS_THREADS),none) -DDS_THR = -DDDS_THREADS_SINGLE -else -DDS_THR = -endif - - -linux: $(O_FILES) - ar rcs $(STATIC_LIB) $(O_FILES) - -%.o: %.cpp - $(CC) $(CC_FULL_FLAGS) $(DDS_THR) -c $< - -depend: - makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) - -clean: - rm -f $(O_FILES) $(STATIC_LIB) - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(STATIC_LIB) ../test - cp $(STATIC_LIB) ../examples - - -# DO NOT DELETE - -dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -ABsearch.o: QuickTricks.h LaterTricks.h ABsearch.h -ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -CalcTables.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h -CalcTables.o: PBN.h -DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -DealerPar.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.o: ABsearch.h -LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -LaterTricks.o: threadmem.h LaterTricks.h -Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.o: Scheduler.h threadmem.h SolverIF.h PBN.h -PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -QuickTricks.o: threadmem.h QuickTricks.h -Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -SolveBoard.o: SolverIF.h SolveBoard.h PBN.h -SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h -SolverIF.o: ABsearch.h SolverIF.h -Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -TransTable.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h diff --git a/src/Makefiles/Makefile_linux_static b/src/Makefiles/Makefile_linux_static new file mode 100644 index 00000000..62b0af23 --- /dev/null +++ b/src/Makefiles/Makefile_linux_static @@ -0,0 +1,120 @@ +# --------------------- INFORMATION -------------------------------- + +# This the DDS Makefile for Linux and the GNU g++ compiler. +# It creates a statically linked library, libdds.a. + +# --------------------- CONFIGURATION ------------------------------ + +# You can configure the following: + +# 1. The threading systems that you want in the library. +# You will always get single-threading. If you have multiple +# threading systems, the default will be the multi-threading one +# with the lowest number (see System.cpp). All that matters is +# CC_THREADING. + +# GCD and WINAPI don't work on Windows. +THR_BOOST = -DDDS_THREADS_BOOST +THR_GCD = -DDDS_THREADS_GCD +THR_OPENMP = -DDDS_THREADS_OPENMP +THR_WINAPI = -DDDS_THREADS_WINAPI +THR_STL = -DDDS_THREADS_STL + +THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_STL) + +# If you need to add something for a threading system, this is +# the place. + +CC_BOOST_LINK = -lboost_system -lboost_thread + +THREAD_COMPILE = -fopenmp +THREAD_LINK = $(CC_BOOST_LINK) + +# 2. The small memory option, which causes DDS to consume a lot less +# memory and to run somewhat more slowly. + +SMALL_MEMORY = -DSMALL_MEMORY_OPTION + +# 3. Debugging options. (There are more granular options in debug.h.) + +DEBUG_ALL = -DDDS_DEBUG_ALL +TIMING = -DDDS_TIMING +SCHEDULER = -DDDS_SCHEDULER + +# All that matters from no. 3 and no. 4 is the following. Here you +# can add $(SMALL_MEMORY) etc. + +DDS_BEHAVIOR = + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_SOURCE = Makefiles/sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt + +# If your compiler name is not given here, change it. +CC = g++ + +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... + +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wlogical-op \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wnoexcept \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wredundant-decls \ + -Wsign-promo \ + -Wstrict-null-sentinel \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-format + +COMPILE_FLAGS = -O3 -flto -fopenmp -mtune=generic -std=c++11 \ + $(WARN_FLAGS) \ + $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) + +DLLBASE = dds +STATIC_LIB = lib$(DLLBASE).a + +include $(INCL_SOURCE) + +O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) + + +linux: $(O_FILES) + gcc-ar rcs $(STATIC_LIB) $(O_FILES) + +%.o: %.cpp + $(CC) $(COMPILE_FLAGS) -c $< + +depend: + makedepend -Y -- $(SOURCE_FILES) + +clean: + rm -f $(O_FILES) $(STATIC_LIB) + +install: + test -d ../test || mkdir ../test + test -d ../examples || mkdir ../examples + cp $(STATIC_LIB) ../test + cp $(STATIC_LIB) ../examples + +include $(INCL_DEPENDS) + diff --git a/src/NOTES b/src/NOTES deleted file mode 100644 index 774f94f8..00000000 --- a/src/NOTES +++ /dev/null @@ -1,15 +0,0 @@ -17.03.2018 - -Makefile -- One for each system - -dtest -- Get laptop changes, no more time function calls - -General -- Move away from printf etc to out. -- It's a bit annoying that SetMaxThreads() gets called once with 0 - automatically, once with 1 from dtest. So lots of debug text files - are created. Probably generate at the end, like with TimerList. -- mingw has undefined symbols, eliminate system defines as -- much as possible. diff --git a/test/Makefiles/Makefile_linux b/test/Makefiles/Makefile_linux index d036f65d..3e77c522 100644 --- a/test/Makefiles/Makefile_linux +++ b/test/Makefiles/Makefile_linux @@ -48,6 +48,7 @@ WARN_FLAGS = \ -Wno-unused \ -Wno-unknown-pragmas \ -Wno-long-long \ + -Wno-odr \ -Wno-format # Here you can turn on warnings. @@ -66,9 +67,11 @@ DTEST_SOURCE_FILES = \ testcommon.cpp \ testStats.cpp -LD_FLAGS = +LD_FLAGS = -LIB_FLAGS = -L. -l$(DLLBASE) +THREAD_LINK = -lboost_system -lboost_thread + +LIB_FLAGS = -Wl,-rpath=. -L. -l$(DLLBASE) $(THREAD_LINK) DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o @@ -202,3 +205,5 @@ testcommon.o: ../include/dll.h ../include/portab.h testStats.h dtest.h testStats.o: ../include/portab.h testStats.h itest.o: ../include/dll.h testcommon.h dtest.o: ../include/dll.h testcommon.h + + diff --git a/test/dtest.cpp b/test/dtest.cpp index 2eacff9a..5e7ad7c8 100644 --- a/test/dtest.cpp +++ b/test/dtest.cpp @@ -10,6 +10,7 @@ #include #include +#include #include "../include/dll.h" #include "testcommon.h" diff --git a/test/testStats.cpp b/test/testStats.cpp index 029debc5..1594b9af 100644 --- a/test/testStats.cpp +++ b/test/testStats.cpp @@ -84,7 +84,7 @@ void TestStartTimer() #ifdef _WIN32 QueryPerformanceCounter(&ttimerUser0); #else - gettimeofday(&ttimerUser0, nullptr); + gettimeofday(&ttimerUser0, NULL); #endif } @@ -100,7 +100,7 @@ void TestEndTimer() int ttimeUser = static_cast ((ttimerUser1.QuadPart - ttimerUser0.QuadPart)); #else - gettimeofday(&ttimerUser1, nullptr); + gettimeofday(&ttimerUser1, NULL); int ttimeUser = TesttimevalDiff(ttimerUser1, ttimerUser0); #endif @@ -162,7 +162,7 @@ void TestStartTimerNo(int no) #ifdef _WIN32 QueryPerformanceCounter(&ttimerListUser0[no]); #else - gettimeofday(&ttimerListUser0[no], nullptr); + gettimeofday(&ttimerListUser0[no], NULL); #endif } @@ -176,7 +176,7 @@ void TestEndTimerNo(int no) int timeUser = static_cast ((ttimerListUser1[no].QuadPart - ttimerListUser0[no].QuadPart)); #else - gettimeofday(&ttimerListUser1[no], nullptr); + gettimeofday(&ttimerListUser1[no], NULL); int timeUser = TesttimevalDiff(ttimerListUser1[no], ttimerListUser0[no]); #endif @@ -199,7 +199,7 @@ void TestEndTimerNoAndComp(int no, int pred) int timeUser = static_cast ((ttimerListUser1[no].QuadPart - ttimerListUser0[no].QuadPart)); #else - gettimeofday(&ttimerListUser1[no], nullptr); + gettimeofday(&ttimerListUser1[no], NULL); int timeUser = TesttimevalDiff(ttimerListUser1[no], ttimerListUser0[no]); #endif diff --git a/test/testcommon.cpp b/test/testcommon.cpp index 091d2e6e..b1924584 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -278,8 +278,10 @@ int threadingCode(char * arg) return 3; else if (str == "boost") return 4; - else + else if (str == "stl") return 5; + else + return 6; } @@ -301,13 +303,13 @@ bool read_file( FILE * fp; fp = fopen(fname, "r"); - if (fp == nullptr) + if (fp == NULL) { char backup[80]; sprintf(backup, "../hands/%s", fname); fp = fopen(backup, "r"); name = backup; - if (fp == nullptr) + if (fp == NULL) return false; } else @@ -332,7 +334,7 @@ bool read_file( fclose(fp); fp = fopen(name, "r"); - if (fp == nullptr) + if (fp == NULL) return false; } else @@ -348,39 +350,39 @@ bool read_file( size_t number_t = static_cast(* number); if ((*dealer_list = static_cast - (calloc(number_t, sizeof(int)))) == nullptr) + (calloc(number_t, sizeof(int)))) == NULL) return false; if ((*vul_list = static_cast - (calloc(number_t, sizeof(int)))) == nullptr) + (calloc(number_t, sizeof(int)))) == NULL) return false; if ((*deal_list = static_cast - (calloc(number_t, sizeof(dealPBN)))) == nullptr) + (calloc(number_t, sizeof(dealPBN)))) == NULL) return false; if ((*fut_list = static_cast - (calloc(number_t, sizeof(futureTricks)))) == nullptr) + (calloc(number_t, sizeof(futureTricks)))) == NULL) return false; if ((*table_list = static_cast - (calloc(number_t, sizeof(ddTableResults)))) == nullptr) + (calloc(number_t, sizeof(ddTableResults)))) == NULL) return false; if ((*par_list = static_cast - (calloc(number_t, sizeof(parResults)))) == nullptr) + (calloc(number_t, sizeof(parResults)))) == NULL) return false; if ((*dealerpar_list = static_cast - (calloc(number_t, sizeof(parResultsDealer)))) == nullptr) + (calloc(number_t, sizeof(parResultsDealer)))) == NULL) return false; if ((*play_list = static_cast - (calloc(number_t, sizeof(playTracePBN)))) == nullptr) + (calloc(number_t, sizeof(playTracePBN)))) == NULL) return false; if ((*trace_list = static_cast - (calloc(number_t, sizeof(solvedPlay)))) == nullptr) + (calloc(number_t, sizeof(solvedPlay)))) == NULL) return false; if (GIBmode) @@ -1292,7 +1294,7 @@ void timer_start() #ifdef _WIN32 QueryPerformanceCounter(&tu0); #else - gettimeofday(&tu0, nullptr); + gettimeofday(&tu0, NULL); #endif } @@ -1306,7 +1308,7 @@ int timer_end() tu = static_cast ((tu1.QuadPart - tu0.QuadPart) * 1000. / frequency.QuadPart); #else - gettimeofday(&tu1, nullptr); + gettimeofday(&tu1, NULL); tu = timeval_diff(tu1, tu0); #endif ctu += tu; From 51179df39142777c36234db85be47a5a00f820d7 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 18 Mar 2018 20:58:07 +0100 Subject: [PATCH 027/132] Temp files --- src/Makefile_mingw_stillbad | 2 +- src/Makefiles/Makefile_linux_shared | 186 ++++++++++++---------------- 2 files changed, 81 insertions(+), 107 deletions(-) diff --git a/src/Makefile_mingw_stillbad b/src/Makefile_mingw_stillbad index 089e2011..70d42a92 100644 --- a/src/Makefile_mingw_stillbad +++ b/src/Makefile_mingw_stillbad @@ -21,7 +21,7 @@ CC = g++ # Use this one to get Windows multi-threading # CC_FLAGS = -O3 -flto -mtune=generic # Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -fopenmp -mtune=generic -DBUILDING_EXAMPLE_DLL +CC_FLAGS = -O3 -flto -fopenmp -mtune=generic -DBUILDING_EXAMPLE_DLL -std=c++11 LD_FLAGS = \ -Wl,--subsystem,windows \ diff --git a/src/Makefiles/Makefile_linux_shared b/src/Makefiles/Makefile_linux_shared index 9e7cd25f..bb4de5e3 100644 --- a/src/Makefiles/Makefile_linux_shared +++ b/src/Makefiles/Makefile_linux_shared @@ -1,25 +1,66 @@ +# --------------------- INFORMATION -------------------------------- + # This the DDS Makefile for Linux and the GNU g++ compiler. -# Only OpenMP works here. +# It creates a dynamically linked (shared) library, libdds.so. -# If you want to compile a single-threaded version, use -# make DDS_THREADS=none +# --------------------- CONFIGURATION ------------------------------ -# If your compiler name is not given here, change it. -CC = g++ +# You can configure the following: + +# 1. The threading systems that you want in the library. +# You will always get single-threading. If you have multiple +# threading systems, the default will be the multi-threading one +# with the lowest number (see System.cpp). All that matters is +# CC_THREADING. + +# GCD and WINAPI don't work on Windows. +THR_BOOST = -DDDS_THREADS_BOOST +THR_GCD = -DDDS_THREADS_GCD +THR_OPENMP = -DDDS_THREADS_OPENMP +THR_WINAPI = -DDDS_THREADS_WINAPI +THR_STL = -DDDS_THREADS_STL + +THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_STL) + +# If you need to add something for a threading system, this is +# the place. + +CC_BOOST_LINK = -lboost_system -lboost_thread + +THREAD_COMPILE = -fopenmp +THREAD_LINK = -fopenmp $(CC_BOOST_LINK) + +# 2. The small memory option, which causes DDS to consume a lot less +# memory and to run somewhat more slowly. + +SMALL_MEMORY = -DSMALL_MEMORY_OPTION -# Use this one to get OpenMP multi-threading -CC_FLAGS = -fPIC -g -O3 -flto -fopenmp -mtune=generic -Wno-write-strings +# 3. Debugging options. (There are more granular options in debug.h.) -LD_FLAGS = \ - -Wl,-O1 \ - -Wl,--sort-common \ - -Wl,--as-needed \ - -Wl,-z \ - -Wl,relro +DEBUG_ALL = -DDDS_DEBUG_ALL +TIMING = -DDDS_TIMING +SCHEDULER = -DDDS_SCHEDULER +# All that matters from no. 3 and no. 4 is the following. Here you +# can add $(SMALL_MEMORY) etc. + +DDS_BEHAVIOR = + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_SOURCE = Makefiles/sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt + +# If your compiler name is not given here, change it. +CC = g++ + +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... -# These flags are not turned on be default, but DDS should pass them. -# Turn them on below. WARN_FLAGS = \ -Wshadow \ -Wsign-conversion \ @@ -45,58 +86,37 @@ WARN_FLAGS = \ -Wno-long-long \ -Wno-format -# Here you can turn on warnings. -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) +COMPILE_FLAGS = -fPIC -O3 -flto -fopenmp -mtune=generic -std=c++11 \ + $(WARN_FLAGS) \ + $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) DLLBASE = dds -SHARED_LIB = lib$(DLLBASE).so - -# Major version -MAJOR = 2 - -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolverIF.cpp \ - Stats.cpp \ - Timer.cpp \ - TransTable.cpp +SHARED_LIB = lib$(DLLBASE).so + +include $(INCL_SOURCE) O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) -ifeq ($(DDS_THREADS),none) -DDS_THR = -DDDS_THREADS_SINGLE -else -DDS_THR = -endif +LINK_FLAGS = \ + -shared \ + -Wl,-O2 \ + -Wl,--sort-common \ + -Wl,--as-needed \ + -Wl,-z \ + -Wl,relro \ + $(THREAD_LINK) \ + -fPIC linux: $(O_FILES) - $(CC) $(LD_FLAGS) -fopenmp \ - -Wl,-soname,lib$(DLLBASE).so.$(MAJOR) \ - -o $(SHARED_LIB) ABsearch.o ABstats.o CalcTables.o \ - DealerPar.o Init.o LaterTricks.o Moves.o PBN.o Par.o \ - PlayAnalyser.o QuickTricks.o SolveBoard.o \ - SolverIF.o Stats.o Timer.o TransTable.o dds.o \ - Scheduler.o -shared -fPIC + $(CC) \ + -o $(SHARED_LIB) $(O_FILES) $(LINK_FLAGS) %.o: %.cpp - $(CC) $(CC_FULL_FLAGS) $(DDS_THR) -c $< + $(CC) $(COMPILE_FLAGS) -c $< depend: - makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) + makedepend -Y -- $(SOURCE_FILES) clean: rm -f $(O_FILES) $(SHARED_LIB) @@ -104,54 +124,8 @@ clean: install: test -d ../test || mkdir ../test test -d ../examples || mkdir ../examples - cp $(SHARED_LIB) ../test - cp $(SHARED_LIB) ../examples - cp $(SHARED_LIB) /usr/lib - - -# DO NOT DELETE - -dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -ABsearch.o: QuickTricks.h LaterTricks.h ABsearch.h -ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -CalcTables.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h -CalcTables.o: PBN.h -DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -DealerPar.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.o: ABsearch.h -LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -LaterTricks.o: threadmem.h LaterTricks.h -Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.o: Scheduler.h threadmem.h SolverIF.h PBN.h -PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -QuickTricks.o: threadmem.h QuickTricks.h -Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -SolveBoard.o: SolverIF.h SolveBoard.h PBN.h -SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h -SolverIF.o: ABsearch.h SolverIF.h -Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -TransTable.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h + cp $(STATIC_LIB) ../test + cp $(STATIC_LIB) ../examples + +include $(INCL_DEPENDS) + From dc0484cd64846f42d9187446cb5c532a39ce4110 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Wed, 21 Mar 2018 20:59:56 +0100 Subject: [PATCH 028/132] Now does Mac clang and g++ as well --- src/Makefiles/Makefile_Mac_clang | 133 --------------------- src/Makefiles/Makefile_Mac_clang_shared | 125 ++++++++++++++++++++ src/Makefiles/Makefile_Mac_clang_static | 120 +++++++++++++++++++ src/Makefiles/Makefile_Mac_gcc | 146 ----------------------- src/Makefiles/Makefile_Mac_gcc_shared | 125 ++++++++++++++++++++ src/Makefiles/Makefile_Mac_gcc_static | 129 ++++++++++++++++++++ src/Makefiles/Makefile_Mac_shared | 150 ------------------------ src/System.cpp | 23 ++-- src/TimerGroup.cpp | 4 +- src/TimerList.cpp | 3 +- src/dds.h | 3 - test/Makefiles/Makefile_Mac_clang | 6 +- test/Makefiles/Makefile_Mac_gcc | 6 +- 13 files changed, 527 insertions(+), 446 deletions(-) delete mode 100644 src/Makefiles/Makefile_Mac_clang create mode 100644 src/Makefiles/Makefile_Mac_clang_shared create mode 100644 src/Makefiles/Makefile_Mac_clang_static delete mode 100644 src/Makefiles/Makefile_Mac_gcc create mode 100644 src/Makefiles/Makefile_Mac_gcc_shared create mode 100644 src/Makefiles/Makefile_Mac_gcc_static delete mode 100644 src/Makefiles/Makefile_Mac_shared diff --git a/src/Makefiles/Makefile_Mac_clang b/src/Makefiles/Makefile_Mac_clang deleted file mode 100644 index 3d3e21a4..00000000 --- a/src/Makefiles/Makefile_Mac_clang +++ /dev/null @@ -1,133 +0,0 @@ -# This the DDS Makefile for Mac OS and the clang compiler. -# No multi-threadingOpenMP works here. - -# If your compiler name is not given here, change it. -CC = g++ - -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -mtune=generic - -LD_FLAGS = \ - -Wl,--dynamicbase \ - -Wl,--nxcompat \ - -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup - - -# These flags are not turned on be default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wcomment \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wredundant-decls \ - -Wsign-promo \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -# Here you can turn on warnings. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -DLLBASE = dds -STATIC_LIB = lib$(DLLBASE).a - -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolverIF.cpp \ - Stats.cpp \ - Timer.cpp \ - TransTable.cpp - -O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) - -linux: $(O_FILES) - ar rcs $(STATIC_LIB) $(O_FILES) - -%.o: %.cpp - $(CC) $(CC_FULL_FLAGS) -c $< - -depend: - makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) - -clean: - rm -f $(O_FILES) $(STATIC_LIB) - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(STATIC_LIB) ../test - cp $(STATIC_LIB) ../examples - - -# DO NOT DELETE - -dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h Timer.h ABstats.h -dds.o: Moves.h Stats.h Scheduler.h Init.h -ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -ABsearch.o: ABstats.h Moves.h Stats.h Scheduler.h threadmem.h QuickTricks.h -ABsearch.o: LaterTricks.h ABsearch.h -ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -ABstats.o: ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -CalcTables.o: ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h PBN.h -DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -DealerPar.o: ABstats.h Moves.h Stats.h Scheduler.h -Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -Init.o: ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h ABsearch.h -LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -LaterTricks.o: ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -LaterTricks.o: LaterTricks.h -Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -Moves.o: ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h ABstats.h -Par.o: Moves.h Stats.h Scheduler.h -PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -PlayAnalyser.o: ABstats.h Moves.h Stats.h Scheduler.h threadmem.h SolverIF.h -PlayAnalyser.o: PBN.h -PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h ABstats.h -PBN.o: Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -QuickTricks.o: ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -QuickTricks.o: QuickTricks.h -Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Scheduler.o: Timer.h ABstats.h Moves.h Stats.h -SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -SolveBoard.o: ABstats.h Moves.h Stats.h Scheduler.h threadmem.h SolverIF.h -SolveBoard.o: SolveBoard.h PBN.h -SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -SolverIF.o: ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h -SolverIF.o: ABsearch.h SolverIF.h -Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -Stats.o: ABstats.h Moves.h Stats.h Scheduler.h -Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -Timer.o: ABstats.h Moves.h Stats.h Scheduler.h -TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -TransTable.o: ABstats.h Moves.h Stats.h Scheduler.h diff --git a/src/Makefiles/Makefile_Mac_clang_shared b/src/Makefiles/Makefile_Mac_clang_shared new file mode 100644 index 00000000..eb0c33d4 --- /dev/null +++ b/src/Makefiles/Makefile_Mac_clang_shared @@ -0,0 +1,125 @@ +# --------------------- INFORMATION -------------------------------- + +# This the DDS Makefile for MacOS and the clang compiler. +# It creates a dynamically linked (shared) library, libdds.so. + +# --------------------- CONFIGURATION ------------------------------ + +# You can configure the following: + +# 1. The threading systems that you want in the library. +# You will always get single-threading. If you have multiple +# threading systems, the default will be the multi-threading one +# with the lowest number (see System.cpp). All that matters is +# CC_THREADING. + +# GCD and WINAPI don't work on Windows. +THR_BOOST = -DDDS_THREADS_BOOST +THR_GCD = -DDDS_THREADS_GCD +THR_OPENMP = -DDDS_THREADS_OPENMP +THR_WINAPI = -DDDS_THREADS_WINAPI +THR_STL = -DDDS_THREADS_STL + +THREADING = $(THR_BOOST) $(THR_GCD) $(THR_STL) + +# If you need to add something for a threading system, this is +# the place. + +CC_BOOST = /usr/local/Cellar/boost/1.56.0 +CC_BOOST_INCL = $(CC_BOOST)/include +CC_BOOST_LINK = -L$(CC_BOOST)/lib -lboost_system -lboost_thread-mt + +THREAD_COMPILE = +THREAD_LINK = $(CC_BOOST_LINK) + +# 2. The small memory option, which causes DDS to consume a lot less +# memory and to run somewhat more slowly. + +SMALL_MEMORY = -DSMALL_MEMORY_OPTION + +# 3. Debugging options. (There are more granular options in debug.h.) + +DEBUG_ALL = -DDDS_DEBUG_ALL +TIMING = -DDDS_TIMING +SCHEDULER = -DDDS_SCHEDULER + +# All that matters from no. 3 and no. 4 is the following. Here you +# can add $(SMALL_MEMORY) etc. + +DDS_BEHAVIOR = + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_SOURCE = Makefiles/sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt + +# If your compiler name is not given here, change it. +CC = g++ + +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... + +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wcomment \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wredundant-decls \ + -Wsign-promo \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-format + +COMPILE_FLAGS = -fPIC -O3 -flto -mtune=generic -std=c++11 \ + $(WARN_FLAGS) \ + $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) + +DLLBASE = dds +SHARED_LIB = lib$(DLLBASE).so + +LINK_FLAGS = \ + -shared \ + $(THREAD_LINK) \ + -fPIC + +include $(INCL_SOURCE) + +O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) + + +macos: $(O_FILES) + $(CC) -o $(SHARED_LIB) $(O_FILES) $(LINK_FLAGS) + +%.o: %.cpp + $(CC) $(COMPILE_FLAGS) -c $< + +depend: + makedepend -Y -- $(SOURCE_FILES) + +clean: + rm -f $(O_FILES) $(SHARED_LIB) + +install: + test -d ../test || mkdir ../test + test -d ../examples || mkdir ../examples + cp $(STATIC_LIB) ../test + cp $(STATIC_LIB) ../examples + +include $(INCL_DEPENDS) + diff --git a/src/Makefiles/Makefile_Mac_clang_static b/src/Makefiles/Makefile_Mac_clang_static new file mode 100644 index 00000000..20b80206 --- /dev/null +++ b/src/Makefiles/Makefile_Mac_clang_static @@ -0,0 +1,120 @@ +# --------------------- INFORMATION -------------------------------- + +# This the DDS Makefile for MacOS and the clang compiler. +# It creates a statically linked library, libdds.a. + +# --------------------- CONFIGURATION ------------------------------ + +# You can configure the following: + +# 1. The threading systems that you want in the library. +# You will always get single-threading. If you have multiple +# threading systems, the default will be the multi-threading one +# with the lowest number (see System.cpp). All that matters is +# CC_THREADING. + +# GCD and WINAPI don't work on Windows. +THR_BOOST = -DDDS_THREADS_BOOST +THR_GCD = -DDDS_THREADS_GCD +THR_OPENMP = -DDDS_THREADS_OPENMP +THR_WINAPI = -DDDS_THREADS_WINAPI +THR_STL = -DDDS_THREADS_STL + +THREADING = $(THR_BOOST) $(THR_GCD) $(THR_STL) + +# If you need to add something for a threading system, this is +# the place. + +CC_BOOST = /usr/local/Cellar/boost/1.56.0 +CC_BOOST_INCL = $(CC_BOOST)/include +CC_BOOST_LINK = -L$(CC_BOOST)/lib -lboost_system -lboost_thread-mt + +THREAD_COMPILE = +THREAD_LINK = $(CC_BOOST_LINK) + +# 2. The small memory option, which causes DDS to consume a lot less +# memory and to run somewhat more slowly. + +SMALL_MEMORY = -DSMALL_MEMORY_OPTION + +# 3. Debugging options. (There are more granular options in debug.h.) + +DEBUG_ALL = -DDDS_DEBUG_ALL +TIMING = -DDDS_TIMING +SCHEDULER = -DDDS_SCHEDULER + +# All that matters from no. 2 and no. 3 is the following. Here you +# can add $(SMALL_MEMORY) etc. + +DDS_BEHAVIOR = + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_SOURCE = Makefiles/sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt + +# If your compiler name is not given here, change it. +CC = g++ + +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... + +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wcomment \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wredundant-decls \ + -Wsign-promo \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-format + +COMPILE_FLAGS = -O3 -flto -mtune=generic -std=c++11 \ + $(WARN_FLAGS) \ + $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) + +DLLBASE = dds +STATIC_LIB = lib$(DLLBASE).a + +include $(INCL_SOURCE) + +O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) + + +macos: $(O_FILES) + ar rcs $(STATIC_LIB) $(O_FILES) + +%.o: %.cpp + $(CC) $(COMPILE_FLAGS) -c $< + +depend: + makedepend -Y -- $(SOURCE_FILES) + +clean: + rm -f $(O_FILES) $(STATIC_LIB) + +install: + test -d ../test || mkdir ../test + test -d ../examples || mkdir ../examples + cp $(STATIC_LIB) ../test + cp $(STATIC_LIB) ../examples + +include $(INCL_DEPENDS) + diff --git a/src/Makefiles/Makefile_Mac_gcc b/src/Makefiles/Makefile_Mac_gcc deleted file mode 100644 index 4a2be4c9..00000000 --- a/src/Makefiles/Makefile_Mac_gcc +++ /dev/null @@ -1,146 +0,0 @@ -# This the DDS Makefile for Mac and the GNU g++ compiler. -# Only OpenMP works here. - -# If you want to compile a single-threaded version, use -# make DDS_THREADS=none - -# If your compiler name is not given here, change it. -CC = gcc-4.9 - -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -fopenmp -mtune=generic - -LD_FLAGS = \ - -Wl,--dynamicbase \ - -Wl,--nxcompat \ - -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup - - -# These flags are not turned on be default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - -fno-use-linker-plugin \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wnoexcept \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wredundant-decls \ - -Wsign-promo \ - -Wstrict-null-sentinel \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -# Here you can turn on warnings. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -DLLBASE = dds -STATIC_LIB = lib$(DLLBASE).a - -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolverIF.cpp \ - Stats.cpp \ - Timer.cpp \ - TransTable.cpp - -O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) - -ifeq ($(DDS_THREADS),none) -DDS_THR = -DDDS_THREADS_SINGLE -else -DDS_THR = -endif - - -mac: $(O_FILES) - ar rcs $(STATIC_LIB) $(O_FILES) - -%.o: %.cpp - $(CC) $(CC_FULL_FLAGS) $(DDS_THR) -c $< - -depend: - makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) - -clean: - rm -f $(O_FILES) $(STATIC_LIB) - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(STATIC_LIB) ../test - cp $(STATIC_LIB) ../examples - - -# DO NOT DELETE - -dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h Timer.h ABstats.h -dds.o: Moves.h Stats.h Scheduler.h Init.h -ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -ABsearch.o: ABstats.h Moves.h Stats.h Scheduler.h threadmem.h QuickTricks.h -ABsearch.o: LaterTricks.h ABsearch.h -ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -ABstats.o: ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -CalcTables.o: ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h PBN.h -DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -DealerPar.o: ABstats.h Moves.h Stats.h Scheduler.h -Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -Init.o: ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h ABsearch.h -LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -LaterTricks.o: ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -LaterTricks.o: LaterTricks.h -Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -Moves.o: ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h ABstats.h -Par.o: Moves.h Stats.h Scheduler.h -PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -PlayAnalyser.o: ABstats.h Moves.h Stats.h Scheduler.h threadmem.h SolverIF.h -PlayAnalyser.o: PBN.h -PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h ABstats.h -PBN.o: Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -QuickTricks.o: ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -QuickTricks.o: QuickTricks.h -Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Scheduler.o: Timer.h ABstats.h Moves.h Stats.h -SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -SolveBoard.o: ABstats.h Moves.h Stats.h Scheduler.h threadmem.h SolverIF.h -SolveBoard.o: SolveBoard.h PBN.h -SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -SolverIF.o: ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h -SolverIF.o: ABsearch.h SolverIF.h -Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -Stats.o: ABstats.h Moves.h Stats.h Scheduler.h -Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -Timer.o: ABstats.h Moves.h Stats.h Scheduler.h -TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Timer.h -TransTable.o: ABstats.h Moves.h Stats.h Scheduler.h diff --git a/src/Makefiles/Makefile_Mac_gcc_shared b/src/Makefiles/Makefile_Mac_gcc_shared new file mode 100644 index 00000000..2e8461f2 --- /dev/null +++ b/src/Makefiles/Makefile_Mac_gcc_shared @@ -0,0 +1,125 @@ +# --------------------- INFORMATION -------------------------------- + +# This the DDS Makefile for MacOS and the g++ compiler. +# It creates a dynamically linked (shared) library, libdds.so. + +# --------------------- CONFIGURATION ------------------------------ + +# You can configure the following: + +# 1. The threading systems that you want in the library. +# You will always get single-threading. If you have multiple +# threading systems, the default will be the multi-threading one +# with the lowest number (see System.cpp). All that matters is +# CC_THREADING. + +# GCD and WINAPI don't work on Windows. +THR_BOOST = -DDDS_THREADS_BOOST +THR_GCD = -DDDS_THREADS_GCD +THR_OPENMP = -DDDS_THREADS_OPENMP +THR_WINAPI = -DDDS_THREADS_WINAPI +THR_STL = -DDDS_THREADS_STL + +THREADING = $(THR_OPENMP) $(THR_STL) + +# If you need to add something for a threading system, this is +# the place. + +THREAD_COMPILE = +THREAD_LINK = -lgomp + +# 2. The small memory option, which causes DDS to consume a lot less +# memory and to run somewhat more slowly. + +SMALL_MEMORY = -DSMALL_MEMORY_OPTION + +# 3. Debugging options. (There are more granular options in debug.h.) + +DEBUG_ALL = -DDDS_DEBUG_ALL +TIMING = -DDDS_TIMING +SCHEDULER = -DDDS_SCHEDULER + +# All that matters from no. 3 and no. 4 is the following. Here you +# can add $(SMALL_MEMORY) etc. + +DDS_BEHAVIOR = + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_SOURCE = Makefiles/sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt + +# If your compiler name is not given here, change it. +CC = gcc-4.9 + +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... + +WARN_FLAGS = \ + -fno-use-linker-plugin \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wlogical-op \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wnoexcept \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wredundant-decls \ + -Wsign-promo \ + -Wstrict-null-sentinel \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-format + +COMPILE_FLAGS = -fPIC -O3 -flto -mtune=generic -Wno-write-string \ + -fopenmp -std=c++11 \ + $(WARN_FLAGS) \ + $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) + +DLLBASE = dds +SHARED_LIB = lib$(DLLBASE).so + +LINK_FLAGS = \ + -shared \ + $(THREAD_LINK) \ + -fPIC + +include $(INCL_SOURCE) + +O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) + + +macos: $(O_FILES) + $(CC) -o $(SHARED_LIB) $(O_FILES) $(LINK_FLAGS) -lstdc++ + +%.o: %.cpp + $(CC) $(COMPILE_FLAGS) -c $< + +depend: + makedepend -Y -- $(SOURCE_FILES) + +clean: + rm -f $(O_FILES) $(SHARED_LIB) + +install: + test -d ../test || mkdir ../test + test -d ../examples || mkdir ../examples + cp $(STATIC_LIB) ../test + cp $(STATIC_LIB) ../examples + +include $(INCL_DEPENDS) + diff --git a/src/Makefiles/Makefile_Mac_gcc_static b/src/Makefiles/Makefile_Mac_gcc_static new file mode 100644 index 00000000..00febe82 --- /dev/null +++ b/src/Makefiles/Makefile_Mac_gcc_static @@ -0,0 +1,129 @@ +# --------------------- INFORMATION -------------------------------- + +# This the DDS Makefile for MacOS and the GNU g++ compiler. +# It creates a statically linked library, libdds.a. + +# --------------------- CONFIGURATION ------------------------------ + +# You can configure the following: + +# 1. The threading systems that you want in the library. +# You will always get single-threading. If you have multiple +# threading systems, the default will be the multi-threading one +# with the lowest number (see System.cpp). All that matters is +# CC_THREADING. + +# GCD and WINAPI don't work on Windows. +THR_BOOST = -DDDS_THREADS_BOOST +THR_GCD = -DDDS_THREADS_GCD +THR_OPENMP = -DDDS_THREADS_OPENMP +THR_WINAPI = -DDDS_THREADS_WINAPI +THR_STL = -DDDS_THREADS_STL + +THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_STL) + +# If you need to add something for a threading system, this is +# the place. + +CC_BOOST = /usr/local/Cellar/boost/1.56.0 +CC_BOOST_INCL = $(CC_BOOST)/include +CC_BOOST_LINK = -L$(CC_BOOST)/lib -lboost_system -lboost_thread-mt + +THREAD_COMPILE = +THREAD_LINK = $(CC_BOOST_LINK) + +# 2. The small memory option, which causes DDS to consume a lot less +# memory and to run somewhat more slowly. + +SMALL_MEMORY = -DSMALL_MEMORY_OPTION + +# 3. Debugging options. (There are more granular options in debug.h.) + +DEBUG_ALL = -DDDS_DEBUG_ALL +TIMING = -DDDS_TIMING +SCHEDULER = -DDDS_SCHEDULER + +# All that matters from no. 3 and no. 4 is the following. Here you +# can add $(SMALL_MEMORY) etc. + +DDS_BEHAVIOR = + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_SOURCE = Makefiles/sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt + +# If your compiler name is not given here, change it. +CC = gcc-4.9 + +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... + +WARN_FLAGS = \ + -fno-use-linker-plugin \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wlogical-op \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wnoexcept \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wredundant-decls \ + -Wsign-promo \ + -Wstrict-null-sentinel \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-format + +COMPILE_FLAGS = -O3 -flto -fopenmp -mtune=generic -std=c++11 \ + $(WARN_FLAGS) \ + $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) + +DLLBASE = dds +STATIC_LIB = lib$(DLLBASE).a + +LD_FLAGS = \ + -Wl,--dynamicbase \ + -Wl,--nxcompat \ + -Wl,--no-seh \ + -Wl,--enable-stdcall-fixup + +include $(INCL_SOURCE) + +O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) + + +macos: $(O_FILES) + ar rcs $(STATIC_LIB) $(O_FILES) + +%.o: %.cpp + $(CC) $(COMPILE_FLAGS) -c $< + +depend: + makedepend -Y -- $(SOURCE_FILES) + +clean: + rm -f $(O_FILES) $(STATIC_LIB) + +install: + test -d ../test || mkdir ../test + test -d ../examples || mkdir ../examples + cp $(STATIC_LIB) ../test + cp $(STATIC_LIB) ../examples + +include $(INCL_DEPENDS) + diff --git a/src/Makefiles/Makefile_Mac_shared b/src/Makefiles/Makefile_Mac_shared deleted file mode 100644 index 1e0617b6..00000000 --- a/src/Makefiles/Makefile_Mac_shared +++ /dev/null @@ -1,150 +0,0 @@ -# This the DDS Makefile for Linux and the GNU g++ compiler. -# Only OpenMP works here. - -# If you want to compile a single-threaded version, use -# make DDS_THREADS=none - -# If your compiler name is not given here, change it. -CC = gcc-4.9 - -# Use this one to get OpenMP multi-threading -CC_FLAGS = -fPIC -g -O3 -flto -fopenmp -mtune=generic -Wno-write-strings - - -# These flags are not turned on be default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - -fno-use-linker-plugin \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wnoexcept \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wredundant-decls \ - -Wsign-promo \ - -Wstrict-null-sentinel \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -# Here you can turn on warnings. -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -DLLBASE = dds -SHARED_LIB = lib$(DLLBASE).so - -# Major version -MAJOR = 2 - -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolverIF.cpp \ - Stats.cpp \ - Timer.cpp \ - TransTable.cpp - -O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) - -ifeq ($(DDS_THREADS),none) -DDS_THR = -DDDS_THREADS_SINGLE -else -DDS_THR = -endif - - -mac: $(O_FILES) - $(CC) -dynamiclib -fopenmp \ - -o $(SHARED_LIB) ABsearch.o ABstats.o CalcTables.o \ - DealerPar.o Init.o LaterTricks.o Moves.o PBN.o Par.o \ - PlayAnalyser.o QuickTricks.o SolveBoard.o \ - SolverIF.o Stats.o Timer.o TransTable.o dds.o \ - Scheduler.o -lstdc++ - -%.o: %.cpp - $(CC) $(CC_FULL_FLAGS) $(DDS_THR) -c $< - -depend: - makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) - -clean: - rm -f $(O_FILES) $(SHARED_LIB) - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(SHARED_LIB) ../test - cp $(SHARED_LIB) ../examples - cp $(SHARED_LIB) /usr/lib - - -# DO NOT DELETE - -dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -ABsearch.o: QuickTricks.h LaterTricks.h ABsearch.h -ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -CalcTables.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h -CalcTables.o: PBN.h -DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -DealerPar.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.o: ABsearch.h -LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -LaterTricks.o: threadmem.h LaterTricks.h -Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.o: Scheduler.h threadmem.h SolverIF.h PBN.h -PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -QuickTricks.o: threadmem.h QuickTricks.h -Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -SolveBoard.o: SolverIF.h SolveBoard.h PBN.h -SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h -SolverIF.o: ABsearch.h SolverIF.h -Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -TransTable.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h diff --git a/src/System.cpp b/src/System.cpp index f07998c8..62958334 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -27,6 +27,10 @@ #endif #endif +#ifdef DDS_THREADS_GCD + #include +#endif + #ifdef DDS_THREADS_STL #include #endif @@ -372,9 +376,9 @@ int System::RunThreadsGCD() dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^(size_t t) { - thid = static_cast(t); + int thid = static_cast(t); (*fptr)(thid); - } + }); #endif return RETURN_NO_FAULT; @@ -453,7 +457,8 @@ string System::GetVersion( minor = (DDS_VERSION - major * 10000) / 100; patch = DDS_VERSION % 100; - string st = STR(major) + "." + STR(minor) + "." + STR(patch); + string st = to_string(major) + "." + to_string(minor) + + "." + to_string(patch); return st; } @@ -468,7 +473,7 @@ string System::GetSystem(int& sys) const sys = 3; #elif defined(__APPLE__) sys = 4; -#elif +#ellse sys = 0; #endif @@ -482,11 +487,11 @@ string System::GetCompiler(int& comp) const comp = 1; #elif defined(__MINGW32__) comp = 2; +#elif defined(__clang__) + comp = 4; // Out-of-order on purpose #elif defined(__GNUC__) comp = 3; -#elif defined(__clang__) - comp = 4; -#elif +#else comp = 0; #endif @@ -500,7 +505,7 @@ string System::GetConstructor(int& cons) const cons = 1; #elif defined(USES_CONSTRUCTOR) cons = 2; -#elif +#else cons = 0; #endif @@ -541,7 +546,7 @@ string System::str(DDSInfo * info) const ss << left << setw(13) << "Compiler" << setw(20) << right << strCompiler << "\n"; - const string strConstructor = System::GetCompiler(info->constructor); + const string strConstructor = System::GetConstructor(info->constructor); ss << left << setw(13) << "Constructor" << setw(20) << right << strConstructor << "\n"; diff --git a/src/TimerGroup.cpp b/src/TimerGroup.cpp index 40476d60..0d8a3326 100644 --- a/src/TimerGroup.cpp +++ b/src/TimerGroup.cpp @@ -44,7 +44,7 @@ void TimerGroup::SetNames(const string& s) // Special format emphasizing the card number within the trick. for (unsigned i = 0; i < timers.size(); i++) { - st = s + STR(i % 4) + " " + STR(i); + st = s + to_string(i % 4) + " " + to_string(i); timers[i].SetName(st); } } @@ -52,7 +52,7 @@ void TimerGroup::SetNames(const string& s) { for (unsigned i = 0; i < timers.size(); i++) { - st = s + STR(i); + st = s + to_string(i); timers[i].SetName(st); } } diff --git a/src/TimerList.cpp b/src/TimerList.cpp index be1b9b6e..2508309b 100644 --- a/src/TimerList.cpp +++ b/src/TimerList.cpp @@ -109,7 +109,8 @@ void TimerList::PrintStats(const int thrId) const sumTotal += t; } - const string fname = DDS_TIMING_PREFIX + STR(thrId) + DDS_DEBUG_SUFFIX; + const string fname = DDS_TIMING_PREFIX + to_string(thrId) + + DDS_DEBUG_SUFFIX; ofstream fout; fout.open(fname); diff --git a/src/dds.h b/src/dds.h index eabc232a..f6f12d81 100644 --- a/src/dds.h +++ b/src/dds.h @@ -54,9 +54,6 @@ #define Max(x, y) (((x) >= (y)) ? (x) : (y)) #define Min(x, y) (((x) <= (y)) ? (x) : (y)) -#define STR(x) \ - static_cast(&(ostringstream() << x))->str() - #define DDS_NOTRUMP 4 /* "hand" is leading hand, "relative" is hand relative leading diff --git a/test/Makefiles/Makefile_Mac_clang b/test/Makefiles/Makefile_Mac_clang index 3bb75c59..e99ad913 100644 --- a/test/Makefiles/Makefile_Mac_clang +++ b/test/Makefiles/Makefile_Mac_clang @@ -59,7 +59,11 @@ DTEST_SOURCE_FILES = \ testcommon.cpp \ testStats.cpp -LIB_FLAGS = -L. -l$(DLLBASE) +# TODO: This is only for the .a static library. +CC_BOOST = /usr/local/Cellar/boost/1.56.0 +CC_BOOST_LINK = -L$(CC_BOOST)/lib -lboost_system -lboost_thread-mt + +LIB_FLAGS = -L. -l$(DLLBASE) $(CC_BOOST_LINK) DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o diff --git a/test/Makefiles/Makefile_Mac_gcc b/test/Makefiles/Makefile_Mac_gcc index 598f88d6..12fc4a62 100644 --- a/test/Makefiles/Makefile_Mac_gcc +++ b/test/Makefiles/Makefile_Mac_gcc @@ -66,7 +66,11 @@ DTEST_SOURCE_FILES = \ testcommon.cpp \ testStats.cpp -LIB_FLAGS = -L. -l$(DLLBASE) +#TODO: This is only for the .a static library. +CC_BOOST = /usr/local/Cellar/boost/1.56.0 +CC_BOOST_LINK = -L$(CC_BOOST)/lib -lboost_system -lboost_thread-mt + +LIB_FLAGS = -L. -l$(DLLBASE) $(CC_BOOST_LINK) LD_FLAGS = -lgomp -lstdc++ DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o From bd500dee96cc20c46937c881fa015af3775055cb Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Wed, 21 Mar 2018 23:28:21 +0100 Subject: [PATCH 029/132] mingw works, but not yet pretty --- src/Init.cpp | 2 + src/Makefile_Mac_clang_shared | 128 ---------------- src/Makefile_Mac_clang_static | 118 --------------- src/Makefile_mingw_stillbad | 4 +- src/Makefiles/Makefile_mingw_new | 188 +++++++++++++++++++++++ test/Makefile_mingw_stillbad | 2 +- test/Makefiles/Makefile_mingw_new | 244 ++++++++++++++++++++++++++++++ 7 files changed, 437 insertions(+), 249 deletions(-) delete mode 100644 src/Makefile_Mac_clang_shared delete mode 100644 src/Makefile_Mac_clang_static create mode 100644 src/Makefiles/Makefile_mingw_new create mode 100644 test/Makefiles/Makefile_mingw_new diff --git a/src/Init.cpp b/src/Init.cpp index 88301008..4430fa2b 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -151,6 +151,8 @@ void STDCALL SetMaxThreads( else noOfThreads = ncores; + sysdep.Register(DDS_SYSTEM_SOLVE, noOfThreads); + int mem_def, mem_max; CalcThreadMemory(oldNoOfThreads, kilobytesUsable, mem_def, mem_max); diff --git a/src/Makefile_Mac_clang_shared b/src/Makefile_Mac_clang_shared deleted file mode 100644 index ec8f0c10..00000000 --- a/src/Makefile_Mac_clang_shared +++ /dev/null @@ -1,128 +0,0 @@ -# --------------------- INFORMATION -------------------------------- - -# This the DDS Makefile for MacOS and the clang compiler. -# It creates a dynamically linked (shared) library, libdds.so. - -# --------------------- CONFIGURATION ------------------------------ - -# You can configure the following: - -# 1. The threading systems that you want in the library. -# You will always get single-threading. If you have multiple -# threading systems, the default will be the multi-threading one -# with the lowest number (see System.cpp). All that matters is -# CC_THREADING. - -# GCD and WINAPI don't work on Windows. -THR_BOOST = -DDDS_THREADS_BOOST -THR_GCD = -DDDS_THREADS_GCD -THR_OPENMP = -DDDS_THREADS_OPENMP -THR_WINAPI = -DDDS_THREADS_WINAPI -THR_STL = -DDDS_THREADS_STL - -THREADING = $(THR_BOOST) $(THR_GCD) $(THR_OPENMP) $(THR_STL) - -# If you need to add something for a threading system, this is -# the place. - -CC_BOOST_LINK = -lboost_system -lboost_thread - -THREAD_COMPILE = -fopenmp -THREAD_LINK = -fopenmp $(CC_BOOST_LINK) - -# 2. The small memory option, which causes DDS to consume a lot less -# memory and to run somewhat more slowly. - -SMALL_MEMORY = -DSMALL_MEMORY_OPTION - -# 3. Debugging options. (There are more granular options in debug.h.) - -DEBUG_ALL = -DDDS_DEBUG_ALL -TIMING = -DDDS_TIMING -SCHEDULER = -DDDS_SCHEDULER - -# All that matters from no. 3 and no. 4 is the following. Here you -# can add $(SMALL_MEMORY) etc. - -DDS_BEHAVIOR = - -# ----------------------- OFTEN OK ------------------------------ - -# From here on you you don't have to change anything to CONFIGURE -# the compilation. But you may well have to change something to -# get it to compile. - -INCL_SOURCE = Makefiles/sources.txt -INCL_DEPENDS = Makefiles/depends_o.txt - -# If your compiler name is not given here, change it. -CC = g++ - -# We compile with aggressive warnings, but we have to turn off some -# of them as they appear in libraries in great numbers... - -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wcomment \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wredundant-decls \ - -Wsign-promo \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -COMPILE_FLAGS = -fPIC -O3 -flto -fopenmp -mtune=generic -std=c++11 \ - $(WARN_FLAGS) \ - $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) - -DLLBASE = dds -SHARED_LIB = lib$(DLLBASE).so - -LINK_FLAGS = \ - -shared \ - -Wl,-O2 \ - -Wl,--sort-common \ - -Wl,--as-needed \ - -Wl,z \ - -Wl,relro \ - $(THREAD_LINK) \ - -fPIC - -include $(INCL_SOURCE) - -O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) - - -macos: $(O_FILES) - $(CC) -o $(SHARED_LIB) $(O_FILES) $(LINK_FLAGS) - -%.o: %.cpp - $(CC) $(COMPILE_FLAGS) -c $< - -depend: - makedepend -Y -- $(SOURCE_FILES) - -clean: - rm -f $(O_FILES) $(SHARED_LIB) - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(STATIC_LIB) ../test - cp $(STATIC_LIB) ../examples - -include $(INCL_DEPENDS) - diff --git a/src/Makefile_Mac_clang_static b/src/Makefile_Mac_clang_static deleted file mode 100644 index 5128b5a9..00000000 --- a/src/Makefile_Mac_clang_static +++ /dev/null @@ -1,118 +0,0 @@ -# --------------------- INFORMATION -------------------------------- - -# This the DDS Makefile for MacOS and the clang compiler. -# It creates a statically linked library, libdds.a. - -# --------------------- CONFIGURATION ------------------------------ - -# You can configure the following: - -# 1. The threading systems that you want in the library. -# You will always get single-threading. If you have multiple -# threading systems, the default will be the multi-threading one -# with the lowest number (see System.cpp). All that matters is -# CC_THREADING. - -# GCD and WINAPI don't work on Windows. -THR_BOOST = -DDDS_THREADS_BOOST -THR_GCD = -DDDS_THREADS_GCD -THR_OPENMP = -DDDS_THREADS_OPENMP -THR_WINAPI = -DDDS_THREADS_WINAPI -THR_STL = -DDDS_THREADS_STL - -THREADING = $(THR_BOOST) $(THR_GCD) $(THR_OPENMP) $(THR_STL) - -# If you need to add something for a threading system, this is -# the place. - -CC_BOOST_LINK = -lboost_system -lboost_thread - -THREAD_COMPILE = -fopenmp -THREAD_LINK = $(CC_BOOST_LINK) - -# 2. The small memory option, which causes DDS to consume a lot less -# memory and to run somewhat more slowly. - -SMALL_MEMORY = -DSMALL_MEMORY_OPTION - -# 3. Debugging options. (There are more granular options in debug.h.) - -DEBUG_ALL = -DDDS_DEBUG_ALL -TIMING = -DDDS_TIMING -SCHEDULER = -DDDS_SCHEDULER - -# All that matters from no. 3 and no. 4 is the following. Here you -# can add $(SMALL_MEMORY) etc. - -DDS_BEHAVIOR = - -# ----------------------- OFTEN OK ------------------------------ - -# From here on you you don't have to change anything to CONFIGURE -# the compilation. But you may well have to change something to -# get it to compile. - -INCL_SOURCE = Makefiles/sources.txt -INCL_DEPENDS = Makefiles/depends_o.txt - -# If your compiler name is not given here, change it. -CC = g++ - -# We compile with aggressive warnings, but we have to turn off some -# of them as they appear in libraries in great numbers... - -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wcomment \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wredundant-decls \ - -Wsign-promo \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -COMPILE_FLAGS = -O3 -flto -fopenmp -mtune=generic -std=c++11 \ - $(WARN_FLAGS) \ - $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) - -DLLBASE = dds -STATIC_LIB = lib$(DLLBASE).a - -include $(INCL_SOURCE) - -O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) - - -macos: $(O_FILES) - ar rcs $(STATIC_LIB) $(O_FILES) - -%.o: %.cpp - $(CC) $(COMPILE_FLAGS) -c $< - -depend: - makedepend -Y -- $(SOURCE_FILES) - -clean: - rm -f $(O_FILES) $(STATIC_LIB) - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(STATIC_LIB) ../test - cp $(STATIC_LIB) ../examples - -include $(INCL_DEPENDS) - diff --git a/src/Makefile_mingw_stillbad b/src/Makefile_mingw_stillbad index 70d42a92..486a16fe 100644 --- a/src/Makefile_mingw_stillbad +++ b/src/Makefile_mingw_stillbad @@ -87,8 +87,8 @@ mingw: $(O_FILES) $(CC) -shared \ -o $(DLL) \ $(O_FILES) \ - -Wl,--out-implib,libdds.a \ - -lboost_system -lboost_thread + -lboost_system -lboost_thread \ + -Wl,--out-implib,libdds.a %.o: %.cpp diff --git a/src/Makefiles/Makefile_mingw_new b/src/Makefiles/Makefile_mingw_new new file mode 100644 index 00000000..7cbbf89b --- /dev/null +++ b/src/Makefiles/Makefile_mingw_new @@ -0,0 +1,188 @@ +# This the DDS Makefile for Windows and the MinGW compiler. +# It does assume a Unix-like setup for some commands, +# but if you only want to call "make" with the default target, +# you should be OK. + +# If you want to compile a single-threaded version, use +# DDS_THREADS=none + +# The "windres" and "cvtres" tools are used for putting version +# information into the DLL in a way that Windows can see. +# It is not mandatory, and if you don't have those tools, +# You can remove $(VFILE).obj in the target line below. + + +# If your exact compiler name is not given here, change it. +# CC = mingw32-g++ +# CC = i686-w64-mingw32-g++ +CC = g++ + +# Use this one to get Windows multi-threading +# CC_FLAGS = -O3 -flto -mtune=generic +# Use this one to get OpenMP multi-threading +CC_FLAGS = -O3 -DBUILDING_EXAMPLE_DLL -fopenmp + +LD_FLAGS = \ + -Wl,--subsystem,windows \ + -Wl,--output-def,$(DLLBASE).def \ + -Wl,--dynamicbase \ + -Wl,--nxcompat \ + -Wl,--no-seh \ + -Wl,--enable-stdcall-fixup \ + -lboost_system \ + -lboost_thread + + +# These flags are not turned on be default, but DDS should pass them. +# Turn them on below. +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wlogical-op \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wnoexcept \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wsign-promo \ + -Wstrict-null-sentinel \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-format + +# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION +# CC_FULL_FLAGS = $(CC_FLAGS) +CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) + +LIB_FLAGS = -shared + +DLLBASE = dds +DLL = $(DLLBASE).dll +EXPORTER = Exports.def + +VFILE = ddsres +WINDRES_FLAG = -F pe-x86-64 + +SOURCE_FILES = \ + dds.cpp \ + ABsearch.cpp \ + ABstats.cpp \ + CalcTables.cpp \ + DealerPar.cpp \ + Init.cpp \ + LaterTricks.cpp \ + Moves.cpp \ + Par.cpp \ + PlayAnalyser.cpp \ + PBN.cpp \ + QuickTricks.cpp \ + Scheduler.cpp \ + SolveBoard.cpp \ + SolverIF.cpp \ + System.cpp \ + Timer.cpp \ + TransTable.cpp + +O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o + +ifeq ($(DDS_THREADS),none) +DDS_THR = -DDDS_THREADS_SINGLE +else +DDS_THR = -DDDS_THREADS_BOOST -DDDS_THREADS_OPENMP -DDDS_THREADS_STL +endif + + +mingw: $(O_FILES) + $(CC) $(LIB_FLAGS) $(O_FILES) -o $(DLL) -lgomp -lboost_system -lboost_thread -Wl,--out-implib,libdds.a -Wl,--no-undefined + +%.o: %.cpp + $(CC) $(CC_FLAGS) $(DDS_THR) -c $< + +$(DLLBASE).res: $(DLLBASE).rc + windres $(DLLBASE).rc $(DLLBASE).res + +$(VFILE).o: $(DLLBASE).rc + windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o + +depend: + makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) + +clean: + rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} + +install: + test -d ../test || mkdir ../test + test -d ../examples || mkdir ../examples + cp $(DLL) $(DLLBASE).def ../test + cp $(DLL) $(DLLBASE).def ../examples + + +# DO NOT DELETE + +dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +dds.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +dds.o: TimeStatList.h TimeStat.h Init.h +ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABsearch.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +ABsearch.o: TimeStatList.h TimeStat.h threadmem.h QuickTricks.h LaterTricks.h +ABsearch.o: ABsearch.h +ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +ABstats.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +ABstats.o: TimeStatList.h TimeStat.h +CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +CalcTables.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +CalcTables.o: TimeStatList.h TimeStat.h SolveBoard.h PBN.h +DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +DealerPar.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +DealerPar.o: TimeStatList.h TimeStat.h +Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Init.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +Init.o: TimeStatList.h TimeStat.h threadmem.h Init.h ABsearch.h System.h +LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h +LaterTricks.o: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +LaterTricks.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +LaterTricks.o: LaterTricks.h +Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Moves.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +Moves.o: TimeStatList.h TimeStat.h ABsearch.h +Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +Par.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +Par.o: TimeStatList.h TimeStat.h +PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h +PlayAnalyser.o: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +PlayAnalyser.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +PlayAnalyser.o: SolverIF.h System.h PBN.h +PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +PBN.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +PBN.o: TimeStatList.h TimeStat.h PBN.h +QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h +QuickTricks.o: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h +QuickTricks.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +QuickTricks.o: QuickTricks.h +Scheduler.o: Scheduler.h TimeStatList.h TimeStat.h dds.h debug.h +Scheduler.o: ../include/portab.h TransTable.h ../include/dll.h TimerList.h +Scheduler.o: TimerGroup.h Timer.h ABstats.h Moves.h +SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +SolveBoard.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +SolveBoard.o: TimeStatList.h TimeStat.h threadmem.h SolverIF.h SolveBoard.h +SolveBoard.o: System.h PBN.h +SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +SolverIF.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +SolverIF.o: TimeStatList.h TimeStat.h Init.h threadmem.h ABsearch.h +SolverIF.o: SolverIF.h +System.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h +System.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +System.o: TimeStatList.h TimeStat.h System.h SolveBoard.h PlayAnalyser.h +Timer.o: Timer.h ../include/portab.h +TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h +TransTable.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h +TransTable.o: TimeStatList.h TimeStat.h diff --git a/test/Makefile_mingw_stillbad b/test/Makefile_mingw_stillbad index d63fdb7a..da018e11 100644 --- a/test/Makefile_mingw_stillbad +++ b/test/Makefile_mingw_stillbad @@ -92,7 +92,7 @@ ITEST_SOURCE_FILES = \ ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) dtest: $(DTEST_OBJ_FILES) - $(CC) $(DTEST_OBJ_FILES) -L. -ldds.dll -o $(DTEST) + $(CC) -o $(DTEST) $(DTEST_OBJ_FILES) -L. -ldds itest: $(ITEST_OBJ_FILES) $(CC) $(CC_FULL_FLAGS) $(ITEST_OBJ_FILES) $(LD_FLAGS) -o $(ITEST) diff --git a/test/Makefiles/Makefile_mingw_new b/test/Makefiles/Makefile_mingw_new new file mode 100644 index 00000000..6b915d1b --- /dev/null +++ b/test/Makefiles/Makefile_mingw_new @@ -0,0 +1,244 @@ +# This is a Makefile for the dtest test program, +# for Windows and the minGW compiler. + +# It does assume a Unix-like setup for some commands, +# but if you only want to call "make" with the default target, +# you should be OK. + +# The test program itself does not use multi-threading, +# but the DLL might, depending on how it was compiled. + +# The Makefile also allows an "un-official" and ugly, but +# sometimes practical compilation of a directly integrated +# executable (i.e. not using the DLL). For this the Makefile +# uses the source and object files in the src directory... +# Use "make itest" at your own risk. + + +# If your exact compiler name is not given here, change it. +# CC = mingw32-g++ +# CC = i686-w64-mingw32-g++ +CC = g++ + +# Use this one to get Windows multi-threading +# CC_FLAGS = -O3 -flto -mtune=generic +# Use this one to get OpenMP multi-threading +CC_FLAGS = -O3 + +# These flags are not turned on by default, but DDS should pass them. +# Turn them on below. +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wlogical-op \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wnoexcept \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wredundant-decls \ + -Wsign-promo \ + -Wstrict-null-sentinel \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-format + +# Here you can turn on warnings. +# CC_FULL_FLAGS = $(CC_FLAGS) +CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) + +DTEST = dtest +ITEST = itest + +DLLBASE = dds +DLL = $(DLLBASE).dll +DLIB = $(DLLBASE).lib +EXPORTER = Exports.def + +# This is in addition to $(DTEST).cpp +DTEST_SOURCE_FILES = \ + testcommon.cpp \ + testStats.cpp + +LD_FLAGS = \ + -Wl,--dynamicbase \ + -Wl,--nxcompat \ + -Wl,--no-seh \ + -Wl,--enable-stdcall-fixup + +LIB_FLAGS = -L. -l$(DLLBASE) + +DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o + +# These are the files that we steal from the src directory. +SRC = ../src +STOLEN_SOURCE_FILES = \ + $(SRC)/dds.cpp \ + $(SRC)/ABsearch.cpp \ + $(SRC)/ABstats.cpp \ + $(SRC)/CalcTables.cpp \ + $(SRC)/DealerPar.cpp \ + $(SRC)/Init.cpp \ + $(SRC)/LaterTricks.cpp \ + $(SRC)/Moves.cpp \ + $(SRC)/Par.cpp \ + $(SRC)/PlayAnalyser.cpp \ + $(SRC)/PBN.cpp \ + $(SRC)/QuickTricks.cpp \ + $(SRC)/Scheduler.cpp \ + $(SRC)/SolveBoard.cpp \ + $(SRC)/SolveBoard_basic.cpp \ + $(SRC)/SolveBoard_boost.cpp \ + $(SRC)/SolveBoard_GCD.cpp \ + $(SRC)/SolveBoard_OpenMP.cpp \ + $(SRC)/SolveBoard_WinAPI.cpp \ + $(SRC)/SolverIF.cpp \ + $(SRC)/Stats.cpp \ + $(SRC)/Timer.cpp \ + $(SRC)/TransTable.cpp + +ITEST_SOURCE_FILES = \ + $(STOLEN_SOURCE_FILES) \ + $(DTEST_SOURCE_FILES) \ + itest.cpp + +ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) + +dtest: $(DTEST_OBJ_FILES) + $(CC) $(CC_FLAGS) $(DTEST_OBJ_FILES) $(LIB_FLAGS) -o $(DTEST) + +itest: $(ITEST_OBJ_FILES) + $(CC) $(CC_FULL_FLAGS) $(ITEST_OBJ_FILES) $(LD_FLAGS) -o $(ITEST) + +%.o: %.cpp + $(CC) $(CC_FLAGS) -c $< -o $*.o + +depend: + makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp + +clean: + rm -f *.o *.exe $(DLLBASE).def $(DLL) + + +# DO NOT DELETE + +../src/dds.o: ../include/dll.h ../src/dds.h ../src/debug.h +../src/dds.o: ../include/portab.h ../src/TransTable.h ../src/Timer.h +../src/dds.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/dds.o: ../src/Scheduler.h ../src/Init.h +../src/ABsearch.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/ABsearch.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/ABsearch.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/ABsearch.o: ../src/Scheduler.h ../src/threadmem.h ../src/QuickTricks.h +../src/ABsearch.o: ../src/LaterTricks.h ../src/ABsearch.h +../src/ABstats.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/ABstats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/ABstats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/ABstats.o: ../src/Scheduler.h +../src/CalcTables.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/CalcTables.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/CalcTables.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/CalcTables.o: ../src/Scheduler.h ../src/SolveBoard.h ../src/PBN.h +../src/DealerPar.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/DealerPar.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/DealerPar.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/DealerPar.o: ../src/Scheduler.h +../src/Init.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Init.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/Init.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/Init.o: ../src/Scheduler.h ../src/threadmem.h ../src/Init.h +../src/Init.o: ../src/ABsearch.h +../src/LaterTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/LaterTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/LaterTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/LaterTricks.o: ../src/Scheduler.h ../src/threadmem.h +../src/LaterTricks.o: ../src/LaterTricks.h +../src/Moves.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Moves.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/Moves.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/Moves.o: ../src/Scheduler.h ../src/ABsearch.h +../src/Par.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Par.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/Par.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/Par.o: ../src/Scheduler.h +../src/PlayAnalyser.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/PlayAnalyser.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/PlayAnalyser.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/PlayAnalyser.o: ../src/Scheduler.h ../src/threadmem.h +../src/PlayAnalyser.o: ../src/SolverIF.h ../src/PBN.h +../src/PBN.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/PBN.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/PBN.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/PBN.o: ../src/Scheduler.h ../src/PBN.h +../src/QuickTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/QuickTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/QuickTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/QuickTricks.o: ../src/Scheduler.h ../src/threadmem.h +../src/QuickTricks.o: ../src/QuickTricks.h +../src/Scheduler.o: ../src/Scheduler.h ../src/dds.h ../src/debug.h +../src/Scheduler.o: ../include/portab.h ../src/TransTable.h ../include/dll.h +../src/Scheduler.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/Scheduler.o: ../src/Stats.h +../src/SolveBoard.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/SolveBoard.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/SolveBoard.o: ../src/Scheduler.h ../src/threadmem.h ../src/SolverIF.h +../src/SolveBoard.o: ../src/SolveBoard.h ../src/PBN.h +../src/SolveBoard.o: ../src/SolveBoard_basic.h ../src/SolveBoard_boost.h +../src/SolveBoard.o: ../src/SolveBoard_GCD.h ../src/SolveBoard_OpenMP.h +../src/SolveBoard.o: ../src/SolveBoard_WinAPI.h +../src/SolveBoard_basic.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard_basic.o: ../src/TransTable.h ../include/dll.h +../src/SolveBoard_basic.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/SolveBoard_basic.o: ../src/Stats.h ../src/Scheduler.h +../src/SolveBoard_basic.o: ../src/SolveBoard.h ../src/SolveBoard_basic.h +../src/SolveBoard_boost.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard_boost.o: ../src/TransTable.h ../include/dll.h +../src/SolveBoard_boost.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/SolveBoard_boost.o: ../src/Stats.h ../src/Scheduler.h +../src/SolveBoard_boost.o: ../src/SolveBoard.h ../src/SolveBoard_boost.h +../src/SolveBoard_GCD.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard_GCD.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/SolveBoard_GCD.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/SolveBoard_GCD.o: ../src/Scheduler.h ../src/SolveBoard.h +../src/SolveBoard_GCD.o: ../src/SolveBoard_GCD.h +../src/SolveBoard_OpenMP.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard_OpenMP.o: ../src/TransTable.h ../include/dll.h +../src/SolveBoard_OpenMP.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/SolveBoard_OpenMP.o: ../src/Stats.h ../src/Scheduler.h +../src/SolveBoard_OpenMP.o: ../src/SolveBoard.h ../src/SolveBoard_OpenMP.h +../src/SolveBoard_WinAPI.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard_WinAPI.o: ../src/TransTable.h ../include/dll.h +../src/SolveBoard_WinAPI.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/SolveBoard_WinAPI.o: ../src/Stats.h ../src/Scheduler.h +../src/SolveBoard_WinAPI.o: ../src/SolveBoard.h ../src/SolveBoard_WinAPI.h +../src/SolverIF.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolverIF.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/SolverIF.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/SolverIF.o: ../src/Scheduler.h ../src/Init.h ../src/threadmem.h +../src/SolverIF.o: ../src/ABsearch.h ../src/SolverIF.h +../src/Stats.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Stats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/Stats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/Stats.o: ../src/Scheduler.h +../src/Timer.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Timer.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/Timer.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/Timer.o: ../src/Scheduler.h +../src/TransTable.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/TransTable.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h +../src/TransTable.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h +../src/TransTable.o: ../src/Scheduler.h +testcommon.o: ../include/dll.h ../include/portab.h testStats.h dtest.h +testStats.o: ../include/portab.h testStats.h +itest.o: ../include/dll.h testcommon.h +dtest.o: ../include/dll.h testcommon.h From 46bac58c05aa44db4c9017664e55223c62f76412 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Thu, 22 Mar 2018 08:15:46 +0100 Subject: [PATCH 030/132] Cleaner src Makefiles --- src/Makefiles/Makefile_cygwin | 5 - src/Makefiles/Makefile_mingw | 201 +++++++++++------------------ src/Makefiles/Makefile_mingw_all | 170 ------------------------ src/Makefiles/Makefile_mingw_new | 188 --------------------------- src/Makefiles/Makefile_mingw_tdc32 | 167 ------------------------ src/Makefiles/Makefile_mingw_tdc64 | 167 ------------------------ 6 files changed, 73 insertions(+), 825 deletions(-) delete mode 100644 src/Makefiles/Makefile_mingw_all delete mode 100644 src/Makefiles/Makefile_mingw_new delete mode 100644 src/Makefiles/Makefile_mingw_tdc32 delete mode 100644 src/Makefiles/Makefile_mingw_tdc64 diff --git a/src/Makefiles/Makefile_cygwin b/src/Makefiles/Makefile_cygwin index 85cbcde0..765fe627 100644 --- a/src/Makefiles/Makefile_cygwin +++ b/src/Makefiles/Makefile_cygwin @@ -144,8 +144,3 @@ install: include $(INCL_DEPENDS) - - -vs: $(OBJ_FILES) - $(CC) $(LINK_FLAGS1) $(OBJ_FILES) $(EXPORTER) \ - $(LINK_FLAGS2) /out:$(DLL) diff --git a/src/Makefiles/Makefile_mingw b/src/Makefiles/Makefile_mingw index 47bd42aa..fb45bfce 100644 --- a/src/Makefiles/Makefile_mingw +++ b/src/Makefiles/Makefile_mingw @@ -1,39 +1,71 @@ -# This the DDS Makefile for Windows and the MinGW compiler. -# It does assume a Unix-like setup for some commands, -# but if you only want to call "make" with the default target, -# you should be OK. +# --------------------- INFORMATION -------------------------------- -# If you want to compile a single-threaded version, use -# DDS_THREADS=none +# This the DDS Makefile for Windows and the mingw GNU g++ +# compiler. It assumes a Unix-like setup for some commands. # The "windres" and "cvtres" tools are used for putting version # information into the DLL in a way that Windows can see. # It is not mandatory, and if you don't have those tools, # You can remove $(VFILE).obj in the target line below. +# --------------------- CONFIGURATION ------------------------------ -# If your exact compiler name is not given here, change it. -# CC = mingw32-g++ -# CC = i686-w64-mingw32-g++ -CC = g++ +# You can configure the following: + +# 1. The threading systems that you want in the DLL/executable. +# You will always get single-threading. If you have multiple +# threading systems, the default will be the multi-threading one +# with the lowest number (see System.cpp). All that matters is +# CC_THREADING. + +# GCD doesn't work on Windows. +THR_BOOST = -DDDS_THREADS_BOOST +THR_GCD = -DDDS_THREADS_GCD +THR_OPENMP = -DDDS_THREADS_OPENMP +THR_WINAPI = -DDDS_THREADS_WINAPI +THR_STL = -DDDS_THREADS_STL + +THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_STL) + +# If you need to add something for a threading system, this is +# the place. + +CC_BOOST_LINK = -lboost_system -lboost_thread + +THREAD_COMPILE = -fopenmp +THREAD_LINK = -lgomp $(CC_BOOST_LINK) + +# 2. The small memory option, which causes DDS to consume a lot less +# memory and to run somewhat more slowly. + +SMALL_MEMORY = -DSMALL_MEMORY_OPTION -# Use this one to get Windows multi-threading -# CC_FLAGS = -O3 -flto -mtune=generic -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -fopenmp -mtune=generic +# 3. Debugging options. (There are more granular options in debug.h.) -LD_FLAGS = \ - -Wl,--subsystem,windows \ - -Wl,--output-def,$(DLLBASE).def \ - -Wl,--dynamicbase \ - -Wl,--nxcompat \ - -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup \ - -lpthread +DEBUG_ALL = -DDDS_DEBUG_ALL +TIMING = -DDDS_TIMING +SCHEDULER = -DDDS_SCHEDULER +# All that matters from no. 2 and no. 3 is the following. Here you +# can add $(SMALL_MEMORY) etc. + +DDS_BEHAVIOR = + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_SOURCE = Makefiles/sources.txt +INCL_DEPENDS = Makefiles/depends_obj.txt + +# If your compiler name is not given here, change it. +CC = g++ + +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... -# These flags are not turned on be default, but DDS should pass them. -# Turn them on below. WARN_FLAGS = \ -Wshadow \ -Wsign-conversion \ @@ -41,6 +73,7 @@ WARN_FLAGS = \ -Wcast-align -Wcast-qual \ -Wctor-dtor-privacy \ -Wdisabled-optimization \ + -Wformat=2 \ -Winit-self \ -Wlogical-op \ -Wmissing-declarations \ @@ -48,7 +81,6 @@ WARN_FLAGS = \ -Wnoexcept \ -Wold-style-cast \ -Woverloaded-virtual \ - -Wredundant-decls \ -Wsign-promo \ -Wstrict-null-sentinel \ -Wstrict-overflow=1 \ @@ -56,61 +88,36 @@ WARN_FLAGS = \ -Werror \ -Wno-unused \ -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format + -Wno-long-long -# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) +COMPILE_FLAGS = -O3 -DBUILDING_EXAMPLE_DLL -fopenmp \ + $(WARN_FLAGS) \ + $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) -LIB_FLAGS = -mdll +LINK1_FLAGS = -shared +LINK2_FLAGS = \ + $(THREAD_LINK) \ + -Wl,--out-implib,libdds.a \ + -Wl,--no-undefined DLLBASE = dds DLL = $(DLLBASE).dll +DLIB = $(DLLBASE).lib EXPORTER = Exports.def VFILE = ddsres WINDRES_FLAG = -F pe-x86-64 -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolveBoard_basic.cpp \ - SolveBoard_boost.cpp \ - SolveBoard_GCD.cpp \ - SolveBoard_OpenMP.cpp \ - SolveBoard_WinAPI.cpp \ - SolverIF.cpp \ - Stats.cpp \ - Timer.cpp \ - TransTable.cpp +include $(INCL_SOURCE) O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o -ifeq ($(DDS_THREADS),none) -DDS_THR = -DDDS_THREADS_SINGLE -else -DDS_THR = -endif - - mingw: $(O_FILES) - $(CC) $(LIB_FLAGS) $(CC_FULL_FLAGS) $(O_FILES) $(LD_FLAGS) $(EXPORTER) -o $(DLL) + $(CC) $(LINK1_FLAGS) $(O_FILES) \ + -o $(DLL) $(LINK2_FLAGS) %.o: %.cpp - $(CC) $(CC_FULL_FLAGS) $(DDS_THR) -c $< + $(CC) $(COMPILE_FLAGS) -c $< $(DLLBASE).res: $(DLLBASE).rc windres $(DLLBASE).rc $(DLLBASE).res @@ -119,7 +126,7 @@ $(VFILE).o: $(DLLBASE).rc windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o depend: - makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) + makedepend -Y -- $(SOURCE_FILES) clean: rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} @@ -130,67 +137,5 @@ install: cp $(DLL) $(DLLBASE).def ../test cp $(DLL) $(DLLBASE).def ../examples +include $(INCL_DEPENDS) -# DO NOT DELETE - -dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -ABsearch.o: QuickTricks.h LaterTricks.h ABsearch.h -ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -CalcTables.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h -CalcTables.o: PBN.h -DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -DealerPar.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.o: ABsearch.h -LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -LaterTricks.o: threadmem.h LaterTricks.h -Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.o: Scheduler.h threadmem.h SolverIF.h PBN.h -PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -QuickTricks.o: threadmem.h QuickTricks.h -Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -SolveBoard.o: SolverIF.h SolveBoard.h PBN.h SolveBoard_basic.h -SolveBoard.o: SolveBoard_boost.h SolveBoard_GCD.h SolveBoard_OpenMP.h -SolveBoard.o: SolveBoard_WinAPI.h -SolveBoard_basic.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_basic.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_basic.o: Scheduler.h SolveBoard.h SolveBoard_basic.h -SolveBoard_boost.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_boost.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_boost.o: Scheduler.h SolveBoard.h SolveBoard_boost.h -SolveBoard_GCD.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_GCD.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_GCD.o: Scheduler.h SolveBoard.h SolveBoard_GCD.h -SolveBoard_OpenMP.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_OpenMP.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_OpenMP.o: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h -SolveBoard_WinAPI.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_WinAPI.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_WinAPI.o: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h -SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h -SolverIF.o: ABsearch.h SolverIF.h -Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -TransTable.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h diff --git a/src/Makefiles/Makefile_mingw_all b/src/Makefiles/Makefile_mingw_all deleted file mode 100644 index 71e00b00..00000000 --- a/src/Makefiles/Makefile_mingw_all +++ /dev/null @@ -1,170 +0,0 @@ -# This the DDS Makefile for Windows and the MinGW compiler. -# It assumes a Unix-like setup for some commands. - -# The "windres" and "cvtres" tools are used for putting version -# information into the DLL in a way that Windows can see. -# It is not mandatory, and if you don't have those tools, -# You can remove $(VFILE).obj in the target line below. -# -# If you want to compile a single-threaded version, use -# DDS_THREADS=none - -# If your exact compiler name is not given here, change it. -# CC = mingw32-g++ -# CC = i686-w64-mingw32-g++ -CC = g++ - -# Use this one to get Windows multi-threading -# CC_FLAGS = -O3 -flto -mtune=generic -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -fopenmp -mtune=generic - -LD_FLAGS = \ - -Wl,--subsystem,windows \ - -Wl,--output-def,$(DLLBASE).def \ - -Wl,--dynamicbase \ - -Wl,--nxcompat \ - -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup \ - -lpthread \ - -lboost_system \ - -lboost_thread - - -# These flags are not turned on be default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wnoexcept \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wsign-promo \ - -Wstrict-null-sentinel \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION -# -DDDS_THREADS_SINGLE -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) -DDDS_THREADS_BOOST - -LIB_FLAGS = -mdll - -DLLBASE = dds -DLL = $(DLLBASE).dll -EXPORTER = Exports.def - -VFILE = ddsres -WINDRES_FLAG = -F pe-x86-64 - -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolverIF.cpp \ - Stats.cpp \ - System.cpp \ - Timer.cpp \ - TransTable.cpp - -O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o - - - -mingw: $(O_FILES) - $(CC) $(LIB_FLAGS) $(CC_FULL_FLAGS) $(O_FILES) $(LD_FLAGS) $(EXPORTER) -o $(DLL) - -%.o: %.cpp - $(CC) $(CC_FULL_FLAGS) -c $< - -$(DLLBASE).res: $(DLLBASE).rc - windres $(DLLBASE).rc $(DLLBASE).res - -$(VFILE).o: $(DLLBASE).rc - windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o - -depend: - makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) - -clean: - rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(DLL) $(DLLBASE).def ../test - cp $(DLL) $(DLLBASE).def ../examples - - -# DO NOT DELETE - -dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -ABsearch.o: QuickTricks.h LaterTricks.h ABsearch.h -ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -CalcTables.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h -CalcTables.o: PBN.h -DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -DealerPar.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.o: ABsearch.h System.h -LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -LaterTricks.o: threadmem.h LaterTricks.h -Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.o: Scheduler.h threadmem.h SolverIF.h PBN.h -PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -QuickTricks.o: threadmem.h QuickTricks.h -Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -SolveBoard.o: SolverIF.h SolveBoard.h System.h PBN.h -SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h -SolverIF.o: ABsearch.h SolverIF.h -Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -System.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -System.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h System.h SolveBoard.h -Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -TransTable.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h diff --git a/src/Makefiles/Makefile_mingw_new b/src/Makefiles/Makefile_mingw_new deleted file mode 100644 index 7cbbf89b..00000000 --- a/src/Makefiles/Makefile_mingw_new +++ /dev/null @@ -1,188 +0,0 @@ -# This the DDS Makefile for Windows and the MinGW compiler. -# It does assume a Unix-like setup for some commands, -# but if you only want to call "make" with the default target, -# you should be OK. - -# If you want to compile a single-threaded version, use -# DDS_THREADS=none - -# The "windres" and "cvtres" tools are used for putting version -# information into the DLL in a way that Windows can see. -# It is not mandatory, and if you don't have those tools, -# You can remove $(VFILE).obj in the target line below. - - -# If your exact compiler name is not given here, change it. -# CC = mingw32-g++ -# CC = i686-w64-mingw32-g++ -CC = g++ - -# Use this one to get Windows multi-threading -# CC_FLAGS = -O3 -flto -mtune=generic -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -DBUILDING_EXAMPLE_DLL -fopenmp - -LD_FLAGS = \ - -Wl,--subsystem,windows \ - -Wl,--output-def,$(DLLBASE).def \ - -Wl,--dynamicbase \ - -Wl,--nxcompat \ - -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup \ - -lboost_system \ - -lboost_thread - - -# These flags are not turned on be default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wnoexcept \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wsign-promo \ - -Wstrict-null-sentinel \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -LIB_FLAGS = -shared - -DLLBASE = dds -DLL = $(DLLBASE).dll -EXPORTER = Exports.def - -VFILE = ddsres -WINDRES_FLAG = -F pe-x86-64 - -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolverIF.cpp \ - System.cpp \ - Timer.cpp \ - TransTable.cpp - -O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o - -ifeq ($(DDS_THREADS),none) -DDS_THR = -DDDS_THREADS_SINGLE -else -DDS_THR = -DDDS_THREADS_BOOST -DDDS_THREADS_OPENMP -DDDS_THREADS_STL -endif - - -mingw: $(O_FILES) - $(CC) $(LIB_FLAGS) $(O_FILES) -o $(DLL) -lgomp -lboost_system -lboost_thread -Wl,--out-implib,libdds.a -Wl,--no-undefined - -%.o: %.cpp - $(CC) $(CC_FLAGS) $(DDS_THR) -c $< - -$(DLLBASE).res: $(DLLBASE).rc - windres $(DLLBASE).rc $(DLLBASE).res - -$(VFILE).o: $(DLLBASE).rc - windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o - -depend: - makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) - -clean: - rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(DLL) $(DLLBASE).def ../test - cp $(DLL) $(DLLBASE).def ../examples - - -# DO NOT DELETE - -dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -dds.o: TimeStatList.h TimeStat.h Init.h -ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -ABsearch.o: TimeStatList.h TimeStat.h threadmem.h QuickTricks.h LaterTricks.h -ABsearch.o: ABsearch.h -ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -ABstats.o: TimeStatList.h TimeStat.h -CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -CalcTables.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -CalcTables.o: TimeStatList.h TimeStat.h SolveBoard.h PBN.h -DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -DealerPar.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -DealerPar.o: TimeStatList.h TimeStat.h -Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -Init.o: TimeStatList.h TimeStat.h threadmem.h Init.h ABsearch.h System.h -LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.o: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -LaterTricks.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h -LaterTricks.o: LaterTricks.h -Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -Moves.o: TimeStatList.h TimeStat.h ABsearch.h -Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -Par.o: TimeStatList.h TimeStat.h -PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.o: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -PlayAnalyser.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h -PlayAnalyser.o: SolverIF.h System.h PBN.h -PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -PBN.o: TimeStatList.h TimeStat.h PBN.h -QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.o: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -QuickTricks.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h -QuickTricks.o: QuickTricks.h -Scheduler.o: Scheduler.h TimeStatList.h TimeStat.h dds.h debug.h -Scheduler.o: ../include/portab.h TransTable.h ../include/dll.h TimerList.h -Scheduler.o: TimerGroup.h Timer.h ABstats.h Moves.h -SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolveBoard.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -SolveBoard.o: TimeStatList.h TimeStat.h threadmem.h SolverIF.h SolveBoard.h -SolveBoard.o: System.h PBN.h -SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -SolverIF.o: TimeStatList.h TimeStat.h Init.h threadmem.h ABsearch.h -SolverIF.o: SolverIF.h -System.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -System.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -System.o: TimeStatList.h TimeStat.h System.h SolveBoard.h PlayAnalyser.h -Timer.o: Timer.h ../include/portab.h -TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -TransTable.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -TransTable.o: TimeStatList.h TimeStat.h diff --git a/src/Makefiles/Makefile_mingw_tdc32 b/src/Makefiles/Makefile_mingw_tdc32 deleted file mode 100644 index 8623138b..00000000 --- a/src/Makefiles/Makefile_mingw_tdc32 +++ /dev/null @@ -1,167 +0,0 @@ -# This is the DDS Makefile for Windows and the tdm-gcc compiler: -# http://tdm-gcc.tdragon.net/ -# It does assume a Unix-like setup for some commands, -# but if you only want to call "make" with the default target, -# you should be OK. -# Changes relative to the MinGW Makefile contributed by Sergio Polini. - -# If you want to compile a single-threaded version, use -# make DDS_THREADS=none - -# If your exact compiler name is not given here, change it. -CC = x86_64-w64-mingw32-g++ - -# Use this one to get Windows multi-threading -# CC_FLAGS = -O3 -flto -mtune=generic -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -fopenmp -mtune=generic -m32 - -LD_FLAGS = \ - -Wl,--subsystem,windows \ - -Wl,--output-def,$(DLLBASE).def \ - -Wl,--dynamicbase \ - -Wl,--nxcompat \ - -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup - - -# These flags are not turned on be default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wnoexcept \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wredundant-decls \ - -Wsign-promo \ - -Wstrict-null-sentinel \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -# Here you can turn on warnings. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -LIB_FLAGS = -mdll -m32 - -DLLBASE = dds -DLL = $(DLLBASE).dll -EXPORTER = Exports.def - -VFILE = ddsres -WINDRES_FLAG = -F pe-i386 - -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolverIF.cpp \ - Stats.cpp \ - Timer.cpp \ - TransTable.cpp - -O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o - -ifeq ($(DDS_THREADS),none) -DDS_THR = -DDDS_THREADS_SINGLE -else -DDS_THR = -endif - - -mingw: $(O_FILES) - $(CC) $(LIB_FLAGS) $(CC_FULL_FLAGS) $(O_FILES) $(LD_FLAGS) $(EXPORTER) -o $(DLL) - -%.o: %.cpp - $(CC) $(CC_FULL_FLAGS) $(DDS_THR) -c $< - -$(DLLBASE).res: $(DLLBASE).rc - windres $(DLLBASE).rc $(DLLBASE).res - -$(VFILE).o: $(DLLBASE).rc - windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o - -depend: - makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) - -clean: - rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(DLL) $(DLLBASE).def ../test - cp $(DLL) $(DLLBASE).def ../examples - - -# DO NOT DELETE - -dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -ABsearch.o: QuickTricks.h LaterTricks.h ABsearch.h -ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -CalcTables.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h -CalcTables.o: PBN.h -DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -DealerPar.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.o: ABsearch.h -LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -LaterTricks.o: threadmem.h LaterTricks.h -Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.o: Scheduler.h threadmem.h SolverIF.h PBN.h -PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -QuickTricks.o: threadmem.h QuickTricks.h -Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -SolveBoard.o: SolverIF.h SolveBoard.h PBN.h -SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h -SolverIF.o: ABsearch.h SolverIF.h -Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -TransTable.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h diff --git a/src/Makefiles/Makefile_mingw_tdc64 b/src/Makefiles/Makefile_mingw_tdc64 deleted file mode 100644 index 0dc5510d..00000000 --- a/src/Makefiles/Makefile_mingw_tdc64 +++ /dev/null @@ -1,167 +0,0 @@ -# This is the DDS Makefile for Windows and the tdm-gcc compiler: -# http://tdm-gcc.tdragon.net/ -# It does assume a Unix-like setup for some commands, -# but if you only want to call "make" with the default target, -# you should be OK. -# Changes relative to the MinGW Makefile contributed by Sergio Polini. - -# If you want to compile a single-threaded version, use -# make DDS_THREADS=none - -# If your exact compiler name is not given here, change it. -CC = x86_64-w64-mingw32-g++ - -# Use this one to get Windows multi-threading -# CC_FLAGS = -O3 -flto -mtune=generic -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -fopenmp -mtune=generic - -LD_FLAGS = \ - -Wl,--subsystem,windows \ - -Wl,--output-def,$(DLLBASE).def \ - -Wl,--dynamicbase \ - -Wl,--nxcompat \ - -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup - - -# These flags are not turned on be default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wnoexcept \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wredundant-decls \ - -Wsign-promo \ - -Wstrict-null-sentinel \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -# Here you can turn on warnings. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -LIB_FLAGS = -mdll - -DLLBASE = dds -DLL = $(DLLBASE).dll -EXPORTER = Exports.def - -VFILE = ddsres -WINDRES_FLAG = -F pe-x86-64 - -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolverIF.cpp \ - Stats.cpp \ - Timer.cpp \ - TransTable.cpp - -O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o - -ifeq ($(DDS_THREADS),none) -DDS_THR = -DDDS_THREADS_SINGLE -else -DDS_THR = -endif - - -mingw: $(O_FILES) - $(CC) $(LIB_FLAGS) $(CC_FULL_FLAGS) $(O_FILES) $(LD_FLAGS) $(EXPORTER) -o $(DLL) - -%.o: %.cpp - $(CC) $(CC_FULL_FLAGS) $(DDS_THR) -c $< - -$(DLLBASE).res: $(DLLBASE).rc - windres $(DLLBASE).rc $(DLLBASE).res - -$(VFILE).o: $(DLLBASE).rc - windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o - -depend: - makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) - -clean: - rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(DLL) $(DLLBASE).def ../test - cp $(DLL) $(DLLBASE).def ../examples - - -# DO NOT DELETE - -dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -ABsearch.o: QuickTricks.h LaterTricks.h ABsearch.h -ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -CalcTables.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h -CalcTables.o: PBN.h -DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -DealerPar.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.o: ABsearch.h -LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -LaterTricks.o: threadmem.h LaterTricks.h -Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.o: Scheduler.h threadmem.h SolverIF.h PBN.h -PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -QuickTricks.o: threadmem.h QuickTricks.h -Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -SolveBoard.o: SolverIF.h SolveBoard.h PBN.h -SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h -SolverIF.o: ABsearch.h SolverIF.h -Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -TransTable.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h From 1153b9202cd26d4c4f648ad7aae8943312c925ff Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Thu, 22 Mar 2018 09:47:21 +0100 Subject: [PATCH 031/132] Better timers in dtest (a start, at least) --- src/Makefile_mingw_boost_BAD | 196 ------------------------ src/Makefile_mingw_stillbad | 117 -------------- test/Makefile_mingw_stillbad | 222 --------------------------- test/Makefiles/Makefile_mingw | 6 +- test/Makefiles/Makefile_mingw_new | 244 ------------------------------ test/TestTimer.cpp | 163 ++++++++++++++++++++ test/TestTimer.h | 53 +++++++ test/testStats.cpp | 118 ++++----------- test/testcommon.cpp | 138 ++--------------- 9 files changed, 267 insertions(+), 990 deletions(-) delete mode 100644 src/Makefile_mingw_boost_BAD delete mode 100644 src/Makefile_mingw_stillbad delete mode 100644 test/Makefile_mingw_stillbad delete mode 100644 test/Makefiles/Makefile_mingw_new create mode 100644 test/TestTimer.cpp create mode 100644 test/TestTimer.h diff --git a/src/Makefile_mingw_boost_BAD b/src/Makefile_mingw_boost_BAD deleted file mode 100644 index f0304937..00000000 --- a/src/Makefile_mingw_boost_BAD +++ /dev/null @@ -1,196 +0,0 @@ -# This the DDS Makefile for Windows and the MinGW compiler. -# It does assume a Unix-like setup for some commands, -# but if you only want to call "make" with the default target, -# you should be OK. - -# If you want to compile a single-threaded version, use -# DDS_THREADS=none - -# The "windres" and "cvtres" tools are used for putting version -# information into the DLL in a way that Windows can see. -# It is not mandatory, and if you don't have those tools, -# You can remove $(VFILE).obj in the target line below. - - -# If your exact compiler name is not given here, change it. -# CC = mingw32-g++ -# CC = i686-w64-mingw32-g++ -CC = g++ - -# Use this one to get Windows multi-threading -# CC_FLAGS = -O3 -flto -mtune=generic -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -mtune=generic - -LD_FLAGS = \ - -Wl,--subsystem,windows \ - -Wl,--output-def,$(DLLBASE).def \ - -Wl,--dynamicbase \ - -Wl,--nxcompat \ - -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup \ - -lboost_system \ - -lboost_thread - - -# These flags are not turned on be default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wnoexcept \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wsign-promo \ - -Wstrict-null-sentinel \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -LIB_FLAGS = -mdll - -DLLBASE = dds -DLL = $(DLLBASE).dll -EXPORTER = Exports.def - -VFILE = ddsres -WINDRES_FLAG = -F pe-x86-64 - -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolveBoard_basic.cpp \ - SolveBoard_boost.cpp \ - SolveBoard_GCD.cpp \ - SolveBoard_OpenMP.cpp \ - SolveBoard_WinAPI.cpp \ - SolverIF.cpp \ - Stats.cpp \ - Timer.cpp \ - TransTable.cpp - -O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o - -ifeq ($(DDS_THREADS),none) -DDS_THR = -DDDS_THREADS_SINGLE -else -DDS_THR = -DDDS_THREADS_BOOST -endif - - -mingw: $(O_FILES) - $(CC) $(LIB_FLAGS) $(CC_FULL_FLAGS) $(O_FILES) $(LD_FLAGS) $(EXPORTER) -o $(DLL) - -%.o: %.cpp - $(CC) $(CC_FULL_FLAGS) $(DDS_THR) -c $< - -$(DLLBASE).res: $(DLLBASE).rc - windres $(DLLBASE).rc $(DLLBASE).res - -$(VFILE).o: $(DLLBASE).rc - windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o - -depend: - makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) - -clean: - rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(DLL) $(DLLBASE).def ../test - cp $(DLL) $(DLLBASE).def ../examples - - -# DO NOT DELETE - -dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -ABsearch.o: QuickTricks.h LaterTricks.h ABsearch.h -ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -CalcTables.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h SolveBoard.h -CalcTables.o: PBN.h -DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -DealerPar.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.o: ABsearch.h -LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -LaterTricks.o: threadmem.h LaterTricks.h -Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.o: Scheduler.h threadmem.h SolverIF.h PBN.h -PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -QuickTricks.o: threadmem.h QuickTricks.h -Scheduler.o: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolveBoard.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -SolveBoard.o: SolverIF.h SolveBoard.h PBN.h SolveBoard_basic.h -SolveBoard.o: SolveBoard_boost.h SolveBoard_GCD.h SolveBoard_OpenMP.h -SolveBoard.o: SolveBoard_WinAPI.h -SolveBoard_basic.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_basic.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_basic.o: Scheduler.h SolveBoard.h SolveBoard_basic.h -SolveBoard_boost.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_boost.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_boost.o: Scheduler.h SolveBoard.h SolveBoard_boost.h -SolveBoard_GCD.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_GCD.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_GCD.o: Scheduler.h SolveBoard.h SolveBoard_GCD.h -SolveBoard_OpenMP.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_OpenMP.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_OpenMP.o: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h -SolveBoard_WinAPI.o: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_WinAPI.o: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_WinAPI.o: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h -SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h threadmem.h -SolverIF.o: ABsearch.h SolverIF.h -Stats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Stats.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Timer.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Timer.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -TransTable.o: Timer.h ABstats.h Moves.h Stats.h Scheduler.h diff --git a/src/Makefile_mingw_stillbad b/src/Makefile_mingw_stillbad deleted file mode 100644 index 486a16fe..00000000 --- a/src/Makefile_mingw_stillbad +++ /dev/null @@ -1,117 +0,0 @@ -# This the DDS Makefile for Windows and the MinGW compiler. -# It assumes a Unix-like setup for some commands. - -# The "windres" and "cvtres" tools are used for putting version -# information into the DLL in a way that Windows can see. -# It is not mandatory, and if you don't have those tools, -# You can remove $(VFILE).obj in the target line below. -# -# If you want to compile a single-threaded version, use -# DDS_THREADS=none - -INCL_SOURCE = Makefiles/sources.txt -INCL_DEPENDS = Makefiles/depends_o.txt - - -# If your exact compiler name is not given here, change it. -# CC = mingw32-g++ -# CC = i686-w64-mingw32-g++ -CC = g++ - -# Use this one to get Windows multi-threading -# CC_FLAGS = -O3 -flto -mtune=generic -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -fopenmp -mtune=generic -DBUILDING_EXAMPLE_DLL -std=c++11 - -LD_FLAGS = \ - -Wl,--subsystem,windows \ - -Wl,--output-def,$(DLLBASE).def \ - -Wl,--dynamicbase \ - -Wl,--nxcompat \ - -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup \ - -lpthread \ - -lboost_system \ - -lboost_thread - - -# These flags are not turned on be default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wnoexcept \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wsign-promo \ - -Wstrict-null-sentinel \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION -# -DDDS_THREADS_SINGLE -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) -DDDS_THREADS_BOOST - -LIB_FLAGS = -mdll - -DLLBASE = dds -DLL = $(DLLBASE).dll -EXPORTER = Exports.def - -VFILE = ddsres -WINDRES_FLAG = -F pe-x86-64 - -include $(INCL_SOURCE) - -O_FILES = $(subst .cpp,.o,$(SOURCE_FILES)) $(VFILE).o - - - # -O3 -flto -fopenmp -mtune=generic -DBUILDING_EXAMPLE_DLL \ - # -Wl,--out-implib,libdds.dll.a \ - # $(CC) $(LIB_FLAGS) $(CC_FULL_FLAGS) $(O_FILES) $(LD_FLAGS) $(EXPORTER) -o $(DLL) - -mingw: $(O_FILES) - $(CC) -shared \ - -o $(DLL) \ - $(O_FILES) \ - -lboost_system -lboost_thread \ - -Wl,--out-implib,libdds.a - - -%.o: %.cpp - $(CC) $(CC_FULL_FLAGS) -c $< - -$(DLLBASE).res: $(DLLBASE).rc - windres $(DLLBASE).rc $(DLLBASE).res - -$(VFILE).o: $(DLLBASE).rc - windres $(WINDRES_FLAG) $(DLLBASE).rc $(VFILE).o - -depend: - makedepend -Y -- $(CC_FLAGS) -- $(SOURCE_FILES) - -clean: - rm -f $(O_FILES) $(DLL) $(DLLBASE).{lib,def,exp,res} - -install: - test -d ../test || mkdir ../test - test -d ../examples || mkdir ../examples - cp $(DLL) $(DLLBASE).def ../test - cp $(DLL) $(DLLBASE).def ../examples - - -include $(INCL_DEPENDS) - diff --git a/test/Makefile_mingw_stillbad b/test/Makefile_mingw_stillbad deleted file mode 100644 index da018e11..00000000 --- a/test/Makefile_mingw_stillbad +++ /dev/null @@ -1,222 +0,0 @@ -# This is a Makefile for the dtest test program, -# for Windows and the minGW compiler. - -# It does assume a Unix-like setup for some commands, -# but if you only want to call "make" with the default target, -# you should be OK. - -# The test program itself does not use multi-threading, -# but the DLL might, depending on how it was compiled. - -# The Makefile also allows an "un-official" and ugly, but -# sometimes practical compilation of a directly integrated -# executable (i.e. not using the DLL). For this the Makefile -# uses the source and object files in the src directory... -# Use "make itest" at your own risk. - - -# If your exact compiler name is not given here, change it. -# CC = mingw32-g++ -# CC = i686-w64-mingw32-g++ -CC = g++ - -# Use this one to get Windows multi-threading -# CC_FLAGS = -O3 -flto -mtune=generic -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -mtune=generic - -# These flags are not turned on by default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wnoexcept \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wredundant-decls \ - -Wsign-promo \ - -Wstrict-null-sentinel \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -# Here you can turn on warnings. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -DTEST = dtest -ITEST = itest - -DLLBASE = dds -DLL = $(DLLBASE).dll -DLIB = $(DLLBASE).lib -EXPORTER = Exports.def - -# This is in addition to $(DTEST).cpp -DTEST_SOURCE_FILES = \ - testcommon.cpp \ - testStats.cpp - -LD_FLAGS = \ - -Wl,--dynamicbase \ - -Wl,--nxcompat \ - -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup - -LIB_FLAGS = -L. -l$(DLLBASE) - -DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o - -# These are the files that we steal from the src directory. -include Makefiles/sources.txt - -# $(CC) $(CC_FULL_FLAGS) $(DTEST_OBJ_FILES) $(LD_FLAGS) $(LIB_FLAGS) -o $(DTEST) - -ITEST_SOURCE_FILES = \ - $(SOURCE_FILES) \ - $(DTEST_SOURCE_FILES) \ - itest.cpp - -ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) - -dtest: $(DTEST_OBJ_FILES) - $(CC) -o $(DTEST) $(DTEST_OBJ_FILES) -L. -ldds - -itest: $(ITEST_OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(ITEST_OBJ_FILES) $(LD_FLAGS) -o $(ITEST) - -%.o: %.cpp - $(CC) $(CC_FULL_FLAGS) -c $< -o $*.o - -depend: - makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp - -clean: - rm -f *.o *.exe $(DLLBASE).def $(DLL) - - -# DO NOT DELETE - -../src/dds.o: ../include/dll.h ../src/dds.h ../src/debug.h -../src/dds.o: ../include/portab.h ../src/TransTable.h ../src/Timer.h -../src/dds.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/dds.o: ../src/Scheduler.h ../src/Init.h -../src/ABsearch.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABsearch.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABsearch.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABsearch.o: ../src/Scheduler.h ../src/threadmem.h ../src/QuickTricks.h -../src/ABsearch.o: ../src/LaterTricks.h ../src/ABsearch.h -../src/ABstats.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABstats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABstats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABstats.o: ../src/Scheduler.h -../src/CalcTables.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/CalcTables.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/CalcTables.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/CalcTables.o: ../src/Scheduler.h ../src/SolveBoard.h ../src/PBN.h -../src/DealerPar.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/DealerPar.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/DealerPar.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/DealerPar.o: ../src/Scheduler.h -../src/Init.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Init.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Init.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Init.o: ../src/Scheduler.h ../src/threadmem.h ../src/Init.h -../src/Init.o: ../src/ABsearch.h -../src/LaterTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/LaterTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/LaterTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/LaterTricks.o: ../src/Scheduler.h ../src/threadmem.h -../src/LaterTricks.o: ../src/LaterTricks.h -../src/Moves.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Moves.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Moves.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Moves.o: ../src/Scheduler.h ../src/ABsearch.h -../src/Par.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Par.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Par.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Par.o: ../src/Scheduler.h -../src/PlayAnalyser.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PlayAnalyser.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PlayAnalyser.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PlayAnalyser.o: ../src/Scheduler.h ../src/threadmem.h -../src/PlayAnalyser.o: ../src/SolverIF.h ../src/PBN.h -../src/PBN.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PBN.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PBN.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PBN.o: ../src/Scheduler.h ../src/PBN.h -../src/QuickTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/QuickTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/QuickTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/QuickTricks.o: ../src/Scheduler.h ../src/threadmem.h -../src/QuickTricks.o: ../src/QuickTricks.h -../src/Scheduler.o: ../src/Scheduler.h ../src/dds.h ../src/debug.h -../src/Scheduler.o: ../include/portab.h ../src/TransTable.h ../include/dll.h -../src/Scheduler.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/Scheduler.o: ../src/Stats.h -../src/SolveBoard.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolveBoard.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolveBoard.o: ../src/Scheduler.h ../src/threadmem.h ../src/SolverIF.h -../src/SolveBoard.o: ../src/SolveBoard.h ../src/PBN.h -../src/SolveBoard.o: ../src/SolveBoard_basic.h ../src/SolveBoard_boost.h -../src/SolveBoard.o: ../src/SolveBoard_GCD.h ../src/SolveBoard_OpenMP.h -../src/SolveBoard.o: ../src/SolveBoard_WinAPI.h -../src/SolveBoard_basic.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard_basic.o: ../src/TransTable.h ../include/dll.h -../src/SolveBoard_basic.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/SolveBoard_basic.o: ../src/Stats.h ../src/Scheduler.h -../src/SolveBoard_basic.o: ../src/SolveBoard.h ../src/SolveBoard_basic.h -../src/SolveBoard_boost.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard_boost.o: ../src/TransTable.h ../include/dll.h -../src/SolveBoard_boost.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/SolveBoard_boost.o: ../src/Stats.h ../src/Scheduler.h -../src/SolveBoard_boost.o: ../src/SolveBoard.h ../src/SolveBoard_boost.h -../src/SolveBoard_GCD.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard_GCD.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolveBoard_GCD.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolveBoard_GCD.o: ../src/Scheduler.h ../src/SolveBoard.h -../src/SolveBoard_GCD.o: ../src/SolveBoard_GCD.h -../src/SolveBoard_OpenMP.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard_OpenMP.o: ../src/TransTable.h ../include/dll.h -../src/SolveBoard_OpenMP.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/SolveBoard_OpenMP.o: ../src/Stats.h ../src/Scheduler.h -../src/SolveBoard_OpenMP.o: ../src/SolveBoard.h ../src/SolveBoard_OpenMP.h -../src/SolveBoard_WinAPI.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard_WinAPI.o: ../src/TransTable.h ../include/dll.h -../src/SolveBoard_WinAPI.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/SolveBoard_WinAPI.o: ../src/Stats.h ../src/Scheduler.h -../src/SolveBoard_WinAPI.o: ../src/SolveBoard.h ../src/SolveBoard_WinAPI.h -../src/SolverIF.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolverIF.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolverIF.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolverIF.o: ../src/Scheduler.h ../src/Init.h ../src/threadmem.h -../src/SolverIF.o: ../src/ABsearch.h ../src/SolverIF.h -../src/Stats.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Stats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Stats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Stats.o: ../src/Scheduler.h -../src/Timer.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Timer.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Timer.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Timer.o: ../src/Scheduler.h -../src/TransTable.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/TransTable.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/TransTable.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/TransTable.o: ../src/Scheduler.h -testcommon.o: ../include/dll.h ../include/portab.h testStats.h dtest.h -testStats.o: ../include/portab.h testStats.h -itest.o: ../include/dll.h testcommon.h -dtest.o: ../include/dll.h testcommon.h diff --git a/test/Makefiles/Makefile_mingw b/test/Makefiles/Makefile_mingw index 315a1a43..6b915d1b 100644 --- a/test/Makefiles/Makefile_mingw +++ b/test/Makefiles/Makefile_mingw @@ -23,7 +23,7 @@ CC = g++ # Use this one to get Windows multi-threading # CC_FLAGS = -O3 -flto -mtune=generic # Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -mtune=generic +CC_FLAGS = -O3 # These flags are not turned on by default, but DDS should pass them. # Turn them on below. @@ -114,13 +114,13 @@ ITEST_SOURCE_FILES = \ ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) dtest: $(DTEST_OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(DTEST_OBJ_FILES) $(LD_FLAGS) $(LIB_FLAGS) -o $(DTEST) + $(CC) $(CC_FLAGS) $(DTEST_OBJ_FILES) $(LIB_FLAGS) -o $(DTEST) itest: $(ITEST_OBJ_FILES) $(CC) $(CC_FULL_FLAGS) $(ITEST_OBJ_FILES) $(LD_FLAGS) -o $(ITEST) %.o: %.cpp - $(CC) $(CC_FULL_FLAGS) -c $< -o $*.o + $(CC) $(CC_FLAGS) -c $< -o $*.o depend: makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp diff --git a/test/Makefiles/Makefile_mingw_new b/test/Makefiles/Makefile_mingw_new deleted file mode 100644 index 6b915d1b..00000000 --- a/test/Makefiles/Makefile_mingw_new +++ /dev/null @@ -1,244 +0,0 @@ -# This is a Makefile for the dtest test program, -# for Windows and the minGW compiler. - -# It does assume a Unix-like setup for some commands, -# but if you only want to call "make" with the default target, -# you should be OK. - -# The test program itself does not use multi-threading, -# but the DLL might, depending on how it was compiled. - -# The Makefile also allows an "un-official" and ugly, but -# sometimes practical compilation of a directly integrated -# executable (i.e. not using the DLL). For this the Makefile -# uses the source and object files in the src directory... -# Use "make itest" at your own risk. - - -# If your exact compiler name is not given here, change it. -# CC = mingw32-g++ -# CC = i686-w64-mingw32-g++ -CC = g++ - -# Use this one to get Windows multi-threading -# CC_FLAGS = -O3 -flto -mtune=generic -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 - -# These flags are not turned on by default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wnoexcept \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wredundant-decls \ - -Wsign-promo \ - -Wstrict-null-sentinel \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -# Here you can turn on warnings. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -DTEST = dtest -ITEST = itest - -DLLBASE = dds -DLL = $(DLLBASE).dll -DLIB = $(DLLBASE).lib -EXPORTER = Exports.def - -# This is in addition to $(DTEST).cpp -DTEST_SOURCE_FILES = \ - testcommon.cpp \ - testStats.cpp - -LD_FLAGS = \ - -Wl,--dynamicbase \ - -Wl,--nxcompat \ - -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup - -LIB_FLAGS = -L. -l$(DLLBASE) - -DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o - -# These are the files that we steal from the src directory. -SRC = ../src -STOLEN_SOURCE_FILES = \ - $(SRC)/dds.cpp \ - $(SRC)/ABsearch.cpp \ - $(SRC)/ABstats.cpp \ - $(SRC)/CalcTables.cpp \ - $(SRC)/DealerPar.cpp \ - $(SRC)/Init.cpp \ - $(SRC)/LaterTricks.cpp \ - $(SRC)/Moves.cpp \ - $(SRC)/Par.cpp \ - $(SRC)/PlayAnalyser.cpp \ - $(SRC)/PBN.cpp \ - $(SRC)/QuickTricks.cpp \ - $(SRC)/Scheduler.cpp \ - $(SRC)/SolveBoard.cpp \ - $(SRC)/SolveBoard_basic.cpp \ - $(SRC)/SolveBoard_boost.cpp \ - $(SRC)/SolveBoard_GCD.cpp \ - $(SRC)/SolveBoard_OpenMP.cpp \ - $(SRC)/SolveBoard_WinAPI.cpp \ - $(SRC)/SolverIF.cpp \ - $(SRC)/Stats.cpp \ - $(SRC)/Timer.cpp \ - $(SRC)/TransTable.cpp - -ITEST_SOURCE_FILES = \ - $(STOLEN_SOURCE_FILES) \ - $(DTEST_SOURCE_FILES) \ - itest.cpp - -ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) - -dtest: $(DTEST_OBJ_FILES) - $(CC) $(CC_FLAGS) $(DTEST_OBJ_FILES) $(LIB_FLAGS) -o $(DTEST) - -itest: $(ITEST_OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(ITEST_OBJ_FILES) $(LD_FLAGS) -o $(ITEST) - -%.o: %.cpp - $(CC) $(CC_FLAGS) -c $< -o $*.o - -depend: - makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp - -clean: - rm -f *.o *.exe $(DLLBASE).def $(DLL) - - -# DO NOT DELETE - -../src/dds.o: ../include/dll.h ../src/dds.h ../src/debug.h -../src/dds.o: ../include/portab.h ../src/TransTable.h ../src/Timer.h -../src/dds.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/dds.o: ../src/Scheduler.h ../src/Init.h -../src/ABsearch.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABsearch.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABsearch.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABsearch.o: ../src/Scheduler.h ../src/threadmem.h ../src/QuickTricks.h -../src/ABsearch.o: ../src/LaterTricks.h ../src/ABsearch.h -../src/ABstats.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABstats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABstats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABstats.o: ../src/Scheduler.h -../src/CalcTables.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/CalcTables.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/CalcTables.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/CalcTables.o: ../src/Scheduler.h ../src/SolveBoard.h ../src/PBN.h -../src/DealerPar.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/DealerPar.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/DealerPar.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/DealerPar.o: ../src/Scheduler.h -../src/Init.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Init.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Init.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Init.o: ../src/Scheduler.h ../src/threadmem.h ../src/Init.h -../src/Init.o: ../src/ABsearch.h -../src/LaterTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/LaterTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/LaterTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/LaterTricks.o: ../src/Scheduler.h ../src/threadmem.h -../src/LaterTricks.o: ../src/LaterTricks.h -../src/Moves.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Moves.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Moves.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Moves.o: ../src/Scheduler.h ../src/ABsearch.h -../src/Par.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Par.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Par.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Par.o: ../src/Scheduler.h -../src/PlayAnalyser.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PlayAnalyser.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PlayAnalyser.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PlayAnalyser.o: ../src/Scheduler.h ../src/threadmem.h -../src/PlayAnalyser.o: ../src/SolverIF.h ../src/PBN.h -../src/PBN.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PBN.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PBN.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PBN.o: ../src/Scheduler.h ../src/PBN.h -../src/QuickTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/QuickTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/QuickTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/QuickTricks.o: ../src/Scheduler.h ../src/threadmem.h -../src/QuickTricks.o: ../src/QuickTricks.h -../src/Scheduler.o: ../src/Scheduler.h ../src/dds.h ../src/debug.h -../src/Scheduler.o: ../include/portab.h ../src/TransTable.h ../include/dll.h -../src/Scheduler.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/Scheduler.o: ../src/Stats.h -../src/SolveBoard.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolveBoard.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolveBoard.o: ../src/Scheduler.h ../src/threadmem.h ../src/SolverIF.h -../src/SolveBoard.o: ../src/SolveBoard.h ../src/PBN.h -../src/SolveBoard.o: ../src/SolveBoard_basic.h ../src/SolveBoard_boost.h -../src/SolveBoard.o: ../src/SolveBoard_GCD.h ../src/SolveBoard_OpenMP.h -../src/SolveBoard.o: ../src/SolveBoard_WinAPI.h -../src/SolveBoard_basic.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard_basic.o: ../src/TransTable.h ../include/dll.h -../src/SolveBoard_basic.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/SolveBoard_basic.o: ../src/Stats.h ../src/Scheduler.h -../src/SolveBoard_basic.o: ../src/SolveBoard.h ../src/SolveBoard_basic.h -../src/SolveBoard_boost.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard_boost.o: ../src/TransTable.h ../include/dll.h -../src/SolveBoard_boost.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/SolveBoard_boost.o: ../src/Stats.h ../src/Scheduler.h -../src/SolveBoard_boost.o: ../src/SolveBoard.h ../src/SolveBoard_boost.h -../src/SolveBoard_GCD.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard_GCD.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolveBoard_GCD.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolveBoard_GCD.o: ../src/Scheduler.h ../src/SolveBoard.h -../src/SolveBoard_GCD.o: ../src/SolveBoard_GCD.h -../src/SolveBoard_OpenMP.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard_OpenMP.o: ../src/TransTable.h ../include/dll.h -../src/SolveBoard_OpenMP.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/SolveBoard_OpenMP.o: ../src/Stats.h ../src/Scheduler.h -../src/SolveBoard_OpenMP.o: ../src/SolveBoard.h ../src/SolveBoard_OpenMP.h -../src/SolveBoard_WinAPI.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard_WinAPI.o: ../src/TransTable.h ../include/dll.h -../src/SolveBoard_WinAPI.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/SolveBoard_WinAPI.o: ../src/Stats.h ../src/Scheduler.h -../src/SolveBoard_WinAPI.o: ../src/SolveBoard.h ../src/SolveBoard_WinAPI.h -../src/SolverIF.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolverIF.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolverIF.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolverIF.o: ../src/Scheduler.h ../src/Init.h ../src/threadmem.h -../src/SolverIF.o: ../src/ABsearch.h ../src/SolverIF.h -../src/Stats.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Stats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Stats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Stats.o: ../src/Scheduler.h -../src/Timer.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Timer.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Timer.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Timer.o: ../src/Scheduler.h -../src/TransTable.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/TransTable.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/TransTable.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/TransTable.o: ../src/Scheduler.h -testcommon.o: ../include/dll.h ../include/portab.h testStats.h dtest.h -testStats.o: ../include/portab.h testStats.h -itest.o: ../include/dll.h testcommon.h -dtest.o: ../include/dll.h testcommon.h diff --git a/test/TestTimer.cpp b/test/TestTimer.cpp new file mode 100644 index 00000000..210cc187 --- /dev/null +++ b/test/TestTimer.cpp @@ -0,0 +1,163 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#include +#include + +#include "TestTimer.h" + +using std::chrono::duration_cast; +using std::chrono::milliseconds; + + +TestTimer::TestTimer() +{ + TestTimer::reset(); +} + + +TestTimer::~TestTimer() +{ +} + + +void TestTimer::reset() +{ + name = ""; + count = 0; + userCum = 0; + userCumOld = 0; + sysCum = 0; +} + + +void TestTimer::setname(const string& s) +{ + name = s; +} + + +void TestTimer::start(const int number) +{ + count += number; + user0 = Clock::now(); + sys0 = clock(); +} + + +void TestTimer::end() +{ + time_point user1 = Clock::now(); + clock_t sys1 = clock(); + + chrono::duration d = user1 - user0; + int tuser = static_cast(1000. * d.count()); + + userCum += tuser; + sysCum += static_cast((1000 * (sys1 - sys0)) / + static_cast(CLOCKS_PER_SEC)); +} + + +void TestTimer::printRunning( + const int reached, + const int divisor) +{ + if (count == 0) + return; + + cout << setw(8) << reached << " (" << + setw(6) << setprecision(1) << right << fixed << + 100. * reached / + static_cast(divisor) << "%)" << + setw(15) << right << fixed << setprecision(0) << + (userCum - userCumOld) / 1000. << endl; + + userCumOld = userCum; +} + + +void TestTimer::printBasic() const +{ + if (count == 0) + return; + + if (name != "") + cout << setw(19) << left << "Timer name" << ": " << name << "\n"; + + cout << setw(19) << left << "Number of calls" << ": " << count << "\n"; + + if (userCum == 0) + cout << setw(19) << left << "User time" << ": " << "zero" << "\n"; + else + { + cout << setw(19) << left << "User time/ticks" << ": " << + userCum << "\n"; + cout << setw(19) << left << "User per call" << ": " << + setprecision(2) << userCum / static_cast(count) << "\n"; + } + + if (sysCum == 0) + cout << setw(19) << left << "Sys time" << ": " << "zero" << "\n"; + else + { + cout << setw(19) << left << "Sys time/ticks" << ": " << + sysCum << "\n"; + cout << setw(19) << left << "Sys per call" << ": " << + setprecision(2) << sysCum / static_cast(count) << "\n"; + cout << setw(19) << left << "Ratio" << ": " << + setprecision(2) << sysCum / static_cast(userCum); + } + cout << endl; +} + + +void TestTimer::printHands() const +{ + if (name != "") + cout << setw(21) << left << "Timer name" << + setw(12) << right << name << "\n"; + + cout << setw(21) << left << "Number of hands" << + setw(12) << right << count << "\n"; + + if (count == 0) + return; + + if (userCum == 0) + cout << setw(21) << left << "User time (ms)" << + setw(12) << right << "zero" << "\n"; + else + { + cout << setw(21) << left << "User time (ms)" << + setw(12) << right << fixed << + setprecision(0) << userCum / 1000. << "\n"; + cout << setw(21) << left << "Avg user time (ms)" << + setw(12) << right << fixed << setprecision(2) << userCum / + static_cast(1000. * count) << "\n"; + } + + if (sysCum == 0) + cout << setw(21) << left << "Sys time" << + setw(12) << right << "zero" << "\n"; + else + { + cout << setw(21) << left << "Sys time (ms)" << + setw(12) << right << fixed << setprecision(0) << sysCum << "\n"; + cout << setw(21) << left << "Avg sys time (ms)" << + setw(12) << right << fixed << setprecision(2) << sysCum / + static_cast(count) << "\n"; + cout << setw(21) << left << "Ratio" << + setw(12) << right << fixed << setprecision(2) << + 1000. * sysCum / static_cast(userCum); + } + cout << endl; +} + diff --git a/test/TestTimer.h b/test/TestTimer.h new file mode 100644 index 00000000..d8fee490 --- /dev/null +++ b/test/TestTimer.h @@ -0,0 +1,53 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2016 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_TIMING_H +#define DDS_TIMING_H + +#include +#include + +using Clock = std::chrono::steady_clock; +using std::chrono::time_point; + +using namespace std; + + +class TestTimer +{ + private: + string name; + long count; + long userCum; + long userCumOld; + long sysCum; + + time_point user0; + clock_t sys0; + + public: + + TestTimer(); + ~TestTimer(); + + void reset(); + + void setname(const string& s); + + void start(const int number = 1); + void end(); + + void printRunning( + const int reached, + const int number); + void printBasic() const; + void printHands() const; +}; + +#endif diff --git a/test/testStats.cpp b/test/testStats.cpp index 1594b9af..a694e6cc 100644 --- a/test/testStats.cpp +++ b/test/testStats.cpp @@ -13,29 +13,25 @@ #include #include +#include + +using Clock = std::chrono::steady_clock; +using std::chrono::time_point; +using std::chrono::duration_cast; +using std::chrono::milliseconds; + +using namespace std; + #include "../include/portab.h" #include "testStats.h" #define NUM_TIMERS 2000 #define COUNTER_SLOTS 200 - -#ifdef _WIN32 - LARGE_INTEGER ttimerFreq; - LARGE_INTEGER ttimerUser0; - LARGE_INTEGER ttimerUser1; - LARGE_INTEGER ttimerListUser0[NUM_TIMERS]; - LARGE_INTEGER ttimerListUser1[NUM_TIMERS]; -#else - #include - - int TesttimevalDiff(timeval x, timeval y); - - timeval ttimerUser0; - timeval ttimerUser1; - timeval ttimerListUser0[NUM_TIMERS]; - timeval ttimerListUser1[NUM_TIMERS]; -#endif +time_point ttimerUser0; +time_point ttimerUser1; +time_point ttimerListUser0[NUM_TIMERS]; +time_point ttimerListUser1[NUM_TIMERS]; clock_t ttimerSys0; clock_t ttimerSys1; @@ -81,11 +77,7 @@ void TestStartTimer() ttimerCount++; ttimerSys0 = clock(); -#ifdef _WIN32 - QueryPerformanceCounter(&ttimerUser0); -#else - gettimeofday(&ttimerUser0, NULL); -#endif + ttimerUser0 = Clock::now(); } @@ -93,16 +85,11 @@ void TestEndTimer() { ttimerSys1 = clock(); -#ifdef _WIN32 - // To get "real" seconds we would have to divide by - // timerFreq.QuadPart which needs to be initialized. - QueryPerformanceCounter(&ttimerUser1); - int ttimeUser = static_cast - ((ttimerUser1.QuadPart - ttimerUser0.QuadPart)); -#else - gettimeofday(&ttimerUser1, NULL); - int ttimeUser = TesttimevalDiff(ttimerUser1, ttimerUser0); -#endif + ttimerUser1 = Clock::now(); + + chrono::duration d = ttimerUser1 - ttimerUser0; + + int ttimeUser = static_cast(1000. * d.count()); ttimerUserCum += ttimeUser; @@ -159,11 +146,7 @@ void TestStartTimerNo(int no) ttimerListCount[no]++; ttimerListSys0[no] = clock(); -#ifdef _WIN32 - QueryPerformanceCounter(&ttimerListUser0[no]); -#else - gettimeofday(&ttimerListUser0[no], NULL); -#endif + ttimerListUser0[no] = Clock::now(); } @@ -171,15 +154,12 @@ void TestEndTimerNo(int no) { ttimerListSys1[no] = clock(); -#ifdef _WIN32 - QueryPerformanceCounter(&ttimerListUser1[no]); - int timeUser = static_cast - ((ttimerListUser1[no].QuadPart - ttimerListUser0[no].QuadPart)); -#else - gettimeofday(&ttimerListUser1[no], NULL); - int timeUser = TesttimevalDiff(ttimerListUser1[no], - ttimerListUser0[no]); -#endif + ttimerListUser1[no] = Clock::now(); + + chrono::duration d = ttimerListUser1[no] - + ttimerListUser0[no]; + + int timeUser = static_cast(1000. * d.count()); ttimerListUserCum[no] += static_cast(timeUser); @@ -194,15 +174,12 @@ void TestEndTimerNoAndComp(int no, int pred) { ttimerListSys1[no] = clock(); -#ifdef _WIN32 - QueryPerformanceCounter(&ttimerListUser1[no]); - int timeUser = static_cast - ((ttimerListUser1[no].QuadPart - ttimerListUser0[no].QuadPart)); -#else - gettimeofday(&ttimerListUser1[no], NULL); - int timeUser = TesttimevalDiff(ttimerListUser1[no], - ttimerListUser0[no]); -#endif + ttimerListUser1[no] = Clock::now(); + + chrono::duration d = ttimerListUser1[no] - + ttimerListUser0[no]; + + int timeUser = static_cast(1000. * d.count()); ttimerListUserCum[no] += static_cast(timeUser); @@ -263,34 +240,3 @@ void TestPrintTimerList() } } - -#ifndef _WIN32 -int TesttimevalDiff(timeval x, timeval y) -{ - /* Elapsed time, x-y, in milliseconds */ - return 1000 * (x.tv_sec - y.tv_sec ) - + (x.tv_usec - y.tv_usec) / 1000; -} -#endif - - -long long tcounter[COUNTER_SLOTS]; - -void TestInitCounter() -{ - for (int i = 0; i < COUNTER_SLOTS; i++) - tcounter[i] = 0; -} - - -void TestPrintCounter() -{ - for (int i = 0; i < COUNTER_SLOTS; i++) - { - if (tcounter[i]) - printf("%d\t%12lld\n", i, tcounter[i]); - } - printf("\n"); -} - - diff --git a/test/testcommon.cpp b/test/testcommon.cpp index b1924584..4d270e5e 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -11,25 +11,17 @@ #include #include #include -#include -#include #include + #include "../include/dll.h" #include "../include/portab.h" #include "testStats.h" +#include "TestTimer.h" +#include "dtest.h" using namespace std; - -#ifdef _WIN32 - LARGE_INTEGER frequency, tu0, tu1; -#else -#include - timeval tu0, tu1; -#endif - -#include "dtest.h" - +TestTimer timer; #define SOLVE_SIZE MAXNOOFBOARDS #define BOARD_SIZE MAXNOOFTABLES @@ -48,18 +40,13 @@ bool GIBmode = false; #define QUOTE (static_cast('"')) - -clock_t ts0, ts1; -int tu , ts, ctu, cts; - - int realMain(int argc, char * argv[]); int realMain(int argc, char * argv[]) { input_number = 0; - ctu = 0; - cts = 0; + timer.reset(); + timer.setname("Hand stats"); TestSetTimerName("Timer title"); @@ -86,9 +73,6 @@ int realMain(int argc, char * argv[]) set_constants(); main_identify(); -#ifdef _WIN32 - QueryPerformanceFrequency(&frequency); -#endif boardsPBN bop; solvedBoards solvedbdp; @@ -166,10 +150,9 @@ int realMain(int argc, char * argv[]) exit(0); } - print_times(number); + timer.printHands(); TestPrintTimer(); TestPrintTimerList(); - TestPrintCounter(); free(dealer_list); free(vul_list); @@ -790,8 +773,6 @@ bool compare_FUT(futureTricks * fut1, futureTricks * fut2) if (fut1->cards != fut2->cards) return false; -// TEMPNODE -// printf(" %8d\n", fut1->nodes); for (int i = 0; i < fut1->cards; i++) { if (fut1->suit [i] != fut2->suit [i]) return false; @@ -1017,7 +998,7 @@ void loop_solve( bop->mode[j] = 1; } - timer_start(); + timer.start(count); int ret; if ((ret = SolveAllChunks(bop, solvedbdp, 1)) != RETURN_NO_FAULT) @@ -1025,14 +1006,10 @@ void loop_solve( printf("loop_solve i %i: Return %d\n", i, ret); exit(0); } - tu = timer_end(); + timer.end(); #ifdef BATCHTIMES - printf("%8d (%5.1f%%) %15d\n", - i + count, - 100. * (i + count) / static_cast(number), - tu); - fflush(stdout); + timer.printRunning(i+count, number); #endif for (int j = 0; j < count; j++) @@ -1074,7 +1051,7 @@ bool loop_calc( strcpy(dealsp->deals[j].cards, deal_list[i + j].remainCards); } - timer_start(); + timer.start(count); int ret; if ((ret = CalcAllTablesPBN(dealsp, -1, filter, resp, parp)) != RETURN_NO_FAULT) @@ -1082,14 +1059,10 @@ bool loop_calc( printf("loop_solve i %i: Return %d\n", i, ret); exit(0); } - tu = timer_end(); + timer.end(); #ifdef BATCHTIMES - printf("%8d (%5.1f%%) %15d\n", - i + count, - 100. * (i + count) / static_cast(number), - tu); - fflush(stdout); + timer.printRunning(i+count, number); #endif for (int j = 0; j < count; j++) @@ -1210,7 +1183,7 @@ bool loop_play( playsp->plays[j] = play_list[i + j]; } - timer_start(); + timer.start(count); int ret; if ((ret = AnalyseAllPlaysPBN(bop, playsp, solvedplp, 1)) != RETURN_NO_FAULT) @@ -1218,14 +1191,10 @@ bool loop_play( printf("loop_play i %i: Return %d\n", i, ret); exit(0); } - tu = timer_end(); + timer.end(); #ifdef BATCHTIMES - printf("%8d (%5.1f%%) %15d\n", - i + count, - 100. * (i + count) / static_cast(number), - tu); - fflush(stdout); + timer.printRunning(i+count, number); #endif for (int j = 0; j < count; j++) @@ -1249,81 +1218,6 @@ bool loop_play( } -void print_times(int number) -{ - printf("%-20s %12d\n", "Number of hands", number); - if (number == 0) return; - - if (ctu == 0) - printf("%-20s %12s\n", "User time (ms)", "zero"); - else - { - printf("%-20s %12d\n", "User time (ms)", ctu); - printf("%-20s %12.2f\n", "Avg user time (ms)", - ctu / static_cast(number)); - } - - if (cts == 0) - printf("%-20s %12s\n", "Syst time", "zero"); - else - { - printf("%-20s %12d\n", "Syst time (ms)", cts); - printf("%-20s %12.2f\n", "Avg syst time (ms)", - cts / static_cast(number)); - printf("%-20s %12.2f\n", "Ratio", - cts / static_cast(ctu)); - } - printf("\n"); -} - - -#ifndef _WIN32 -int timeval_diff(timeval x, timeval y) -{ - /* Elapsed time, x-y, in milliseconds */ - return 1000 * (x.tv_sec - y.tv_sec ) - + (x.tv_usec - y.tv_usec) / 1000; -} -#endif - - -void timer_start() -{ - ts0 = clock(); - -#ifdef _WIN32 - QueryPerformanceCounter(&tu0); -#else - gettimeofday(&tu0, NULL); -#endif -} - - -int timer_end() -{ - ts1 = clock(); - -#ifdef _WIN32 - QueryPerformanceCounter(&tu1); - tu = static_cast - ((tu1.QuadPart - tu0.QuadPart) * 1000. / frequency.QuadPart); -#else - gettimeofday(&tu1, NULL); - tu = timeval_diff(tu1, tu0); -#endif - ctu += tu; - - ts = static_cast - ( (1000 * - static_cast(ts1 - ts0) / - static_cast(CLOCKS_PER_SEC))); -// TEMPNODE -// printf("%8d", ts); - cts += ts; - return tu; -} - - bool consume_int( char * line, int * pos, From d4dc32dde5826d5403b27b1bbd9faf97c03cc4c7 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Thu, 22 Mar 2018 15:16:40 +0100 Subject: [PATCH 032/132] test Makefiles for cygwin and Visual are now cleaner --- src/Makefiles/Makefile_Mac_clang_shared | 2 +- src/Makefiles/Makefile_Mac_gcc_shared | 2 +- src/Makefiles/Makefile_Mac_gcc_static | 2 +- src/Makefiles/Makefile_Visual | 3 + src/Makefiles/Makefile_Visual_Windows | 181 --------- src/Makefiles/Makefile_cygwin | 5 +- src/Makefiles/Makefile_linux_shared | 2 +- src/Makefiles/Makefile_linux_static | 2 +- src/Makefiles/Makefile_mingw | 3 + test/Makefiles/Makefile_Visual | 186 +++------ test/Makefiles/Makefile_Visual_Windows | 209 ---------- test/Makefiles/Makefile_cygwin | 193 +++------ .../{sources.txt => dds_sources.txt} | 2 +- test/Makefiles/depends_o.txt | 114 ++++++ test/Makefiles/depends_obj.txt | 114 ++++++ test/Makefiles/own_sources.txt | 4 + test/ref/sched.txt | 75 ---- test/ref/timer0_chrono.txt | 367 ------------------ test/ref/timer0_old.txt | 367 ------------------ 19 files changed, 349 insertions(+), 1484 deletions(-) delete mode 100644 src/Makefiles/Makefile_Visual_Windows delete mode 100644 test/Makefiles/Makefile_Visual_Windows rename test/Makefiles/{sources.txt => dds_sources.txt} (95%) create mode 100644 test/Makefiles/depends_o.txt create mode 100644 test/Makefiles/depends_obj.txt create mode 100644 test/Makefiles/own_sources.txt delete mode 100644 test/ref/sched.txt delete mode 100644 test/ref/timer0_chrono.txt delete mode 100644 test/ref/timer0_old.txt diff --git a/src/Makefiles/Makefile_Mac_clang_shared b/src/Makefiles/Makefile_Mac_clang_shared index eb0c33d4..ecd48858 100644 --- a/src/Makefiles/Makefile_Mac_clang_shared +++ b/src/Makefiles/Makefile_Mac_clang_shared @@ -43,7 +43,7 @@ DEBUG_ALL = -DDDS_DEBUG_ALL TIMING = -DDDS_TIMING SCHEDULER = -DDDS_SCHEDULER -# All that matters from no. 3 and no. 4 is the following. Here you +# All that matters from no. 2 and no. 3 is the following. Here you # can add $(SMALL_MEMORY) etc. DDS_BEHAVIOR = diff --git a/src/Makefiles/Makefile_Mac_gcc_shared b/src/Makefiles/Makefile_Mac_gcc_shared index 2e8461f2..8a17c255 100644 --- a/src/Makefiles/Makefile_Mac_gcc_shared +++ b/src/Makefiles/Makefile_Mac_gcc_shared @@ -39,7 +39,7 @@ DEBUG_ALL = -DDDS_DEBUG_ALL TIMING = -DDDS_TIMING SCHEDULER = -DDDS_SCHEDULER -# All that matters from no. 3 and no. 4 is the following. Here you +# All that matters from no. 2 and no. 3 is the following. Here you # can add $(SMALL_MEMORY) etc. DDS_BEHAVIOR = diff --git a/src/Makefiles/Makefile_Mac_gcc_static b/src/Makefiles/Makefile_Mac_gcc_static index 00febe82..009f4d88 100644 --- a/src/Makefiles/Makefile_Mac_gcc_static +++ b/src/Makefiles/Makefile_Mac_gcc_static @@ -43,7 +43,7 @@ DEBUG_ALL = -DDDS_DEBUG_ALL TIMING = -DDDS_TIMING SCHEDULER = -DDDS_SCHEDULER -# All that matters from no. 3 and no. 4 is the following. Here you +# All that matters from no. 2 and no. 3 is the following. Here you # can add $(SMALL_MEMORY) etc. DDS_BEHAVIOR = diff --git a/src/Makefiles/Makefile_Visual b/src/Makefiles/Makefile_Visual index 182c018a..b2e0e6e1 100644 --- a/src/Makefiles/Makefile_Visual +++ b/src/Makefiles/Makefile_Visual @@ -140,5 +140,8 @@ install: cp $(DLL) $(DLIB) ../test cp $(DLL) $(DLIB) ../examples +# If you don't have a Linux-like setup, use "del" instead of "rm" +# and "copy" instead of "cp". + include $(INCL_DEPENDS) diff --git a/src/Makefiles/Makefile_Visual_Windows b/src/Makefiles/Makefile_Visual_Windows deleted file mode 100644 index 02ddc708..00000000 --- a/src/Makefiles/Makefile_Visual_Windows +++ /dev/null @@ -1,181 +0,0 @@ -# This the DDS Makefile for Windows and the Microsoft Visual C++ -# compiler. Unlike the other Makefiles, it does not assume a -# Unix-like setup. -# Contributed by Philippe Capron in Dec. 2014. - -# You can't compile a single-threaded version with this particular -# Makefile. - -# The cvtres" tool is used for putting version -# information into the DLL in a way that Windows can see. -# It is not mandatory, and if you don't have those tools, -# You can remove $(VFILE).obj in the target line below. - - -# If your Microsoft compiler is not called cl, change it here. -CC = cl -CC_FLAGS = /O2 /Oi /Ot /Oy /GL - -# These flags are not turned on by default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - /Wall \ - /wd4127 \ - /wd4555 \ - /wd4668 \ - /wd4701 \ - /wd4710 \ - /wd4711 \ - /wd4820 \ - /wd4986 \ - /wd4987 \ - /wd4996 \ - /WX - -# Here you can turn on warnings. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -LIB_FLAGS = /link /DLL - -DLLBASE = dds -DLL = $(DLLBASE).dll -DLIB = $(DLLBASE).lib -EXPORTER = Exports.def - -VFILE = ddsres - -SOURCE_FILES = \ - dds.cpp \ - ABsearch.cpp \ - ABstats.cpp \ - CalcTables.cpp \ - DealerPar.cpp \ - Init.cpp \ - LaterTricks.cpp \ - Moves.cpp \ - Par.cpp \ - PlayAnalyser.cpp \ - PBN.cpp \ - QuickTricks.cpp \ - Scheduler.cpp \ - SolveBoard.cpp \ - SolveBoard_basic.cpp \ - SolveBoard_boost.cpp \ - SolveBoard_GCD.cpp \ - SolveBoard_OpenMP.cpp \ - SolveBoard_WinAPI.cpp \ - SolverIF.cpp \ - Stats.cpp \ - Timer.cpp \ - TransTable.cpp - -OBJ_FILES = \ - dds.obj \ - ABsearch.obj \ - ABstats.obj \ - CalcTables.obj \ - DealerPar.obj \ - Init.obj \ - LaterTricks.obj \ - Moves.obj \ - Par.obj \ - PlayAnalyser.obj \ - PBN.obj \ - QuickTricks.obj \ - Scheduler.obj \ - SolveBoard.obj \ - SolveBoard_basic.obj \ - SolveBoard_boost.obj \ - SolveBoard_GCD.obj \ - SolveBoard_OpenMP.obj \ - SolveBoard_WinAPI.obj \ - SolverIF.obj \ - Stats.obj \ - Timer.obj \ - TransTable.obj \ - $(VFILE).obj - -vs: $(OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(OBJ_FILES) $(EXPORTER) $(LIB_FLAGS) /out:$(DLL) - -%.obj: %.cpp - $(CC) $(CC_FULL_FLAGS) $(DDS_THR) /c $< - -$(VFILE).obj: $(DLLBASE).res - cvtres /MACHINE:X86 /OUT:$(VFILE).obj $(DLLBASE).res - -clean: - del $(OBJ_FILES) $(DLL) \ - $(DLLBASE).lib $(DLLBASE).exp $(DLLBASE).def $(DLLBASE).obj $(DLLBASE).res - -install: - copy $(DLL) ..\test - copy $(DLIB) ..\test - copy $(DLL) ..\examples - copy $(DLIB) ..\examples - -# DO NOT DELETE - -dds.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -ABsearch.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h -ABsearch.obj: QuickTricks.h LaterTricks.h ABsearch.h -ABstats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -CalcTables.obj: dds.h debug.h ../include/portab.h TransTable.h -CalcTables.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -CalcTables.obj: Scheduler.h SolveBoard.h PBN.h -DealerPar.obj: dds.h debug.h ../include/portab.h TransTable.h -DealerPar.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Init.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h threadmem.h Init.h -Init.obj: ABsearch.h -LaterTricks.obj: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -LaterTricks.obj: Scheduler.h threadmem.h LaterTricks.h -Moves.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h ABsearch.h -Par.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -PlayAnalyser.obj: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -PlayAnalyser.obj: Scheduler.h threadmem.h SolverIF.h PBN.h -PBN.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h PBN.h -QuickTricks.obj: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -QuickTricks.obj: Scheduler.h threadmem.h QuickTricks.h -Scheduler.obj: Scheduler.h dds.h debug.h ../include/portab.h TransTable.h -Scheduler.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard.obj: Scheduler.h threadmem.h SolverIF.h SolveBoard.h PBN.h -SolveBoard.obj: SolveBoard_basic.h SolveBoard_boost.h SolveBoard_GCD.h -SolveBoard.obj: SolveBoard_OpenMP.h SolveBoard_WinAPI.h -SolveBoard_basic.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_basic.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_basic.obj: Scheduler.h SolveBoard.h SolveBoard_basic.h -SolveBoard_boost.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_boost.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_boost.obj: Scheduler.h SolveBoard.h SolveBoard_boost.h -SolveBoard_GCD.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_GCD.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_GCD.obj: Scheduler.h SolveBoard.h SolveBoard_GCD.h -SolveBoard_OpenMP.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_OpenMP.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_OpenMP.obj: Scheduler.h SolveBoard.h SolveBoard_OpenMP.h -SolveBoard_WinAPI.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard_WinAPI.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -SolveBoard_WinAPI.obj: Scheduler.h SolveBoard.h SolveBoard_WinAPI.h -SolverIF.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h Init.h -SolverIF.obj: threadmem.h ABsearch.h SolverIF.h -Stats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Stats.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -Timer.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Timer.obj: Timer.h ABstats.h Moves.h Stats.h Scheduler.h -TransTable.obj: dds.h debug.h ../include/portab.h TransTable.h -TransTable.obj: ../include/dll.h Timer.h ABstats.h Moves.h Stats.h -TransTable.obj: Scheduler.h diff --git a/src/Makefiles/Makefile_cygwin b/src/Makefiles/Makefile_cygwin index 765fe627..68be98e6 100644 --- a/src/Makefiles/Makefile_cygwin +++ b/src/Makefiles/Makefile_cygwin @@ -46,7 +46,7 @@ DEBUG_ALL = -DDDS_DEBUG_ALL TIMING = -DDDS_TIMING SCHEDULER = -DDDS_SCHEDULER -# All that matters from no. 3 and no. 4 is the following. Here you +# All that matters from no. 2 and no. 3 is the following. Here you # can add $(SMALL_MEMORY) etc. DDS_BEHAVIOR = @@ -142,5 +142,8 @@ install: cp $(DLL) $(DLLBASE).def ../test cp $(DLL) $(DLLBASE).def ../examples +# If you don't have a Linux-like setup, use "del" instead of "rm +# and "copy" instead of "cp". + include $(INCL_DEPENDS) diff --git a/src/Makefiles/Makefile_linux_shared b/src/Makefiles/Makefile_linux_shared index bb4de5e3..8336fd78 100644 --- a/src/Makefiles/Makefile_linux_shared +++ b/src/Makefiles/Makefile_linux_shared @@ -41,7 +41,7 @@ DEBUG_ALL = -DDDS_DEBUG_ALL TIMING = -DDDS_TIMING SCHEDULER = -DDDS_SCHEDULER -# All that matters from no. 3 and no. 4 is the following. Here you +# All that matters from no. 2 and no. 3 is the following. Here you # can add $(SMALL_MEMORY) etc. DDS_BEHAVIOR = diff --git a/src/Makefiles/Makefile_linux_static b/src/Makefiles/Makefile_linux_static index 62b0af23..82dbc261 100644 --- a/src/Makefiles/Makefile_linux_static +++ b/src/Makefiles/Makefile_linux_static @@ -41,7 +41,7 @@ DEBUG_ALL = -DDDS_DEBUG_ALL TIMING = -DDDS_TIMING SCHEDULER = -DDDS_SCHEDULER -# All that matters from no. 3 and no. 4 is the following. Here you +# All that matters from no. 2 and no. 3 is the following. Here you # can add $(SMALL_MEMORY) etc. DDS_BEHAVIOR = diff --git a/src/Makefiles/Makefile_mingw b/src/Makefiles/Makefile_mingw index fb45bfce..0352937f 100644 --- a/src/Makefiles/Makefile_mingw +++ b/src/Makefiles/Makefile_mingw @@ -137,5 +137,8 @@ install: cp $(DLL) $(DLLBASE).def ../test cp $(DLL) $(DLLBASE).def ../examples +# If you don't have a Linux-like setup, use "del" instead of "rm" +# and "copy" instead of "cp". + include $(INCL_DEPENDS) diff --git a/test/Makefiles/Makefile_Visual b/test/Makefiles/Makefile_Visual index f3ce58ca..fb492e8b 100644 --- a/test/Makefiles/Makefile_Visual +++ b/test/Makefiles/Makefile_Visual @@ -1,12 +1,10 @@ -# This is a Makefile for the dtest test program, -# for Windows and the Microsoft Visual C++ compiler. +# --------------------- INFORMATION -------------------------------- -# It does assume a Unix-like setup for some commands, -# but if you only want to call "make" with the default target, -# you should be OK. +# This the test Makefile for Windows and the Microsoft Visual C++ +# compiler. It assumes a Unix-like setup for some commands. -# The test program itself does not use multi-threading, -# but the DLL might, depending on how it was compiled. +# The dtest program itself does not use multi-threading, +# but the library might, depending on how it was compiled. # The Makefile also allows an "un-official" and ugly, but # sometimes practical compilation of a directly integrated @@ -14,6 +12,9 @@ # uses the source and object files in the src directory... # Use "make itest" at your own risk. +# If you need to add something for the threading system, this is +# the place. + BOOST32_PATH1 = \User\sheins\boost_1_66_0_x32 BOOST32_LIB1 = $(BOOST32_PATH1)\lib32-msvc-14.0 @@ -23,13 +24,24 @@ BOOST32_LIB2 = $(BOOST32_PATH2)\lib32-msvc-14.1 CC_BOOST_INCL = /I$(BOOST32_PATH1) /I$(BOOST32_PATH2) CC_BOOST_LINK = /LIBPATH:$(BOOST32_LIB1) /LIBPATH:$(BOOST32_LIB2) -# If your Microsoft compiler is not called cl, change it here. +THREAD_LINK = $(CC_BOOST_LINK) + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_DDS_SOURCE = Makefiles/dds_sources.txt +INCL_OWN_SOURCE = Makefiles/own_sources.txt +INCL_DEPENDS = Makefiles/depends_obj.txt + +# If your compiler name is not given here, change it. CC = cl -CC_FLAGS = /O2 /Oi /Ot /Oy /GL -LINK_FLAGS = /LTCG -# These flags are not turned on by default, but DDS should pass them. -# Turn them on below. +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... + WARN_FLAGS = \ /Wall \ /wd4127 \ @@ -56,157 +68,55 @@ WARN_FLAGS = \ /wd5027 \ /WX -# Here you can turn on warnings. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -DTEST = dtest -ITEST = itest +COMPILE_FLAGS = /O2 /Oi /Ot /Oy /GL $(WARN_FLAGS) DLLBASE = dds DLL = $(DLLBASE).dll DLIB = $(DLLBASE).lib EXPORTER = Exports.def +LINK1_FLAGS = /LTCG +LINK2_FLAGS = $(THREAD_LINK) + # This is in addition to $(DTEST).cpp -DTEST_SOURCE_FILES = \ - testcommon.cpp \ - testStats.cpp +include $(INCL_OWN_SOURCE) DTEST_OBJ_FILES = $(subst .cpp,.obj,$(DTEST_SOURCE_FILES)) $(DTEST).obj +DTEST = dtest +ITEST = itest + # These are the files that we steal from the src directory. -SRC = ../src -STOLEN_SOURCE_FILES = \ - $(SRC)/dds.cpp \ - $(SRC)/ABsearch.cpp \ - $(SRC)/ABstats.cpp \ - $(SRC)/CalcTables.cpp \ - $(SRC)/DealerPar.cpp \ - $(SRC)/Init.cpp \ - $(SRC)/LaterTricks.cpp \ - $(SRC)/Moves.cpp \ - $(SRC)/Par.cpp \ - $(SRC)/PlayAnalyser.cpp \ - $(SRC)/PBN.cpp \ - $(SRC)/QuickTricks.cpp \ - $(SRC)/Scheduler.cpp \ - $(SRC)/SolveBoard.cpp \ - $(SRC)/SolverIF.cpp \ - $(SRC)/Stats.cpp \ - $(SRC)/System.cpp \ - $(SRC)/Timer.cpp \ - $(SRC)/TimerGroup.cpp \ - $(SRC)/TimerList.cpp \ - $(SRC)/TransTable.cpp + +include $(INCL_DDS_SOURCE) ITEST_SOURCE_FILES = \ - $(STOLEN_SOURCE_FILES) \ + $(DDS_SOURCE_FILES) \ $(DTEST_SOURCE_FILES) \ itest.cpp -ITEST_OBJ_FILES = $(subst .cpp,.obj,$(ITEST_SOURCE_FILES)) +ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) dtest: $(DTEST_OBJ_FILES) - link /LTCG $(DTEST_OBJ_FILES) $(DLIB) $(CC_BOOST_LINK) /out:$(DTEST).exe + link $(LINK1_FLAGS) $(DTEST_OBJ_FILES) $(DLIB) \ + $(LINK2_FLAGS) /out:$(DTEST).exe itest: $(ITEST_OBJ_FILES) - link /LTCG $(ITEST_OBJ_FILES) $(CC_BOOST_LINK) /out:$(ITEST).exe + link $(LINK1_FLAGS) $(ITEST_OBJ_FILES) \ + $(LINK2_FLAGS) /out:$(ITEST).exe %.obj: %.cpp - $(CC) $(CC_FULL_FLAGS) $(CC_BOOST_INCL) /c $< /Fo$*.obj + $(CC) $(COMPILE_FLAGS) $(CC_BOOST_INCL) /c $< /Fo$*.obj depend: makedepend -Y -o.obj -- $(ITEST_SOURCE_FILES) $(DTEST).cpp clean: - rm -f $(ITEST_OBJ_FILES) $(DTEST).{obj,exe} $(ITEST).{exe,exp,lib} $(DLL) $(DLIB) - - -# DO NOT DELETE - -../src/dds.obj: ../include/dll.h ../src/dds.h ../src/debug.h -../src/dds.obj: ../include/portab.h ../src/TransTable.h ../src/Timer.h -../src/dds.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/dds.obj: ../src/Scheduler.h ../src/Init.h -../src/ABsearch.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABsearch.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABsearch.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABsearch.obj: ../src/Scheduler.h ../src/threadmem.h -../src/ABsearch.obj: ../src/QuickTricks.h ../src/LaterTricks.h -../src/ABsearch.obj: ../src/ABsearch.h -../src/ABstats.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABstats.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABstats.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABstats.obj: ../src/Scheduler.h -../src/CalcTables.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/CalcTables.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/CalcTables.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/CalcTables.obj: ../src/Scheduler.h ../src/SolveBoard.h ../src/PBN.h -../src/DealerPar.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/DealerPar.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/DealerPar.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/DealerPar.obj: ../src/Scheduler.h -../src/Init.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Init.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Init.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Init.obj: ../src/Scheduler.h ../src/threadmem.h ../src/Init.h -../src/Init.obj: ../src/ABsearch.h -../src/LaterTricks.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/LaterTricks.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/LaterTricks.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/LaterTricks.obj: ../src/Scheduler.h ../src/threadmem.h -../src/LaterTricks.obj: ../src/LaterTricks.h -../src/Moves.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Moves.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Moves.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Moves.obj: ../src/Scheduler.h ../src/ABsearch.h -../src/Par.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Par.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Par.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Par.obj: ../src/Scheduler.h -../src/PlayAnalyser.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PlayAnalyser.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PlayAnalyser.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PlayAnalyser.obj: ../src/Scheduler.h ../src/threadmem.h -../src/PlayAnalyser.obj: ../src/SolverIF.h ../src/PBN.h -../src/PBN.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PBN.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PBN.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PBN.obj: ../src/Scheduler.h ../src/PBN.h -../src/QuickTricks.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/QuickTricks.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/QuickTricks.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/QuickTricks.obj: ../src/Scheduler.h ../src/threadmem.h -../src/QuickTricks.obj: ../src/QuickTricks.h -../src/Scheduler.obj: ../src/Scheduler.h ../src/dds.h ../src/debug.h -../src/Scheduler.obj: ../include/portab.h ../src/TransTable.h -../src/Scheduler.obj: ../include/dll.h ../src/Timer.h ../src/ABstats.h -../src/Scheduler.obj: ../src/Moves.h ../src/Stats.h -../src/SolveBoard.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolveBoard.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolveBoard.obj: ../src/Scheduler.h ../src/threadmem.h -../src/SolveBoard.obj: ../src/SolverIF.h ../src/SolveBoard.h ../src/PBN.h -../src/SolverIF.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolverIF.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolverIF.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolverIF.obj: ../src/Scheduler.h ../src/Init.h ../src/threadmem.h -../src/SolverIF.obj: ../src/ABsearch.h ../src/SolverIF.h -../src/Stats.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Stats.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Stats.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Stats.obj: ../src/Scheduler.h -../src/Timer.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Timer.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Timer.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Timer.obj: ../src/Scheduler.h -../src/TransTable.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/TransTable.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/TransTable.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/TransTable.obj: ../src/Scheduler.h -testcommon.obj: ../include/dll.h ../include/portab.h testStats.h dtest.h -testStats.obj: ../include/portab.h testStats.h -itest.obj: ../include/dll.h testcommon.h -dtest.obj: ../include/dll.h testcommon.h + rm -f $(ITEST_OBJ_FILES) $(DTEST).{obj,exe} \ + $(ITEST).{exe,exp,lib} $(DLL) $(DLIB) + +# If you don't have a Linux-like setup, use "del" instead of "rm". + +include $(INCL_DEPENDS) + diff --git a/test/Makefiles/Makefile_Visual_Windows b/test/Makefiles/Makefile_Visual_Windows deleted file mode 100644 index 2c74d36c..00000000 --- a/test/Makefiles/Makefile_Visual_Windows +++ /dev/null @@ -1,209 +0,0 @@ -# This is a Makefile for the dtest test program, -# for Windows and the Microsoft Visual C++ compiler. -# Unlike the other Makefiles, it does not assume a Unix-like setup. -# Contributed by Philippe Capron in Dec. 2014. - -# The test program itself does not use multi-threading, -# but the DLL might, depending on how it was compiled. - -# The Makefile also allows an "un-official" and ugly, but -# sometimes practical compilation of a directly integrated -# executable (i.e. not using the DLL). For this the Makefile -# uses the source and object files in the src directory... -# Use "make itest" at your own risk. - -# If your Microsoft compiler is not called cl, change it here. -CC = cl -CC_FLAGS = /O2 /Oi /Ot /Oy /GL -LINK_FLAGS = /LTCG - -# These flags are not turned on by default, but DDS should pass them. -# Turn them on below. -WARN_FLAGS = \ - /Wall \ - /wd4127 \ - /wd4514 \ - /wd4555 \ - /wd4668 \ - /wd4701 \ - /wd4711 \ - /wd4820 \ - /wd4986 \ - /wd4987 \ - /wd4996 \ - /WX - -# Here you can turn on warnings. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -DTEST = dtest -ITEST = itest - -DLLBASE = dds -DLL = $(DLLBASE).dll -DLIB = $(DLLBASE).lib -EXPORTER = Exports.def - -# This is in addition to $(DTEST).cpp -DTEST_SOURCE_FILES = \ - testcommon.cpp \ - testStats.cpp - -DTEST_OBJ_FILES = \ - testcommon.obj \ - testStats.obj \ - $(DTEST).obj - -# These are the files that we steal from the src directory. -SRC = ..\src -STOLEN_SOURCE_FILES = \ - $(SRC)\dds.cpp \ - $(SRC)\ABsearch.cpp \ - $(SRC)\ABstats.cpp \ - $(SRC)\CalcTables.cpp \ - $(SRC)\DealerPar.cpp \ - $(SRC)\Init.cpp \ - $(SRC)\LaterTricks.cpp \ - $(SRC)\Moves.cpp \ - $(SRC)\Par.cpp \ - $(SRC)\PlayAnalyser.cpp \ - $(SRC)\PBN.cpp \ - $(SRC)\QuickTricks.cpp \ - $(SRC)\Scheduler.cpp \ - $(SRC)\SolveBoard.cpp \ - $(SRC)\SolverIF.cpp \ - $(SRC)\Stats.cpp \ - $(SRC)\Timer.cpp \ - $(SRC)\TransTable.cpp - -ITEST_SOURCE_FILES = \ - $(STOLEN_SOURCE_FILES) \ - $(DTEST_SOURCE_FILES) \ - itest.cpp - -ITEST_OBJ_FILES = \ - $(SRC)\dds.obj \ - $(SRC)\ABsearch.obj \ - $(SRC)\ABstats.obj \ - $(SRC)\CalcTables.obj \ - $(SRC)\DealerPar.obj \ - $(SRC)\Init.obj \ - $(SRC)\LaterTricks.obj \ - $(SRC)\Moves.obj \ - $(SRC)\Par.obj \ - $(SRC)\PlayAnalyser.obj \ - $(SRC)\PBN.obj \ - $(SRC)\QuickTricks.obj \ - $(SRC)\Scheduler.obj \ - $(SRC)\SolveBoard.obj \ - $(SRC)\SolverIF.obj \ - $(SRC)\Stats.obj \ - $(SRC)\Timer.obj \ - $(SRC)\TransTable.obj \ - testcommon.obj \ - testStats.obj \ - itest.obj - -dtest: $(DTEST_OBJ_FILES) - link $(DTEST_OBJ_FILES) $(DLIB) /out:$(DTEST).exe - -itest: $(ITEST_OBJ_FILES) - link /LTCG $(ITEST_OBJ_FILES) /out:$(ITEST).exe - -%.obj: %.cpp - $(CC) $(CC_FULL_FLAGS) /c $< /Fo$*.obj - -clean: - del $(ITEST_OBJ_FILES) \ - $(DTEST).obj $(DTEST).exe \ - $(ITEST).exe $(ITEST).exp $(ITEST).lib \ - $(DLL) $(DLIB) - - -# DO NOT DELETE - -../src/dds.obj: ../include/dll.h ../src/dds.h ../src/debug.h -../src/dds.obj: ../include/portab.h ../src/TransTable.h ../src/Timer.h -../src/dds.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/dds.obj: ../src/Scheduler.h ../src/Init.h -../src/ABsearch.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABsearch.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABsearch.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABsearch.obj: ../src/Scheduler.h ../src/threadmem.h -../src/ABsearch.obj: ../src/QuickTricks.h ../src/LaterTricks.h -../src/ABsearch.obj: ../src/ABsearch.h -../src/ABstats.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABstats.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABstats.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABstats.obj: ../src/Scheduler.h -../src/CalcTables.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/CalcTables.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/CalcTables.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/CalcTables.obj: ../src/Scheduler.h ../src/SolveBoard.h ../src/PBN.h -../src/DealerPar.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/DealerPar.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/DealerPar.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/DealerPar.obj: ../src/Scheduler.h -../src/Init.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Init.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Init.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Init.obj: ../src/Scheduler.h ../src/threadmem.h ../src/Init.h -../src/Init.obj: ../src/ABsearch.h -../src/LaterTricks.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/LaterTricks.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/LaterTricks.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/LaterTricks.obj: ../src/Scheduler.h ../src/threadmem.h -../src/LaterTricks.obj: ../src/LaterTricks.h -../src/Moves.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Moves.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Moves.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Moves.obj: ../src/Scheduler.h ../src/ABsearch.h -../src/Par.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Par.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Par.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Par.obj: ../src/Scheduler.h -../src/PlayAnalyser.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PlayAnalyser.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PlayAnalyser.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PlayAnalyser.obj: ../src/Scheduler.h ../src/threadmem.h -../src/PlayAnalyser.obj: ../src/SolverIF.h ../src/PBN.h -../src/PBN.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PBN.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PBN.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PBN.obj: ../src/Scheduler.h ../src/PBN.h -../src/QuickTricks.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/QuickTricks.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/QuickTricks.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/QuickTricks.obj: ../src/Scheduler.h ../src/threadmem.h -../src/QuickTricks.obj: ../src/QuickTricks.h -../src/Scheduler.obj: ../src/Scheduler.h ../src/dds.h ../src/debug.h -../src/Scheduler.obj: ../include/portab.h ../src/TransTable.h -../src/Scheduler.obj: ../include/dll.h ../src/Timer.h ../src/ABstats.h -../src/Scheduler.obj: ../src/Moves.h ../src/Stats.h -../src/SolveBoard.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolveBoard.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolveBoard.obj: ../src/Scheduler.h ../src/threadmem.h -../src/SolveBoard.obj: ../src/SolverIF.h ../src/SolveBoard.h ../src/PBN.h -../src/SolverIF.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolverIF.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolverIF.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolverIF.obj: ../src/Scheduler.h ../src/Init.h ../src/threadmem.h -../src/SolverIF.obj: ../src/ABsearch.h ../src/SolverIF.h -../src/Stats.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Stats.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Stats.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Stats.obj: ../src/Scheduler.h -../src/Timer.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Timer.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Timer.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Timer.obj: ../src/Scheduler.h -../src/TransTable.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/TransTable.obj: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/TransTable.obj: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/TransTable.obj: ../src/Scheduler.h -testcommon.obj: ../include/dll.h ../include/portab.h testStats.h dtest.h -testStats.obj: ../include/portab.h testStats.h -itest.obj: ../include/dll.h testcommon.h -dtest.obj: ../include/dll.h testcommon.h diff --git a/test/Makefiles/Makefile_cygwin b/test/Makefiles/Makefile_cygwin index 06cf9f1a..7657432c 100644 --- a/test/Makefiles/Makefile_cygwin +++ b/test/Makefiles/Makefile_cygwin @@ -1,12 +1,10 @@ -# This is a Makefile for the dtest test program, -# for Cygwin under Windows and the GNU g++ compiler. +# --------------------- INFORMATION -------------------------------- -# It does assume a Unix-like setup for some commands, -# but if you only want to call "make" with the default target, -# you should be OK. +# This the test Makefile for Windows and the Cygwin GNU g++ +# compiler. It assumes a Unix-like setup for some commands. -# The test program itself does not use multi-threading, -# but the DLL might, depending on how it was compiled. +# The dtest program itself does not use multi-threading, +# but the library might, depending on how it was compiled. # The Makefile also allows an "un-official" and ugly, but # sometimes practical compilation of a directly integrated @@ -14,17 +12,29 @@ # uses the source and object files in the src directory... # Use "make itest" at your own risk. +# If you need to add something for the threading system, this is +# the place. + +CC_BOOST_LINK = -lboost_system -lboost_thread + +THREAD_LINK = $(CC_BOOST_LINK) + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_DDS_SOURCE = Makefiles/dds_sources.txt +INCL_OWN_SOURCE = Makefiles/own_sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt # If your compiler name is not given here, change it. CC = g++ -# Use this one to get Windows multi-threading -# CC_FLAGS = -O3 -flto -mtune=generic -fno-use-linker-plugin -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -fopenmp -mtune=generic -fno-use-linker-plugin +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... -# These flags are not turned on by default, but DDS should pass them. -# Turn them on below. WARN_FLAGS = \ -Wshadow \ -Wsign-conversion \ @@ -32,13 +42,13 @@ WARN_FLAGS = \ -Wcast-align -Wcast-qual \ -Wctor-dtor-privacy \ -Wdisabled-optimization \ + -Wformat=2 \ -Winit-self \ -Wlogical-op \ -Wmissing-declarations \ -Wmissing-include-dirs \ -Wnoexcept \ -Wold-style-cast \ - -Wformat=2 \ -Woverloaded-virtual \ -Wredundant-decls \ -Wsign-promo \ @@ -50,162 +60,65 @@ WARN_FLAGS = \ -Wno-unknown-pragmas \ -Wno-long-long -# Here you can turn on warnings. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -DTEST = dtest -ITEST = itest +COMPILE_FLAGS = -O3 -flto -fopenmp -mtune=generic \ + -fno-use-linker-plugin \ + $(WARN_FLAGS) DLLBASE = dds DLL = $(DLLBASE).dll DLIB = $(DLLBASE).lib EXPORTER = Exports.def -# This is in addition to $(DTEST).cpp -DTEST_SOURCE_FILES = \ - testcommon.cpp \ - testStats.cpp - -LD_FLAGS = \ +LINK1_FLAGS = +LINK2_FLAGS = \ -Wl,--subsystem,windows \ -Wl,--output-def,$(DLLBASE).def \ -Wl,--dynamicbase \ -Wl,--nxcompat \ -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup + -Wl,--enable-stdcall-fixup \ + $(THREAD_LINK) \ + -L. -l$(DLLBASE) -LIB_FLAGS = -L. -l$(DLLBASE) +# This is in addition to $(DTEST).cpp + +include $(INCL_OWN_SOURCE) DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o +DTEST = dtest +ITEST = itest + # These are the files that we steal from the src directory. -SRC = ../src -STOLEN_SOURCE_FILES = \ - $(SRC)/dds.cpp \ - $(SRC)/ABsearch.cpp \ - $(SRC)/ABstats.cpp \ - $(SRC)/CalcTables.cpp \ - $(SRC)/DealerPar.cpp \ - $(SRC)/Init.cpp \ - $(SRC)/LaterTricks.cpp \ - $(SRC)/Moves.cpp \ - $(SRC)/Par.cpp \ - $(SRC)/PlayAnalyser.cpp \ - $(SRC)/PBN.cpp \ - $(SRC)/QuickTricks.cpp \ - $(SRC)/Scheduler.cpp \ - $(SRC)/SolveBoard.cpp \ - $(SRC)/SolverIF.cpp \ - $(SRC)/Stats.cpp \ - $(SRC)/Timer.cpp \ - $(SRC)/TransTable.cpp + +include $(INCL_DDS_SOURCE) ITEST_SOURCE_FILES = \ - $(STOLEN_SOURCE_FILES) \ + $(DDS_SOURCE_FILES) \ $(DTEST_SOURCE_FILES) \ itest.cpp ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) dtest: $(DTEST_OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(DTEST_OBJ_FILES) $(LD_FLAGS) $(LIB_FLAGS) -o $(DTEST) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(DTEST_OBJ_FILES) \ + $(LINK2_FLAGS) -o $(DTEST) itest: $(ITEST_OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(ITEST_OBJ_FILES) $(LD_FLAGS) -o $(ITEST) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(ITEST_OBJ_FILES) \ + $(LINK2_FLAGS) -o $(ITEST) %.o: %.cpp - $(CC) $(CC_FULL_FLAGS) -c $< -o $*.o + $(CC) $(COMPILE_FLAGS) -c $< -o $*.o depend: makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp clean: - rm -f $(ITEST_OBJ_FILES) $(DTEST).{o,exe} $(ITEST).exe $(DLL) $(DLLBASE).def - - -# DO NOT DELETE - -../src/dds.o: ../include/dll.h ../src/dds.h ../src/debug.h -../src/dds.o: ../include/portab.h ../src/TransTable.h ../src/Timer.h -../src/dds.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/dds.o: ../src/Scheduler.h ../src/Init.h -../src/ABsearch.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABsearch.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABsearch.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABsearch.o: ../src/Scheduler.h ../src/threadmem.h ../src/QuickTricks.h -../src/ABsearch.o: ../src/LaterTricks.h ../src/ABsearch.h -../src/ABstats.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABstats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABstats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABstats.o: ../src/Scheduler.h -../src/CalcTables.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/CalcTables.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/CalcTables.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/CalcTables.o: ../src/Scheduler.h ../src/SolveBoard.h ../src/PBN.h -../src/DealerPar.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/DealerPar.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/DealerPar.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/DealerPar.o: ../src/Scheduler.h -../src/Init.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Init.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Init.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Init.o: ../src/Scheduler.h ../src/threadmem.h ../src/Init.h -../src/Init.o: ../src/ABsearch.h -../src/LaterTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/LaterTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/LaterTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/LaterTricks.o: ../src/Scheduler.h ../src/threadmem.h -../src/LaterTricks.o: ../src/LaterTricks.h -../src/Moves.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Moves.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Moves.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Moves.o: ../src/Scheduler.h ../src/ABsearch.h -../src/Par.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Par.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Par.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Par.o: ../src/Scheduler.h -../src/PlayAnalyser.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PlayAnalyser.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PlayAnalyser.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PlayAnalyser.o: ../src/Scheduler.h ../src/threadmem.h -../src/PlayAnalyser.o: ../src/SolverIF.h ../src/PBN.h -../src/PBN.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PBN.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PBN.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PBN.o: ../src/Scheduler.h ../src/PBN.h -../src/QuickTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/QuickTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/QuickTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/QuickTricks.o: ../src/Scheduler.h ../src/threadmem.h -../src/QuickTricks.o: ../src/QuickTricks.h -../src/Scheduler.o: ../src/Scheduler.h ../src/dds.h ../src/debug.h -../src/Scheduler.o: ../include/portab.h ../src/TransTable.h ../include/dll.h -../src/Scheduler.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/Scheduler.o: ../src/Stats.h -../src/SolveBoard.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolveBoard.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolveBoard.o: ../src/Scheduler.h ../src/threadmem.h ../src/SolverIF.h -../src/SolveBoard.o: ../src/SolveBoard.h ../src/PBN.h -../src/SolverIF.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolverIF.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolverIF.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolverIF.o: ../src/Scheduler.h ../src/Init.h ../src/threadmem.h -../src/SolverIF.o: ../src/ABsearch.h ../src/SolverIF.h -../src/Stats.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Stats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Stats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Stats.o: ../src/Scheduler.h -../src/Timer.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Timer.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Timer.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Timer.o: ../src/Scheduler.h -../src/TransTable.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/TransTable.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/TransTable.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/TransTable.o: ../src/Scheduler.h -testcommon.o: ../include/dll.h ../include/portab.h testStats.h dtest.h -testStats.o: ../include/portab.h testStats.h -itest.o: ../include/dll.h testcommon.h -dtest.o: ../include/dll.h testcommon.h + rm -f $(ITEST_OBJ_FILES) $(DTEST).{o,exe} $(ITEST).exe \ + $(DLL) $(DLLBASE).def + +# If you don't have a Linux-like setup, use "del" instead of "rm". + +include $(INCL_DEPENDS) + diff --git a/test/Makefiles/sources.txt b/test/Makefiles/dds_sources.txt similarity index 95% rename from test/Makefiles/sources.txt rename to test/Makefiles/dds_sources.txt index a3e5d15c..c3c4f366 100644 --- a/test/Makefiles/sources.txt +++ b/test/Makefiles/dds_sources.txt @@ -1,4 +1,4 @@ -SOURCE_FILES = \ +DDS_SOURCE_FILES = \ ../src/dds.cpp \ ../src/ABsearch.cpp \ ../src/ABstats.cpp \ diff --git a/test/Makefiles/depends_o.txt b/test/Makefiles/depends_o.txt new file mode 100644 index 00000000..b879804a --- /dev/null +++ b/test/Makefiles/depends_o.txt @@ -0,0 +1,114 @@ +../src/dds.o: ../include/dll.h ../src/dds.h ../src/debug.h +../src/dds.o: ../include/portab.h ../src/TransTable.h ../src/TimerList.h +../src/dds.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/dds.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/dds.o: ../src/TimeStat.h ../src/Init.h +../src/ABsearch.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/ABsearch.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/ABsearch.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/ABsearch.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/ABsearch.o: ../src/TimeStat.h ../src/threadmem.h ../src/QuickTricks.h +../src/ABsearch.o: ../src/LaterTricks.h ../src/ABsearch.h +../src/ABstats.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/ABstats.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/ABstats.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/ABstats.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/ABstats.o: ../src/TimeStat.h +../src/CalcTables.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/CalcTables.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/CalcTables.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/CalcTables.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/CalcTables.o: ../src/TimeStat.h ../src/SolveBoard.h ../src/PBN.h +../src/DealerPar.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/DealerPar.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/DealerPar.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/DealerPar.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/DealerPar.o: ../src/TimeStat.h +../src/Init.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Init.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/Init.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/Init.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/Init.o: ../src/TimeStat.h ../src/threadmem.h ../src/Init.h +../src/Init.o: ../src/ABsearch.h ../src/System.h +../src/LaterTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/LaterTricks.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/LaterTricks.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/LaterTricks.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/LaterTricks.o: ../src/TimeStat.h ../src/threadmem.h +../src/LaterTricks.o: ../src/LaterTricks.h +../src/Moves.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Moves.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/Moves.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/Moves.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/Moves.o: ../src/TimeStat.h ../src/ABsearch.h +../src/Par.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Par.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/Par.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/Par.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/Par.o: ../src/TimeStat.h +../src/PlayAnalyser.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/PlayAnalyser.o: ../src/TransTable.h ../include/dll.h +../src/PlayAnalyser.o: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h +../src/PlayAnalyser.o: ../src/ABstats.h ../src/Moves.h ../src/Scheduler.h +../src/PlayAnalyser.o: ../src/TimeStatList.h ../src/TimeStat.h +../src/PlayAnalyser.o: ../src/threadmem.h ../src/SolverIF.h ../src/System.h +../src/PlayAnalyser.o: ../src/PBN.h +../src/PBN.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/PBN.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/PBN.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/PBN.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/PBN.o: ../src/TimeStat.h ../src/PBN.h +../src/QuickTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/QuickTricks.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/QuickTricks.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/QuickTricks.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/QuickTricks.o: ../src/TimeStat.h ../src/threadmem.h +../src/QuickTricks.o: ../src/QuickTricks.h +../src/Scheduler.o: ../src/Scheduler.h ../src/TimeStatList.h +../src/Scheduler.o: ../src/TimeStat.h ../src/dds.h ../src/debug.h +../src/Scheduler.o: ../include/portab.h ../src/TransTable.h ../include/dll.h +../src/Scheduler.o: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h +../src/Scheduler.o: ../src/ABstats.h ../src/Moves.h +../src/SolveBoard.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/SolveBoard.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/SolveBoard.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/SolveBoard.o: ../src/TimeStat.h ../src/threadmem.h ../src/SolverIF.h +../src/SolveBoard.o: ../src/SolveBoard.h ../src/System.h ../src/PBN.h +../src/SolverIF.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolverIF.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/SolverIF.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/SolverIF.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/SolverIF.o: ../src/TimeStat.h ../src/Init.h ../src/threadmem.h +../src/SolverIF.o: ../src/ABsearch.h ../src/SolverIF.h +../src/System.o: ../include/dll.h ../src/dds.h ../src/debug.h +../src/System.o: ../include/portab.h ../src/TransTable.h ../src/TimerList.h +../src/System.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/System.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/System.o: ../src/TimeStat.h ../src/System.h ../src/SolveBoard.h +../src/System.o: ../src/PlayAnalyser.h +../src/Timer.o: ../src/Timer.h ../include/portab.h +../src/TimerGroup.o: ../src/TimerGroup.h ../src/Timer.h ../src/dds.h +../src/TimerGroup.o: ../src/debug.h ../include/portab.h ../src/TransTable.h +../src/TimerGroup.o: ../include/dll.h ../src/TimerList.h ../src/ABstats.h +../src/TimerGroup.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/TimerGroup.o: ../src/TimeStat.h +../src/TimerList.o: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h +../src/TimerList.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/TimerList.o: ../src/TransTable.h ../include/dll.h ../src/ABstats.h +../src/TimerList.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/TimerList.o: ../src/TimeStat.h +../src/TimeStat.o: ../include/portab.h ../src/TimeStat.h +../src/TimeStatList.o: ../src/TimeStatList.h ../src/TimeStat.h +../src/TimeStatList.o: ../include/portab.h +../src/TransTable.o: ../src/dds.h ../src/debug.h ../include/portab.h +../src/TransTable.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/TransTable.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/TransTable.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/TransTable.o: ../src/TimeStat.h +testcommon.o: ../include/dll.h ../include/portab.h testStats.h TestTimer.h +testcommon.o: dtest.h +TestTimer.o: TestTimer.h +testStats.o: ../include/portab.h testStats.h +itest.o: ../include/dll.h testcommon.h +dtest.o: ../include/dll.h testcommon.h diff --git a/test/Makefiles/depends_obj.txt b/test/Makefiles/depends_obj.txt new file mode 100644 index 00000000..f31383ba --- /dev/null +++ b/test/Makefiles/depends_obj.txt @@ -0,0 +1,114 @@ +../src/dds.obj: ../include/dll.h ../src/dds.h ../src/debug.h +../src/dds.obj: ../include/portab.h ../src/TransTable.h ../src/TimerList.h +../src/dds.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/dds.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/dds.obj: ../src/TimeStat.h ../src/Init.h +../src/ABsearch.obj: ../src/dds.h ../src/debug.h ../include/portab.h +../src/ABsearch.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/ABsearch.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/ABsearch.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/ABsearch.obj: ../src/TimeStat.h ../src/threadmem.h +../src/ABsearch.obj: ../src/QuickTricks.h ../src/LaterTricks.h +../src/ABsearch.obj: ../src/ABsearch.h +../src/ABstats.obj: ../src/dds.h ../src/debug.h ../include/portab.h +../src/ABstats.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/ABstats.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/ABstats.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/ABstats.obj: ../src/TimeStat.h +../src/CalcTables.obj: ../src/dds.h ../src/debug.h ../include/portab.h +../src/CalcTables.obj: ../src/TransTable.h ../include/dll.h +../src/CalcTables.obj: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h +../src/CalcTables.obj: ../src/ABstats.h ../src/Moves.h ../src/Scheduler.h +../src/CalcTables.obj: ../src/TimeStatList.h ../src/TimeStat.h +../src/CalcTables.obj: ../src/SolveBoard.h ../src/PBN.h +../src/DealerPar.obj: ../src/dds.h ../src/debug.h ../include/portab.h +../src/DealerPar.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/DealerPar.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/DealerPar.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/DealerPar.obj: ../src/TimeStat.h +../src/Init.obj: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Init.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/Init.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/Init.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/Init.obj: ../src/TimeStat.h ../src/threadmem.h ../src/Init.h +../src/Init.obj: ../src/ABsearch.h ../src/System.h +../src/LaterTricks.obj: ../src/dds.h ../src/debug.h ../include/portab.h +../src/LaterTricks.obj: ../src/TransTable.h ../include/dll.h +../src/LaterTricks.obj: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h +../src/LaterTricks.obj: ../src/ABstats.h ../src/Moves.h ../src/Scheduler.h +../src/LaterTricks.obj: ../src/TimeStatList.h ../src/TimeStat.h +../src/LaterTricks.obj: ../src/threadmem.h ../src/LaterTricks.h +../src/Moves.obj: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Moves.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/Moves.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/Moves.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/Moves.obj: ../src/TimeStat.h ../src/ABsearch.h +../src/Par.obj: ../src/dds.h ../src/debug.h ../include/portab.h +../src/Par.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/Par.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/Par.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/Par.obj: ../src/TimeStat.h +../src/PlayAnalyser.obj: ../src/dds.h ../src/debug.h ../include/portab.h +../src/PlayAnalyser.obj: ../src/TransTable.h ../include/dll.h +../src/PlayAnalyser.obj: ../src/TimerList.h ../src/TimerGroup.h +../src/PlayAnalyser.obj: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/PlayAnalyser.obj: ../src/Scheduler.h ../src/TimeStatList.h +../src/PlayAnalyser.obj: ../src/TimeStat.h ../src/threadmem.h +../src/PlayAnalyser.obj: ../src/SolverIF.h ../src/System.h ../src/PBN.h +../src/PBN.obj: ../src/dds.h ../src/debug.h ../include/portab.h +../src/PBN.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/PBN.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/PBN.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/PBN.obj: ../src/TimeStat.h ../src/PBN.h +../src/QuickTricks.obj: ../src/dds.h ../src/debug.h ../include/portab.h +../src/QuickTricks.obj: ../src/TransTable.h ../include/dll.h +../src/QuickTricks.obj: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h +../src/QuickTricks.obj: ../src/ABstats.h ../src/Moves.h ../src/Scheduler.h +../src/QuickTricks.obj: ../src/TimeStatList.h ../src/TimeStat.h +../src/QuickTricks.obj: ../src/threadmem.h ../src/QuickTricks.h +../src/Scheduler.obj: ../src/Scheduler.h ../src/TimeStatList.h +../src/Scheduler.obj: ../src/TimeStat.h ../src/dds.h ../src/debug.h +../src/Scheduler.obj: ../include/portab.h ../src/TransTable.h +../src/Scheduler.obj: ../include/dll.h ../src/TimerList.h ../src/TimerGroup.h +../src/Scheduler.obj: ../src/Timer.h ../src/ABstats.h ../src/Moves.h +../src/SolveBoard.obj: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolveBoard.obj: ../src/TransTable.h ../include/dll.h +../src/SolveBoard.obj: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h +../src/SolveBoard.obj: ../src/ABstats.h ../src/Moves.h ../src/Scheduler.h +../src/SolveBoard.obj: ../src/TimeStatList.h ../src/TimeStat.h +../src/SolveBoard.obj: ../src/threadmem.h ../src/SolverIF.h +../src/SolveBoard.obj: ../src/SolveBoard.h ../src/System.h ../src/PBN.h +../src/SolverIF.obj: ../src/dds.h ../src/debug.h ../include/portab.h +../src/SolverIF.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h +../src/SolverIF.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/SolverIF.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/SolverIF.obj: ../src/TimeStat.h ../src/Init.h ../src/threadmem.h +../src/SolverIF.obj: ../src/ABsearch.h ../src/SolverIF.h +../src/System.obj: ../include/dll.h ../src/dds.h ../src/debug.h +../src/System.obj: ../include/portab.h ../src/TransTable.h ../src/TimerList.h +../src/System.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h +../src/System.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/System.obj: ../src/TimeStat.h ../src/System.h ../src/SolveBoard.h +../src/System.obj: ../src/PlayAnalyser.h +../src/Timer.obj: ../src/Timer.h ../include/portab.h +../src/TimerGroup.obj: ../src/TimerGroup.h ../src/Timer.h ../src/dds.h +../src/TimerGroup.obj: ../src/debug.h ../include/portab.h ../src/TransTable.h +../src/TimerGroup.obj: ../include/dll.h ../src/TimerList.h ../src/ABstats.h +../src/TimerGroup.obj: ../src/Moves.h ../src/Scheduler.h +../src/TimerGroup.obj: ../src/TimeStatList.h ../src/TimeStat.h +../src/TimerList.obj: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h +../src/TimerList.obj: ../src/dds.h ../src/debug.h ../include/portab.h +../src/TimerList.obj: ../src/TransTable.h ../include/dll.h ../src/ABstats.h +../src/TimerList.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h +../src/TimerList.obj: ../src/TimeStat.h +../src/TransTable.obj: ../src/dds.h ../src/debug.h ../include/portab.h +../src/TransTable.obj: ../src/TransTable.h ../include/dll.h +../src/TransTable.obj: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h +../src/TransTable.obj: ../src/ABstats.h ../src/Moves.h ../src/Scheduler.h +../src/TransTable.obj: ../src/TimeStatList.h ../src/TimeStat.h +testcommon.obj: ../include/dll.h ../include/portab.h testStats.h TestTimer.h +testcommon.obj: dtest.h +testStats.obj: ../include/portab.h testStats.h +TestTimer.obj: TestTimer.h +itest.obj: ../include/dll.h testcommon.h +dtest.obj: ../include/dll.h testcommon.h diff --git a/test/Makefiles/own_sources.txt b/test/Makefiles/own_sources.txt new file mode 100644 index 00000000..c89055b1 --- /dev/null +++ b/test/Makefiles/own_sources.txt @@ -0,0 +1,4 @@ +DTEST_SOURCE_FILES = \ + testcommon.cpp \ + TestTimer.cpp \ + testStats.cpp diff --git a/test/ref/sched.txt b/test/ref/sched.txt deleted file mode 100644 index 17b274c1..00000000 --- a/test/ref/sched.txt +++ /dev/null @@ -1,75 +0,0 @@ -Suit/NT - - n Number Cum time Average Sdev Sdev/mu - 1 29 9259313 319287 317668 0.99 - Avg 29 9259313 319287 317668 0.99 - -Repeat number - - n Number Cum time Average Sdev Sdev/mu - 0 29 9259313 319287 317668 0.99 - Avg 29 9259313 319287 317668 0.99 - -Trace depth - - n Number Cum time Average Sdev Sdev/mu - 0 29 9259313 319287 317668 0.99 - Avg 29 9259313 319287 317668 0.99 - -Evenness - - n Number Cum time Average Sdev Sdev/mu - 0 29 9259313 319287 317668 0.99 - Avg 29 9259313 319287 317668 0.99 - -Fanout - - n Number Cum time Average Sdev Sdev/mu - 33 1 69048 69048 0 0.00 - 37 1 80923 80923 0 0.00 - 38 1 255068 255068 0 0.00 - 39 2 46833 23417 2937 0.13 - 40 5 1559141 311828 275274 0.88 - 41 2 402088 201044 129519 0.64 - 42 4 296512 74128 39114 0.53 - 43 1 264389 264389 0 0.00 - 44 1 107856 107856 0 0.00 - 45 2 952402 476201 408513 0.86 - 46 3 1769324 589775 147521 0.25 - 47 4 2341648 585412 400295 0.68 - 51 1 863492 863492 0 0.00 - 58 1 250589 250589 0 0.00 - Avg 29 9259313 319287 317668 0.99 - -Threads - - n Number Cum time Average Sdev Sdev/mu - 0 12 2372153 197679 179588 0.91 - 1 4 1951266 487817 387100 0.79 - 2 4 2445013 611253 251235 0.41 - 3 9 2490881 276765 339816 1.23 - Avg 29 9259313 319287 317668 0.99 - -Group actual suit/NT - - n Number Cum time Average Sdev Sdev/mu - 0 71 10404968 146549 218153 1.49 - 1 29 9259313 319287 317668 0.99 - Avg 100 19664281 196643 263055 1.34 - -Group predicted suit/NT - - n Number Cum time Average Sdev Sdev/mu - 0 71 17391714 244954 0 0.00 - 1 29 12314015 424621 0 0.00 - Avg 100 29705729 297057 0 0.00 - -Group diff suit/NT - - n Number Cum time Average Sdev Sdev/mu - 0 71 -6986746 -98405 207932 -2.11 - 1 29 -3054702 -105335 314316 -2.98 - Avg 100 -10041448 -100414 243634 -2.43 - -Largest hand 1406984 4978740 28.26% - diff --git a/test/ref/timer0_chrono.txt b/test/ref/timer0_chrono.txt deleted file mode 100644 index 096c0444..00000000 --- a/test/ref/timer0_chrono.txt +++ /dev/null @@ -1,367 +0,0 @@ -Name Count User Avg % Syst Avg % -AB 211580 2160877 10.21 98.9 1872000 8.85 85.6 -Make 245448 577 0.00 0.0 64000 0.26 2.9 -Undo 211568 357 0.00 0.0 56000 0.26 2.6 -Evaluate 376 2 0.01 0.0 1000 2.66 0.0 -NextMove 111234 212 0.00 0.0 33000 0.30 1.5 -QuickTricks 83871 2904 0.03 0.1 33000 0.39 1.5 -LaterTricks 30190 69 0.00 0.0 9000 0.30 0.4 -MoveGen 163187 9047 0.06 0.4 65000 0.40 3.0 -Lookup 52724 10837 0.21 0.5 43000 0.82 2.0 -Build 17975 1090 0.06 0.0 11000 0.61 0.5 ---------------------------------------------------------------------- -Sum 1128153 2185972 1.94100.0 2187000 1.94100.0 - -Name Count User Avg % Syst Avg % -AB0 48 12 6651 554.25 0.3 6000 500.00 0.3 -AB3 47 29 133 4.59 0.0 0 0.00 0.0 -AB2 46 42 173 4.12 0.0 0 0.00 0.0 -AB1 45 63 262 4.16 0.0 0 0.00 0.0 -AB0 44 90 3300 36.67 0.2 3000 33.33 0.2 -AB3 43 175 788 4.50 0.0 1000 5.71 0.1 -AB2 42 230 1055 4.59 0.0 0 0.00 0.0 -AB1 41 333 1193 3.58 0.1 0 0.00 0.0 -AB0 40 385 14639 38.02 0.7 13000 33.77 0.7 -AB3 39 674 2950 4.38 0.1 0 0.00 0.0 -AB2 38 875 3602 4.12 0.2 2000 2.29 0.1 -AB1 37 1237 4305 3.48 0.2 4000 3.23 0.2 -AB0 36 1363 51103 37.49 2.4 42000 30.81 2.2 -AB3 35 2284 8812 3.86 0.4 7000 3.06 0.4 -AB2 34 2715 11351 4.18 0.5 8000 2.95 0.4 -AB1 33 4049 12160 3.00 0.6 7000 1.73 0.4 -AB0 32 4307 138004 32.04 6.4 123000 28.56 6.6 -AB3 31 4621 17585 3.81 0.8 9000 1.95 0.5 -AB2 30 5555 20504 3.69 0.9 16000 2.88 0.9 -AB1 29 7561 21956 2.90 1.0 12000 1.59 0.6 -AB0 28 8021 251870 31.40 11.7 234000 29.17 12.5 -AB3 27 7047 25787 3.66 1.2 16000 2.27 0.9 -AB2 26 8254 30197 3.66 1.4 18000 2.18 1.0 -AB1 25 11153 31803 2.85 1.5 27000 2.42 1.4 -AB0 24 11695 328848 28.12 15.2 307000 26.25 16.4 -AB3 23 7833 26905 3.43 1.2 18000 2.30 1.0 -AB2 22 8727 32162 3.69 1.5 18000 2.06 1.0 -AB1 21 12103 33166 2.74 1.5 20000 1.65 1.1 -AB0 20 12649 330978 26.17 15.3 325000 25.69 17.4 -AB3 19 7278 23311 3.20 1.1 14000 1.92 0.7 -AB2 18 7660 27656 3.61 1.3 12000 1.57 0.6 -AB1 17 10430 29080 2.79 1.3 19000 1.82 1.0 -AB0 16 10893 252805 23.21 11.7 241000 22.12 12.9 -AB3 15 5610 16994 3.03 0.8 13000 2.32 0.7 -AB2 14 5654 20521 3.63 0.9 7000 1.24 0.4 -AB1 13 7731 21944 2.84 1.0 13000 1.68 0.7 -AB0 12 8189 157752 19.26 7.3 149000 18.20 8.0 -AB3 11 3377 10343 3.06 0.5 11000 3.26 0.6 -AB2 10 3351 12046 3.59 0.6 6000 1.79 0.3 -AB1 9 4389 13040 2.97 0.6 9000 2.05 0.5 -AB0 8 4707 117939 25.06 5.5 116000 24.64 6.2 -AB3 7 1462 4874 3.33 0.2 1000 0.68 0.1 -AB2 6 1443 5205 3.61 0.2 1000 0.69 0.1 -AB1 5 1787 5871 3.29 0.3 5000 2.80 0.3 -AB0 4 1960 25241 12.88 1.2 19000 9.69 1.0 -AB3 3 378 1295 3.43 0.1 0 0.00 0.0 -AB2 2 360 1217 3.38 0.1 0 0.00 0.0 -AB1 1 400 1332 3.33 0.1 0 0.00 0.0 -AB0 0 439 169 0.38 0.0 0 0.00 0.0 ---------------------------------------------------------------------- -Sum 211580 2160877 10.21100.0 1872000 8.85100.0 - -Name Number User ticks Avg System Avg ms -AB0 0 439 171 0.39 1000 2.28 -AB1 1 400 1503 3.76 1000 2.50 -AB2 2 360 2736 7.60 1000 2.78 -AB3 3 378 4033 10.67 1000 2.65 -AB0 4 1960 30063 15.34 25000 12.76 -AB1 5 1787 35945 20.11 31000 17.35 -AB2 6 1443 41168 28.53 34000 23.56 -AB3 7 1462 46066 31.51 37000 25.31 -AB0 8 4707 165749 35.21 162000 34.42 -AB1 9 4389 178804 40.74 175000 39.87 -AB2 10 3351 190902 56.97 183000 54.61 -AB3 11 3377 201308 59.61 205000 60.70 -AB0 12 8189 361319 44.12 367000 44.82 -AB1 13 7731 383380 49.59 388000 50.19 -AB2 14 5654 404008 71.46 401000 70.92 -AB3 15 5610 421163 75.07 419000 74.69 -AB0 16 10893 676950 62.15 682000 62.61 -AB1 17 10430 706280 67.72 713000 68.36 -AB2 18 7660 734140 95.84 730000 95.30 -AB3 19 7278 757601 104.09 754000 103.60 -AB0 20 12649 1092284 86.35 1098000 86.81 -AB1 21 12103 1125617 93.00 1132000 93.53 -AB2 22 8727 1157975 132.69 1168000 133.84 -AB3 23 7833 1185036 151.29 1193000 152.30 -AB0 24 11695 1517326 129.74 1516000 129.63 -AB1 25 11153 1549233 138.91 1556000 139.51 -AB2 26 8254 1579633 191.38 1586000 192.15 -AB3 27 7047 1605573 227.84 1614000 229.03 -AB0 28 8021 1860615 231.97 1866000 232.64 -AB1 29 7561 1882640 248.99 1888000 249.70 -AB2 30 5555 1903208 342.61 1913000 344.37 -AB3 31 4621 1920915 415.69 1930000 417.66 -AB0 32 4307 2061204 478.57 2065000 479.45 -AB1 33 4049 2073459 512.09 2076000 512.72 -AB2 34 2715 2084858 767.90 2090000 769.80 -AB3 35 2284 2093719 916.69 2100000 919.44 -AB0 36 1363 2146043 1574.50 2147000 1575.20 -AB1 37 1237 2150357 1738.36 2152000 1739.69 -AB2 38 875 2153968 2461.68 2157000 2465.14 -AB3 39 674 2156964 3200.24 2160000 3204.75 -AB0 40 385 2172124 5641.88 2175000 5649.35 -AB1 41 333 2173319 6526.48 2176000 6534.53 -AB2 42 230 2174387 9453.86 2176000 9460.87 -AB3 43 175 2175199 12429.71 2178000 12445.71 -AB0 44 90 2178714 24207.93 2181000 24233.33 -AB1 45 63 2178978 34586.95 2181000 34619.05 -AB2 46 42 2179153 51884.60 2181000 51928.57 -AB3 47 29 2179294 75148.07 2181000 75206.90 -AB0 48 12 2185972 182164.33 2187000 182250.00 -Make1 570 0 0.00 0 0.00 -Make2 400 0 0.00 0 0.00 -Make3 457 0 0.00 0 0.00 -Make4 549 0 0.00 0 0.00 -Make5 2492 3 0.00 1000 0.40 -Make6 1787 0 0.00 0 0.00 -Make7 1828 0 0.00 0 0.00 -Make8 1933 3 0.00 2000 1.03 -Make9 5780 1 0.00 3000 0.52 -Make10 4389 13 0.00 0 0.00 -Make11 4079 5 0.00 4000 0.98 -Make12 4322 4 0.00 2000 0.46 -Make13 9891 1 0.00 0 0.00 -Make14 7731 44 0.01 1000 0.13 -Make15 6837 5 0.00 2000 0.29 -Make16 6972 47 0.01 2000 0.29 -Make17 13463 89 0.01 8000 0.59 -Make18 10430 44 0.00 1000 0.10 -Make19 9428 25 0.00 4000 0.42 -Make20 8775 1 0.00 1000 0.11 -Make21 15711 58 0.00 7000 0.45 -Make22 12103 30 0.00 4000 0.33 -Make23 10723 7 0.00 0 0.00 -Make24 9233 14 0.00 1000 0.11 -Make25 14833 12 0.00 3000 0.20 -Make26 11153 17 0.00 1000 0.09 -Make27 10171 10 0.00 5000 0.49 -Make28 8106 20 0.00 2000 0.25 -Make29 10203 29 0.00 2000 0.20 -Make30 7561 8 0.00 2000 0.26 -Make31 6803 9 0.00 0 0.00 -Make32 5229 0 0.00 1000 0.19 -Make33 5267 40 0.01 1000 0.19 -Make34 4049 15 0.00 0 0.00 -Make35 3244 2 0.00 0 0.00 -Make36 2555 0 0.00 0 0.00 -Make37 1783 0 0.00 1000 0.56 -Make38 1237 0 0.00 1000 0.81 -Make39 1094 13 0.01 1000 0.91 -Make40 734 8 0.01 0 0.00 -Make41 486 0 0.00 1000 2.06 -Make42 333 0 0.00 0 0.00 -Make43 276 0 0.00 0 0.00 -Make44 190 0 0.00 0 0.00 -Make45 112 0 0.00 0 0.00 -Make46 63 0 0.00 0 0.00 -Make47 51 0 0.00 0 0.00 -Make48 32 0 0.00 0 0.00 -Undo1 439 0 0.00 0 0.00 -Undo2 400 11 0.03 0 0.00 -Undo3 360 0 0.00 0 0.00 -Undo4 378 0 0.00 0 0.00 -Undo5 1960 2 0.00 0 0.00 -Undo6 1787 13 0.01 1000 0.56 -Undo7 1443 12 0.01 1000 0.69 -Undo8 1462 24 0.02 0 0.00 -Undo9 4707 3 0.00 0 0.00 -Undo10 4389 14 0.00 0 0.00 -Undo11 3351 3 0.00 1000 0.30 -Undo12 3377 25 0.01 1000 0.30 -Undo13 8189 18 0.00 3000 0.37 -Undo14 7731 0 0.00 3000 0.39 -Undo15 5654 24 0.00 0 0.00 -Undo16 5610 10 0.00 0 0.00 -Undo17 10893 43 0.00 2000 0.18 -Undo18 10430 7 0.00 0 0.00 -Undo19 7660 21 0.00 0 0.00 -Undo20 7278 0 0.00 2000 0.27 -Undo21 12649 35 0.00 3000 0.24 -Undo22 12103 14 0.00 5000 0.41 -Undo23 8727 19 0.00 4000 0.46 -Undo24 7833 0 0.00 2000 0.26 -Undo25 11695 2 0.00 5000 0.43 -Undo26 11153 37 0.00 3000 0.27 -Undo27 8254 0 0.00 3000 0.36 -Undo28 7047 0 0.00 0 0.00 -Undo29 8021 2 0.00 3000 0.37 -Undo30 7561 1 0.00 3000 0.40 -Undo31 5555 0 0.00 1000 0.18 -Undo32 4621 1 0.00 0 0.00 -Undo33 4307 0 0.00 3000 0.70 -Undo34 4049 0 0.00 4000 0.99 -Undo35 2715 12 0.00 1000 0.37 -Undo36 2284 0 0.00 0 0.00 -Undo37 1363 0 0.00 0 0.00 -Undo38 1237 0 0.00 1000 0.81 -Undo39 875 0 0.00 1000 1.14 -Undo40 674 0 0.00 0 0.00 -Undo41 385 2 0.01 0 0.00 -Undo42 333 0 0.00 0 0.00 -Undo43 230 0 0.00 0 0.00 -Undo44 175 2 0.01 0 0.00 -Undo45 90 0 0.00 0 0.00 -Undo46 63 0 0.00 0 0.00 -Undo47 42 0 0.00 0 0.00 -Undo48 29 0 0.00 0 0.00 -Evaluate0 376 2 0.01 1000 2.66 -NextMove1 170 0 0.00 0 0.00 -NextMove2 269 0 0.00 0 0.00 -NextMove3 131 0 0.00 0 0.00 -NextMove4 281 0 0.00 0 0.00 -NextMove5 705 0 0.00 0 0.00 -NextMove6 1255 0 0.00 0 0.00 -NextMove7 532 0 0.00 0 0.00 -NextMove8 1077 15 0.01 0 0.00 -NextMove9 1391 0 0.00 0 0.00 -NextMove10 3316 13 0.00 1000 0.30 -NextMove11 1073 0 0.00 1000 0.93 -NextMove12 2649 0 0.00 0 0.00 -NextMove13 2160 0 0.00 2000 0.93 -NextMove14 6029 12 0.00 2000 0.33 -NextMove15 1702 0 0.00 0 0.00 -NextMove16 4427 0 0.00 3000 0.68 -NextMove17 3033 5 0.00 0 0.00 -NextMove18 7860 35 0.00 1000 0.13 -NextMove19 2570 1 0.00 0 0.00 -NextMove20 5510 0 0.00 0 0.00 -NextMove21 3608 1 0.00 2000 0.55 -NextMove22 9041 3 0.00 5000 0.55 -NextMove23 3062 0 0.00 0 0.00 -NextMove24 5837 13 0.00 0 0.00 -NextMove25 3680 20 0.01 1000 0.27 -NextMove26 8015 45 0.01 4000 0.50 -NextMove27 3138 16 0.01 0 0.00 -NextMove28 5130 12 0.00 3000 0.58 -NextMove29 2642 3 0.00 1000 0.38 -NextMove30 5379 6 0.00 3000 0.56 -NextMove31 2182 0 0.00 0 0.00 -NextMove32 3373 0 0.00 2000 0.59 -NextMove33 1218 0 0.00 0 0.00 -NextMove34 3089 0 0.00 1000 0.32 -NextMove35 960 0 0.00 0 0.00 -NextMove36 1755 0 0.00 0 0.00 -NextMove37 546 0 0.00 0 0.00 -NextMove38 817 0 0.00 0 0.00 -NextMove39 420 0 0.00 1000 2.38 -NextMove40 455 0 0.00 0 0.00 -NextMove41 153 0 0.00 0 0.00 -NextMove42 232 12 0.05 0 0.00 -NextMove43 101 0 0.00 0 0.00 -NextMove44 129 0 0.00 0 0.00 -NextMove45 49 0 0.00 0 0.00 -NextMove46 41 0 0.00 0 0.00 -NextMove47 22 0 0.00 0 0.00 -NextMove48 20 0 0.00 0 0.00 -QuickTricks3 378 0 0.00 0 0.00 -QuickTricks4 1791 39 0.02 2000 1.12 -QuickTricks7 1462 0 0.00 1000 0.68 -QuickTricks8 4374 106 0.02 0 0.00 -QuickTricks11 3377 0 0.00 2000 0.59 -QuickTricks12 7644 204 0.03 2000 0.26 -QuickTricks15 5610 16 0.00 0 0.00 -QuickTricks16 10249 390 0.04 5000 0.49 -QuickTricks19 7278 1 0.00 3000 0.41 -QuickTricks20 6148 451 0.07 2000 0.33 -QuickTricks23 7833 6 0.00 1000 0.13 -QuickTricks24 5383 489 0.09 3000 0.56 -QuickTricks27 7047 2 0.00 3000 0.43 -QuickTricks28 4038 545 0.13 4000 0.99 -QuickTricks31 4621 45 0.01 3000 0.65 -QuickTricks32 2292 349 0.15 1000 0.44 -QuickTricks35 2284 0 0.00 1000 0.44 -QuickTricks36 844 153 0.18 0 0.00 -QuickTricks39 674 1 0.00 0 0.00 -QuickTricks40 279 58 0.21 0 0.00 -QuickTricks43 175 12 0.07 0 0.00 -QuickTricks44 61 36 0.59 0 0.00 -QuickTricks47 29 1 0.03 0 0.00 -LaterTricks4 911 0 0.00 0 0.00 -LaterTricks8 2742 12 0.00 0 0.00 -LaterTricks12 5346 4 0.00 2000 0.37 -LaterTricks16 7609 21 0.00 2000 0.26 -LaterTricks20 3841 8 0.00 1000 0.26 -LaterTricks24 3689 0 0.00 2000 0.54 -LaterTricks28 3052 23 0.01 0 0.00 -LaterTricks32 1860 1 0.00 1000 0.54 -LaterTricks36 800 0 0.00 1000 1.25 -LaterTricks40 279 0 0.00 0 0.00 -LaterTricks44 61 0 0.00 0 0.00 -MoveGen1 400 0 0.00 0 0.00 -MoveGen2 360 5 0.01 0 0.00 -MoveGen3 326 2 0.01 0 0.00 -MoveGen4 268 41 0.15 0 0.00 -MoveGen5 1787 6 0.00 0 0.00 -MoveGen6 1443 5 0.00 1000 0.69 -MoveGen7 1296 12 0.01 0 0.00 -MoveGen8 856 190 0.22 0 0.00 -MoveGen9 4389 11 0.00 1000 0.23 -MoveGen10 3351 12 0.00 1000 0.30 -MoveGen11 3006 55 0.02 3000 1.00 -MoveGen12 1673 391 0.23 2000 1.20 -MoveGen13 7731 98 0.01 3000 0.39 -MoveGen14 5654 51 0.01 0 0.00 -MoveGen15 5135 116 0.02 3000 0.58 -MoveGen16 2545 786 0.31 1000 0.39 -MoveGen17 10430 113 0.01 2000 0.19 -MoveGen18 7660 118 0.02 3000 0.39 -MoveGen19 6858 102 0.01 3000 0.44 -MoveGen20 3265 1175 0.36 2000 0.61 -MoveGen21 12103 73 0.01 2000 0.17 -MoveGen22 8727 149 0.02 4000 0.46 -MoveGen23 7661 124 0.02 2000 0.26 -MoveGen24 3396 1334 0.39 1000 0.29 -MoveGen25 11153 70 0.01 4000 0.36 -MoveGen26 8254 104 0.01 4000 0.48 -MoveGen27 7033 125 0.02 1000 0.14 -MoveGen28 2976 1343 0.45 3000 1.01 -MoveGen29 7561 35 0.00 4000 0.53 -MoveGen30 5555 49 0.01 1000 0.18 -MoveGen31 4621 68 0.01 4000 0.87 -MoveGen32 1856 1067 0.57 3000 1.62 -MoveGen33 4049 55 0.01 0 0.00 -MoveGen34 2715 33 0.01 1000 0.37 -MoveGen35 2284 35 0.02 1000 0.44 -MoveGen36 800 609 0.76 2000 2.50 -MoveGen37 1237 9 0.01 0 0.00 -MoveGen38 875 9 0.01 1000 1.14 -MoveGen39 674 32 0.05 0 0.00 -MoveGen40 279 295 1.06 1000 3.58 -MoveGen41 333 0 0.00 0 0.00 -MoveGen42 230 1 0.00 0 0.00 -MoveGen43 175 12 0.07 1000 5.71 -MoveGen44 61 89 1.46 0 0.00 -MoveGen45 63 2 0.03 0 0.00 -MoveGen46 42 2 0.05 0 0.00 -MoveGen47 29 7 0.24 0 0.00 -MoveGen48 12 27 2.25 0 0.00 -Lookup4 639 692 1.08 2000 3.13 -Lookup8 2142 1313 0.61 6000 2.80 -Lookup12 4591 1556 0.34 2000 0.44 -Lookup16 6842 1611 0.24 9000 1.32 -Lookup20 12649 1887 0.15 9000 0.71 -Lookup24 11695 1442 0.12 6000 0.51 -Lookup28 8021 1003 0.13 4000 0.50 -Lookup32 4307 709 0.16 3000 0.70 -Lookup36 1363 390 0.29 2000 1.47 -Lookup40 385 153 0.40 0 0.00 -Lookup44 90 81 0.90 0 0.00 -Build4 268 17 0.06 1000 3.73 -Build8 856 81 0.09 1000 1.17 -Build12 1673 75 0.04 2000 1.20 -Build16 2545 117 0.05 0 0.00 -Build20 3265 183 0.06 2000 0.61 -Build24 3396 150 0.04 1000 0.29 -Build28 2976 226 0.08 2000 0.67 -Build32 1856 158 0.09 1000 0.54 -Build36 800 69 0.09 0 0.00 -Build40 279 7 0.03 1000 3.58 -Build44 61 7 0.11 0 0.00 - diff --git a/test/ref/timer0_old.txt b/test/ref/timer0_old.txt deleted file mode 100644 index 6c219029..00000000 --- a/test/ref/timer0_old.txt +++ /dev/null @@ -1,367 +0,0 @@ -Name Count User Avg % Syst Avg % -AB 211580 4252337 20.10 87.5 1364000 6.45 87.5 -Make 245448 130675 0.53 2.7 51000 0.21 3.3 -Undo 211568 96593 0.46 2.0 29000 0.14 1.9 -Evaluate 376 226 0.60 0.0 0 0.00 0.0 -NextMove 111234 46222 0.42 1.0 9000 0.08 0.6 -QuickTricks 83871 70808 0.84 1.5 19000 0.23 1.2 -LaterTricks 30190 15553 0.52 0.3 8000 0.26 0.5 -MoveGen 163187 151486 0.93 3.1 49000 0.30 3.1 -Lookup 52724 75011 1.42 1.5 26000 0.49 1.7 -Build 17975 18632 1.04 0.4 4000 0.22 0.3 ---------------------------------------------------------------------- -Sum 1128153 4857543 4.31100.0 1559000 1.38100.0 - -Name Count User Avg % Syst Avg % -AB0 48 12 156041300.33 0.4 5000 416.67 0.4 -AB3 47 29 128 4.41 0.0 0 0.00 0.0 -AB2 46 42 181 4.31 0.0 0 0.00 0.0 -AB1 45 63 272 4.32 0.0 0 0.00 0.0 -AB0 44 90 8367 92.97 0.2 3000 33.33 0.2 -AB3 43 175 721 4.12 0.0 0 0.00 0.0 -AB2 42 230 980 4.26 0.0 1000 4.35 0.1 -AB1 41 333 1194 3.59 0.0 0 0.00 0.0 -AB0 40 385 31776 82.54 0.7 9000 23.38 0.7 -AB3 39 674 2657 3.94 0.1 0 0.00 0.0 -AB2 38 875 3305 3.78 0.1 0 0.00 0.0 -AB1 37 1237 4216 3.41 0.1 0 0.00 0.0 -AB0 36 1363 108491 79.60 2.6 39000 28.61 2.9 -AB3 35 2284 7588 3.32 0.2 4000 1.75 0.3 -AB2 34 2715 10104 3.72 0.2 4000 1.47 0.3 -AB1 33 4049 11947 2.95 0.3 4000 0.99 0.3 -AB0 32 4307 305061 70.83 7.2 102000 23.68 7.5 -AB3 31 4621 15742 3.41 0.4 2000 0.43 0.1 -AB2 30 5555 19496 3.51 0.5 9000 1.62 0.7 -AB1 29 7561 22894 3.03 0.5 7000 0.93 0.5 -AB0 28 8021 544094 67.83 12.8 160000 19.95 11.7 -AB3 27 7047 23138 3.28 0.5 10000 1.42 0.7 -AB2 26 8254 28457 3.45 0.7 9000 1.09 0.7 -AB1 25 11153 32306 2.90 0.8 4000 0.36 0.3 -AB0 24 11695 785033 67.13 18.5 242000 20.69 17.7 -AB3 23 7833 25304 3.23 0.6 7000 0.89 0.5 -AB2 22 8727 31203 3.58 0.7 8000 0.92 0.6 -AB1 21 12103 35369 2.92 0.8 13000 1.07 1.0 -AB0 20 12649 783256 61.92 18.4 265000 20.95 19.4 -AB3 19 7278 22874 3.14 0.5 4000 0.55 0.3 -AB2 18 7660 27732 3.62 0.7 11000 1.44 0.8 -AB1 17 10430 31267 3.00 0.7 11000 1.05 0.8 -AB0 16 10893 573871 52.68 13.5 197000 18.09 14.4 -AB3 15 5610 17410 3.10 0.4 5000 0.89 0.4 -AB2 14 5654 20906 3.70 0.5 6000 1.06 0.4 -AB1 13 7731 23627 3.06 0.6 11000 1.42 0.8 -AB0 12 8189 385465 47.07 9.1 113000 13.80 8.3 -AB3 11 3377 10470 3.10 0.2 3000 0.89 0.2 -AB2 10 3351 12063 3.60 0.3 4000 1.19 0.3 -AB1 9 4389 13838 3.15 0.3 7000 1.59 0.5 -AB0 8 4707 184563 39.21 4.3 63000 13.38 4.6 -AB3 7 1462 4360 2.98 0.1 0 0.00 0.0 -AB2 6 1443 4708 3.26 0.1 2000 1.39 0.1 -AB1 5 1787 5621 3.15 0.1 3000 1.68 0.2 -AB0 4 1960 51055 26.05 1.2 15000 7.65 1.1 -AB3 3 378 1050 2.78 0.0 0 0.00 0.0 -AB2 2 360 1021 2.84 0.0 1000 2.78 0.1 -AB1 1 400 1208 3.02 0.0 1000 2.50 0.1 -AB0 0 439 344 0.78 0.0 0 0.00 0.0 ---------------------------------------------------------------------- -Sum 211580 4252337 20.10100.0 1364000 6.45100.0 - -Name Number User ticks Avg System Avg ms -AB0 0 439 570 1.30 0 0.00 -AB1 1 400 2549 6.37 1000 2.50 -AB2 2 360 4223 11.73 2000 5.56 -AB3 3 378 6094 16.12 2000 5.29 -AB0 4 1960 62630 31.95 18000 9.18 -AB1 5 1787 72132 40.36 23000 12.87 -AB2 6 1443 80085 55.50 26000 18.02 -AB3 7 1462 88001 60.19 27000 18.47 -AB0 8 4707 288149 61.22 99000 21.03 -AB1 9 4389 311525 70.98 108000 24.61 -AB2 10 3351 332100 99.10 115000 34.32 -AB3 11 3377 350941 103.92 120000 35.53 -AB0 12 8189 765184 93.44 246000 30.04 -AB1 13 7731 805035 104.13 262000 33.89 -AB2 14 5654 840779 148.71 272000 48.11 -AB3 15 5610 872333 155.50 280000 49.91 -AB0 16 10893 1487986 136.60 498000 45.72 -AB1 17 10430 1540473 147.70 514000 49.28 -AB2 18 7660 1587918 207.30 529000 69.06 -AB3 19 7278 1629556 223.90 539000 74.06 -AB0 20 12649 2458235 194.34 814000 64.35 -AB1 21 12103 2517712 208.02 833000 68.83 -AB2 22 8727 2571236 294.63 849000 97.28 -AB3 23 7833 2617312 334.14 863000 110.17 -AB0 24 11695 3446492 294.70 1120000 95.77 -AB1 25 11153 3501067 313.91 1128000 101.14 -AB2 26 8254 3549605 430.05 1148000 139.08 -AB3 27 7047 3592327 509.77 1166000 165.46 -AB0 28 8021 4173114 520.27 1335000 166.44 -AB1 29 7561 4211435 556.99 1345000 177.89 -AB2 30 5555 4244866 764.15 1361000 245.00 -AB3 31 4621 4273763 924.86 1368000 296.04 -AB0 32 4307 4602058 1068.51 1476000 342.70 -AB1 33 4049 4622211 1141.57 1483000 366.26 -AB2 34 2715 4639706 1708.92 1491000 549.17 -AB3 35 2284 4653820 2037.57 1495000 654.55 -AB0 36 1363 4772945 3501.79 1535000 1126.19 -AB1 37 1237 4780105 3864.27 1536000 1241.71 -AB2 38 875 4785797 5469.48 1537000 1756.57 -AB3 39 674 4790649 7107.79 1538000 2281.90 -AB0 40 385 4826130 12535.40 1548000 4020.78 -AB1 41 333 4828208 14499.12 1549000 4651.65 -AB2 42 230 4829929 20999.69 1550000 6739.13 -AB3 43 175 4831264 27607.22 1550000 8857.14 -AB0 44 90 4840816 53786.84 1554000 17266.67 -AB1 45 63 4841279 76845.70 1554000 24666.67 -AB2 46 42 4841577 115275.64 1554000 37000.00 -AB3 47 29 4841824 166959.45 1554000 53586.21 -AB0 48 12 4857543 404795.25 1559000 129916.67 -Make1 570 254 0.45 0 0.00 -Make2 400 175 0.44 0 0.00 -Make3 457 216 0.47 0 0.00 -Make4 549 296 0.54 0 0.00 -Make5 2492 1351 0.54 0 0.00 -Make6 1787 912 0.51 0 0.00 -Make7 1828 907 0.50 0 0.00 -Make8 1933 977 0.51 0 0.00 -Make9 5780 3300 0.57 1000 0.17 -Make10 4389 2429 0.55 2000 0.46 -Make11 4079 2121 0.52 1000 0.25 -Make12 4322 2282 0.53 2000 0.46 -Make13 9891 5562 0.56 2000 0.20 -Make14 7731 4336 0.56 3000 0.39 -Make15 6837 3505 0.51 1000 0.15 -Make16 6972 3753 0.54 4000 0.57 -Make17 13463 7292 0.54 1000 0.07 -Make18 10430 5622 0.54 2000 0.19 -Make19 9428 4754 0.50 3000 0.32 -Make20 8775 4821 0.55 1000 0.11 -Make21 15711 8423 0.54 2000 0.13 -Make22 12103 6456 0.53 2000 0.17 -Make23 10723 5367 0.50 5000 0.47 -Make24 9233 4856 0.53 2000 0.22 -Make25 14833 8045 0.54 1000 0.07 -Make26 11153 5854 0.52 3000 0.27 -Make27 10171 5131 0.50 1000 0.10 -Make28 8106 4235 0.52 1000 0.12 -Make29 10203 5466 0.54 2000 0.20 -Make30 7561 3982 0.53 0 0.00 -Make31 6803 3401 0.50 3000 0.44 -Make32 5229 2887 0.55 1000 0.19 -Make33 5267 2852 0.54 2000 0.38 -Make34 4049 2191 0.54 0 0.00 -Make35 3244 1630 0.50 0 0.00 -Make36 2555 1326 0.52 0 0.00 -Make37 1783 1049 0.59 1000 0.56 -Make38 1237 720 0.58 0 0.00 -Make39 1094 593 0.54 1000 0.91 -Make40 734 388 0.53 0 0.00 -Make41 486 323 0.66 0 0.00 -Make42 333 221 0.66 0 0.00 -Make43 276 140 0.51 0 0.00 -Make44 190 125 0.66 1000 5.26 -Make45 112 72 0.64 0 0.00 -Make46 63 30 0.48 0 0.00 -Make47 51 24 0.47 0 0.00 -Make48 32 23 0.72 0 0.00 -Undo1 439 215 0.49 0 0.00 -Undo2 400 148 0.37 0 0.00 -Undo3 360 138 0.38 0 0.00 -Undo4 378 135 0.36 0 0.00 -Undo5 1960 1013 0.52 0 0.00 -Undo6 1787 780 0.44 1000 0.56 -Undo7 1443 623 0.43 0 0.00 -Undo8 1462 649 0.44 1000 0.68 -Undo9 4707 2496 0.53 0 0.00 -Undo10 4389 1987 0.45 0 0.00 -Undo11 3351 1492 0.45 0 0.00 -Undo12 3377 1464 0.43 0 0.00 -Undo13 8189 4324 0.53 0 0.00 -Undo14 7731 3491 0.45 1000 0.13 -Undo15 5654 2555 0.45 1000 0.18 -Undo16 5610 2566 0.46 0 0.00 -Undo17 10893 5606 0.51 3000 0.28 -Undo18 10430 4589 0.44 1000 0.10 -Undo19 7660 3329 0.43 1000 0.13 -Undo20 7278 3234 0.44 2000 0.27 -Undo21 12649 6336 0.50 1000 0.08 -Undo22 12103 5230 0.43 3000 0.25 -Undo23 8727 3784 0.43 1000 0.11 -Undo24 7833 3543 0.45 1000 0.13 -Undo25 11695 5667 0.48 0 0.00 -Undo26 11153 4675 0.42 4000 0.36 -Undo27 8254 3475 0.42 2000 0.24 -Undo28 7047 2908 0.41 0 0.00 -Undo29 8021 4056 0.51 0 0.00 -Undo30 7561 3192 0.42 2000 0.26 -Undo31 5555 2350 0.42 1000 0.18 -Undo32 4621 1915 0.41 1000 0.22 -Undo33 4307 2135 0.50 1000 0.23 -Undo34 4049 1700 0.42 0 0.00 -Undo35 2715 1167 0.43 0 0.00 -Undo36 2284 957 0.42 0 0.00 -Undo37 1363 766 0.56 0 0.00 -Undo38 1237 552 0.45 0 0.00 -Undo39 875 395 0.45 0 0.00 -Undo40 674 288 0.43 0 0.00 -Undo41 385 204 0.53 1000 2.60 -Undo42 333 154 0.46 0 0.00 -Undo43 230 117 0.51 0 0.00 -Undo44 175 92 0.53 0 0.00 -Undo45 90 47 0.52 0 0.00 -Undo46 63 21 0.33 0 0.00 -Undo47 42 21 0.50 0 0.00 -Undo48 29 12 0.41 0 0.00 -Evaluate0 376 226 0.60 0 0.00 -NextMove1 170 74 0.44 0 0.00 -NextMove2 269 98 0.36 0 0.00 -NextMove3 131 50 0.38 0 0.00 -NextMove4 281 102 0.36 0 0.00 -NextMove5 705 298 0.42 0 0.00 -NextMove6 1255 511 0.41 0 0.00 -NextMove7 532 218 0.41 0 0.00 -NextMove8 1077 437 0.41 0 0.00 -NextMove9 1391 583 0.42 0 0.00 -NextMove10 3316 1446 0.44 0 0.00 -NextMove11 1073 448 0.42 0 0.00 -NextMove12 2649 1160 0.44 0 0.00 -NextMove13 2160 900 0.42 0 0.00 -NextMove14 6029 2563 0.43 0 0.00 -NextMove15 1702 716 0.42 0 0.00 -NextMove16 4427 1916 0.43 0 0.00 -NextMove17 3033 1207 0.40 0 0.00 -NextMove18 7860 3362 0.43 0 0.00 -NextMove19 2570 1052 0.41 0 0.00 -NextMove20 5510 2355 0.43 0 0.00 -NextMove21 3608 1439 0.40 2000 0.55 -NextMove22 9041 3728 0.41 2000 0.22 -NextMove23 3062 1246 0.41 0 0.00 -NextMove24 5837 2426 0.42 0 0.00 -NextMove25 3680 1517 0.41 1000 0.27 -NextMove26 8015 3188 0.40 1000 0.12 -NextMove27 3138 1324 0.42 0 0.00 -NextMove28 5130 2047 0.40 0 0.00 -NextMove29 2642 1094 0.41 0 0.00 -NextMove30 5379 2276 0.42 1000 0.19 -NextMove31 2182 845 0.39 0 0.00 -NextMove32 3373 1422 0.42 1000 0.30 -NextMove33 1218 533 0.44 0 0.00 -NextMove34 3089 1225 0.40 0 0.00 -NextMove35 960 406 0.42 0 0.00 -NextMove36 1755 692 0.39 0 0.00 -NextMove37 546 248 0.45 0 0.00 -NextMove38 817 353 0.43 1000 1.22 -NextMove39 420 176 0.42 0 0.00 -NextMove40 455 214 0.47 0 0.00 -NextMove41 153 60 0.39 0 0.00 -NextMove42 232 107 0.46 0 0.00 -NextMove43 101 32 0.32 0 0.00 -NextMove44 129 69 0.53 0 0.00 -NextMove45 49 24 0.49 0 0.00 -NextMove46 41 17 0.41 0 0.00 -NextMove47 22 8 0.36 0 0.00 -NextMove48 20 10 0.50 0 0.00 -QuickTricks3 378 187 0.49 0 0.00 -QuickTricks4 1791 1660 0.93 1000 0.56 -QuickTricks7 1462 813 0.56 0 0.00 -QuickTricks8 4374 4310 0.99 0 0.00 -QuickTricks11 3377 1824 0.54 0 0.00 -QuickTricks12 7644 7759 1.02 4000 0.52 -QuickTricks15 5610 3134 0.56 0 0.00 -QuickTricks16 10249 10994 1.07 8000 0.78 -QuickTricks19 7278 4013 0.55 1000 0.14 -QuickTricks20 6148 6937 1.13 0 0.00 -QuickTricks23 7833 4179 0.53 1000 0.13 -QuickTricks24 5383 6540 1.21 1000 0.19 -QuickTricks27 7047 3790 0.54 1000 0.14 -QuickTricks28 4038 5310 1.32 1000 0.25 -QuickTricks31 4621 2580 0.56 1000 0.22 -QuickTricks32 2292 3156 1.38 0 0.00 -QuickTricks35 2284 1246 0.55 0 0.00 -QuickTricks36 844 1271 1.51 0 0.00 -QuickTricks39 674 377 0.56 0 0.00 -QuickTricks40 279 457 1.64 0 0.00 -QuickTricks43 175 116 0.66 0 0.00 -QuickTricks44 61 133 2.18 0 0.00 -QuickTricks47 29 22 0.76 0 0.00 -LaterTricks4 911 486 0.53 0 0.00 -LaterTricks8 2742 1457 0.53 1000 0.36 -LaterTricks12 5346 2817 0.53 1000 0.19 -LaterTricks16 7609 3840 0.50 2000 0.26 -LaterTricks20 3841 1914 0.50 1000 0.26 -LaterTricks24 3689 1818 0.49 3000 0.81 -LaterTricks28 3052 1557 0.51 0 0.00 -LaterTricks32 1860 1013 0.54 0 0.00 -LaterTricks36 800 460 0.57 0 0.00 -LaterTricks40 279 154 0.55 0 0.00 -LaterTricks44 61 37 0.61 0 0.00 -MoveGen1 400 228 0.57 0 0.00 -MoveGen2 360 232 0.64 0 0.00 -MoveGen3 326 230 0.71 0 0.00 -MoveGen4 268 345 1.29 0 0.00 -MoveGen5 1787 1219 0.68 2000 1.12 -MoveGen6 1443 1042 0.72 0 0.00 -MoveGen7 1296 995 0.77 1000 0.77 -MoveGen8 856 1350 1.58 1000 1.17 -MoveGen9 4389 3159 0.72 1000 0.23 -MoveGen10 3351 2650 0.79 1000 0.30 -MoveGen11 3006 2486 0.83 1000 0.33 -MoveGen12 1673 2984 1.78 3000 1.79 -MoveGen13 7731 5438 0.70 3000 0.39 -MoveGen14 5654 4448 0.79 0 0.00 -MoveGen15 5135 4234 0.82 1000 0.19 -MoveGen16 2545 5180 2.04 2000 0.79 -MoveGen17 10430 7115 0.68 1000 0.10 -MoveGen18 7660 6140 0.80 1000 0.13 -MoveGen19 6858 5616 0.82 1000 0.15 -MoveGen20 3265 7125 2.18 1000 0.31 -MoveGen21 12103 7910 0.65 1000 0.08 -MoveGen22 8727 6907 0.79 1000 0.11 -MoveGen23 7661 6196 0.81 0 0.00 -MoveGen24 3396 7980 2.35 6000 1.77 -MoveGen25 11153 7040 0.63 2000 0.18 -MoveGen26 8254 6364 0.77 3000 0.36 -MoveGen27 7033 5864 0.83 4000 0.57 -MoveGen28 2976 7815 2.63 3000 1.01 -MoveGen29 7561 4811 0.64 1000 0.13 -MoveGen30 5555 4485 0.81 4000 0.72 -MoveGen31 4621 3979 0.86 0 0.00 -MoveGen32 1856 5361 2.89 0 0.00 -MoveGen33 4049 2686 0.66 0 0.00 -MoveGen34 2715 2275 0.84 4000 1.47 -MoveGen35 2284 2077 0.91 0 0.00 -MoveGen36 800 2840 3.55 0 0.00 -MoveGen37 1237 881 0.71 0 0.00 -MoveGen38 875 762 0.87 0 0.00 -MoveGen39 674 654 0.97 0 0.00 -MoveGen40 279 1117 4.00 0 0.00 -MoveGen41 333 297 0.89 0 0.00 -MoveGen42 230 259 1.13 0 0.00 -MoveGen43 175 209 1.19 0 0.00 -MoveGen44 61 290 4.75 0 0.00 -MoveGen45 63 48 0.76 0 0.00 -MoveGen46 42 49 1.17 0 0.00 -MoveGen47 29 44 1.52 0 0.00 -MoveGen48 12 70 5.83 0 0.00 -Lookup4 639 2221 3.48 0 0.00 -Lookup8 2142 5578 2.60 6000 2.80 -Lookup12 4591 8596 1.87 3000 0.65 -Lookup16 6842 11075 1.62 3000 0.44 -Lookup20 12649 15665 1.24 4000 0.32 -Lookup24 11695 13635 1.17 2000 0.17 -Lookup28 8021 9555 1.19 4000 0.50 -Lookup32 4307 5390 1.25 3000 0.70 -Lookup36 1363 2164 1.59 1000 0.73 -Lookup40 385 790 2.05 0 0.00 -Lookup44 90 342 3.80 0 0.00 -Build4 268 236 0.88 0 0.00 -Build8 856 827 0.97 0 0.00 -Build12 1673 1716 1.03 0 0.00 -Build16 2545 2458 0.97 2000 0.79 -Build20 3265 3372 1.03 1000 0.31 -Build24 3396 3349 0.99 0 0.00 -Build28 2976 3266 1.10 0 0.00 -Build32 1856 2090 1.13 0 0.00 -Build36 800 924 1.16 0 0.00 -Build40 279 297 1.06 1000 3.58 -Build44 61 97 1.59 0 0.00 - From 8c981911b52d6f8a8f3dbcf730d658a3558c1aa2 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Thu, 22 Mar 2018 16:12:44 +0100 Subject: [PATCH 033/132] Drafted Makefiles for linux and Mac (dtest), added cores field to DDSDInfo --- include/dll.h | 2 + src/Makefiles/Makefile_Mac_clang_shared | 4 +- src/Makefiles/Makefile_Mac_gcc_shared | 4 +- src/System.cpp | 38 ++++- src/System.h | 1 + test/Makefiles/Makefile_Mac_clang_new | 114 +++++++++++++ test/Makefiles/Makefile_Mac_gcc_new | 115 +++++++++++++ test/Makefiles/Makefile_linux_new | 115 +++++++++++++ test/Makefiles/Makefile_mingw | 215 +++++------------------- test/dtest.cpp | 6 +- test/itest.cpp | 6 +- test/testcommon.cpp | 2 +- 12 files changed, 433 insertions(+), 189 deletions(-) create mode 100644 test/Makefiles/Makefile_Mac_clang_new create mode 100644 test/Makefiles/Makefile_Mac_gcc_new create mode 100644 test/Makefiles/Makefile_linux_new diff --git a/include/dll.h b/include/dll.h index b9c27a87..22214093 100644 --- a/include/dll.h +++ b/include/dll.h @@ -355,6 +355,8 @@ struct DDSInfo // Currently 0 = none, 1 = DllMain, 2 = Unix-style int constructor; + int numCores; + // Currently // 0 = none, // 1 = Windows (native), diff --git a/src/Makefiles/Makefile_Mac_clang_shared b/src/Makefiles/Makefile_Mac_clang_shared index ecd48858..f93cd28d 100644 --- a/src/Makefiles/Makefile_Mac_clang_shared +++ b/src/Makefiles/Makefile_Mac_clang_shared @@ -118,8 +118,8 @@ clean: install: test -d ../test || mkdir ../test test -d ../examples || mkdir ../examples - cp $(STATIC_LIB) ../test - cp $(STATIC_LIB) ../examples + cp $(SHARED_LIB) ../test + cp $(SHARED_LIB) ../examples include $(INCL_DEPENDS) diff --git a/src/Makefiles/Makefile_Mac_gcc_shared b/src/Makefiles/Makefile_Mac_gcc_shared index 8a17c255..5aa3fe51 100644 --- a/src/Makefiles/Makefile_Mac_gcc_shared +++ b/src/Makefiles/Makefile_Mac_gcc_shared @@ -118,8 +118,8 @@ clean: install: test -d ../test || mkdir ../test test -d ../examples || mkdir ../examples - cp $(STATIC_LIB) ../test - cp $(STATIC_LIB) ../examples + cp $(SHARED_LIB) ../test + cp $(SHARED_LIB) ../examples include $(INCL_DEPENDS) diff --git a/src/System.cpp b/src/System.cpp index 62958334..290149e7 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -174,6 +174,7 @@ void System::GetHardware( { kilobytesFree = 0; ncores = 1; + (void) System::GetCores(ncores); #if defined(_WIN32) || defined(__CYGWIN__) // Using GlobalMemoryStatusEx instead of GlobalMemoryStatus @@ -513,6 +514,23 @@ string System::GetConstructor(int& cons) const } +string System::GetCores(int& cores) const +{ +#if defined(_WIN32) || defined(__CYGWIN__) + SYSTEM_INFO sysinfo; + GetSystemInfo(&sysinfo); + cores = static_cast(sysinfo.dwNumberOfProcessors); +#elif defined(__APPLE__) || defined(__linux__) + cores = sysconf(_SC_NPROCESSORS_ONLN); +#endif + + // TODO Think about thread::hardware_concurrency(). + // This should be standard in C++11. + + return to_string(cores); +} + + string System::GetThreading(int& thr) const { string st = ""; @@ -550,20 +568,24 @@ string System::str(DDSInfo * info) const ss << left << setw(13) << "Constructor" << setw(20) << right << strConstructor << "\n"; - const string strThreading = System::GetThreading(info->threading); - ss << left << setw(9) << "Threading" << - setw(24) << right << strThreading << "\n"; - - info->noOfThreads = numThreads; - ss << left << setw(17) << "Number of threads" << - setw(16) << right << numThreads << "\n"; - const string strVersion = System::GetVersion(info->major, info->minor, info->patch); ss << left << setw(13) << "Version" << setw(20) << right << strVersion << "\n"; strcpy(info->versionString, strVersion.c_str()); + const string strCores = System::GetCores(info->numCores); + ss << left << setw(17) << "Number of cores" << + setw(16) << right << strCores << "\n"; + + info->noOfThreads = numThreads; + ss << left << setw(17) << "Number of threads" << + setw(16) << right << numThreads << "\n"; + + const string strThreading = System::GetThreading(info->threading); + ss << left << setw(9) << "Threading" << + setw(24) << right << strThreading << "\n"; + const string st = ss.str(); strcpy(info->systemString, st.c_str()); return st; diff --git a/src/System.h b/src/System.h index d9a2d6ea..4184012b 100644 --- a/src/System.h +++ b/src/System.h @@ -60,6 +60,7 @@ class System int& patch) const; string GetSystem(int& sys) const; string GetCompiler(int& comp) const; + string GetCores(int& comp) const; string GetConstructor(int& cons) const; string GetThreading(int &thr) const; diff --git a/test/Makefiles/Makefile_Mac_clang_new b/test/Makefiles/Makefile_Mac_clang_new new file mode 100644 index 00000000..43a90195 --- /dev/null +++ b/test/Makefiles/Makefile_Mac_clang_new @@ -0,0 +1,114 @@ +# --------------------- INFORMATION -------------------------------- + +# This the test Makefile for MacOS and the clang compiler. +# It assumes a Unix-like setup for some commands. + +# The dtest program itself does not use multi-threading, +# but the library might, depending on how it was compiled. + +# The Makefile also allows an "un-official" and ugly, but +# sometimes practical compilation of a directly integrated +# executable (i.e. not using the DLL). For this the Makefile +# uses the source and object files in the src directory... +# Use "make itest" at your own risk. + +# If you need to add something for the threading system, this is +# the place. + +# This is only necessary for the .a static library, actually. + +CC_BOOST = /usr/local/Cellar/boost/1.56.0 +CC_BOOST_LINK = -L$(CC_BOOST)/lib -lboost_system -lboost_thread-mt + +THREAD_LINK = $(CC_BOOST_LINK) + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_DDS_SOURCE = Makefiles/dds_sources.txt +INCL_OWN_SOURCE = Makefiles/own_sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt + +# If your compiler name is not given here, change it. +CC = g++ + +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... + +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wcomment \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wredundant-decls \ + -Wsign-promo \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-format + +COMPILE_FLAGS = -O3 -flto -mtune=generic \ + $(WARN_FLAGS) + +DLLBASE = dds +STATIC_LIB = lib$(DLLBASE).a +DLIB = $(DLLBASE).lib + +LINK1_FLAGS = +LINK2_FLAGS = - $(THREAD_LINK) \ + -L. -l$(DLLBASE) + +# This is in addition to $(DTEST).cpp + +include $(INCL_OWN_SOURCE) + +DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o + +DTEST = dtest +ITEST = itest + +# These are the files that we steal from the src directory. + +include $(INCL_DDS_SOURCE) + +ITEST_SOURCE_FILES = \ + $(DDS_SOURCE_FILES) \ + $(DTEST_SOURCE_FILES) \ + itest.cpp + +ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) + +dtest: $(DTEST_OBJ_FILES) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(DTEST_OBJ_FILES) \ + $(LINK2_FLAGS)) -o $(DTEST) + +itest: $(ITEST_OBJ_FILES) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(ITEST_OBJ_FILES) \ + $(LINK2_FLAGS) -o $(ITEST) + +%.o: %.cpp + $(CC) $(COMPILE_FLAGS) -c $< -o $*.o + +depend: + makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp + +clean: + rm -f $(ITEST_OBJ_FILES) $(DTEST).o \ + $(DTEST) $(ITEST) $(STATIC_LIB) + +include $(INCL_DEPENDS) + diff --git a/test/Makefiles/Makefile_Mac_gcc_new b/test/Makefiles/Makefile_Mac_gcc_new new file mode 100644 index 00000000..fb505c6e --- /dev/null +++ b/test/Makefiles/Makefile_Mac_gcc_new @@ -0,0 +1,115 @@ +# --------------------- INFORMATION -------------------------------- + +# This the test Makefile for MacOS and the GNU g++ compiler. +# It assumes a Unix-like setup for some commands. + +# The dtest program itself does not use multi-threading, +# but the library might, depending on how it was compiled. + +# The Makefile also allows an "un-official" and ugly, but +# sometimes practical compilation of a directly integrated +# executable (i.e. not using the DLL). For this the Makefile +# uses the source and object files in the src directory... +# Use "make itest" at your own risk. + +# If you need to add something for the threading system, this is +# the place. + +CC_BOOST = /usr/local/Cellar/boost/1.56.0 +CC_BOOST_LINK = -L$(CC_BOOST)/lib -lboost_system -lboost_thread-mt + +THREAD_LINK = $(CC_BOOST_LINK) + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_DDS_SOURCE = Makefiles/dds_sources.txt +INCL_OWN_SOURCE = Makefiles/own_sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt + +# If your compiler name is not given here, change it. +CC = gcc-4.9 + +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... + +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wlogical-op \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wnoexcept \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wredundant-decls \ + -Wsign-promo \ + -Wstrict-null-sentinel \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-format + +COMPILE_FLAGS = -O3 -flto -fopenmp -mtune=generic \ + $(WARN_FLAGS) + +DLLBASE = dds +STATIC_LIB = lib$(DLLBASE).a +SHARED_LIB = lib$(DLLBASE).so +DLIB = $(DLLBASE).lib + +LINK1_FLAGS = +LINK2_FLAGS = - $(THREAD_LINK) \ + -L. -l$(DLLBASE) \ + -lgomp -lstdc++ + +# This is in addition to $(DTEST).cpp + +include $(INCL_OWN_SOURCE) + +DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o + +DTEST = dtest +ITEST = itest + +# These are the files that we steal from the src directory. + +include $(INCL_DDS_SOURCE) + +ITEST_SOURCE_FILES = \ + $(DDS_SOURCE_FILES) \ + $(DTEST_SOURCE_FILES) \ + itest.cpp + +ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) + +dtest: $(DTEST_OBJ_FILES) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(DTEST_OBJ_FILES) \ + $(LINK2_FLAGS) -o $(DTEST) + +itest: $(ITEST_OBJ_FILES) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(ITEST_OBJ_FILES) \ + $(LINK2_FLAGS) -o $(ITEST) + +%.o: %.cpp + $(CC) $(COMPILE_FLAGS) -c $< -o $*.o + +depend: + makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp + +clean: + rm -f *.o $(DTEST) $(ITEST) $(STATIC_LIB) $(SHARED_LIB) + +include $(INCL_DEPENDS) + diff --git a/test/Makefiles/Makefile_linux_new b/test/Makefiles/Makefile_linux_new new file mode 100644 index 00000000..8a8f9edd --- /dev/null +++ b/test/Makefiles/Makefile_linux_new @@ -0,0 +1,115 @@ +# --------------------- INFORMATION -------------------------------- + +# This the test Makefile for Linux and the GNU g++ compiler. +# It assumes a Unix-like setup for some commands. + +# The dtest program itself does not use multi-threading, +# but the library might, depending on how it was compiled. + +# The Makefile also allows an "un-official" and ugly, but +# sometimes practical compilation of a directly integrated +# executable (i.e. not using the DLL). For this the Makefile +# uses the source and object files in the src directory... +# Use "make itest" at your own risk. + +# If you need to add something for the threading system, this is +# the place. + +CC_BOOST_LINK = -lboost_system -lboost_thread + +THREAD_LINK = $(CC_BOOST_LINK) + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_DDS_SOURCE = Makefiles/dds_sources.txt +INCL_OWN_SOURCE = Makefiles/own_sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt + +# If your compiler name is not given here, change it. +CC = g++ + +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... + +WARN_FLAGS = \ + -Wshadow \ + -Wsign-conversion \ + -pedantic -Wall -Wextra \ + -Wcast-align -Wcast-qual \ + -Wctor-dtor-privacy \ + -Wdisabled-optimization \ + -Winit-self \ + -Wlogical-op \ + -Wmissing-declarations \ + -Wmissing-include-dirs \ + -Wnoexcept \ + -Wold-style-cast \ + -Woverloaded-virtual \ + -Wredundant-decls \ + -Wsign-promo \ + -Wstrict-null-sentinel \ + -Wstrict-overflow=1 \ + -Wswitch-default -Wundef \ + -Werror \ + -Wno-unused \ + -Wno-unknown-pragmas \ + -Wno-long-long \ + -Wno-odr \ + -Wno-format + +COMPILE_FLAGS = -O3 -flto -fopenmp -mtune=generic \ + $(WARN_FLAGS) + +DLLBASE = dds +STATIC_LIB = lib$(DLLBASE).a +DLIB = $(DLLBASE).lib + +LINK1_FLAGS = +LINK2_FLAGS = -Wl,-rpath=. \ + $(THREAD_LINK) \ + -L. -l$(DLLBASE) + +# This is in addition to $(DTEST).cpp + +include $(INCL_OWN_SOURCE) + +DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o + +DTEST = dtest +ITEST = itest + +# These are the files that we steal from the src directory. + +include $(INCL_DDS_SOURCE) + +ITEST_SOURCE_FILES = \ + $(DDS_SOURCE_FILES) \ + $(DTEST_SOURCE_FILES) \ + itest.cpp + +ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) + +dtest: $(DTEST_OBJ_FILES) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(DTEST_OBJ_FILES) \ + $(LINK2_FLAGS) -o $(DTEST) + +itest: $(ITEST_OBJ_FILES) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(ITEST_OBJ_FILES) \ + $(LINK2_FLAGS) -o $(ITEST) + +%.o: %.cpp + $(CC) $(COMPILE_FLAGS) -c $< -o $*.o + +depend: + makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp + +clean: + rm -f $(ITEST_OBJ_FILES) $(DTEST).o \ + $(DTEST) $(ITEST) $(STATIC_LIB) + +include $(INCL_DEPENDS) + diff --git a/test/Makefiles/Makefile_mingw b/test/Makefiles/Makefile_mingw index 6b915d1b..4db4601c 100644 --- a/test/Makefiles/Makefile_mingw +++ b/test/Makefiles/Makefile_mingw @@ -1,12 +1,10 @@ -# This is a Makefile for the dtest test program, -# for Windows and the minGW compiler. +# --------------------- INFORMATION -------------------------------- -# It does assume a Unix-like setup for some commands, -# but if you only want to call "make" with the default target, -# you should be OK. +# This the test Makefile for Windows and the mingw GNU g++ +# compiler. It assumes a Unix-like setup for some commands. -# The test program itself does not use multi-threading, -# but the DLL might, depending on how it was compiled. +# The dtest program itself does not use multi-threading, +# but the library might, depending on how it was compiled. # The Makefile also allows an "un-official" and ugly, but # sometimes practical compilation of a directly integrated @@ -14,19 +12,27 @@ # uses the source and object files in the src directory... # Use "make itest" at your own risk. +# If you need to add something for the threading system, this is +# the place. -# If your exact compiler name is not given here, change it. -# CC = mingw32-g++ -# CC = i686-w64-mingw32-g++ +THREAD_LINK = + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_DDS_SOURCE = Makefiles/dds_sources.txt +INCL_OWN_SOURCE = Makefiles/own_sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt + +# If your compiler name is not given here, change it. CC = g++ -# Use this one to get Windows multi-threading -# CC_FLAGS = -O3 -flto -mtune=generic -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... -# These flags are not turned on by default, but DDS should pass them. -# Turn them on below. WARN_FLAGS = \ -Wshadow \ -Wsign-conversion \ @@ -52,75 +58,52 @@ WARN_FLAGS = \ -Wno-long-long \ -Wno-format -# Here you can turn on warnings. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -DTEST = dtest -ITEST = itest +COMPILE_FLAGS = -O3 $(WARN_FLAGS) DLLBASE = dds DLL = $(DLLBASE).dll DLIB = $(DLLBASE).lib EXPORTER = Exports.def -# This is in addition to $(DTEST).cpp -DTEST_SOURCE_FILES = \ - testcommon.cpp \ - testStats.cpp - -LD_FLAGS = \ +LINK1_FLAGS = +LINK2_FLAGS = \ -Wl,--dynamicbase \ -Wl,--nxcompat \ -Wl,--no-seh \ - -Wl,--enable-stdcall-fixup + -Wl,--enable-stdcall-fixup \ + $(THREAD_LINK) \ + -L. -l$(DLLBASE) + +# This is in addition to $(DTEST).cpp -LIB_FLAGS = -L. -l$(DLLBASE) +include $(INCL_OWN_SOURCE) DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o +DTEST = dtest +ITEST = itest + # These are the files that we steal from the src directory. -SRC = ../src -STOLEN_SOURCE_FILES = \ - $(SRC)/dds.cpp \ - $(SRC)/ABsearch.cpp \ - $(SRC)/ABstats.cpp \ - $(SRC)/CalcTables.cpp \ - $(SRC)/DealerPar.cpp \ - $(SRC)/Init.cpp \ - $(SRC)/LaterTricks.cpp \ - $(SRC)/Moves.cpp \ - $(SRC)/Par.cpp \ - $(SRC)/PlayAnalyser.cpp \ - $(SRC)/PBN.cpp \ - $(SRC)/QuickTricks.cpp \ - $(SRC)/Scheduler.cpp \ - $(SRC)/SolveBoard.cpp \ - $(SRC)/SolveBoard_basic.cpp \ - $(SRC)/SolveBoard_boost.cpp \ - $(SRC)/SolveBoard_GCD.cpp \ - $(SRC)/SolveBoard_OpenMP.cpp \ - $(SRC)/SolveBoard_WinAPI.cpp \ - $(SRC)/SolverIF.cpp \ - $(SRC)/Stats.cpp \ - $(SRC)/Timer.cpp \ - $(SRC)/TransTable.cpp + +include $(INCL_DDS_SOURCE) ITEST_SOURCE_FILES = \ - $(STOLEN_SOURCE_FILES) \ + $(DDS_SOURCE_FILES) \ $(DTEST_SOURCE_FILES) \ itest.cpp ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) dtest: $(DTEST_OBJ_FILES) - $(CC) $(CC_FLAGS) $(DTEST_OBJ_FILES) $(LIB_FLAGS) -o $(DTEST) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(DTEST_OBJ_FILES) \ + $(LINK2_FLAGS) -o $(DTEST) itest: $(ITEST_OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(ITEST_OBJ_FILES) $(LD_FLAGS) -o $(ITEST) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(ITEST_OBJ_FILES) \ + $(LINK2_FLAGS) -o $(ITEST) %.o: %.cpp - $(CC) $(CC_FLAGS) -c $< -o $*.o + $(CC) $(COMPILE_FLAGS) -c $< -o $*.o depend: makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp @@ -128,117 +111,9 @@ depend: clean: rm -f *.o *.exe $(DLLBASE).def $(DLL) +# If you don't have a Linux-like setup, use "del" instead of "rm". + +include $(INCL_DEPENDS) # DO NOT DELETE -../src/dds.o: ../include/dll.h ../src/dds.h ../src/debug.h -../src/dds.o: ../include/portab.h ../src/TransTable.h ../src/Timer.h -../src/dds.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/dds.o: ../src/Scheduler.h ../src/Init.h -../src/ABsearch.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABsearch.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABsearch.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABsearch.o: ../src/Scheduler.h ../src/threadmem.h ../src/QuickTricks.h -../src/ABsearch.o: ../src/LaterTricks.h ../src/ABsearch.h -../src/ABstats.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABstats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABstats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABstats.o: ../src/Scheduler.h -../src/CalcTables.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/CalcTables.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/CalcTables.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/CalcTables.o: ../src/Scheduler.h ../src/SolveBoard.h ../src/PBN.h -../src/DealerPar.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/DealerPar.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/DealerPar.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/DealerPar.o: ../src/Scheduler.h -../src/Init.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Init.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Init.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Init.o: ../src/Scheduler.h ../src/threadmem.h ../src/Init.h -../src/Init.o: ../src/ABsearch.h -../src/LaterTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/LaterTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/LaterTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/LaterTricks.o: ../src/Scheduler.h ../src/threadmem.h -../src/LaterTricks.o: ../src/LaterTricks.h -../src/Moves.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Moves.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Moves.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Moves.o: ../src/Scheduler.h ../src/ABsearch.h -../src/Par.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Par.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Par.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Par.o: ../src/Scheduler.h -../src/PlayAnalyser.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PlayAnalyser.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PlayAnalyser.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PlayAnalyser.o: ../src/Scheduler.h ../src/threadmem.h -../src/PlayAnalyser.o: ../src/SolverIF.h ../src/PBN.h -../src/PBN.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PBN.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PBN.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PBN.o: ../src/Scheduler.h ../src/PBN.h -../src/QuickTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/QuickTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/QuickTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/QuickTricks.o: ../src/Scheduler.h ../src/threadmem.h -../src/QuickTricks.o: ../src/QuickTricks.h -../src/Scheduler.o: ../src/Scheduler.h ../src/dds.h ../src/debug.h -../src/Scheduler.o: ../include/portab.h ../src/TransTable.h ../include/dll.h -../src/Scheduler.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/Scheduler.o: ../src/Stats.h -../src/SolveBoard.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolveBoard.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolveBoard.o: ../src/Scheduler.h ../src/threadmem.h ../src/SolverIF.h -../src/SolveBoard.o: ../src/SolveBoard.h ../src/PBN.h -../src/SolveBoard.o: ../src/SolveBoard_basic.h ../src/SolveBoard_boost.h -../src/SolveBoard.o: ../src/SolveBoard_GCD.h ../src/SolveBoard_OpenMP.h -../src/SolveBoard.o: ../src/SolveBoard_WinAPI.h -../src/SolveBoard_basic.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard_basic.o: ../src/TransTable.h ../include/dll.h -../src/SolveBoard_basic.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/SolveBoard_basic.o: ../src/Stats.h ../src/Scheduler.h -../src/SolveBoard_basic.o: ../src/SolveBoard.h ../src/SolveBoard_basic.h -../src/SolveBoard_boost.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard_boost.o: ../src/TransTable.h ../include/dll.h -../src/SolveBoard_boost.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/SolveBoard_boost.o: ../src/Stats.h ../src/Scheduler.h -../src/SolveBoard_boost.o: ../src/SolveBoard.h ../src/SolveBoard_boost.h -../src/SolveBoard_GCD.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard_GCD.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolveBoard_GCD.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolveBoard_GCD.o: ../src/Scheduler.h ../src/SolveBoard.h -../src/SolveBoard_GCD.o: ../src/SolveBoard_GCD.h -../src/SolveBoard_OpenMP.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard_OpenMP.o: ../src/TransTable.h ../include/dll.h -../src/SolveBoard_OpenMP.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/SolveBoard_OpenMP.o: ../src/Stats.h ../src/Scheduler.h -../src/SolveBoard_OpenMP.o: ../src/SolveBoard.h ../src/SolveBoard_OpenMP.h -../src/SolveBoard_WinAPI.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard_WinAPI.o: ../src/TransTable.h ../include/dll.h -../src/SolveBoard_WinAPI.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/SolveBoard_WinAPI.o: ../src/Stats.h ../src/Scheduler.h -../src/SolveBoard_WinAPI.o: ../src/SolveBoard.h ../src/SolveBoard_WinAPI.h -../src/SolverIF.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolverIF.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolverIF.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolverIF.o: ../src/Scheduler.h ../src/Init.h ../src/threadmem.h -../src/SolverIF.o: ../src/ABsearch.h ../src/SolverIF.h -../src/Stats.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Stats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Stats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Stats.o: ../src/Scheduler.h -../src/Timer.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Timer.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Timer.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Timer.o: ../src/Scheduler.h -../src/TransTable.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/TransTable.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/TransTable.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/TransTable.o: ../src/Scheduler.h -testcommon.o: ../include/dll.h ../include/portab.h testStats.h dtest.h -testStats.o: ../include/portab.h testStats.h -itest.o: ../include/dll.h testcommon.h -dtest.o: ../include/dll.h testcommon.h diff --git a/test/dtest.cpp b/test/dtest.cpp index 5e7ad7c8..45516ee2 100644 --- a/test/dtest.cpp +++ b/test/dtest.cpp @@ -20,10 +20,10 @@ using namespace std; int main(int argc, char * argv[]) { - int ncores = 0; + int nthreads = 0; if (argc >= 4) - ncores = atoi(argv[3]); - SetMaxThreads(ncores); + nthreads = atoi(argv[3]); + SetMaxThreads(nthreads); if (argc >= 5) SetThreading(threadingCode(argv[4])); diff --git a/test/itest.cpp b/test/itest.cpp index e615263b..06d10ee2 100644 --- a/test/itest.cpp +++ b/test/itest.cpp @@ -17,11 +17,11 @@ int main(int argc, char * argv[]) { - int ncores = 0; + int nthreads = 0; if (argc >= 4) - ncores = atoi(argv[3]); + nthreads = atoi(argv[3]); - SetMaxThreads(ncores); + SetMaxThreads(nthreads); if (argc >= 5) SetThreading(threadingCode(argv[4])); diff --git a/test/testcommon.cpp b/test/testcommon.cpp index 4d270e5e..f57b8ec4 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -53,7 +53,7 @@ int realMain(int argc, char * argv[]) if (argc != 3 && argc != 4 && argc != 5) { printf( - "Usage: dtest file.txt solve|calc|par|dealerpar|play [ncores [threading]]\n"); + "Usage: dtest file.txt solve|calc|par|dealerpar|play [nthreads [threading]]\n"); return 1; } From 7eaf573f49a11290e5b190c693c1ac01fd17fbe3 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Fri, 23 Mar 2018 21:06:51 +0100 Subject: [PATCH 034/132] Small scheduler change --- src/Scheduler.cpp | 53 +++++++++++++++++++++++++++++++++-------------- src/Scheduler.h | 6 +++++- 2 files changed, 42 insertions(+), 17 deletions(-) diff --git a/src/Scheduler.cpp b/src/Scheduler.cpp index 57f8a8ae..233f30f5 100644 --- a/src/Scheduler.cpp +++ b/src/Scheduler.cpp @@ -17,24 +17,10 @@ Scheduler::Scheduler() { - // This can be HCP, for instance. Currently it is close to - // 6 - 4 - 2 - 1 - 0.5 for A-K-Q-J-T, but with 6.5 for the ace - // in order to make the sum come out to 28, an even number, so - // that the average number is an integer. - - for (int i = 0; i < 8192; i++) - { - highCards[i] = 0; - - if (i & (1 << 12)) highCards[i] += 13; - if (i & (1 << 11)) highCards[i] += 8; - if (i & (1 << 10)) highCards[i] += 4; - if (i & (1 << 9)) highCards[i] += 2; - if (i & (1 << 8)) highCards[i] += 1; - } - numHands = 0; + Scheduler::InitHighCards(); + #ifdef DDS_SCHEDULER Scheduler::InitTimes(); @@ -50,6 +36,34 @@ Scheduler::Scheduler() } +void Scheduler::InitHighCards() +{ + // highCards[i] is a point value of a given suit holding i. + // This can be HCP, for instance. Currently it is close to + // 6 - 4 - 2 - 1 - 0.5 for A-K-Q-J-T, but with 6.5 for the ace + // in order to make the sum come out to 28, an even number, so + // that the average number is an integer. + + highCards.resize(1 << 13); + const unsigned pA = 1 << 12; + const unsigned pK = 1 << 11; + const unsigned pQ = 1 << 10; + const unsigned pJ = 1 << 9; + const unsigned pT = 1 << 8; + + for (unsigned suit = 0; suit < (1 << 13); suit++) + { + int j = 0; + if (suit & pA) j += 13; + if (suit & pK) j += 8; + if (suit & pQ) j += 4; + if (suit & pJ) j += 2; + if (suit & pT) j += 1; + highCards[suit] = j; + } +} + + #ifdef DDS_SCHEDULER void Scheduler::InitTimes() { @@ -99,6 +113,13 @@ void Scheduler::Reset() } +void Scheduler::RegisterThreads( + const int n) +{ + UNUSED(n); +} + + void Scheduler::RegisterTraceDepth( playTracesBin * plp, int number) diff --git a/src/Scheduler.h b/src/Scheduler.h index 5f4c4fc2..6416ed2b 100644 --- a/src/Scheduler.h +++ b/src/Scheduler.h @@ -97,7 +97,9 @@ class Scheduler int numHands; - int highCards[8192]; + vector highCards; + + void InitHighCards(); int Strength( deal * dl); @@ -157,6 +159,8 @@ class Scheduler ~Scheduler(); + void RegisterThreads(const int n); + void RegisterTraceDepth( playTracesBin * plp, int number); From 88a6309ca4d9a95f810f6e50a7c4ee3d99704fd8 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 24 Mar 2018 09:24:03 +0100 Subject: [PATCH 035/132] Changed the Register functions in Scheduler --- src/PlayAnalyser.cpp | 3 +-- src/Scheduler.cpp | 45 +++++++++++++++++++++++--------------------- src/Scheduler.h | 35 ++++++++++++++++++++-------------- src/SolveBoard.cpp | 4 ++-- 4 files changed, 48 insertions(+), 39 deletions(-) diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 8868b7c0..570e03bd 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -293,8 +293,7 @@ int STDCALL AnalyseAllPlaysBin( traceparam.noOfBoards = bop->noOfBoards; traceparam.solvedp = solvedp; - scheduler.RegisterTraceDepth(plp, bop->noOfBoards); - scheduler.Register(bop, SCHEDULER_TRACE); + scheduler.RegisterRun(SCHEDULER_TRACE, bop, plp); sysdep.Register(DDS_SYSTEM_PLAY, noOfThreads); START_BLOCK_TIMER; diff --git a/src/Scheduler.cpp b/src/Scheduler.cpp index 233f30f5..eafe5a8b 100644 --- a/src/Scheduler.cpp +++ b/src/Scheduler.cpp @@ -120,25 +120,21 @@ void Scheduler::RegisterThreads( } -void Scheduler::RegisterTraceDepth( - playTracesBin * plp, - int number) +void Scheduler::RegisterRun( + const enum SchedulerMode mode, + boards const * bop, + playTracesBin const * plp) { - // This is only used for traces, so it is entered separately. - -#ifdef DDS_SCHEDULER - for (int b = 0; b < number; b++) + for (int b = 0; b < bop->noOfBoards; b++) hands[b].depth = plp->plays[b].number; -#else - UNUSED(plp); - UNUSED(number); -#endif + + Scheduler::RegisterRun(mode, bop); } -void Scheduler::Register( - boards * bop, - int sortMode) +void Scheduler::RegisterRun( + const enum SchedulerMode mode, + boards const * bop) { Scheduler::Reset(); @@ -154,21 +150,28 @@ void Scheduler::Register( Scheduler::FinetuneGroups(); + Scheduler::SortHands(mode); + +} + + +void Scheduler::SortHands(const enum SchedulerMode mode) +{ // Make predictions per group. - if (sortMode == SCHEDULER_SOLVE) + if (mode == SCHEDULER_SOLVE) Scheduler::SortSolve(); - else if (sortMode == SCHEDULER_CALC) + else if (mode == SCHEDULER_CALC) Scheduler::SortCalc(); - else if (sortMode == SCHEDULER_TRACE) + else if (mode == SCHEDULER_TRACE) Scheduler::SortTrace(); } void Scheduler::MakeGroups( - boards * bop) + boards const * bop) { - deal * dl; + deal const * dl; listType * lp; for (int b = 0; b < numHands; b++) @@ -651,7 +654,7 @@ void Scheduler::SortTrace() int Scheduler::Strength( - deal * dl) + deal const * dl) { // If the strength in all suits is evenly split, then the // "strength" returned is close to 0. Maximum is 49. @@ -678,7 +681,7 @@ int Scheduler::Strength( int Scheduler::Fanout( - deal * dl) + deal const * dl) { // The fanout for a given suit and a given player is the number // of bit groups, so KT982 has 3 groups. In a given suit the diff --git a/src/Scheduler.h b/src/Scheduler.h index 6416ed2b..8b909407 100644 --- a/src/Scheduler.h +++ b/src/Scheduler.h @@ -18,10 +18,13 @@ using namespace std; -#define SCHEDULER_NOSORT 0 -#define SCHEDULER_SOLVE 1 -#define SCHEDULER_CALC 2 -#define SCHEDULER_TRACE 3 +enum SchedulerMode +{ + SCHEDULER_NOSORT, + SCHEDULER_SOLVE, + SCHEDULER_CALC, + SCHEDULER_TRACE +}; #define HASH_MAX 200 @@ -101,11 +104,13 @@ class Scheduler void InitHighCards(); + void SortHands(const enum SchedulerMode mode); + int Strength( - deal * dl); + deal const * dl); int Fanout( - deal * dl); + deal const * dl); void Reset(); @@ -113,7 +118,7 @@ class Scheduler Timer timerBlock; void MakeGroups( - boards * bop); + boards const * bop); void FinetuneGroups(); @@ -159,15 +164,17 @@ class Scheduler ~Scheduler(); - void RegisterThreads(const int n); + void RegisterThreads( + const int n); - void RegisterTraceDepth( - playTracesBin * plp, - int number); + void RegisterRun( + const enum SchedulerMode mode, + boards const * bop, + playTracesBin const * plp); - void Register( - boards * bop, - int sortMode); + void RegisterRun( + const enum SchedulerMode mode, + boards const * bop); schedType GetNumber( int thrId); diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index b4c388e9..6702867d 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -161,12 +161,12 @@ int SolveAllBoardsN( if (source == 0) { - scheduler.Register(bop, SCHEDULER_SOLVE); + scheduler.RegisterRun(SCHEDULER_SOLVE, bop); sysdep.Register(DDS_SYSTEM_SOLVE, noOfThreads); } else { - scheduler.Register(bop, SCHEDULER_CALC); + scheduler.RegisterRun(SCHEDULER_CALC, bop); sysdep.Register(DDS_SYSTEM_CALC, noOfThreads); } From ec6b04fb7b4ffd4307f2bae40d173f210dffcdff Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 24 Mar 2018 10:09:18 +0100 Subject: [PATCH 036/132] Global variable noOfThreads now limited to Init.cpp --- src/Init.cpp | 36 +++++++++++++++--------------------- src/PlayAnalyser.cpp | 2 +- src/SolveBoard.cpp | 5 ++--- src/SolverIF.cpp | 8 +++----- src/System.cpp | 43 ++++++++++++++++++++++++++++++++++--------- src/System.h | 15 ++++++++++++--- src/dds.h | 2 -- 7 files changed, 67 insertions(+), 44 deletions(-) diff --git a/src/Init.cpp b/src/Init.cpp index 4430fa2b..694ae37f 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -19,8 +19,6 @@ void InitConstants(); void InitDebugFiles(); -double ConstantMemoryUsed(); - void FreeThreadMem(); void CalcThreadMemory( @@ -115,11 +113,8 @@ void CalcThreadMemory( } else { + // Even less comfortable. Thread number will be limited later. // Limit the number of threads to the available memory. - int fittingThreads = static_cast( kilobytesUsable / - ( static_cast(1024. * THREADMEM_DEF_MB) ) ); - - noOfThreads = Max(fittingThreads, 1); mem_def = THREADMEM_DEF_MB; mem_max = THREADMEM_DEF_MB; } @@ -151,11 +146,23 @@ void STDCALL SetMaxThreads( else noOfThreads = ncores; - sysdep.Register(DDS_SYSTEM_SOLVE, noOfThreads); - int mem_def, mem_max; CalcThreadMemory(oldNoOfThreads, kilobytesUsable, mem_def, mem_max); + if (kilobytesUsable > 0 && noOfThreads > 1) + { + if (kilobytesUsable < 1024 * mem_max * noOfThreads) + { + int fittingThreads = static_cast( kilobytesUsable / + ( static_cast(1024. * mem_max) ) ); + + noOfThreads = Max(fittingThreads, 1); + } + } + + sysdep.RegisterParams(noOfThreads, + kilobytesUsable >> 10, mem_def, mem_max); + for (int k = 0; k < noOfThreads; k++) { localVar[k].transTable.SetMemoryDefault(mem_def); @@ -600,19 +607,6 @@ void STDCALL FreeMemory() } -double ConstantMemoryUsed() -{ - double memUsed = - 8192 * ( sizeof(int) // highestRank - + sizeof(int) // counttable - + 15 * sizeof(char) // relRank - + 14 * sizeof(unsigned short int)) - / static_cast(1024.); - - return memUsed; -} - - double ThreadMemoryUsed() { double memUsed = diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 570e03bd..dc878bc4 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -294,7 +294,7 @@ int STDCALL AnalyseAllPlaysBin( traceparam.solvedp = solvedp; scheduler.RegisterRun(SCHEDULER_TRACE, bop, plp); - sysdep.Register(DDS_SYSTEM_PLAY, noOfThreads); + sysdep.RegisterRun(DDS_SYSTEM_PLAY); START_BLOCK_TIMER; int retRun = sysdep.RunThreads(chunkSize); diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 6702867d..42a72be3 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -18,7 +18,6 @@ #include "debug.h" -extern int noOfThreads; long chunk; paramType param; extern System sysdep; @@ -162,12 +161,12 @@ int SolveAllBoardsN( if (source == 0) { scheduler.RegisterRun(SCHEDULER_SOLVE, bop); - sysdep.Register(DDS_SYSTEM_SOLVE, noOfThreads); + sysdep.RegisterRun(DDS_SYSTEM_SOLVE); } else { scheduler.RegisterRun(SCHEDULER_CALC, bop); - sysdep.Register(DDS_SYSTEM_CALC, noOfThreads); + sysdep.RegisterRun(DDS_SYSTEM_CALC); } for (int k = 0; k < MAXNOOFBOARDS; k++) diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 681115b6..f08d053a 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -15,7 +15,9 @@ #include "threadmem.h" #include "ABsearch.h" #include "SolverIF.h" +#include "System.h" +extern System sysdep; extern Scheduler scheduler; @@ -53,10 +55,6 @@ void PrintDeal( FILE * fp, unsigned short ranks[][DDS_SUITS]); - -extern int noOfThreads; - - bool (* AB_ptr_list[DDS_HANDS])( pos * posPoint, int target, @@ -938,7 +936,7 @@ int BoardRangeChecks( return RETURN_MODE_WRONG_HI; } - if (thrId < 0 || thrId >= noOfThreads) + if (! sysdep.ThreadOK(thrId)) /* Fault corrected after suggestion by Dirk Willecke. */ { DumpInput(RETURN_THREAD_INDEX, dl, target, solutions, mode); diff --git a/src/System.cpp b/src/System.cpp index 290149e7..bc3e1c6a 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -227,20 +227,38 @@ void System::GetHardware( } -int System::Register( - const unsigned code, - const int nThreads) +int System::RegisterParams( + const int nThreads, + const int mem_usable_MB, + const int mem_def_MB, + const int mem_max_MB) { + if (nThreads < 1 || nThreads >= MAXNOOFTHREADS) + return RETURN_THREAD_INDEX; + + numThreads = nThreads; + sysMem_MB = mem_usable_MB; + thrDef_MB = mem_def_MB; + thrMax_MB = mem_max_MB; + return RETURN_NO_FAULT; +} + + +int System::RegisterRun(const unsigned code) +{ + // TODO Use same code as in Scheduler, put in dds.h + if (code >= DDS_SYSTEM_SIZE) return RETURN_THREAD_MISSING; // Not quite right; runCat = code; + return RETURN_NO_FAULT; +} - if (nThreads < 1 || nThreads >= MAXNOOFTHREADS) - return RETURN_THREAD_INDEX; - numThreads = nThreads; - return RETURN_NO_FAULT; +bool System::ThreadOK(const int thrId) const +{ + return (thrId >= 0 && thrId < numThreads); } @@ -574,9 +592,16 @@ string System::str(DDSInfo * info) const setw(20) << right << strVersion << "\n"; strcpy(info->versionString, strVersion.c_str()); - const string strCores = System::GetCores(info->numCores); + ss << left << setw(17) << "Memory max (MB)" << + setw(16) << right << sysMem_MB << "\n"; + + const string stm = to_string(thrDef_MB) + " to " + to_string(thrMax_MB); + ss << left << setw(17) << "Thread def (MB)" << + setw(16) << right << stm << "\n"; + + System::GetCores(info->numCores); ss << left << setw(17) << "Number of cores" << - setw(16) << right << strCores << "\n"; + setw(16) << right << info->numCores << "\n"; info->noOfThreads = numThreads; ss << left << setw(17) << "Number of threads" << diff --git a/src/System.h b/src/System.h index 4184012b..c07596d7 100644 --- a/src/System.h +++ b/src/System.h @@ -34,6 +34,9 @@ class System unsigned runCat; // SOLVE / CALC / PLAY int numThreads; + int sysMem_MB; + int thrDef_MB; + int thrMax_MB; unsigned preferredSystem; @@ -72,9 +75,15 @@ class System void Reset(); - int Register( - const unsigned code, - const int noOfThreads = 1); + int RegisterParams( + const int nThreads, + const int mem_usable_MB, + const int mem_def_MB, + const int mem_max_MB); + + int RegisterRun(const unsigned code); + + bool ThreadOK(const int thrId) const; void GetHardware( int& ncores, diff --git a/src/dds.h b/src/dds.h index f6f12d81..e038b4c4 100644 --- a/src/dds.h +++ b/src/dds.h @@ -84,8 +84,6 @@ extern char relRank[8192][15]; extern unsigned short int winRanks[8192][14]; -extern int noOfThreads; - struct playparamType { int noOfBoards; From 608fdd9f3c2607f707166822bb0896c439545736 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 24 Mar 2018 11:01:39 +0100 Subject: [PATCH 037/132] Starting to pull thrId out of ABsearch.cpp --- src/ABsearch.cpp | 12 +++--------- src/ABsearch.h | 3 ++- src/ABstats.cpp | 20 ++++++++------------ src/ABstats.h | 7 +++++-- src/Init.cpp | 16 +++++++++------- 5 files changed, 27 insertions(+), 31 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index c658aeb4..b1fd5966 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -127,17 +127,11 @@ void InitFileTopLevel(int thrId) } -void InitFileABstats(int thrId) +void InitFileABstats( + localVarType * thrp, + const string& fname) { #ifdef DDS_AB_STATS - localVarType * thrp = &localVar[thrId]; - - char fname[DDS_FNAME_LEN]; - sprintf(fname, "%s%d%s", - DDS_AB_STATS_PREFIX, - thrId, - DDS_DEBUG_SUFFIX); - thrp->ABStats.SetFile(fname); thrp->ABStats.SetName(AB_TARGET_REACHED, "Target decided"); diff --git a/src/ABsearch.h b/src/ABsearch.h index a45c1c6a..098faa22 100644 --- a/src/ABsearch.h +++ b/src/ABsearch.h @@ -81,7 +81,8 @@ void InitFileTopLevel( int thrId); void InitFileABstats( - int thrId); + localVarType * thrp, + const string& fname); void InitFileABhits( int thrId); diff --git a/src/ABstats.cpp b/src/ABstats.cpp index 01456bc9..4adbcbd3 100644 --- a/src/ABstats.cpp +++ b/src/ABstats.cpp @@ -2,14 +2,13 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ /* - This object, ABstats, is a simple object for AB statistics - and return values. + ABstats is a simple object for AB statistics and return values. */ @@ -19,7 +18,6 @@ ABstats::ABstats() { - strcpy(fname, ""); fp = stdout; ABstats::Reset(); ABstats::ResetCum(); @@ -78,17 +76,12 @@ void ABstats::ResetCum() } -void ABstats::SetFile(char * ourFname) +void ABstats::SetFile(const string& fname) { - if (strlen(ourFname) > DDS_LINE_LEN) - return; - if (fp != stdout) // Already set return; - strncpy(fname, ourFname, strlen(ourFname)); - - fp = fopen(fname, "w"); + fp = fopen(fname.c_str(), "w"); if (! fp) fp = stdout; } @@ -103,7 +96,10 @@ void ABstats::SetName(int no, char * ourName) } -void ABstats::IncrPos(int no, bool side, int depth) +void ABstats::IncrPos( + int no, + bool side, + int depth) { if (no < 0 || no >= DDS_AB_POS) return; diff --git a/src/ABstats.h b/src/ABstats.h index 5395eb69..592854a2 100644 --- a/src/ABstats.h +++ b/src/ABstats.h @@ -13,6 +13,10 @@ #include #include #include +#include + +using namespace std; + /* AB_COUNT is a macro that avoids the tedious #ifdef's at @@ -46,7 +50,6 @@ class ABstats { private: FILE * fp; - char fname[DDS_LINE_LEN]; char name[DDS_AB_POS][40]; int counter[DDS_AB_POS][DDS_MAXDEPTH]; int counterCum[DDS_AB_POS]; @@ -65,7 +68,7 @@ class ABstats ~ABstats(); void Reset(); void ResetCum(); - void SetFile(char * fname); + void SetFile(const string& fname); void SetName(int no, char * name); void IncrPos(int no, bool side, int depth); void IncrNode(int depth); diff --git a/src/Init.cpp b/src/Init.cpp index 694ae37f..919c2238 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -365,30 +365,32 @@ void InitConstants() void InitDebugFiles() { - for (int k = 0; k < noOfThreads; k++) + for (int thrId = 0; thrId < noOfThreads; thrId++) { + localVarType * thrp = &localVar[thrId]; #ifdef DDS_TOP_LEVEL - InitFileTopLevel(k); + InitFileTopLevel(thrId); #endif #ifdef DDS_AB_STATS - InitFileABstats(k); + InitFileABstats(thrp, + DDS_AB_STATS_PREFIX + to_string(thrId) + DDS_DEBUG_SUFFIX); #endif #ifdef DDS_AB_HITS - InitFileABhits(k); + InitFileABhits(thrId); #endif #ifdef DDS_TT_STATS - InitFileTTstats(k); + InitFileTTstats(thrId); #endif #ifdef DDS_TIMING - InitFileTimer(k); + InitFileTimer(thrId); #endif #ifdef DDS_MOVES - InitFileMoves(k); + InitFileMoves(thrId); #endif } From 2184bc469cc9a46f94fe6372884c7a2afb53aff9 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 24 Mar 2018 11:26:40 +0100 Subject: [PATCH 038/132] One less thrId in ABsearch --- src/ABsearch.cpp | 14 ++++---------- src/ABsearch.h | 3 ++- src/ABstats.cpp | 23 ++++++++++++++++------- src/ABstats.h | 5 ++++- src/Init.cpp | 6 +++--- 5 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index b1fd5966..320d91e9 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -107,18 +107,12 @@ const int handDelta[DDS_SUITS] = { 256, 16, 1, 0 }; // at some point, but it's so similar to the code here that I // leave it in this file for now. -void InitFileTopLevel(int thrId) +void InitFileTopLevel( + localVarType * thrp, + const string& fname) { #ifdef DDS_TOP_LEVEL - localVarType * thrp = &localVar[thrId]; - - char fname[DDS_FNAME_LEN]; - sprintf(fname, "%s%d%s", - DDS_TOP_LEVEL_PREFIX, - thrId, - DDS_DEBUG_SUFFIX); - - thrp->fpTopLevel = fopen(fname, "w"); + thrp->fpTopLevel = fopen(fname.c_str(), "w"); if (! thrp->fpTopLevel) thrp->fpTopLevel = stdout; #else diff --git a/src/ABsearch.h b/src/ABsearch.h index 098faa22..ffee7782 100644 --- a/src/ABsearch.h +++ b/src/ABsearch.h @@ -78,7 +78,8 @@ evalType Evaluate( localVarType * thrp); void InitFileTopLevel( - int thrId); + localVarType * thrp, + const string& fname); void InitFileABstats( localVarType * thrp, diff --git a/src/ABstats.cpp b/src/ABstats.cpp index 4adbcbd3..0c5cd73d 100644 --- a/src/ABstats.cpp +++ b/src/ABstats.cpp @@ -18,7 +18,10 @@ ABstats::ABstats() { + fname = ""; + fileSet = false; fp = stdout; + ABstats::Reset(); ABstats::ResetCum(); } @@ -76,14 +79,9 @@ void ABstats::ResetCum() } -void ABstats::SetFile(const string& fname) +void ABstats::SetFile(const string& fnameIn) { - if (fp != stdout) // Already set - return; - - fp = fopen(fname.c_str(), "w"); - if (! fp) - fp = stdout; + fname = fnameIn; } @@ -127,6 +125,17 @@ int ABstats::GetNodes() void ABstats::PrintStats() { + if (! fileSet) + { + if (fname != "") + { + fp = fopen(fname.c_str(), "w"); + if (! fp) + fp = stdout; + } + fileSet = true; + } + int sumScore1 = 0 , sumScore0 = 0; int psumScore1 = 0 , psumScore0 = 0; int sum[DDS_AB_POS], psum[DDS_AB_POS]; diff --git a/src/ABstats.h b/src/ABstats.h index 592854a2..594afe91 100644 --- a/src/ABstats.h +++ b/src/ABstats.h @@ -50,6 +50,9 @@ class ABstats { private: FILE * fp; + string fname; + bool fileSet; + char name[DDS_AB_POS][40]; int counter[DDS_AB_POS][DDS_MAXDEPTH]; int counterCum[DDS_AB_POS]; @@ -68,7 +71,7 @@ class ABstats ~ABstats(); void Reset(); void ResetCum(); - void SetFile(const string& fname); + void SetFile(const string& fnameIn); void SetName(int no, char * name); void IncrPos(int no, bool side, int depth); void IncrNode(int depth); diff --git a/src/Init.cpp b/src/Init.cpp index 919c2238..98cc4b76 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -368,13 +368,13 @@ void InitDebugFiles() for (int thrId = 0; thrId < noOfThreads; thrId++) { localVarType * thrp = &localVar[thrId]; + const string send = to_string(thrId) + DDS_DEBUG_SUFFIX; #ifdef DDS_TOP_LEVEL - InitFileTopLevel(thrId); + InitFileTopLevel(thrp, DDS_TOP_LEVEL_PREFIX + send); #endif #ifdef DDS_AB_STATS - InitFileABstats(thrp, - DDS_AB_STATS_PREFIX + to_string(thrId) + DDS_DEBUG_SUFFIX); + InitFileABstats(thrp, DDS_AB_STATS_PREFIX + send); #endif #ifdef DDS_AB_HITS From 62e9c69b1f5548e313bf41ee7abe516689104d27 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 24 Mar 2018 12:16:01 +0100 Subject: [PATCH 039/132] More on thrId --- src/ABsearch.cpp | 140 --------------------------------------------- src/ABsearch.h | 28 --------- src/Init.cpp | 56 ++++++++++++++---- src/Moves.cpp | 10 +--- src/Moves.h | 4 +- src/SolverIF.cpp | 6 +- src/TimerList.cpp | 12 +++- src/TimerList.h | 6 +- src/TransTable.cpp | 10 +--- src/TransTable.h | 8 +-- 10 files changed, 71 insertions(+), 209 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index 320d91e9..08b0e77b 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -103,146 +103,6 @@ void DumpStored( const int handDelta[DDS_SUITS] = { 256, 16, 1, 0 }; -// The top-level debugging should possibly go in SolveBoard.cpp -// at some point, but it's so similar to the code here that I -// leave it in this file for now. - -void InitFileTopLevel( - localVarType * thrp, - const string& fname) -{ -#ifdef DDS_TOP_LEVEL - thrp->fpTopLevel = fopen(fname.c_str(), "w"); - if (! thrp->fpTopLevel) - thrp->fpTopLevel = stdout; -#else - UNUSED(thrId); -#endif -} - - -void InitFileABstats( - localVarType * thrp, - const string& fname) -{ -#ifdef DDS_AB_STATS - thrp->ABStats.SetFile(fname); - - thrp->ABStats.SetName(AB_TARGET_REACHED, "Target decided"); - thrp->ABStats.SetName(AB_DEPTH_ZERO , "depth == 0"); - thrp->ABStats.SetName(AB_QUICKTRICKS , "QuickTricks"); - thrp->ABStats.SetName(AB_LATERTRICKS , "LaterTricks"); - thrp->ABStats.SetName(AB_MAIN_LOOKUP , "Main lookup"); - thrp->ABStats.SetName(AB_SIDE_LOOKUP , "Other lookup"); - thrp->ABStats.SetName(AB_MOVE_LOOP , "Move trial"); -#else - UNUSED(thrId); -#endif -} - - -void InitFileABhits(int thrId) -{ -#ifdef DDS_AB_HITS - localVarType * thrp = &localVar[thrId]; - - char fname[DDS_FNAME_LEN]; - sprintf(fname, "%s%d%s", - DDS_AB_HITS_RETRIEVED_PREFIX, - thrId, - DDS_DEBUG_SUFFIX); - - thrp->fpRetrieved = fopen(fname, "w"); - if (! thrp->fpRetrieved) - thrp->fpRetrieved = stdout; - - sprintf(fname, "%s%d%s", - DDS_AB_HITS_STORED_PREFIX, - thrId, - DDS_DEBUG_SUFFIX); - - thrp->fpStored = fopen(fname, "w"); - if (! thrp->fpStored) - thrp->fpStored = stdout; -#else - UNUSED(thrId); -#endif -} - - -void InitFileTTstats(int thrId) -{ -#ifdef DDS_TT_STATS - localVarType * thrp = &localVar[thrId]; - - char fname[DDS_FNAME_LEN]; - sprintf(fname, "%s%d%s", - DDS_TT_STATS_PREFIX, - thrId, - DDS_DEBUG_SUFFIX); - - thrp->transTable.SetFile(fname); -#else - UNUSED(thrId); -#endif -} - - -void InitFileTimer(int thrId) -{ - // TODO: Remove - UNUSED(thrId); -} - - -void InitFileMoves(int thrId) -{ -#ifdef DDS_MOVES - Moves * movesp = &localVar[thrId].moves; - - char fname[DDS_FNAME_LEN]; - sprintf(fname, "%s%d%s\0", - DDS_MOVES_PREFIX, - thrId, - DDS_DEBUG_SUFFIX); - - movesp->SetFile(fname); -#else - UNUSED(thrId); -#endif -} - - -void InitFileScheduler() -{ - // TODO: Remove -} - - -void CloseFileTopLevel(int thrId) -{ -#ifdef DDS_TOP_LEVEL - localVarType * thrp = &localVar[thrId]; - if (thrp->fpTopLevel != stdout && thrp->fpTopLevel != nullptr) - fclose(thrp->fpTopLevel); -#else - UNUSED(thrId); -#endif -} - - -void CloseFileABhits(int thrId) -{ -#ifdef DDS_AB_HITS - localVarType * thrp = &localVar[thrId]; - if (thrp->fpStored != stdout && thrp->fpStored != nullptr) - fclose(thrp->fpStored); -#else - UNUSED(thrId); -#endif -} - - bool ABsearch( pos * posPoint, int target, diff --git a/src/ABsearch.h b/src/ABsearch.h index ffee7782..97945a48 100644 --- a/src/ABsearch.h +++ b/src/ABsearch.h @@ -77,34 +77,6 @@ evalType Evaluate( int trump, localVarType * thrp); -void InitFileTopLevel( - localVarType * thrp, - const string& fname); - -void InitFileABstats( - localVarType * thrp, - const string& fname); - -void InitFileABhits( - int thrId); - -void InitFileTTstats( - int thrId); - -void InitFileTimer( - int thrId); - -void InitFileMoves( - int thrId); - -void InitFileScheduler(); - -void CloseFileTopLevel( - int thrId); - -void CloseFileABhits( - int thrId); - void DumpTopLevel( struct localVarType * thrp, int tricks, diff --git a/src/Init.cpp b/src/Init.cpp index 98cc4b76..4affaf5a 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -369,28 +369,56 @@ void InitDebugFiles() { localVarType * thrp = &localVar[thrId]; const string send = to_string(thrId) + DDS_DEBUG_SUFFIX; + #ifdef DDS_TOP_LEVEL - InitFileTopLevel(thrp, DDS_TOP_LEVEL_PREFIX + send); + const string stop = DDS_TOP_LEVEL_PREFIX + send; + thrp->fpTopLevel = fopen(stop.c_str(), "w"); + if (! thrp->fpTopLevel) + thrp->fpTopLevel = stdout; #endif #ifdef DDS_AB_STATS - InitFileABstats(thrp, DDS_AB_STATS_PREFIX + send); + thrp->ABStats.SetFile(DDS_AB_STATS_PREFIX + send); + thrp->ABStats.SetName(AB_TARGET_REACHED, "Target decided"); + thrp->ABStats.SetName(AB_DEPTH_ZERO , "depth == 0"); + thrp->ABStats.SetName(AB_QUICKTRICKS , "QuickTricks"); + thrp->ABStats.SetName(AB_LATERTRICKS , "LaterTricks"); + thrp->ABStats.SetName(AB_MAIN_LOOKUP , "Main lookup"); + thrp->ABStats.SetName(AB_SIDE_LOOKUP , "Other lookup"); + thrp->ABStats.SetName(AB_MOVE_LOOP , "Move trial"); #endif #ifdef DDS_AB_HITS - InitFileABhits(thrId); + char fname[DDS_FNAME_LEN]; + sprintf(fname, "%s%d%s", + DDS_AB_HITS_RETRIEVED_PREFIX, + thrId, + DDS_DEBUG_SUFFIX); + + thrp->fpRetrieved = fopen(fname, "w"); + if (! thrp->fpRetrieved) + thrp->fpRetrieved = stdout; + + sprintf(fname, "%s%d%s", + DDS_AB_HITS_STORED_PREFIX, + thrId, + DDS_DEBUG_SUFFIX); + + thrp->fpStored = fopen(fname, "w"); + if (! thrp->fpStored) + thrp->fpStored = stdout; #endif -#ifdef DDS_TT_STATS - InitFileTTstats(thrId); +#ifdef DDS_TIMING + thrp->timerList.SetFile(DDS_TIMING_PREFIX + send); #endif -#ifdef DDS_TIMING - InitFileTimer(thrId); +#ifdef DDS_TT_STATS + thrp->transTable.SetFile(DDS_TT_STATS_PREFIX + send); #endif #ifdef DDS_MOVES - InitFileMoves(thrId); + thrp->moves.SetFile(DDS_MOVES_PREFIX + send); #endif } @@ -402,14 +430,20 @@ void InitDebugFiles() void CloseDebugFiles() { - for (int k = 0; k < noOfThreads; k++) + for (int thrId = 0; thrId < noOfThreads; thrId++) { + localVarType * thrp = &localVar[thrId]; #ifdef DDS_TOP_LEVEL - CloseFileTopLevel(k); + if (thrp->fpTopLevel != stdout && thrp->fpTopLevel != nullptr) + fclose(thrp->fpTopLevel); #endif #ifdef DDS_AB_HITS - CloseFileABhits(k); + if (thrp->fpRetrieved != stdout && thrp->fpRetrieved != nullptr) + fclose(thrp->fpRetrieved); + + if (thrp->fpStored != stdout && thrp->fpStored != nullptr) + fclose(thrp->fpStored); #endif } } diff --git a/src/Moves.cpp b/src/Moves.cpp index c82188de..807eeac9 100644 --- a/src/Moves.cpp +++ b/src/Moves.cpp @@ -80,7 +80,6 @@ Moves::Moves() trickFuncSuitTable.list[i].count = 0; } - strcpy(fname, ""); fp = stdout; WeightList[ 4] = &Moves::WeightAllocNTNotvoid1; @@ -100,17 +99,12 @@ Moves::Moves() } -void Moves::SetFile(char * ourFname) +void Moves::SetFile(const string& ourFname) { - if (strlen(ourFname) > 80) - return; - if (fp != stdout) // Already set return; - strncpy(fname, ourFname, strlen(ourFname)); - - fp = fopen(fname, "w"); + fp = fopen(ourFname.c_str(), "w"); if (! fp) fp = stdout; } diff --git a/src/Moves.h b/src/Moves.h index a28c7ab1..debe0b0a 100644 --- a/src/Moves.h +++ b/src/Moves.h @@ -115,8 +115,6 @@ class Moves FILE * fp; - char fname[80]; - void WeightAllocTrump0( pos * posPoint, @@ -211,7 +209,7 @@ class Moves ~Moves(); - void SetFile(char * fname); + void SetFile(const string& fname); void Init( int tricks, diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index f08d053a..2fc3168e 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -601,7 +601,7 @@ int STDCALL SolveBoard( } #ifdef DDS_TIMING - thrp->timerList.PrintStats(thrId); + thrp->timerList.PrintStats(); #endif #ifdef DDS_TT_STATS @@ -716,7 +716,7 @@ int SolveSameBoard( ThreadMemoryUsed(); #ifdef DDS_TIMING - thrp->timerList.PrintStats(thrId); + thrp->timerList.PrintStats(); #endif #ifdef DDS_TT_STATS @@ -869,7 +869,7 @@ int AnalyseLaterBoard( ThreadMemoryUsed(); #ifdef DDS_TIMING - thrp->timerList.PrintStats(thrId); + thrp->timerList.PrintStats(); #endif #ifdef DDS_TT_STATS diff --git a/src/TimerList.cpp b/src/TimerList.cpp index 2508309b..27f891c5 100644 --- a/src/TimerList.cpp +++ b/src/TimerList.cpp @@ -33,6 +33,8 @@ TimerList::~TimerList() void TimerList::Reset() { + fname = ""; + timerGroups.resize(TIMER_GROUPS); timerGroups[TIMER_NO_AB].SetNames("AB"); @@ -48,6 +50,12 @@ void TimerList::Reset() } +void TimerList::SetFile(const string& fnameIn) +{ + fname = fnameIn; +} + + void TimerList::Start( const unsigned groupno, const unsigned timerno) @@ -79,7 +87,7 @@ bool TimerList::Used() const } -void TimerList::PrintStats(const int thrId) const +void TimerList::PrintStats() const { if (! TimerList::Used()) return; @@ -109,8 +117,6 @@ void TimerList::PrintStats(const int thrId) const sumTotal += t; } - const string fname = DDS_TIMING_PREFIX + to_string(thrId) + - DDS_DEBUG_SUFFIX; ofstream fout; fout.open(fname); diff --git a/src/TimerList.h b/src/TimerList.h index cfa6c8ea..24c9a4b5 100644 --- a/src/TimerList.h +++ b/src/TimerList.h @@ -78,6 +78,8 @@ class TimerList { private: + string fname; + vector timerGroups; public: @@ -87,6 +89,8 @@ class TimerList void Reset(); + void SetFile(const string& fnameIn); + void Start( const unsigned groupno, const unsigned timerno); @@ -97,7 +101,7 @@ class TimerList bool Used() const; - void PrintStats(const int thrId) const; + void PrintStats() const; }; #endif diff --git a/src/TransTable.cpp b/src/TransTable.cpp index 10b20eba..2f3072da 100644 --- a/src/TransTable.cpp +++ b/src/TransTable.cpp @@ -135,7 +135,6 @@ TransTable::TransTable() TTInUse = 0; - strcpy(fname, ""); fp = stdout; } @@ -2150,17 +2149,12 @@ void TransTable::SetToPartialHands( } -void TransTable::SetFile(char * ourFname) +void TransTable::SetFile(const string& ourFname) { - if (strlen(ourFname) > TT_LINE_LEN) - return; - if (fp != stdout) // Already set return; - strncpy(fname, ourFname, strlen(ourFname)); - - fp = fopen(fname, "w"); + fp = fopen(ourFname.c_str(), "w"); if (! fp) fp = stdout; } diff --git a/src/TransTable.h b/src/TransTable.h index 0d880521..0c5f8c9b 100644 --- a/src/TransTable.h +++ b/src/TransTable.h @@ -19,9 +19,12 @@ #include #include #include +#include #include "dds.h" #include "../include/dll.h" +using namespace std; + // ResetMemory reasons #define UNKNOWN_REASON 0 #define TOO_MANY_NODES 1 @@ -335,8 +338,6 @@ class TransTable FILE * fp; - char fname[TT_LINE_LEN]; - // Really the maximum of BLOCKS_PER_ENTRY and DISTS_PER_ENTRY int suitHist[BLOCKS_PER_ENTRY + 1], suitWraps; @@ -460,8 +461,7 @@ class TransTable // Debug functions - void SetFile( - char * fname); + void SetFile(const string& fname); void PrintSuits( int trick, From bf7729ef667f3ec192bba248c6451d3cd654d750 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 24 Mar 2018 13:28:39 +0100 Subject: [PATCH 040/132] More thrp --- src/Init.cpp | 2 ++ src/PlayAnalyser.cpp | 4 ++- src/SolverIF.cpp | 75 ++++++++++++++++++++++---------------------- src/SolverIF.h | 8 +++++ 4 files changed, 51 insertions(+), 38 deletions(-) diff --git a/src/Init.cpp b/src/Init.cpp index 4affaf5a..9c558817 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -368,6 +368,7 @@ void InitDebugFiles() for (int thrId = 0; thrId < noOfThreads; thrId++) { localVarType * thrp = &localVar[thrId]; + UNUSED(thrp); // To avoid compile errors const string send = to_string(thrId) + DDS_DEBUG_SUFFIX; #ifdef DDS_TOP_LEVEL @@ -433,6 +434,7 @@ void CloseDebugFiles() for (int thrId = 0; thrId < noOfThreads; thrId++) { localVarType * thrp = &localVar[thrId]; + UNUSED(thrp); // To avoid compile errors #ifdef DDS_TOP_LEVEL if (thrp->fpTopLevel != stdout && thrp->fpTopLevel != nullptr) fclose(thrp->fpTopLevel); diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index dc878bc4..15b2b0de 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -39,7 +39,9 @@ int STDCALL AnalysePlayBin( moveType move; futureTricks fut; - int ret = SolveBoard(dl, -1, 1, 1, &fut, thrId); + struct localVarType * thrp = &localVar[thrId]; + + int ret = SolveBoardInternal(thrp, dl, -1, 1, 1, &fut); if (ret != RETURN_NO_FAULT) return ret; diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 2fc3168e..27c24318 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -22,14 +22,13 @@ extern Scheduler scheduler; int BoardRangeChecks( - deal * dl, + deal& dl, int target, int solutions, - int mode, - int thrId); + int mode); int BoardValueChecks( - deal * dl, + deal& dl, int target, int solutions, int mode, @@ -46,7 +45,7 @@ void LastTrickWinner( int DumpInput( int errCode, - deal * dl, + deal& dl, int target, int solutions, int mode); @@ -84,13 +83,24 @@ int STDCALL SolveBoard( futureTricks * futp, int thrId) { - localVarType * thrp = &localVar[thrId]; + return SolveBoardInternal(&localVar[thrId], dl, target, + solutions, mode, futp); +} + +int SolveBoardInternal( + struct localVarType * thrp, + deal& dl, + int target, + int solutions, + int mode, + futureTricks * futp) +{ // ---------------------------------------------------------- // Formal parameter checks. // ---------------------------------------------------------- - int ret = BoardRangeChecks(&dl, target, solutions, mode, thrId); + int ret = BoardRangeChecks(dl, target, solutions, mode); if (ret != RETURN_NO_FAULT) return ret; @@ -168,7 +178,7 @@ int STDCALL SolveBoard( // Consistency checks. // ---------------------------------------------------------- - ret = BoardValueChecks(&dl, target, solutions, mode, thrp); + ret = BoardValueChecks(dl, target, solutions, mode, thrp); if (ret != RETURN_NO_FAULT) return ret; @@ -894,11 +904,10 @@ int AnalyseLaterBoard( int BoardRangeChecks( - deal * dl, + deal& dl, int target, int solutions, - int mode, - int thrId) + int mode) { if (target < -1) { @@ -936,20 +945,13 @@ int BoardRangeChecks( return RETURN_MODE_WRONG_HI; } - if (! sysdep.ThreadOK(thrId)) - /* Fault corrected after suggestion by Dirk Willecke. */ - { - DumpInput(RETURN_THREAD_INDEX, dl, target, solutions, mode); - return RETURN_THREAD_INDEX; - } - - if (dl->trump < 0 || dl->trump > 4) + if (dl.trump < 0 || dl.trump > 4) { DumpInput(RETURN_TRUMP_WRONG, dl, target, solutions, mode); return RETURN_TRUMP_WRONG; } - if (dl->first < 0 || dl->first > 3) + if (dl.first < 0 || dl.first > 3) { DumpInput(RETURN_FIRST_WRONG, dl, target, solutions, mode); return RETURN_FIRST_WRONG; @@ -958,7 +960,7 @@ int BoardRangeChecks( int rankSeen[3] = {0, 0, 0}; for (int k = 0; k < 3; k++) { - int r = dl->currentTrickRank[k]; + int r = dl.currentTrickRank[k]; if (r == 0) continue; @@ -970,7 +972,7 @@ int BoardRangeChecks( return RETURN_SUIT_OR_RANK; } - if (dl->currentTrickSuit[k] < 0 || dl->currentTrickSuit[k] > 3) + if (dl.currentTrickSuit[k] < 0 || dl.currentTrickSuit[k] > 3) { DumpInput(RETURN_SUIT_OR_RANK, dl, target, solutions, mode); return RETURN_SUIT_OR_RANK; @@ -988,7 +990,7 @@ int BoardRangeChecks( { for (int s = 0; s < DDS_SUITS; s++) { - unsigned c = dl->remainCards[h][s]; + unsigned c = dl.remainCards[h][s]; if (c != 0 && (c < 0x0004 || c >= 0x8000)) { DumpInput(RETURN_SUIT_OR_RANK, dl, target, solutions, mode); @@ -1002,7 +1004,7 @@ int BoardRangeChecks( int BoardValueChecks( - deal * dl, + deal& dl, int target, int solutions, int mode, @@ -1037,7 +1039,7 @@ int BoardValueChecks( int noOfCardsPerHand[DDS_HANDS] = {0, 0, 0, 0}; for (int k = 0; k < handRelFirst; k++) - noOfCardsPerHand[handId(dl->first, k)] = 1; + noOfCardsPerHand[handId(dl.first, k)] = 1; for (int h = 0; h < DDS_HANDS; h++) for (int s = 0; s < DDS_SUITS; s++) @@ -1056,9 +1058,9 @@ int BoardValueChecks( { unsigned short int aggrRemain = 0; for (int h = 0; h < DDS_HANDS; h++) - aggrRemain |= (dl->remainCards[h][dl->currentTrickSuit[k]] >> 2); + aggrRemain |= (dl.remainCards[h][dl.currentTrickSuit[k]] >> 2); - if ((aggrRemain & bitMapRank[dl->currentTrickRank[k]]) != 0) + if ((aggrRemain & bitMapRank[dl.currentTrickRank[k]]) != 0) { DumpInput(RETURN_PLAYED_CARD, dl, target, solutions, mode); return RETURN_PLAYED_CARD; @@ -1174,12 +1176,11 @@ void LastTrickWinner( int DumpInput( int errCode, - deal * dl, + deal& dl, int target, int solutions, int mode) { - FILE * fp; int i, j, k; unsigned short ranks[4][4]; @@ -1190,23 +1191,23 @@ int DumpInput( fprintf(fp, "Error code=%d\n", errCode); fprintf(fp, "\n"); fprintf(fp, "Deal data:\n"); - if (dl->trump != 4) - fprintf(fp, "trump=%c\n", cardSuit[dl->trump]); + if (dl.trump != 4) + fprintf(fp, "trump=%c\n", cardSuit[dl.trump]); else fprintf(fp, "trump=N\n"); - fprintf(fp, "first=%c\n", cardHand[dl->first]); + fprintf(fp, "first=%c\n", cardHand[dl.first]); for (k = 0; k <= 2; k++) - if (dl->currentTrickRank[k] != 0) + if (dl.currentTrickRank[k] != 0) fprintf(fp, "index=%d currentTrickSuit=%c currentTrickRank=%c\n", - k, cardSuit[dl->currentTrickSuit[k]], - cardRank[dl->currentTrickRank[k]]); + k, cardSuit[dl.currentTrickSuit[k]], + cardRank[dl.currentTrickRank[k]]); for (i = 0; i <= 3; i++) for (j = 0; j <= 3; j++) { fprintf(fp, "index1=%d index2=%d remainCards=%d\n", - i, j, dl->remainCards[i][j]); + i, j, dl.remainCards[i][j]); ranks[i][j] = static_cast - (dl->remainCards[i][/*3-*/j] >> 2); + (dl.remainCards[i][/*3-*/j] >> 2); } fprintf(fp, "\n"); fprintf(fp, "target=%d\n", target); diff --git a/src/SolverIF.h b/src/SolverIF.h index 14b43ad8..f81c094a 100644 --- a/src/SolverIF.h +++ b/src/SolverIF.h @@ -11,6 +11,14 @@ #define DDS_SOLVERIF_H +int SolveBoardInternal( + struct localVarType * thrp, + deal& dl, + int target, + int solutions, + int mode, + futureTricks * futp); + int SolveSameBoard( deal dl, futureTricks * futp, From 7057911a43c3aad80a4c63b61f5fcad49d175d89 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 24 Mar 2018 13:44:33 +0100 Subject: [PATCH 041/132] Pushed thrId as far as reasonable --- src/PlayAnalyser.cpp | 23 +++++++++++++---------- src/SolveBoard.cpp | 33 +++++++++++++++++---------------- src/SolverIF.cpp | 15 +++++++-------- src/SolverIF.h | 8 ++++---- src/System.cpp | 16 ++++++++-------- 5 files changed, 49 insertions(+), 46 deletions(-) diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 15b2b0de..b0bc1720 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -27,7 +27,7 @@ paramType playparam; playparamType traceparam; extern System sysdep; -void PlayChunkCommon(const int thid); +void PlayChunkCommon(const int thrId); int STDCALL AnalysePlayBin( @@ -36,17 +36,20 @@ int STDCALL AnalysePlayBin( solvedPlay * solvedp, int thrId) { - moveType move; - futureTricks fut; + if (! sysdep.ThreadOK(thrId)) + return RETURN_THREAD_INDEX; struct localVarType * thrp = &localVar[thrId]; + moveType move; + futureTricks fut; + int ret = SolveBoardInternal(thrp, dl, -1, 1, 1, &fut); if (ret != RETURN_NO_FAULT) return ret; - const int numTricks = ((localVar[thrId].iniDepth + 3) >> 2) + 1; - const int numCardsPlayed = ((48 - localVar[thrId].iniDepth) % 4) + 1; + const int numTricks = ((thrp->iniDepth + 3) >> 2) + 1; + const int numCardsPlayed = ((48 - thrp->iniDepth) % 4) + 1; int last_trick = (play.number + 3) / 4; int last_card = ((play.number + 3) % 4) + 1; @@ -183,8 +186,8 @@ int STDCALL AnalysePlayBin( if (usingCurrent) continue; - if ((ret = AnalyseLaterBoard(dl.first, - &move, hint, hintDir, &fut, thrId)) + if ((ret = AnalyseLaterBoard(thrp, dl.first, &move, hint, + hintDir, &fut)) != RETURN_NO_FAULT) { #if DEBUG @@ -247,7 +250,7 @@ int STDCALL AnalysePlayPBN( } -void PlayChunkCommon(const int thid) +void PlayChunkCommon(const int thrId) { solvedPlay solved[MAXNOOFBOARDS]; int index; @@ -255,7 +258,7 @@ void PlayChunkCommon(const int thid) while (1) { - st = scheduler.GetNumber(thid); + st = scheduler.GetNumber(thrId); index = st.number; if (index == -1) break; @@ -264,7 +267,7 @@ void PlayChunkCommon(const int thid) playparam.bop->deals[index], traceparam.plp->plays[index], &solved[index], - thid); + thrId); // If there are multiple errors, this will catch one of them. if (res == 1) diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 42a72be3..94d93c05 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -24,7 +24,7 @@ extern System sysdep; void SolveChunkCommon( - const int thid) + const int thrId) { futureTricks fut[MAXNOOFBOARDS]; int index; @@ -32,7 +32,7 @@ void SolveChunkCommon( while (1) { - st = scheduler.GetNumber(thid); + st = scheduler.GetNumber(thrId); index = st.number; if (index == -1) break; @@ -46,22 +46,22 @@ void SolveChunkCommon( param.bop->deals[index ].first == param.bop->deals[st.repeatOf].first) { - START_THREAD_TIMER(thid); + START_THREAD_TIMER(thrId); param.solvedp->solvedBoard[index] = fut[ st.repeatOf ]; - END_THREAD_TIMER(thid); + END_THREAD_TIMER(thrId); continue; } else { - START_THREAD_TIMER(thid); + START_THREAD_TIMER(thrId); int res = SolveBoard( param.bop->deals[index], param.bop->target[index], param.bop->solutions[index], param.bop->mode[index], &fut[index], - thid); - END_THREAD_TIMER(thid); + thrId); + END_THREAD_TIMER(thrId); if (res == 1) param.solvedp->solvedBoard[index] = fut[index]; @@ -73,22 +73,23 @@ void SolveChunkCommon( void SolveChunkDDtableCommon( - const int thid) + const int thrId) { + struct localVarType * thrp = &localVar[thrId]; futureTricks fut[MAXNOOFBOARDS]; int index; schedType st; while (1) { - st = scheduler.GetNumber(thid); + st = scheduler.GetNumber(thrId); index = st.number; if (index == -1) break; if (st.repeatOf != -1) { - START_THREAD_TIMER(thid); + START_THREAD_TIMER(thrId); for (int k = 0; k < chunk; k++) { param.bop->deals[index].first = k; @@ -96,20 +97,20 @@ void SolveChunkDDtableCommon( param.solvedp->solvedBoard[index].score[k] = param.solvedp->solvedBoard[ st.repeatOf ].score[k]; } - END_THREAD_TIMER(thid); + END_THREAD_TIMER(thrId); continue; } param.bop->deals[index].first = 0; - START_THREAD_TIMER(thid); + START_THREAD_TIMER(thrId); int res = SolveBoard( param.bop->deals[index], param.bop->target[index], param.bop->solutions[index], param.bop->mode[index], &fut[index], - thid); + thrId); // SH: I'm making a terrible use of the fut structure here. @@ -126,10 +127,10 @@ void SolveChunkDDtableCommon( param.bop->deals[index].first = k; // Next declarer res = SolveSameBoard( + thrp, param.bop->deals[index], &fut[index], - hint, - thid); + hint); if (res == 1) param.solvedp->solvedBoard[index].score[k] = @@ -137,7 +138,7 @@ void SolveChunkDDtableCommon( else param.error = res; } - END_THREAD_TIMER(thid); + END_THREAD_TIMER(thrId); } } diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 27c24318..e06d3797 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -83,6 +83,9 @@ int STDCALL SolveBoard( futureTricks * futp, int thrId) { + if (! sysdep.ThreadOK(thrId)) + return RETURN_THREAD_INDEX; + return SolveBoardInternal(&localVar[thrId], dl, target, solutions, mode, futp); } @@ -646,10 +649,10 @@ int SolveBoardInternal( int SolveSameBoard( + struct localVarType * thrp, deal dl, futureTricks * futp, - int hint, - int thrId) + int hint) { // Specialized function for SolveChunkDDtable for repeat solves. // No further parameter checks! This function makes heavy reuse @@ -658,8 +661,6 @@ int SolveSameBoard( // target == -1, solutions == 1, mode == 2. // The function only needs to return fut.score[0]. - localVarType * thrp = &localVar[thrId]; - int iniDepth = thrp->iniDepth; int trick = (iniDepth + 3) >> 2; thrp->trickNodes = 0; @@ -753,12 +754,12 @@ int SolveSameBoard( int AnalyseLaterBoard( + localVarType * thrp, int leadHand, moveType * move, int hint, int hintDir, - futureTricks * futp, - int thrId) + futureTricks * futp) { // Specialized function for PlayAnalyser for cards after the // opening lead. No further parameter checks! This function @@ -767,8 +768,6 @@ int AnalyseLaterBoard( // target == -1, solutions == 1, mode == 2. // The function only needs to return fut.score[0]. - localVarType * thrp = &localVar[thrId]; - int iniDepth = --thrp->iniDepth; int cardCount = iniDepth + 4; int trick = (iniDepth + 3) >> 2; diff --git a/src/SolverIF.h b/src/SolverIF.h index f81c094a..802d84f0 100644 --- a/src/SolverIF.h +++ b/src/SolverIF.h @@ -20,17 +20,17 @@ int SolveBoardInternal( futureTricks * futp); int SolveSameBoard( + struct localVarType * thrp, deal dl, futureTricks * futp, - int hint, - int thrId); + int hint); int AnalyseLaterBoard( + struct localVarType * thrp, int leadHand, moveType * move, int hint, int hintDir, - futureTricks * futp, - int thrp); + futureTricks * futp); #endif diff --git a/src/System.cpp b/src/System.cpp index bc3e1c6a..d1b55d82 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -293,7 +293,7 @@ int System::RunThreadsBasic() #ifdef DDS_THREADS_WINAPI struct WinWrapType { - int thid; + int thrId; fptrType fptr; HANDLE *waitPtr; }; @@ -303,9 +303,9 @@ DWORD CALLBACK WinCallback(void * p); DWORD CALLBACK WinCallback(void * p) { WinWrapType * winWrap = static_cast(p); - (*(winWrap->fptr))(winWrap->thid); + (*(winWrap->fptr))(winWrap->thrId); - if (SetEvent(winWrap->waitPtr[winWrap->thid]) == 0) + if (SetEvent(winWrap->waitPtr[winWrap->thrId]) == 0) return 0; return 1; @@ -331,7 +331,7 @@ int System::RunThreadsWinAPI() for (unsigned k = 0; k < nt; k++) { - winWrap[k].thid = static_cast(k); + winWrap[k].thrId = static_cast(k); winWrap[k].fptr = fptr; winWrap[k].waitPtr = solveAllEvents; @@ -374,8 +374,8 @@ int System::RunThreadsOpenMP() #pragma omp for schedule(dynamic) for (int k = 0; k < numThreads; k++) { - int thid = omp_get_thread_num(); - (*fptr)(thid); + int thrId = omp_get_thread_num(); + (*fptr)(thrId); } } #endif @@ -395,8 +395,8 @@ int System::RunThreadsGCD() dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^(size_t t) { - int thid = static_cast(t); - (*fptr)(thid); + int thrId = static_cast(t); + (*fptr)(thrId); }); #endif From 148037a2d8858e399558a7633e3108360cfbee20 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 24 Mar 2018 14:28:49 +0100 Subject: [PATCH 042/132] Introduced Memory.cpp, not yet connected to anything --- src/Makefiles/sources.txt | 1 + src/Memory.cpp | 101 +++++++++++++++++++++++++++++ src/Memory.h | 132 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 234 insertions(+) create mode 100644 src/Memory.cpp create mode 100644 src/Memory.h diff --git a/src/Makefiles/sources.txt b/src/Makefiles/sources.txt index e16fdc27..b24a6fb2 100644 --- a/src/Makefiles/sources.txt +++ b/src/Makefiles/sources.txt @@ -6,6 +6,7 @@ SOURCE_FILES = \ DealerPar.cpp \ Init.cpp \ LaterTricks.cpp \ + Memory.cpp \ Moves.cpp \ Par.cpp \ PlayAnalyser.cpp \ diff --git a/src/Memory.cpp b/src/Memory.cpp new file mode 100644 index 00000000..58a38395 --- /dev/null +++ b/src/Memory.cpp @@ -0,0 +1,101 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#include "Memory.h" + + +Memory::Memory() +{ + Memory::Reset(); +} + + +Memory::~Memory() +{ +} + + +void Memory::Reset() +{ + nThreads = 0; + defThrMB = 0; + maxThrMB = 0; + Memory::Resize(1); +} + + +void Memory::ResetThread(const int thrId) +{ + memory[thrId]->transTable.ResetMemory(FREE_THREAD_MEM); + memory[thrId]->memUsed = Memory::MemoryInUseMB(thrId); +} + + +void Memory::ReturnThread(const int thrId) +{ + memory[thrId]->transTable.ReturnAllMemory(); + memory[thrId]->memUsed = Memory::MemoryInUseMB(thrId); +} + + +void Memory::SetThreadSize( + const int memDefault_MB, + const int memMaximum_MB) +{ + defThrMB = memDefault_MB; + maxThrMB = memMaximum_MB; + + for (int i = 0; i < nThreads; i++) + { + memory[i]->transTable.SetMemoryDefault(defThrMB); + memory[i]->transTable.SetMemoryMaximum(maxThrMB); + } +} + + +void Memory::Resize(const int n) +{ + if (nThreads == n) + return; + + if (nThreads > n) + { + for (int i = n; i < nThreads; i++) + delete memory[i]; + } + else + { + for (int i = nThreads; i < n; i++) + memory[i] = new ThreadData; + } + + nThreads = n; + memory.resize(nThreads); +} + + +ThreadData * Memory::GetPtr(const int thrId) +{ + return memory[thrId]; +} + + +double Memory::MemoryInUseMB(const int thrId) const +{ + return memory[thrId]->transTable.MemoryInUse() + + 8192. * sizeof(relRanksType) / static_cast(1024.); +} + + +void Memory::ReturnAllMemory() +{ + Memory::Resize(0); +} + diff --git a/src/Memory.h b/src/Memory.h new file mode 100644 index 00000000..4e64fe60 --- /dev/null +++ b/src/Memory.h @@ -0,0 +1,132 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_MEMORY_H +#define DDS_MEMORY_H + +#include + +#include "TransTable.h" +#include "Moves.h" +#include "debug.h" +#include "../include/dll.h" + +#ifdef DDS_AB_STATS + include "ABstats.h" +#endif + +#ifdef DDS_TIMING + include "TimerList.h" +#endif + +using namespace std; + + +struct WinnerEntryType +{ + int suit; + int winnerRank; + int winnerHand; + int secondRank; + int secondHand; +}; + +struct WinnersType +{ + int number; + WinnerEntryType winner[4]; +}; + + +struct ThreadData +{ + int nodeTypeStore[DDS_HANDS]; + int iniDepth; + bool val; + + unsigned short int suit[DDS_HANDS][DDS_SUITS]; + int trump; + + struct pos lookAheadPos; // Recursive alpha-beta data + bool analysisFlag; + unsigned short int lowestWin[50][DDS_SUITS]; + WinnersType winners[13]; + struct moveType forbiddenMoves[14]; + struct moveType bestMove[50]; + struct moveType bestMoveTT[50]; + + double memUsed; + int nodes; + int trickNodes; + + // Constant for a given hand. + // 960 KB + struct relRanksType rel[8192]; + + TransTable transTable; + + Moves moves; + +#ifdef DDS_AB_STATS + ABstats ABStats; +#endif + +#ifdef DDS_TIMING + TimerList timerList; +#endif + +#ifdef DDS_TOP_LEVEL + FILE * fpTopLevel; +#endif + +#ifdef DDS_AB_HITS + FILE * fpRetrieved; + FILE * fpStored; +#endif + +}; + + +class Memory +{ + private: + + int defThrMB; + int maxThrMB; + + vector memory; + int nThreads; + + public: + + Memory(); + + ~Memory(); + + void Reset(); + + void ResetThread(const int thrId); + + void ReturnThread(const int thrId); + + void SetThreadSize( + const int memDefault_MB, + const int memMaximum_MB); + + void Resize(const int n); + + ThreadData * GetPtr(const int thrId); + + double MemoryInUseMB(const int thrId) const; + + void ReturnAllMemory(); + +}; + +#endif From 56c9586e29af5fff9d2c36b66d8cc189c191dfeb Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 24 Mar 2018 15:48:53 +0100 Subject: [PATCH 043/132] Seems to work with new Memory.cpp class --- src/ABsearch.cpp | 26 ++++++++++----------- src/ABsearch.h | 16 ++++++------- src/Init.cpp | 55 ++++++++++++-------------------------------- src/Init.h | 8 +++---- src/LaterTricks.cpp | 6 ++--- src/LaterTricks.h | 6 +++-- src/Memory.cpp | 26 +++++++++++++-------- src/Memory.h | 14 +++++------ src/PlayAnalyser.cpp | 5 ++-- src/QuickTricks.cpp | 14 +++++------ src/QuickTricks.h | 5 ++-- src/SolveBoard.cpp | 6 +++-- src/SolverIF.cpp | 25 ++++++++++---------- src/SolverIF.h | 8 ++++--- src/TransTable.h | 2 +- 15 files changed, 106 insertions(+), 116 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index 08b0e77b..ad8dfcf2 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -14,10 +14,10 @@ #include "TransTable.h" #include "Moves.h" -#include "threadmem.h" #include "QuickTricks.h" #include "LaterTricks.h" #include "ABsearch.h" +#include "Memory.h" #define DDS_POS_LINES 5 #define DDS_HAND_LINES 12 @@ -33,13 +33,13 @@ void Make3Simple( unsigned short int trickCards[DDS_SUITS], int depth, moveType * mply, - localVarType * thrp); + ThreadData * thrp); void Undo0( pos * posPoint, int depth, moveType * mply, - localVarType * thrp); + ThreadData * thrp); void Undo0Simple( pos * posPoint, @@ -107,7 +107,7 @@ bool ABsearch( pos * posPoint, int target, int depth, - localVarType * thrp) + ThreadData * thrp) { /* posPoint points to the current look-ahead position, target is number of tricks to take for the player, @@ -200,7 +200,7 @@ bool ABsearch0( pos * posPoint, int target, int depth, - localVarType * thrp) + ThreadData * thrp) { /* posPoint points to the current look-ahead position, target is number of tricks to take for the player, @@ -515,7 +515,7 @@ bool ABsearch1( pos * posPoint, int target, int depth, - localVarType * thrp) + ThreadData * thrp) { int trump = thrp->trump; int hand = handId(posPoint->first[depth], 1); @@ -601,7 +601,7 @@ bool ABsearch2( pos * posPoint, int target, int depth, - localVarType * thrp) + ThreadData * thrp) { int hand = handId(posPoint->first[depth], 2); bool success = (thrp->nodeTypeStore[hand] == MAXNODE ? true : false); @@ -682,7 +682,7 @@ bool ABsearch3( pos * posPoint, int target, int depth, - localVarType * thrp) + ThreadData * thrp) { /* This is a specialized AB function for handRelFirst == 3. */ @@ -835,7 +835,7 @@ void Make3( unsigned short int trickCards[DDS_SUITS], int depth, moveType * mply, - localVarType * thrp) + ThreadData * thrp) { int firstHand = posPoint->first[depth]; @@ -899,7 +899,7 @@ void Make3Simple( unsigned short int trickCards[DDS_SUITS], int depth, moveType * mply, - localVarType * thrp) + ThreadData * thrp) { trickDataType * datap = thrp->moves.GetTrickData((depth + 3) >> 2); @@ -933,7 +933,7 @@ void Undo0( pos * posPoint, int depth, moveType * mply, - localVarType * thrp) + ThreadData * thrp) { int h = handId(posPoint->first[depth], 3); int s = mply->suit; @@ -1023,7 +1023,7 @@ void Undo3( evalType Evaluate( pos * posPoint, int trump, - localVarType * thrp) + ThreadData * thrp) { int s, h, hmax = 0, count = 0, k = 0; unsigned short rmax = 0; @@ -1375,7 +1375,7 @@ void DumpStored( void DumpTopLevel( - localVarType * thrp, + ThreadData * thrp, int tricks, int lower, int upper, diff --git a/src/ABsearch.h b/src/ABsearch.h index 97945a48..d31d7d37 100644 --- a/src/ABsearch.h +++ b/src/ABsearch.h @@ -24,31 +24,31 @@ bool ABsearch( struct pos * posPoint, int target, int depth, - struct localVarType * thrp); + struct ThreadData * thrp); bool ABsearch0( struct pos * posPoint, int target, int depth, - struct localVarType * thrp); + struct ThreadData * thrp); bool ABsearch1( struct pos * posPoint, int target, int depth, - struct localVarType * thrp); + struct ThreadData * thrp); bool ABsearch2( struct pos * posPoint, int target, int depth, - struct localVarType * thrp); + struct ThreadData * thrp); bool ABsearch3( struct pos * posPoint, int target, int depth, - struct localVarType * thrp); + struct ThreadData * thrp); void Make0( struct pos * posPoint, @@ -70,15 +70,15 @@ void Make3( unsigned short int trickCards[DDS_SUITS], int depth, moveType * mply, - localVarType * thrp); + ThreadData * thrp); evalType Evaluate( pos * posPoint, int trump, - localVarType * thrp); + ThreadData * thrp); void DumpTopLevel( - struct localVarType * thrp, + struct ThreadData * thrp, int tricks, int lower, int upper, diff --git a/src/Init.cpp b/src/Init.cpp index 9c558817..6120c3fd 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -9,11 +9,11 @@ #include "dds.h" -#include "threadmem.h" #include "Init.h" #include "ABsearch.h" #include "Scheduler.h" #include "System.h" +#include "Memory.h" void InitConstants(); @@ -27,8 +27,8 @@ void CalcThreadMemory( int& mem_def, int& mem_max); -localVarType localVar[MAXNOOFTHREADS]; System sysdep; +Memory memory; Scheduler scheduler; int noOfThreads; @@ -163,26 +163,8 @@ void STDCALL SetMaxThreads( sysdep.RegisterParams(noOfThreads, kilobytesUsable >> 10, mem_def, mem_max); - for (int k = 0; k < noOfThreads; k++) - { - localVar[k].transTable.SetMemoryDefault(mem_def); - localVar[k].transTable.SetMemoryMaximum(mem_max); - } - - if (noOfThreads == oldNoOfThreads) - { - // Must already have TT allocated. - } - else if (noOfThreads > oldNoOfThreads) - { - for (int k = oldNoOfThreads; k < noOfThreads; k++) - localVar[k].transTable.MakeTT(); - } - else - { - for (int k = noOfThreads; k < oldNoOfThreads; k++) - localVar[k].transTable.ReturnAllMemory(); - } + memory.Resize(static_cast(noOfThreads)); + memory.SetThreadSize(mem_def, mem_max); if (! _initialized) { @@ -367,7 +349,7 @@ void InitDebugFiles() { for (int thrId = 0; thrId < noOfThreads; thrId++) { - localVarType * thrp = &localVar[thrId]; + ThreadData * thrp = memory.GetPtr(static_cast(thrId)); UNUSED(thrp); // To avoid compile errors const string send = to_string(thrId) + DDS_DEBUG_SUFFIX; @@ -433,7 +415,7 @@ void CloseDebugFiles() { for (int thrId = 0; thrId < noOfThreads; thrId++) { - localVarType * thrp = &localVar[thrId]; + ThreadData * thrp = memory.GetPtr(static_cast(thrId)); UNUSED(thrp); // To avoid compile errors #ifdef DDS_TOP_LEVEL if (thrp->fpTopLevel != stdout && thrp->fpTopLevel != nullptr) @@ -452,7 +434,7 @@ void CloseDebugFiles() void SetDeal( - localVarType * thrp) + ThreadData * thrp) { /* Initialization of the rel structure is inspired by a solution given by Thomas Andrews */ @@ -487,7 +469,7 @@ void SetDeal( void SetDealTables( - localVarType * thrp) + ThreadData * thrp) { unsigned int topBitRank = 1; unsigned int topBitNo = 2; @@ -567,7 +549,7 @@ void SetDealTables( void InitWinners( deal * dl, pos * posPoint, - localVarType * thrp) + ThreadData * thrp) { int hand, suit, rank; unsigned short int startMovesBitMap[DDS_HANDS][DDS_SUITS]; @@ -600,7 +582,7 @@ void InitWinners( void ResetBestMoves( - localVarType * thrp) + ThreadData * thrp) { for (int d = 0; d <= 49; d++) { @@ -625,28 +607,21 @@ void STDCALL GetDDSInfo(DDSInfo * info) void FreeThreadMem() { - for (int k = 0; k < noOfThreads; k++) - { - localVar[k].transTable.ResetMemory(FREE_THREAD_MEM); - localVar[k].memUsed = localVar[k].transTable.MemoryInUse() + - ThreadMemoryUsed(); - } + for (unsigned k = 0; k < static_cast(noOfThreads); k++) + memory.ResetThread(k); } void STDCALL FreeMemory() { - for (int k = 0; k < noOfThreads; k++) - { - localVar[k].transTable.ReturnAllMemory(); - localVar[k].memUsed = localVar[k].transTable.MemoryInUse() + - ThreadMemoryUsed(); - } + for (unsigned k = 0; k < static_cast(noOfThreads); k++) + memory.ReturnThread(k); } double ThreadMemoryUsed() { + // TODO: Only needed because SolverIF wants to set it. Avoid? double memUsed = 8192 * sizeof(relRanksType) / static_cast(1024.); diff --git a/src/Init.h b/src/Init.h index 2edbae48..128cddc4 100644 --- a/src/Init.h +++ b/src/Init.h @@ -12,18 +12,18 @@ void SetDeal( - struct localVarType * thrp); + struct ThreadData * thrp); void SetDealTables( - struct localVarType * thrp); + struct ThreadData * thrp); void InitWinners( deal * dl, struct pos * posPoint, - struct localVarType * thrp); + struct ThreadData * thrp); void ResetBestMoves( - struct localVarType * thrp); + struct ThreadData * thrp); double ThreadMemoryUsed(); diff --git a/src/LaterTricks.cpp b/src/LaterTricks.cpp index 21f7be07..a76ab0ea 100644 --- a/src/LaterTricks.cpp +++ b/src/LaterTricks.cpp @@ -9,8 +9,8 @@ #include "dds.h" -#include "threadmem.h" #include "LaterTricks.h" +#include "Memory.h" bool LaterTricksMIN( @@ -19,7 +19,7 @@ bool LaterTricksMIN( int depth, int target, int trump, - localVarType * thrp) + ThreadData * thrp) { if ((trump == DDS_NOTRUMP) || (posPoint->winner[trump].rank == 0)) { @@ -153,7 +153,7 @@ bool LaterTricksMAX( int depth, int target, int trump, - localVarType * thrp) + ThreadData * thrp) { if ((trump == DDS_NOTRUMP) || (posPoint->winner[trump].rank == 0)) { diff --git a/src/LaterTricks.h b/src/LaterTricks.h index 333ff0d9..ea2ebed9 100644 --- a/src/LaterTricks.h +++ b/src/LaterTricks.h @@ -10,6 +10,8 @@ #ifndef DDS_LATERTRICKS_H #define DDS_LATERTRICKS_H +#include "Memory.h" + bool LaterTricksMIN( struct pos * posPoint, @@ -17,7 +19,7 @@ bool LaterTricksMIN( int depth, int target, int trump, - struct localVarType * thrp); + ThreadData * thrp); bool LaterTricksMAX( struct pos * posPoint, @@ -25,6 +27,6 @@ bool LaterTricksMAX( int depth, int target, int trump, - struct localVarType * thrp); + ThreadData * thrp); #endif diff --git a/src/Memory.cpp b/src/Memory.cpp index 58a38395..0a2f2ba6 100644 --- a/src/Memory.cpp +++ b/src/Memory.cpp @@ -22,6 +22,7 @@ Memory::~Memory() } +#include void Memory::Reset() { nThreads = 0; @@ -31,14 +32,14 @@ void Memory::Reset() } -void Memory::ResetThread(const int thrId) +void Memory::ResetThread(const unsigned thrId) { memory[thrId]->transTable.ResetMemory(FREE_THREAD_MEM); memory[thrId]->memUsed = Memory::MemoryInUseMB(thrId); } -void Memory::ReturnThread(const int thrId) +void Memory::ReturnThread(const unsigned thrId) { memory[thrId]->transTable.ReturnAllMemory(); memory[thrId]->memUsed = Memory::MemoryInUseMB(thrId); @@ -52,7 +53,7 @@ void Memory::SetThreadSize( defThrMB = memDefault_MB; maxThrMB = memMaximum_MB; - for (int i = 0; i < nThreads; i++) + for (unsigned i = 0; i < nThreads; i++) { memory[i]->transTable.SetMemoryDefault(defThrMB); memory[i]->transTable.SetMemoryMaximum(maxThrMB); @@ -60,34 +61,41 @@ void Memory::SetThreadSize( } -void Memory::Resize(const int n) +void Memory::Resize(const unsigned n) { if (nThreads == n) return; if (nThreads > n) { - for (int i = n; i < nThreads; i++) + for (unsigned i = n; i < nThreads; i++) + { + memory[i]->transTable.ReturnAllMemory(); delete memory[i]; + } + memory.resize(static_cast(n)); } else { - for (int i = nThreads; i < n; i++) + memory.resize(n); + for (unsigned i = nThreads; i < n; i++) + { memory[i] = new ThreadData; + memory[i]->transTable.MakeTT(); + } } nThreads = n; - memory.resize(nThreads); } -ThreadData * Memory::GetPtr(const int thrId) +ThreadData * Memory::GetPtr(const unsigned thrId) { return memory[thrId]; } -double Memory::MemoryInUseMB(const int thrId) const +double Memory::MemoryInUseMB(const unsigned thrId) const { return memory[thrId]->transTable.MemoryInUse() + 8192. * sizeof(relRanksType) / static_cast(1024.); diff --git a/src/Memory.h b/src/Memory.h index 4e64fe60..7c78f3ab 100644 --- a/src/Memory.h +++ b/src/Memory.h @@ -13,9 +13,7 @@ #include #include "TransTable.h" -#include "Moves.h" #include "debug.h" -#include "../include/dll.h" #ifdef DDS_AB_STATS include "ABstats.h" @@ -101,7 +99,7 @@ class Memory int maxThrMB; vector memory; - int nThreads; + unsigned nThreads; public: @@ -111,19 +109,19 @@ class Memory void Reset(); - void ResetThread(const int thrId); + void ResetThread(const unsigned thrId); - void ReturnThread(const int thrId); + void ReturnThread(const unsigned thrId); void SetThreadSize( const int memDefault_MB, const int memMaximum_MB); - void Resize(const int n); + void Resize(const unsigned n); - ThreadData * GetPtr(const int thrId); + ThreadData * GetPtr(const unsigned thrId); - double MemoryInUseMB(const int thrId) const; + double MemoryInUseMB(const unsigned thrId) const; void ReturnAllMemory(); diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index b0bc1720..2749fe3a 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -9,7 +9,6 @@ #include "dds.h" -#include "threadmem.h" #include "SolverIF.h" #include "Scheduler.h" #include "System.h" @@ -26,6 +25,8 @@ FILE * fp; paramType playparam; playparamType traceparam; extern System sysdep; +extern Memory memory; +extern Scheduler scheduler; void PlayChunkCommon(const int thrId); @@ -39,7 +40,7 @@ int STDCALL AnalysePlayBin( if (! sysdep.ThreadOK(thrId)) return RETURN_THREAD_INDEX; - struct localVarType * thrp = &localVar[thrId]; + struct ThreadData * thrp = memory.GetPtr(static_cast(thrId)); moveType move; futureTricks fut; diff --git a/src/QuickTricks.cpp b/src/QuickTricks.cpp index 31c4da92..52ce6350 100644 --- a/src/QuickTricks.cpp +++ b/src/QuickTricks.cpp @@ -9,8 +9,8 @@ #include "dds.h" -#include "threadmem.h" #include "QuickTricks.h" +#include "Memory.h" int QtricksLeadHandNT( @@ -62,7 +62,7 @@ int QuickTricksPartnerHandTrump( int commSuit, int commRank, int * res, - localVarType * thrp); + ThreadData * thrp); int QuickTricksPartnerHandNT( int hand, @@ -78,7 +78,7 @@ int QuickTricksPartnerHandNT( int commSuit, int commRank, int * res, - localVarType * thrp); + ThreadData * thrp); int QuickTricks( @@ -88,7 +88,7 @@ int QuickTricks( int target, int trump, bool * result, - localVarType * thrp) + ThreadData * thrp) { int suit, commRank = 0, commSuit = -1; int res; @@ -868,7 +868,7 @@ int QuickTricksPartnerHandTrump( int commSuit, int commRank, int * res, - localVarType * thrp) + ThreadData * thrp) { /* res=0 Continue with same suit. res=1 Cutoff. @@ -1004,7 +1004,7 @@ int QuickTricksPartnerHandNT( int commSuit, int commRank, int * res, - localVarType * thrp) + ThreadData * thrp) { *res = 1; int qt = qtricks; @@ -1099,7 +1099,7 @@ bool QuickTricksSecondHand( int depth, int target, int trump, - localVarType * thrp) + ThreadData * thrp) { if (depth == thrp->iniDepth) return false; diff --git a/src/QuickTricks.h b/src/QuickTricks.h index bd78d328..4e44a771 100644 --- a/src/QuickTricks.h +++ b/src/QuickTricks.h @@ -10,6 +10,7 @@ #ifndef DDS_QUICKTRICKS_H #define DDS_QUICKTRICKS_H +#include "Memory.h" int QuickTricks( struct pos * posPoint, @@ -18,7 +19,7 @@ int QuickTricks( int target, int trump, bool * result, - struct localVarType * thrp); + ThreadData * thrp); bool QuickTricksSecondHand( struct pos * posPoint, @@ -26,6 +27,6 @@ bool QuickTricksSecondHand( int depth, int target, int trump, - struct localVarType * thrp); + ThreadData * thrp); #endif diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 94d93c05..3c8c730b 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -9,11 +9,11 @@ #include "dds.h" -#include "threadmem.h" #include "SolverIF.h" #include "SolveBoard.h" #include "Scheduler.h" #include "System.h" +#include "Memory.h" #include "PBN.h" #include "debug.h" @@ -21,6 +21,8 @@ long chunk; paramType param; extern System sysdep; +extern Memory memory; +extern Scheduler scheduler; void SolveChunkCommon( @@ -75,7 +77,7 @@ void SolveChunkCommon( void SolveChunkDDtableCommon( const int thrId) { - struct localVarType * thrp = &localVar[thrId]; + struct ThreadData * thrp = memory.GetPtr(static_cast(thrId)); futureTricks fut[MAXNOOFBOARDS]; int index; schedType st; diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index e06d3797..86add3dd 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -12,12 +12,13 @@ #include "dds.h" #include "Init.h" #include "Moves.h" -#include "threadmem.h" #include "ABsearch.h" #include "SolverIF.h" #include "System.h" +#include "Memory.h" extern System sysdep; +extern Memory memory; extern Scheduler scheduler; @@ -32,11 +33,11 @@ int BoardValueChecks( int target, int solutions, int mode, - localVarType * thrp); + ThreadData * thrp); void LastTrickWinner( deal * dl, - localVarType * thrp, + ThreadData * thrp, int handToPlay, int handRelFirst, int * leadRank, @@ -58,14 +59,14 @@ bool (* AB_ptr_list[DDS_HANDS])( pos * posPoint, int target, int depth, - localVarType * thrp) + ThreadData * thrp) = { ABsearch, ABsearch1, ABsearch2, ABsearch3 }; bool (* AB_ptr_trace_list[DDS_HANDS])( pos * posPoint, int target, int depth, - localVarType * thrp) + ThreadData * thrp) = { ABsearch0, ABsearch1, ABsearch2, ABsearch3 }; void (* Make_ptr_list[3])( @@ -86,13 +87,13 @@ int STDCALL SolveBoard( if (! sysdep.ThreadOK(thrId)) return RETURN_THREAD_INDEX; - return SolveBoardInternal(&localVar[thrId], dl, target, - solutions, mode, futp); + return SolveBoardInternal(memory.GetPtr(static_cast(thrId)), + dl, target, solutions, mode, futp); } int SolveBoardInternal( - struct localVarType * thrp, + struct ThreadData * thrp, deal& dl, int target, int solutions, @@ -649,7 +650,7 @@ int SolveBoardInternal( int SolveSameBoard( - struct localVarType * thrp, + struct ThreadData * thrp, deal dl, futureTricks * futp, int hint) @@ -754,7 +755,7 @@ int SolveSameBoard( int AnalyseLaterBoard( - localVarType * thrp, + ThreadData * thrp, int leadHand, moveType * move, int hint, @@ -1007,7 +1008,7 @@ int BoardValueChecks( int target, int solutions, int mode, - localVarType * thrp) + ThreadData * thrp) { int cardCount = thrp->iniDepth + 4; if (cardCount <= 0) @@ -1094,7 +1095,7 @@ int BoardValueChecks( void LastTrickWinner( deal * dl, - localVarType * thrp, + ThreadData * thrp, int handToPlay, int handRelFirst, int * leadRank, diff --git a/src/SolverIF.h b/src/SolverIF.h index 802d84f0..37654466 100644 --- a/src/SolverIF.h +++ b/src/SolverIF.h @@ -10,9 +10,11 @@ #ifndef DDS_SOLVERIF_H #define DDS_SOLVERIF_H +#include "Memory.h" + int SolveBoardInternal( - struct localVarType * thrp, + ThreadData * thrp, deal& dl, int target, int solutions, @@ -20,13 +22,13 @@ int SolveBoardInternal( futureTricks * futp); int SolveSameBoard( - struct localVarType * thrp, + ThreadData * thrp, deal dl, futureTricks * futp, int hint); int AnalyseLaterBoard( - struct localVarType * thrp, + ThreadData * thrp, int leadHand, moveType * move, int hint, diff --git a/src/TransTable.h b/src/TransTable.h index 0c5f8c9b..b446124a 100644 --- a/src/TransTable.h +++ b/src/TransTable.h @@ -20,8 +20,8 @@ #include #include #include -#include "dds.h" #include "../include/dll.h" +#include "dds.h" using namespace std; From d22c93ebe1eb96cf278dcd948e14802d3e94ef85 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 24 Mar 2018 16:13:12 +0100 Subject: [PATCH 044/132] Combined the run modes into a dds.h enum --- src/PBN.cpp | 16 ++++++++-------- src/PBN.h | 6 +++--- src/PlayAnalyser.cpp | 4 ++-- src/Scheduler.cpp | 12 ++++++------ src/Scheduler.h | 16 ++++------------ src/SolveBoard.cpp | 8 ++++---- src/System.cpp | 28 +++++++++++++--------------- src/System.h | 11 ++++------- src/dds.h | 8 ++++++++ 9 files changed, 52 insertions(+), 57 deletions(-) diff --git a/src/PBN.cpp b/src/PBN.cpp index d9ee5994..5c8d8f73 100644 --- a/src/PBN.cpp +++ b/src/PBN.cpp @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -18,13 +18,11 @@ int ConvertFromPBN( char * dealBuff, unsigned int remainCards[DDS_HANDS][DDS_SUITS]) { - int bp = 0, first, card, hand, handRelFirst, suitInHand, h, s; - int IsCard(char cardChar); - - for (h = 0; h < DDS_HANDS; h++) - for (s = 0; s < DDS_SUITS; s++) + for (int h = 0; h < DDS_HANDS; h++) + for (int s = 0; s < DDS_SUITS; s++) remainCards[h][s] = 0; + int bp = 0; while (((dealBuff[bp] != 'W') && (dealBuff[bp] != 'N') && (dealBuff[bp] != 'E') && (dealBuff[bp] != 'S') && (dealBuff[bp] != 'w') && (dealBuff[bp] != 'n') && @@ -34,6 +32,7 @@ int ConvertFromPBN( if (bp >= 3) return 0; + int first; if ((dealBuff[bp] == 'N') || (dealBuff[bp] == 'n')) first = 0; else if ((dealBuff[bp] == 'E') || (dealBuff[bp] == 'e')) @@ -46,8 +45,9 @@ int ConvertFromPBN( bp++; bp++; - handRelFirst = 0; - suitInHand = 0; + int handRelFirst = 0; + int suitInHand = 0; + int card, hand; while ((bp < 80) && (dealBuff[bp] != '\0')) { diff --git a/src/PBN.h b/src/PBN.h index 12bde699..85becdb5 100644 --- a/src/PBN.h +++ b/src/PBN.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -16,7 +16,7 @@ int ConvertFromPBN( unsigned int remainCards[DDS_HANDS][DDS_SUITS]); int ConvertPlayFromPBN( - struct playTracePBN * playPBN, - struct playTraceBin * playBin); + playTracePBN * playPBN, + playTraceBin * playBin); #endif diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 2749fe3a..fc6e0d51 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -299,8 +299,8 @@ int STDCALL AnalyseAllPlaysBin( traceparam.noOfBoards = bop->noOfBoards; traceparam.solvedp = solvedp; - scheduler.RegisterRun(SCHEDULER_TRACE, bop, plp); - sysdep.RegisterRun(DDS_SYSTEM_PLAY); + scheduler.RegisterRun(DDS_RUN_TRACE, bop, plp); + sysdep.RegisterRun(DDS_RUN_TRACE); START_BLOCK_TIMER; int retRun = sysdep.RunThreads(chunkSize); diff --git a/src/Scheduler.cpp b/src/Scheduler.cpp index eafe5a8b..652144ea 100644 --- a/src/Scheduler.cpp +++ b/src/Scheduler.cpp @@ -121,7 +121,7 @@ void Scheduler::RegisterThreads( void Scheduler::RegisterRun( - const enum SchedulerMode mode, + const enum RunMode mode, boards const * bop, playTracesBin const * plp) { @@ -133,7 +133,7 @@ void Scheduler::RegisterRun( void Scheduler::RegisterRun( - const enum SchedulerMode mode, + const enum RunMode mode, boards const * bop) { Scheduler::Reset(); @@ -155,15 +155,15 @@ void Scheduler::RegisterRun( } -void Scheduler::SortHands(const enum SchedulerMode mode) +void Scheduler::SortHands(const enum RunMode mode) { // Make predictions per group. - if (mode == SCHEDULER_SOLVE) + if (mode == DDS_RUN_SOLVE) Scheduler::SortSolve(); - else if (mode == SCHEDULER_CALC) + else if (mode == DDS_RUN_CALC) Scheduler::SortCalc(); - else if (mode == SCHEDULER_TRACE) + else if (mode == DDS_RUN_TRACE) Scheduler::SortTrace(); } diff --git a/src/Scheduler.h b/src/Scheduler.h index 8b909407..e0ae26ff 100644 --- a/src/Scheduler.h +++ b/src/Scheduler.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -18,14 +18,6 @@ using namespace std; -enum SchedulerMode -{ - SCHEDULER_NOSORT, - SCHEDULER_SOLVE, - SCHEDULER_CALC, - SCHEDULER_TRACE -}; - #define HASH_MAX 200 @@ -104,7 +96,7 @@ class Scheduler void InitHighCards(); - void SortHands(const enum SchedulerMode mode); + void SortHands(const enum RunMode mode); int Strength( deal const * dl); @@ -168,12 +160,12 @@ class Scheduler const int n); void RegisterRun( - const enum SchedulerMode mode, + const enum RunMode mode, boards const * bop, playTracesBin const * plp); void RegisterRun( - const enum SchedulerMode mode, + const enum RunMode mode, boards const * bop); schedType GetNumber( diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 3c8c730b..93b6f545 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -163,13 +163,13 @@ int SolveAllBoardsN( if (source == 0) { - scheduler.RegisterRun(SCHEDULER_SOLVE, bop); - sysdep.RegisterRun(DDS_SYSTEM_SOLVE); + scheduler.RegisterRun(DDS_RUN_SOLVE, bop); + sysdep.RegisterRun(DDS_RUN_SOLVE); } else { - scheduler.RegisterRun(SCHEDULER_CALC, bop); - sysdep.RegisterRun(DDS_SYSTEM_CALC); + scheduler.RegisterRun(DDS_RUN_CALC, bop); + sysdep.RegisterRun(DDS_RUN_CALC); } for (int k = 0; k < MAXNOOFBOARDS; k++) diff --git a/src/System.cpp b/src/System.cpp index d1b55d82..eb303f0e 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -99,7 +99,7 @@ System::~System() void System::Reset() { - runCat = DDS_SYSTEM_SOLVE; + runCat = DDS_RUN_SOLVE; numThreads = 1; preferredSystem = DDS_SYSTEM_THREAD_BASIC; @@ -155,16 +155,16 @@ void System::Reset() RunPtrList[DDS_SYSTEM_THREAD_BOOST] = &System::RunThreadsBoost; RunPtrList[DDS_SYSTEM_THREAD_STL] = &System::RunThreadsSTL; - // DDS_SYSTEM_CALC_ doesn't happen. - CallbackSimpleList.resize(DDS_SYSTEM_SIZE); - CallbackSimpleList[DDS_SYSTEM_SOLVE] = SolveChunkCommon; - CallbackSimpleList[DDS_SYSTEM_CALC] = SolveChunkCommon; - CallbackSimpleList[DDS_SYSTEM_PLAY] = PlayChunkCommon; + // DDS_RUN_CALC doesn't happen. + CallbackSimpleList.resize(DDS_RUN_SIZE); + CallbackSimpleList[DDS_RUN_SOLVE] = SolveChunkCommon; + CallbackSimpleList[DDS_RUN_CALC] = SolveChunkCommon; + CallbackSimpleList[DDS_RUN_TRACE] = PlayChunkCommon; - CallbackComplexList.resize(DDS_SYSTEM_SIZE); - CallbackComplexList[DDS_SYSTEM_SOLVE] = SolveChunkDDtableCommon; - CallbackComplexList[DDS_SYSTEM_CALC] = SolveChunkDDtableCommon; - CallbackComplexList[DDS_SYSTEM_PLAY] = PlayChunkCommon; + CallbackComplexList.resize(DDS_RUN_SIZE); + CallbackComplexList[DDS_RUN_SOLVE] = SolveChunkDDtableCommon; + CallbackComplexList[DDS_RUN_CALC] = SolveChunkDDtableCommon; + CallbackComplexList[DDS_RUN_TRACE] = PlayChunkCommon; } @@ -244,14 +244,12 @@ int System::RegisterParams( } -int System::RegisterRun(const unsigned code) +int System::RegisterRun(const RunMode mode) { - // TODO Use same code as in Scheduler, put in dds.h - - if (code >= DDS_SYSTEM_SIZE) + if (mode >= DDS_RUN_SIZE) return RETURN_THREAD_MISSING; // Not quite right; - runCat = code; + runCat = mode; return RETURN_NO_FAULT; } diff --git a/src/System.h b/src/System.h index c07596d7..527cab2b 100644 --- a/src/System.h +++ b/src/System.h @@ -17,12 +17,9 @@ #include #include -using namespace std; +#include "dds.h" -#define DDS_SYSTEM_SOLVE 0 -#define DDS_SYSTEM_CALC 1 -#define DDS_SYSTEM_PLAY 2 -#define DDS_SYSTEM_SIZE 3 +using namespace std; typedef void (*fptrType)(const int thid); @@ -31,7 +28,7 @@ class System { private: - unsigned runCat; // SOLVE / CALC / PLAY + RunMode runCat; // SOLVE / CALC / PLAY int numThreads; int sysMem_MB; @@ -81,7 +78,7 @@ class System const int mem_def_MB, const int mem_max_MB); - int RegisterRun(const unsigned code); + int RegisterRun(const RunMode r); bool ThreadOK(const int thrId) const; diff --git a/src/dds.h b/src/dds.h index e038b4c4..fe72054d 100644 --- a/src/dds.h +++ b/src/dds.h @@ -193,6 +193,14 @@ struct relRanksType // 120 bytes struct absRankType absRank[15][DDS_SUITS]; }; +enum RunMode +{ + DDS_RUN_SOLVE = 0, + DDS_RUN_CALC = 1, + DDS_RUN_TRACE = 2, + DDS_RUN_SIZE = 3 +}; + #include "Moves.h" #include "Scheduler.h" From 42d936aacf45af4dd46f694162bb1a3c08c4dab1 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 24 Mar 2018 16:30:54 +0100 Subject: [PATCH 045/132] More cleanup --- src/Init.cpp | 40 ++++++++++++++++++++-------------------- src/Init.h | 23 ++++++++++------------- src/PBN.cpp | 8 ++++---- src/PBN.h | 4 ++-- src/Par.cpp | 2 +- src/SolverIF.cpp | 2 +- 6 files changed, 38 insertions(+), 41 deletions(-) diff --git a/src/Init.cpp b/src/Init.cpp index 6120c3fd..7f386ffc 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -2,18 +2,22 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ -#include "dds.h" #include "Init.h" -#include "ABsearch.h" -#include "Scheduler.h" #include "System.h" -#include "Memory.h" +#include "Scheduler.h" + + +System sysdep; +Memory memory; +Scheduler scheduler; +int noOfThreads; + void InitConstants(); @@ -27,10 +31,6 @@ void CalcThreadMemory( int& mem_def, int& mem_max); -System sysdep; -Memory memory; -Scheduler scheduler; -int noOfThreads; int lho[DDS_HANDS] = { 1, 2, 3, 0 }; int rho[DDS_HANDS] = { 3, 0, 1, 2 }; @@ -547,9 +547,9 @@ void SetDealTables( void InitWinners( - deal * dl, - pos * posPoint, - ThreadData * thrp) + const deal& dl, + pos& posPoint, + ThreadData const * thrp) { int hand, suit, rank; unsigned short int startMovesBitMap[DDS_HANDS][DDS_SUITS]; @@ -558,11 +558,11 @@ void InitWinners( for (int s = 0; s < DDS_SUITS; s++) startMovesBitMap[h][s] = 0; - for (int k = 0; k < posPoint->handRelFirst; k++) + for (int k = 0; k < posPoint.handRelFirst; k++) { - hand = handId(dl->first, k); - suit = dl->currentTrickSuit[k]; - rank = dl->currentTrickRank[k]; + hand = handId(dl.first, k); + suit = dl.currentTrickSuit[k]; + rank = dl.currentTrickRank[k]; startMovesBitMap[hand][suit] |= bitMapRank[rank]; } @@ -573,10 +573,10 @@ void InitWinners( for (int h = 0; h < DDS_HANDS; h++) aggr |= startMovesBitMap[h][s] | thrp->suit[h][s]; - posPoint->winner[s].rank = thrp->rel[aggr].absRank[1][s].rank; - posPoint->winner[s].hand = thrp->rel[aggr].absRank[1][s].hand; - posPoint->secondBest[s].rank = thrp->rel[aggr].absRank[2][s].rank; - posPoint->secondBest[s].hand = thrp->rel[aggr].absRank[2][s].hand; + posPoint.winner[s].rank = thrp->rel[aggr].absRank[1][s].rank; + posPoint.winner[s].hand = thrp->rel[aggr].absRank[1][s].hand; + posPoint.secondBest[s].rank = thrp->rel[aggr].absRank[2][s].rank; + posPoint.secondBest[s].hand = thrp->rel[aggr].absRank[2][s].hand; } } diff --git a/src/Init.h b/src/Init.h index 128cddc4..ae661b21 100644 --- a/src/Init.h +++ b/src/Init.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -10,26 +10,23 @@ #ifndef DDS_INIT_H #define DDS_INIT_H +#include "dds.h" +#include "Memory.h" -void SetDeal( - struct ThreadData * thrp); -void SetDealTables( - struct ThreadData * thrp); +void SetDeal(ThreadData * thrp); + +void SetDealTables(ThreadData * thrp); void InitWinners( - deal * dl, - struct pos * posPoint, - struct ThreadData * thrp); + const deal& dl, + pos& posPoint, + ThreadData const * thrp); -void ResetBestMoves( - struct ThreadData * thrp); +void ResetBestMoves(ThreadData * thrp); double ThreadMemoryUsed(); void CloseDebugFiles(); -// Used by SH for stand-alone mode. -void DDSidentify(char * s); - #endif diff --git a/src/PBN.cpp b/src/PBN.cpp index 5c8d8f73..b2dc9b5b 100644 --- a/src/PBN.cpp +++ b/src/PBN.cpp @@ -11,11 +11,11 @@ #include "dds.h" #include "PBN.h" -int IsCard(char cardChar); +int IsCard(const char cardChar); int ConvertFromPBN( - char * dealBuff, + char const * dealBuff, unsigned int remainCards[DDS_HANDS][DDS_SUITS]) { for (int h = 0; h < DDS_HANDS; h++) @@ -99,7 +99,7 @@ int ConvertFromPBN( } -int IsCard(char cardChar) +int IsCard(const char cardChar) { switch (cardChar) { @@ -146,7 +146,7 @@ int IsCard(char cardChar) int ConvertPlayFromPBN( - playTracePBN * playPBN, + playTracePBN const * playPBN, playTraceBin * playBin) { int n = playPBN->number; diff --git a/src/PBN.h b/src/PBN.h index 85becdb5..c9bd1ff5 100644 --- a/src/PBN.h +++ b/src/PBN.h @@ -12,11 +12,11 @@ int ConvertFromPBN( - char * dealBuff, + char const * dealBuff, unsigned int remainCards[DDS_HANDS][DDS_SUITS]); int ConvertPlayFromPBN( - playTracePBN * playPBN, + playTracePBN const * playPBN, playTraceBin * playBin); #endif diff --git a/src/Par.cpp b/src/Par.cpp index 2b3d400e..43e0b5aa 100644 --- a/src/Par.cpp +++ b/src/Par.cpp @@ -11,6 +11,7 @@ #include #include "dds.h" +#include "PBN.h" struct par_suits_type { @@ -49,7 +50,6 @@ int STDCALL CalcParPBN( { int res; ddTableDeal tableDeal; - int ConvertFromPBN(char * dealBuff, unsigned int remainCards[4][4]); int STDCALL CalcPar(ddTableDeal tableDeal, int vulnerable, ddTableResults * tablep, parResults * presp); diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 86add3dd..53bf7c06 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -286,7 +286,7 @@ int SolveBoardInternal( thrp->moves.MakeSpecific(&mv, trick, k); } - InitWinners(&dl, &thrp->lookAheadPos, thrp); + InitWinners(dl, thrp->lookAheadPos, thrp); #ifdef DDS_AB_STATS thrp->ABStats.Reset(); From 002385f793e6a22730721e21e999782b0199642f Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 24 Mar 2018 16:36:54 +0100 Subject: [PATCH 046/132] More cleanup --- src/LaterTricks.cpp | 25 +++++++++++-------------- src/LaterTricks.h | 27 ++++++++++++++------------- src/Makefiles/depends_o.txt | 14 +++++++------- src/Makefiles/depends_obj.txt | 14 +++++++------- 4 files changed, 39 insertions(+), 41 deletions(-) diff --git a/src/LaterTricks.cpp b/src/LaterTricks.cpp index a76ab0ea..12bb8824 100644 --- a/src/LaterTricks.cpp +++ b/src/LaterTricks.cpp @@ -2,24 +2,21 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ - -#include "dds.h" #include "LaterTricks.h" -#include "Memory.h" bool LaterTricksMIN( pos * posPoint, - int hand, - int depth, - int target, - int trump, - ThreadData * thrp) + const int hand, + const int depth, + const int target, + const int trump, + ThreadData const * thrp) { if ((trump == DDS_NOTRUMP) || (posPoint->winner[trump].rank == 0)) { @@ -149,11 +146,11 @@ bool LaterTricksMIN( bool LaterTricksMAX( pos * posPoint, - int hand, - int depth, - int target, - int trump, - ThreadData * thrp) + const int hand, + const int depth, + const int target, + const int trump, + ThreadData const * thrp) { if ((trump == DDS_NOTRUMP) || (posPoint->winner[trump].rank == 0)) { diff --git a/src/LaterTricks.h b/src/LaterTricks.h index ea2ebed9..fea1fa57 100644 --- a/src/LaterTricks.h +++ b/src/LaterTricks.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -10,23 +10,24 @@ #ifndef DDS_LATERTRICKS_H #define DDS_LATERTRICKS_H +#include "dds.h" #include "Memory.h" bool LaterTricksMIN( - struct pos * posPoint, - int hand, - int depth, - int target, - int trump, - ThreadData * thrp); + pos * posPoint, + const int hand, + const int depth, + const int target, + const int trump, + ThreadData const * thrp); bool LaterTricksMAX( - struct pos * posPoint, - int hand, - int depth, - int target, - int trump, - ThreadData * thrp); + pos * posPoint, + const int hand, + const int depth, + const int target, + const int trump, + ThreadData const * thrp); #endif diff --git a/src/Makefiles/depends_o.txt b/src/Makefiles/depends_o.txt index 9d17a41f..8f52e7cf 100644 --- a/src/Makefiles/depends_o.txt +++ b/src/Makefiles/depends_o.txt @@ -3,7 +3,7 @@ dds.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h dds.o: TimeStatList.h TimeStat.h Init.h ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h ABsearch.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -ABsearch.o: TimeStatList.h TimeStat.h threadmem.h QuickTricks.h LaterTricks.h +ABsearch.o: TimeStatList.h TimeStat.h QuickTricks.h LaterTricks.h ABsearch.o: ABsearch.h ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h ABstats.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h @@ -16,10 +16,10 @@ DealerPar.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h DealerPar.o: TimeStatList.h TimeStat.h Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Init.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -Init.o: TimeStatList.h TimeStat.h threadmem.h Init.h ABsearch.h System.h +Init.o: TimeStatList.h TimeStat.h Init.h ABsearch.h System.h LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h LaterTricks.o: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -LaterTricks.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +LaterTricks.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h LaterTricks.o: LaterTricks.h Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Moves.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h @@ -29,25 +29,25 @@ Par.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h Par.o: TimeStatList.h TimeStat.h PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h PlayAnalyser.o: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -PlayAnalyser.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +PlayAnalyser.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h PlayAnalyser.o: SolverIF.h System.h PBN.h PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h PBN.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h PBN.o: TimeStatList.h TimeStat.h PBN.h QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h QuickTricks.o: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -QuickTricks.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +QuickTricks.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h QuickTricks.o: QuickTricks.h Scheduler.o: Scheduler.h TimeStatList.h TimeStat.h dds.h debug.h Scheduler.o: ../include/portab.h TransTable.h ../include/dll.h TimerList.h Scheduler.o: TimerGroup.h Timer.h ABstats.h Moves.h SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h SolveBoard.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -SolveBoard.o: TimeStatList.h TimeStat.h threadmem.h SolverIF.h SolveBoard.h +SolveBoard.o: TimeStatList.h TimeStat.h SolverIF.h SolveBoard.h SolveBoard.o: System.h PBN.h SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h SolverIF.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -SolverIF.o: TimeStatList.h TimeStat.h Init.h threadmem.h ABsearch.h +SolverIF.o: TimeStatList.h TimeStat.h Init.h ABsearch.h SolverIF.o: SolverIF.h System.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h System.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h diff --git a/src/Makefiles/depends_obj.txt b/src/Makefiles/depends_obj.txt index ca16e40a..3e36a58f 100644 --- a/src/Makefiles/depends_obj.txt +++ b/src/Makefiles/depends_obj.txt @@ -3,7 +3,7 @@ dds.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h dds.obj: TimeStatList.h TimeStat.h Init.h ABsearch.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h ABsearch.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -ABsearch.obj: TimeStatList.h TimeStat.h threadmem.h QuickTricks.h +ABsearch.obj: TimeStatList.h TimeStat.h QuickTricks.h ABsearch.obj: LaterTricks.h ABsearch.h ABstats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h ABstats.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h @@ -17,10 +17,10 @@ DealerPar.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h DealerPar.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h Init.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Init.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -Init.obj: TimeStatList.h TimeStat.h threadmem.h Init.h ABsearch.h System.h +Init.obj: TimeStatList.h TimeStat.h Init.h ABsearch.h System.h LaterTricks.obj: dds.h debug.h ../include/portab.h TransTable.h LaterTricks.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -LaterTricks.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +LaterTricks.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h LaterTricks.obj: LaterTricks.h Moves.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h Moves.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h @@ -30,25 +30,25 @@ Par.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h Par.obj: TimeStatList.h TimeStat.h PlayAnalyser.obj: dds.h debug.h ../include/portab.h TransTable.h PlayAnalyser.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -PlayAnalyser.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +PlayAnalyser.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h PlayAnalyser.obj: SolverIF.h System.h PBN.h PBN.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h PBN.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h PBN.obj: TimeStatList.h TimeStat.h PBN.h QuickTricks.obj: dds.h debug.h ../include/portab.h TransTable.h QuickTricks.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -QuickTricks.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +QuickTricks.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h QuickTricks.obj: QuickTricks.h Scheduler.obj: Scheduler.h TimeStatList.h TimeStat.h dds.h debug.h Scheduler.obj: ../include/portab.h TransTable.h ../include/dll.h TimerList.h Scheduler.obj: TimerGroup.h Timer.h ABstats.h Moves.h SolveBoard.obj: dds.h debug.h ../include/portab.h TransTable.h SolveBoard.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -SolveBoard.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h threadmem.h +SolveBoard.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h SolveBoard.obj: SolverIF.h SolveBoard.h System.h PBN.h SolverIF.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h SolverIF.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -SolverIF.obj: TimeStatList.h TimeStat.h Init.h threadmem.h ABsearch.h +SolverIF.obj: TimeStatList.h TimeStat.h Init.h ABsearch.h SolverIF.obj: SolverIF.h System.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h System.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h From c6675482609171b44aa859371cab7a2c683d5825 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 24 Mar 2018 16:37:15 +0100 Subject: [PATCH 047/132] Bye-bye threadmem.h --- src/threadmem.h | 81 ------------------------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 src/threadmem.h diff --git a/src/threadmem.h b/src/threadmem.h deleted file mode 100644 index 9ea9996f..00000000 --- a/src/threadmem.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - -#ifndef DDS_THREADMEM_H -#define DDS_THREADMEM_H - -struct WinnerEntryType -{ - int suit; - int winnerRank; - int winnerHand; - int secondRank; - int secondHand; -}; - -struct WinnersType -{ - int number; - WinnerEntryType winner[4]; -}; - - -struct localVarType -{ - int nodeTypeStore[DDS_HANDS]; - int iniDepth; - bool val; - - unsigned short int suit[DDS_HANDS][DDS_SUITS]; - int trump; - - struct pos lookAheadPos; // Recursive alpha-beta data - bool analysisFlag; - unsigned short int lowestWin[50][DDS_SUITS]; - WinnersType winners[13]; - struct moveType forbiddenMoves[14]; - struct moveType bestMove[50]; - struct moveType bestMoveTT[50]; - - double memUsed; - int nodes; - int trickNodes; - - // Constant for a given hand. - // 960 KB - struct relRanksType rel[8192]; - - TransTable transTable; // Object - - Moves moves; // Object - -#ifdef DDS_AB_STATS - ABstats ABStats; // Object -#endif - -#ifdef DDS_TIMING - TimerList timerList; // Object -#endif - -#ifdef DDS_TOP_LEVEL - FILE * fpTopLevel; -#endif - -#ifdef DDS_AB_HITS - FILE * fpRetrieved; - FILE * fpStored; -#endif - -}; - -extern Scheduler scheduler; - -extern struct localVarType localVar[MAXNOOFTHREADS]; - -#endif From 724e691d3927878c3908b55b9cd454da88f1b1e8 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 11:07:00 +0200 Subject: [PATCH 048/132] Added TBB (in principle, doesn't work on my systems) --- include/dll.h | 1 + src/PlayAnalyser.cpp | 8 +++---- src/PlayAnalyser.h | 5 +--- src/QuickTricks.h | 3 ++- src/SolveBoard.cpp | 37 +++++++++++++---------------- src/SolveBoard.h | 15 ++++++------ src/System.cpp | 56 +++++++++++++++++++++++++++++++++++++++++++- src/System.h | 1 + src/TimeStat.cpp | 2 -- src/Timer.cpp | 1 - src/TimerGroup.cpp | 1 - src/dds.cpp | 3 +-- src/dds.h | 8 +++---- test/testcommon.cpp | 4 +++- 14 files changed, 95 insertions(+), 50 deletions(-) diff --git a/include/dll.h b/include/dll.h index 22214093..a4cbb8bd 100644 --- a/include/dll.h +++ b/include/dll.h @@ -364,6 +364,7 @@ struct DDSInfo // 3 = GCD, // 4 = Boost, // 5 = STL + // 6 = TBB int threading; // The actual number of threads configured diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index fc6e0d51..9b0d3d45 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -10,8 +10,9 @@ #include "dds.h" #include "SolverIF.h" -#include "Scheduler.h" #include "System.h" +#include "Memory.h" +#include "Scheduler.h" #include "PBN.h" #include "debug.h" @@ -24,12 +25,11 @@ FILE * fp; paramType playparam; playparamType traceparam; + extern System sysdep; extern Memory memory; extern Scheduler scheduler; -void PlayChunkCommon(const int thrId); - int STDCALL AnalysePlayBin( deal dl, diff --git a/src/PlayAnalyser.h b/src/PlayAnalyser.h index 063af50c..501b52d6 100644 --- a/src/PlayAnalyser.h +++ b/src/PlayAnalyser.h @@ -11,10 +11,7 @@ #define DDS_PLAYANALYSER_H -#include "Scheduler.h" - - void PlayChunkCommon( - const int thid); + const int thrId); #endif diff --git a/src/QuickTricks.h b/src/QuickTricks.h index 4e44a771..4668cf44 100644 --- a/src/QuickTricks.h +++ b/src/QuickTricks.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -12,6 +12,7 @@ #include "Memory.h" + int QuickTricks( struct pos * posPoint, int hand, diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 93b6f545..a82cc96d 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -2,18 +2,17 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ -#include "dds.h" #include "SolverIF.h" #include "SolveBoard.h" -#include "Scheduler.h" #include "System.h" #include "Memory.h" +#include "Scheduler.h" #include "PBN.h" #include "debug.h" @@ -77,7 +76,7 @@ void SolveChunkCommon( void SolveChunkDDtableCommon( const int thrId) { - struct ThreadData * thrp = memory.GetPtr(static_cast(thrId)); + ThreadData * thrp = memory.GetPtr(static_cast(thrId)); futureTricks fut[MAXNOOFBOARDS]; int index; schedType st; @@ -148,8 +147,8 @@ void SolveChunkDDtableCommon( int SolveAllBoardsN( boards * bop, solvedBoards * solvedp, - int chunkSize, - int source) // 0 solve, 1 calc + const int chunkSize, + const int source) // 0 solve, 1 calc { chunk = chunkSize; param.error = 0; @@ -202,16 +201,13 @@ int STDCALL SolveBoardPBN( int solutions, int mode, futureTricks * futp, - int thrIndex) + int thrId) { - - int res, k; deal dl; - if (ConvertFromPBN(dlpbn.remainCards, dl.remainCards) != RETURN_NO_FAULT) return RETURN_PBN_FAULT; - for (k = 0; k <= 2; k++) + for (int k = 0; k <= 2; k++) { dl.currentTrickRank[k] = dlpbn.currentTrickRank[k]; dl.currentTrickSuit[k] = dlpbn.currentTrickSuit[k]; @@ -219,8 +215,7 @@ int STDCALL SolveBoardPBN( dl.first = dlpbn.first; dl.trump = dlpbn.trump; - res = SolveBoard(dl, target, solutions, mode, futp, thrIndex); - + int res = SolveBoard(dl, target, solutions, mode, futp, thrId); return res; } @@ -230,33 +225,34 @@ int STDCALL SolveAllBoards( solvedBoards * solvedp) { boards bo; - int k, i, res; - bo.noOfBoards = bop->noOfBoards; if (bo.noOfBoards > MAXNOOFBOARDS) return RETURN_TOO_MANY_BOARDS; - for (k = 0; k < bop->noOfBoards; k++) + for (int k = 0; k < bop->noOfBoards; k++) { bo.mode[k] = bop->mode[k]; bo.solutions[k] = bop->solutions[k]; bo.target[k] = bop->target[k]; bo.deals[k].first = bop->deals[k].first; bo.deals[k].trump = bop->deals[k].trump; - for (i = 0; i <= 2; i++) + + for (int i = 0; i <= 2; i++) { bo.deals[k].currentTrickSuit[i] = bop->deals[k].currentTrickSuit[i]; bo.deals[k].currentTrickRank[i] = bop->deals[k].currentTrickRank[i]; } - if (ConvertFromPBN(bop->deals[k].remainCards, bo.deals[k].remainCards) != 1) + + if (ConvertFromPBN(bop->deals[k].remainCards, bo.deals[k].remainCards) + != 1) return RETURN_PBN_FAULT; } - res = SolveAllBoardsN(&bo, solvedp, 1, 0); - + int res = SolveAllBoardsN(&bo, solvedp, 1, 0); return res; } + int STDCALL SolveAllChunksPBN( boardsPBN * bop, solvedBoards * solvedp, @@ -295,4 +291,3 @@ int STDCALL SolveAllChunksBin( return SolveAllBoardsN(bop, solvedp, 1, 0); } - diff --git a/src/SolveBoard.h b/src/SolveBoard.h index cf7becd4..b1837260 100644 --- a/src/SolveBoard.h +++ b/src/SolveBoard.h @@ -10,20 +10,19 @@ #ifndef DDS_SOLVEBOARD_H #define DDS_SOLVEBOARD_H - -#include "Scheduler.h" +#include "dds.h" void SolveChunkCommon( - const int thid); + const int thrId); void SolveChunkDDtableCommon( - const int thid); + const int thrId); int SolveAllBoardsN( - struct boards * bop, - struct solvedBoards * solvedp, - int chunkSize, - int source); // 0 source, 1 calc + boards * bop, + solvedBoards * solvedp, + const int chunkSize, + const int source); // 0 source, 1 calc #endif diff --git a/src/System.cpp b/src/System.cpp index eb303f0e..364271d4 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -35,6 +35,27 @@ #include #endif +#ifdef DDS_THREADS_TBB + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable: 4574) + #endif + + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wold-style-cast" + #pragma GCC diagnostic ignored "-Wsign-conversion" + #pragma GCC diagnostic ignored "-Wctor-dtor-privacy" + + #include "tbb/tbb.h" + #include "tbb/tbb_thread.h" + + #pragma GCC diagnostic pop + + #ifdef _MSC_VER + #pragma warning(pop) + #endif +#endif + #include "../include/dll.h" #include "dds.h" @@ -83,7 +104,8 @@ const vector DDS_SYSTEM_THREADING = #define DDS_SYSTEM_THREAD_GCD 3 #define DDS_SYSTEM_THREAD_BOOST 4 #define DDS_SYSTEM_THREAD_STL 5 -#define DDS_SYSTEM_THREAD_SIZE 6 +#define DDS_SYSTEM_THREAD_TBB 6 +#define DDS_SYSTEM_THREAD_SIZE 7 System::System() @@ -137,6 +159,12 @@ void System::Reset() availableSystem[DDS_SYSTEM_THREAD_STL] = false; #endif +#ifdef DDS_THREADS_TBB + availableSystem[DDS_SYSTEM_THREAD_TBB] = true; +#else + availableSystem[DDS_SYSTEM_THREAD_TBB] = false; +#endif + // Take the first of any multi-threading system defined. for (unsigned k = 1; k < availableSystem.size(); k++) { @@ -154,6 +182,7 @@ void System::Reset() RunPtrList[DDS_SYSTEM_THREAD_GCD] = &System::RunThreadsGCD; RunPtrList[DDS_SYSTEM_THREAD_BOOST] = &System::RunThreadsBoost; RunPtrList[DDS_SYSTEM_THREAD_STL] = &System::RunThreadsSTL; + RunPtrList[DDS_SYSTEM_THREAD_TBB] = &System::RunThreadsTBB; // DDS_RUN_CALC doesn't happen. CallbackSimpleList.resize(DDS_RUN_SIZE); @@ -452,6 +481,31 @@ int System::RunThreadsSTL() } +////////////////////////////////////////////////////////////////////// +// TBB // +////////////////////////////////////////////////////////////////////// + +int System::RunThreadsTBB() +{ +#ifdef DDS_THREADS_TBB + vector threads; + threads.resize(static_cast(numThreads)); + + const unsigned nu = static_cast(numThreads); + for (unsigned k = 0; k < nu; k++) + threads[k] = new tbb::tbb_thread(fptr, k); + + for (unsigned k = 0; k < nu; k++) + { + threads[k]->join(); + delete threads[k]; + } +#endif + + return RETURN_NO_FAULT; +} + + int System::RunThreads(const int chunkSize) { fptr = (chunkSize == 1 ? diff --git a/src/System.h b/src/System.h index 527cab2b..1934dc2c 100644 --- a/src/System.h +++ b/src/System.h @@ -53,6 +53,7 @@ class System int RunThreadsGCD(); int RunThreadsWinAPI(); int RunThreadsSTL(); + int RunThreadsTBB(); string GetVersion( int& major, diff --git a/src/TimeStat.cpp b/src/TimeStat.cpp index 38caee28..ff15b08e 100644 --- a/src/TimeStat.cpp +++ b/src/TimeStat.cpp @@ -11,10 +11,8 @@ #include #include #include - #include -#include "../include/portab.h" #include "TimeStat.h" diff --git a/src/Timer.cpp b/src/Timer.cpp index b7f3170d..a34053e7 100644 --- a/src/Timer.cpp +++ b/src/Timer.cpp @@ -13,7 +13,6 @@ #include #include "Timer.h" -#include "../include/portab.h" using std::chrono::duration_cast; using std::chrono::microseconds; diff --git a/src/TimerGroup.cpp b/src/TimerGroup.cpp index 0d8a3326..8705ac7d 100644 --- a/src/TimerGroup.cpp +++ b/src/TimerGroup.cpp @@ -14,7 +14,6 @@ #include #include "TimerGroup.h" -#include "dds.h" TimerGroup::TimerGroup() diff --git a/src/dds.cpp b/src/dds.cpp index d9472e80..fad30225 100644 --- a/src/dds.cpp +++ b/src/dds.cpp @@ -2,14 +2,13 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ #include "../include/dll.h" -#include "dds.h" #include "Init.h" #ifdef _MANAGED diff --git a/src/dds.h b/src/dds.h index fe72054d..1344d8d1 100644 --- a/src/dds.h +++ b/src/dds.h @@ -87,8 +87,8 @@ extern unsigned short int winRanks[8192][14]; struct playparamType { int noOfBoards; - struct playTracesBin * plp; - struct solvedPlays * solvedp; + playTracesBin * plp; + solvedPlays * solvedp; int error; }; @@ -177,8 +177,8 @@ struct extCard struct paramType { int noOfBoards; - struct boards * bop; - struct solvedBoards * solvedp; + boards * bop; + solvedBoards * solvedp; int error; }; diff --git a/test/testcommon.cpp b/test/testcommon.cpp index f57b8ec4..ee12ea22 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -263,8 +263,10 @@ int threadingCode(char * arg) return 4; else if (str == "stl") return 5; - else + else if (str == "tbb") return 6; + else + return 7; } From 64e1418b017aa95dbf87ec3b0e80c5ac89429c16 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 11:45:15 +0200 Subject: [PATCH 049/132] Cleanup, mostly of include files --- src/ABsearch.cpp | 3 +++ src/DealerPar.cpp | 1 + src/Memory.h | 1 + src/Moves.cpp | 2 -- src/Moves.h | 4 ++++ src/Scheduler.h | 1 + src/SolveBoard.cpp | 8 ++++++-- src/SolverIF.cpp | 2 ++ src/System.cpp | 36 +++++++++++++++++------------------- src/TimeStatList.cpp | 1 - src/dds.h | 18 ++---------------- 11 files changed, 37 insertions(+), 40 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index ad8dfcf2..f847f9a7 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -9,6 +9,7 @@ #include #include +#include #include "dds.h" @@ -17,6 +18,8 @@ #include "QuickTricks.h" #include "LaterTricks.h" #include "ABsearch.h" +#include "ABstats.h" +#include "TimerList.h" #include "Memory.h" #define DDS_POS_LINES 5 diff --git a/src/DealerPar.cpp b/src/DealerPar.cpp index 0baab5db..4e7cdf80 100644 --- a/src/DealerPar.cpp +++ b/src/DealerPar.cpp @@ -8,6 +8,7 @@ */ +#include #include "dds.h" diff --git a/src/Memory.h b/src/Memory.h index 7c78f3ab..76451337 100644 --- a/src/Memory.h +++ b/src/Memory.h @@ -13,6 +13,7 @@ #include #include "TransTable.h" +#include "Moves.h" #include "debug.h" #ifdef DDS_AB_STATS diff --git a/src/Moves.cpp b/src/Moves.cpp index 807eeac9..00b890be 100644 --- a/src/Moves.cpp +++ b/src/Moves.cpp @@ -8,8 +8,6 @@ */ -#include - #include "dds.h" #include "Moves.h" #include "ABsearch.h" diff --git a/src/Moves.h b/src/Moves.h index debe0b0a..e14db9a5 100644 --- a/src/Moves.h +++ b/src/Moves.h @@ -10,12 +10,16 @@ #ifndef DDS_MOVES_H #define DDS_MOVES_H +#include #include #include #include #include "dds.h" #include "../include/dll.h" +using namespace std; + + #define CMP_SWAP(i, j) if (a[i].weight < a[j].weight) \ { moveType tmp = a[i]; a[i] = a[j]; a[j] = tmp; } diff --git a/src/Scheduler.h b/src/Scheduler.h index e0ae26ff..3f96ed23 100644 --- a/src/Scheduler.h +++ b/src/Scheduler.h @@ -13,6 +13,7 @@ #include #include "TimeStatList.h" +#include "Timer.h" #include "dds.h" using namespace std; diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index a82cc96d..c6f44909 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -27,7 +27,8 @@ extern Scheduler scheduler; void SolveChunkCommon( const int thrId) { - futureTricks fut[MAXNOOFBOARDS]; + vector fut; + fut.resize(param.noOfBoards); int index; schedType st; @@ -77,7 +78,10 @@ void SolveChunkDDtableCommon( const int thrId) { ThreadData * thrp = memory.GetPtr(static_cast(thrId)); - futureTricks fut[MAXNOOFBOARDS]; + + vector fut; + fut.resize(param.noOfBoards); + int index; schedType st; diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 53bf7c06..468ad273 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -14,8 +14,10 @@ #include "Moves.h" #include "ABsearch.h" #include "SolverIF.h" +#include "TimerList.h" #include "System.h" #include "Memory.h" +#include "Scheduler.h" extern System sysdep; extern Memory memory; diff --git a/src/System.cpp b/src/System.cpp index 364271d4..978df4d1 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -11,6 +11,7 @@ #include #include #include +#include // Boost: Disable some header warnings. @@ -95,7 +96,8 @@ const vector DDS_SYSTEM_THREADING = "OpenMP", "GCD", "Boost", - "STL" + "STL", + "TBB" }; #define DDS_SYSTEM_THREAD_BASIC 0 @@ -126,43 +128,32 @@ void System::Reset() preferredSystem = DDS_SYSTEM_THREAD_BASIC; availableSystem.resize(DDS_SYSTEM_THREAD_SIZE); - availableSystem[DDS_SYSTEM_THREAD_BASIC] = true; + for (unsigned i = 1; i < DDS_SYSTEM_THREAD_SIZE; i++) + availableSystem[i] = false; #ifdef DDS_THREADS_WINAPI availableSystem[DDS_SYSTEM_THREAD_WINAPI] = true; -#else - availableSystem[DDS_SYSTEM_THREAD_WINAPI] = false; #endif #ifdef DDS_THREADS_OPENMP availableSystem[DDS_SYSTEM_THREAD_OPENMP] = true; -#else - availableSystem[DDS_SYSTEM_THREAD_OPENMP] = false; #endif #ifdef DDS_THREADS_GCD availableSystem[DDS_SYSTEM_THREAD_GCD] = true; -#else - availableSystem[DDS_SYSTEM_THREAD_GCD] = false; #endif #ifdef DDS_THREADS_BOOST availableSystem[DDS_SYSTEM_THREAD_BOOST] = true; -#else - availableSystem[DDS_SYSTEM_THREAD_BOOST] = false; #endif #ifdef DDS_THREADS_STL availableSystem[DDS_SYSTEM_THREAD_STL] = true; -#else - availableSystem[DDS_SYSTEM_THREAD_STL] = false; #endif #ifdef DDS_THREADS_TBB availableSystem[DDS_SYSTEM_THREAD_TBB] = true; -#else - availableSystem[DDS_SYSTEM_THREAD_TBB] = false; #endif // Take the first of any multi-threading system defined. @@ -262,7 +253,8 @@ int System::RegisterParams( const int mem_def_MB, const int mem_max_MB) { - if (nThreads < 1 || nThreads >= MAXNOOFTHREADS) + // No upper limit -- caveat emptor. + if (nThreads < 1) return RETURN_THREAD_INDEX; numThreads = nThreads; @@ -343,7 +335,8 @@ DWORD CALLBACK WinCallback(void * p) int System::RunThreadsWinAPI() { #ifdef DDS_THREADS_WINAPI - HANDLE solveAllEvents[MAXNOOFTHREADS]; + HANDLE * solveAllEvents = static_cast( + malloc(numThreads * sizeof(HANDLE))); for (int k = 0; k < numThreads; k++) { @@ -377,6 +370,8 @@ int System::RunThreadsWinAPI() for (int k = 0; k < numThreads; k++) CloseHandle(solveAllEvents[k]); + + free(solveAllEvents); #endif return RETURN_NO_FAULT; @@ -439,9 +434,10 @@ int System::RunThreadsBoost() { #ifdef DDS_THREADS_BOOST vector threads; - threads.resize(static_cast(numThreads)); const unsigned nu = static_cast(numThreads); + threads.resize(nu); + for (unsigned k = 0; k < nu; k++) threads[k] = new boost::thread(fptr, k); @@ -464,9 +460,10 @@ int System::RunThreadsSTL() { #ifdef DDS_THREADS_STL vector threads; - threads.resize(static_cast(numThreads)); const unsigned nu = static_cast(numThreads); + threads.resize(nu); + for (unsigned k = 0; k < nu; k++) threads[k] = new thread(fptr, k); @@ -489,9 +486,10 @@ int System::RunThreadsTBB() { #ifdef DDS_THREADS_TBB vector threads; - threads.resize(static_cast(numThreads)); const unsigned nu = static_cast(numThreads); + threads.resize(nu); + for (unsigned k = 0; k < nu; k++) threads[k] = new tbb::tbb_thread(fptr, k); diff --git a/src/TimeStatList.cpp b/src/TimeStatList.cpp index 5c832493..6a60c5f4 100644 --- a/src/TimeStatList.cpp +++ b/src/TimeStatList.cpp @@ -13,7 +13,6 @@ #include #include "TimeStatList.h" -#include "../include/portab.h" TimeStatList::TimeStatList() diff --git a/src/dds.h b/src/dds.h index 1344d8d1..1922cc47 100644 --- a/src/dds.h +++ b/src/dds.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -10,20 +10,9 @@ #ifndef DDS_DDS_H #define DDS_DDS_H -#include -#include -#include -#include -#include -#include - - -#include "debug.h" #include "../include/portab.h" +#include "../include/dll.h" -#include "TransTable.h" -#include "TimerList.h" -#include "ABstats.h" #if defined(DDS_MEMORY_LEAKS) && defined(_MSC_VER) #define DDS_MEMORY_LEAKS_WIN32 @@ -201,7 +190,4 @@ enum RunMode DDS_RUN_SIZE = 3 }; -#include "Moves.h" -#include "Scheduler.h" - #endif From 1b0df9bf914cc4da99f0448048aba0763cefb6f1 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 11:58:29 +0200 Subject: [PATCH 050/132] MAXNOOFTHREADS is now gone, thread number is dynamic --- src/Init.cpp | 1 + src/Scheduler.cpp | 23 +++++++++++++++++------ src/Scheduler.h | 8 ++++---- src/dds.h | 5 ----- 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/Init.cpp b/src/Init.cpp index 7f386ffc..42dfd5e8 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -162,6 +162,7 @@ void STDCALL SetMaxThreads( sysdep.RegisterParams(noOfThreads, kilobytesUsable >> 10, mem_def, mem_max); + scheduler.RegisterThreads(noOfThreads); memory.Resize(static_cast(noOfThreads)); memory.SetThreadSize(mem_def, mem_max); diff --git a/src/Scheduler.cpp b/src/Scheduler.cpp index 652144ea..2954e302 100644 --- a/src/Scheduler.cpp +++ b/src/Scheduler.cpp @@ -17,22 +17,22 @@ Scheduler::Scheduler() { + numThreads = 1; numHands = 0; Scheduler::InitHighCards(); #ifdef DDS_SCHEDULER Scheduler::InitTimes(); - for (int i = 0; i < 10000; i++) { timeHist[i] = 0; timeHistNT[i] = 0; timeHistSuit[i] = 0; } - - timersThread.resize(MAXNOOFTHREADS); #endif + + Scheduler::RegisterThreads(numThreads); } @@ -72,7 +72,7 @@ void Scheduler::InitTimes() timeDepth.Init("Trace depth", 60); timeStrength.Init("Evenness", 60); timeFanout.Init("Fanout", 100); - timeThread.Init("Threads", MAXNOOFTHREADS); + timeThread.Init("Threads", numThreads); timeGroupActualStrain.Init("Group actual suit/NT", 2); timeGroupPredStrain.Init("Group predicted suit/NT", 2); @@ -103,7 +103,7 @@ void Scheduler::Reset() list[strain][key].first = -1; - for (int t = 0; t < MAXNOOFTHREADS; t++) + for (int t = 0; t < numThreads; t++) { threadGroup[t] = -1; threadCurrGroup[t] = -1; @@ -116,7 +116,18 @@ void Scheduler::Reset() void Scheduler::RegisterThreads( const int n) { - UNUSED(n); + if (n == numThreads) + return; + numThreads = n; + + threadGroup.resize(numThreads); + threadCurrGroup.resize(numThreads); + threadToHand.resize(numThreads); + +#ifdef DDS_SCHEDULER + timeThread.Init("Threads", numThreads); + timersThread.resize(numThreads); +#endif } diff --git a/src/Scheduler.h b/src/Scheduler.h index 3f96ed23..02a49e4e 100644 --- a/src/Scheduler.h +++ b/src/Scheduler.h @@ -86,11 +86,11 @@ class Scheduler sortType sortList[MAXNOOFBOARDS]; int sortLen; - int threadGroup[MAXNOOFTHREADS]; - int threadCurrGroup[MAXNOOFTHREADS]; - - int threadToHand[MAXNOOFTHREADS]; + vector threadGroup; + vector threadCurrGroup; + vector threadToHand; + int numThreads; int numHands; vector highCards; diff --git a/src/dds.h b/src/dds.h index 1922cc47..06cec59a 100644 --- a/src/dds.h +++ b/src/dds.h @@ -29,14 +29,9 @@ #define THREADMEM_DEF_MB 95 #endif -#define MAXNOOFTHREADS 16 - #define MAXNODE 1 #define MINNODE 0 -#define MOVESVALID 1 -#define MOVESLOCKED 2 - #define SIMILARDEALLIMIT 5 #define SIMILARMAXWINNODES 700000 From 39fd9332b608943839fcf01261b30d1a55a57b4b Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 12:31:17 +0200 Subject: [PATCH 051/132] Cleanup of calls --- src/ABsearch.cpp | 18 ++--- src/ABsearch.h | 18 ++--- src/ABstats.h | 2 +- src/COMMENT | 2 +- src/CalcTables.cpp | 2 +- src/DealerPar.cpp | 2 +- src/Moves.cpp | 14 ++-- src/Moves.h | 14 ++-- src/Par.cpp | 2 +- src/PlayAnalyser.cpp | 8 +++ src/PlayAnalyser.h | 2 +- src/QuickTricks.cpp | 2 +- src/SolveBoard.cpp | 1 + src/SolveBoard.h | 2 +- src/SolverIF.cpp | 154 +++++++++++++++++++++---------------------- src/SolverIF.h | 22 +++---- src/TransTable.cpp | 2 +- src/TransTable.h | 2 +- src/dds.h | 27 +++----- src/debug.h | 2 +- 20 files changed, 147 insertions(+), 151 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index f847f9a7..f6e44621 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -775,8 +775,8 @@ bool ABsearch3( void Make0( pos * posPoint, - int depth, - moveType * mply) + const int depth, + moveType const * mply) { /* First hand is not changed in next move */ int h = posPoint->first[depth]; @@ -795,8 +795,8 @@ void Make0( void Make1( pos * posPoint, - int depth, - moveType * mply) + const int depth, + moveType const * mply) { /* First hand is not changed in next move */ int firstHand = posPoint->first[depth]; @@ -815,8 +815,8 @@ void Make1( void Make2( pos * posPoint, - int depth, - moveType * mply) + const int depth, + moveType const * mply) { /* First hand is not changed in next move */ int firstHand = posPoint->first[depth]; @@ -836,8 +836,8 @@ void Make2( void Make3( pos * posPoint, unsigned short int trickCards[DDS_SUITS], - int depth, - moveType * mply, + const int depth, + moveType const * mply, ThreadData * thrp) { int firstHand = posPoint->first[depth]; diff --git a/src/ABsearch.h b/src/ABsearch.h index d31d7d37..2e22b3b1 100644 --- a/src/ABsearch.h +++ b/src/ABsearch.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -52,24 +52,24 @@ bool ABsearch3( void Make0( struct pos * posPoint, - int depth, - moveType * mply); + const int depth, + moveType const * mply); void Make1( struct pos * posPoint, - int depth, - moveType * mply); + const int depth, + moveType const * mply); void Make2( struct pos * posPoint, - int depth, - moveType * mply); + const int depth, + moveType const * mply); void Make3( struct pos * posPoint, unsigned short int trickCards[DDS_SUITS], - int depth, - moveType * mply, + const int depth, + moveType const * mply, ThreadData * thrp); evalType Evaluate( diff --git a/src/ABstats.h b/src/ABstats.h index 594afe91..7c4bfefc 100644 --- a/src/ABstats.h +++ b/src/ABstats.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ diff --git a/src/COMMENT b/src/COMMENT index 83ae80d6..7e21dab9 100644 --- a/src/COMMENT +++ b/src/COMMENT @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ diff --git a/src/CalcTables.cpp b/src/CalcTables.cpp index a2fc181d..d10c890c 100644 --- a/src/CalcTables.cpp +++ b/src/CalcTables.cpp @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ diff --git a/src/DealerPar.cpp b/src/DealerPar.cpp index 4e7cdf80..b4343578 100644 --- a/src/DealerPar.cpp +++ b/src/DealerPar.cpp @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ diff --git a/src/Moves.cpp b/src/Moves.cpp index 00b890be..034fc6da 100644 --- a/src/Moves.cpp +++ b/src/Moves.cpp @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -118,9 +118,9 @@ Moves::~Moves() void Moves::Init( int tricks, int relStartHand, - int initialRanks[], - int initialSuits[], - unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], + const int initialRanks[], + const int initialSuits[], + const unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], int ourTrump, int ourLeadHand) { @@ -1694,9 +1694,9 @@ int Moves::GetLength( void Moves::MakeSpecific( - moveType * ourMply, - int trick, - int relHand) + moveType const * ourMply, + const int trick, + const int relHand) { trackp = &track[trick]; diff --git a/src/Moves.h b/src/Moves.h index e14db9a5..7da0eb19 100644 --- a/src/Moves.h +++ b/src/Moves.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -218,9 +218,9 @@ class Moves void Init( int tricks, int relStartHand, - int initialRanks[], - int initialSuits[], - unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], + const int initialRanks[], + const int initialSuits[], + const unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], int trump, int leadHand); @@ -245,9 +245,9 @@ class Moves int relHand); void MakeSpecific( - moveType * mply, - int trick, - int relHand); + moveType const * mply, + const int trick, + const int relHand); moveType * MakeNext( int trick, diff --git a/src/Par.cpp b/src/Par.cpp index 43e0b5aa..5257784a 100644 --- a/src/Par.cpp +++ b/src/Par.cpp @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 9b0d3d45..d9978289 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -23,6 +23,14 @@ FILE * fp; #endif +struct playparamType +{ + int noOfBoards; + playTracesBin * plp; + solvedPlays * solvedp; + int error; +}; + paramType playparam; playparamType traceparam; diff --git a/src/PlayAnalyser.h b/src/PlayAnalyser.h index 501b52d6..5b8b8fdb 100644 --- a/src/PlayAnalyser.h +++ b/src/PlayAnalyser.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ diff --git a/src/QuickTricks.cpp b/src/QuickTricks.cpp index 52ce6350..a2246d3d 100644 --- a/src/QuickTricks.cpp +++ b/src/QuickTricks.cpp @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index c6f44909..4f5d13bb 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -19,6 +19,7 @@ long chunk; paramType param; + extern System sysdep; extern Memory memory; extern Scheduler scheduler; diff --git a/src/SolveBoard.h b/src/SolveBoard.h index b1837260..30cffba3 100644 --- a/src/SolveBoard.h +++ b/src/SolveBoard.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 468ad273..d2772cbc 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -2,21 +2,17 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ -#include - #include "dds.h" #include "Init.h" -#include "Moves.h" #include "ABsearch.h" #include "SolverIF.h" #include "TimerList.h" #include "System.h" -#include "Memory.h" #include "Scheduler.h" extern System sysdep; @@ -25,37 +21,37 @@ extern Scheduler scheduler; int BoardRangeChecks( - deal& dl, - int target, - int solutions, - int mode); + const deal& dl, + const int target, + const int solutions, + const int mode); int BoardValueChecks( - deal& dl, - int target, - int solutions, - int mode, - ThreadData * thrp); + const deal& dl, + const int target, + const int solutions, + const int mode, + ThreadData const * thrp); void LastTrickWinner( - deal * dl, - ThreadData * thrp, - int handToPlay, - int handRelFirst, - int * leadRank, - int * leadSuit, - int * leadSideWins); + const deal& dl, + ThreadData const * thrp, + const int handToPlay, + const int handRelFirst, + int& leadRank, + int& leadSuit, + int& leadSideWins); int DumpInput( - int errCode, - deal& dl, - int target, - int solutions, - int mode); + const int errCode, + const deal& dl, + const int target, + const int solutions, + const int mode); void PrintDeal( FILE * fp, - unsigned short ranks[][DDS_SUITS]); + const unsigned short ranks[][DDS_SUITS]); bool (* AB_ptr_list[DDS_HANDS])( pos * posPoint, @@ -73,8 +69,8 @@ bool (* AB_ptr_trace_list[DDS_HANDS])( void (* Make_ptr_list[3])( pos * posPoint, - int depth, - moveType * mply) + const int depth, + moveType const * mply) = { Make0, Make1, Make2 }; @@ -96,10 +92,10 @@ int STDCALL SolveBoard( int SolveBoardInternal( struct ThreadData * thrp, - deal& dl, - int target, - int solutions, - int mode, + const deal& dl, + const int target, + const int solutions, + const int mode, futureTricks * futp) { // ---------------------------------------------------------- @@ -197,8 +193,8 @@ int SolveBoardInternal( { int leadRank, leadSuit, leadSideWins; - LastTrickWinner(&dl, thrp, handToPlay, handRelFirst, - &leadRank, &leadSuit, &leadSideWins); + LastTrickWinner(dl, thrp, handToPlay, handRelFirst, + leadRank, leadSuit, leadSideWins); futp->nodes = 0; futp->cards = 1; @@ -653,9 +649,9 @@ int SolveBoardInternal( int SolveSameBoard( struct ThreadData * thrp, - deal dl, + const deal& dl, futureTricks * futp, - int hint) + const int hint) { // Specialized function for SolveChunkDDtable for repeat solves. // No further parameter checks! This function makes heavy reuse @@ -758,10 +754,10 @@ int SolveSameBoard( int AnalyseLaterBoard( ThreadData * thrp, - int leadHand, - moveType * move, - int hint, - int hintDir, + const int leadHand, + moveType const * move, + const int hint, + const int hintDir, futureTricks * futp) { // Specialized function for PlayAnalyser for cards after the @@ -906,10 +902,10 @@ int AnalyseLaterBoard( int BoardRangeChecks( - deal& dl, - int target, - int solutions, - int mode) + const deal& dl, + const int target, + const int solutions, + const int mode) { if (target < -1) { @@ -1006,11 +1002,11 @@ int BoardRangeChecks( int BoardValueChecks( - deal& dl, - int target, - int solutions, - int mode, - ThreadData * thrp) + const deal& dl, + const int target, + const int solutions, + const int mode, + ThreadData const * thrp) { int cardCount = thrp->iniDepth + 4; if (cardCount <= 0) @@ -1096,13 +1092,13 @@ int BoardValueChecks( void LastTrickWinner( - deal * dl, - ThreadData * thrp, - int handToPlay, - int handRelFirst, - int * leadRank, - int * leadSuit, - int * leadSideWins) + const deal& dl, + ThreadData const * thrp, + const int handToPlay, + const int handRelFirst, + int& leadRank, + int& leadSuit, + int& leadSideWins) { int lastTrickSuit[DDS_HANDS], lastTrickRank[DDS_HANDS], @@ -1111,14 +1107,14 @@ void LastTrickWinner( for (h = 0; h < handRelFirst; h++) { - hp = handId(dl->first, h); - lastTrickSuit[hp] = dl->currentTrickSuit[h]; - lastTrickRank[hp] = dl->currentTrickRank[h]; + hp = handId(dl.first, h); + lastTrickSuit[hp] = dl.currentTrickSuit[h]; + lastTrickRank[hp] = dl.currentTrickRank[h]; } for (h = handRelFirst; h < DDS_HANDS; h++) { - hp = handId(dl->first, h); + hp = handId(dl.first, h); for (int s = 0; s < DDS_SUITS; s++) { if (thrp->suit[hp][s] != 0) @@ -1135,15 +1131,15 @@ void LastTrickWinner( maxHand = -1; /* Highest trump? */ - if (dl->trump != DDS_NOTRUMP) + if (dl.trump != DDS_NOTRUMP) { for (h = 0; h < DDS_HANDS; h++) { - if ((lastTrickSuit[h] == dl->trump) && + if ((lastTrickSuit[h] == dl.trump) && (lastTrickRank[h] > maxRank)) { maxRank = lastTrickRank[h]; - maxSuit = dl->trump; + maxSuit = dl.trump; maxHand = h; } } @@ -1152,9 +1148,9 @@ void LastTrickWinner( /* Highest card in leading suit */ if (maxRank == 0) { - maxRank = lastTrickRank[dl->first]; - maxSuit = lastTrickSuit[dl->first]; - maxHand = dl->first; + maxRank = lastTrickRank[dl.first]; + maxSuit = lastTrickSuit[dl.first]; + maxHand = dl.first; for (h = 0; h < DDS_HANDS; h++) { @@ -1167,21 +1163,21 @@ void LastTrickWinner( } } - hp = handId(dl->first, handRelFirst); - * leadRank = lastTrickRank[hp]; - * leadSuit = lastTrickSuit[hp]; - * leadSideWins = ((handToPlay == maxHand || - partner[handToPlay] == maxHand) ? 1 : 0); + hp = handId(dl.first, handRelFirst); + leadRank = lastTrickRank[hp]; + leadSuit = lastTrickSuit[hp]; + leadSideWins = ((handToPlay == maxHand || + partner[handToPlay] == maxHand) ? 1 : 0); } int DumpInput( - int errCode, - deal& dl, - int target, - int solutions, - int mode) + const int errCode, + const deal& dl, + const int target, + const int solutions, + const int mode) { FILE * fp; int i, j, k; @@ -1222,7 +1218,9 @@ int DumpInput( } -void PrintDeal(FILE * fp, unsigned short ranks[][4]) +void PrintDeal( + FILE * fp, + const unsigned short ranks[][4]) { int i, count, trickCount = 0, s, r; bool ec[4]; diff --git a/src/SolverIF.h b/src/SolverIF.h index 37654466..8dbae5a3 100644 --- a/src/SolverIF.h +++ b/src/SolverIF.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -15,24 +15,24 @@ int SolveBoardInternal( ThreadData * thrp, - deal& dl, - int target, - int solutions, - int mode, + const deal& dl, + const int target, + const int solutions, + const int mode, futureTricks * futp); int SolveSameBoard( ThreadData * thrp, - deal dl, + const deal& dl, futureTricks * futp, - int hint); + const int hint); int AnalyseLaterBoard( ThreadData * thrp, - int leadHand, - moveType * move, - int hint, - int hintDir, + const int leadHand, + moveType const * move, + const int hint, + const int hintDir, futureTricks * futp); #endif diff --git a/src/TransTable.cpp b/src/TransTable.cpp index 2f3072da..218aac37 100644 --- a/src/TransTable.cpp +++ b/src/TransTable.cpp @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ diff --git a/src/TransTable.h b/src/TransTable.h index b446124a..005580f3 100644 --- a/src/TransTable.h +++ b/src/TransTable.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ diff --git a/src/dds.h b/src/dds.h index 06cec59a..dd9ef973 100644 --- a/src/dds.h +++ b/src/dds.h @@ -68,15 +68,6 @@ extern char relRank[8192][15]; extern unsigned short int winRanks[8192][14]; -struct playparamType -{ - int noOfBoards; - playTracesBin * plp; - solvedPlays * solvedp; - int error; -}; - - struct moveGroupType { // There are at most 7 groups of bit "runs" in a 13-bit vector @@ -90,8 +81,6 @@ struct moveGroupType extern moveGroupType groupData[8192]; -extern int stat_contr[DDS_STRAINS]; - struct moveType { int suit; @@ -158,14 +147,6 @@ struct extCard int sequence; }; -struct paramType -{ - int noOfBoards; - boards * bop; - solvedBoards * solvedp; - int error; -}; - struct absRankType // 2 bytes { char rank; @@ -177,6 +158,14 @@ struct relRanksType // 120 bytes struct absRankType absRank[15][DDS_SUITS]; }; +struct paramType +{ + int noOfBoards; + boards * bop; + solvedBoards * solvedp; + int error; +}; + enum RunMode { DDS_RUN_SOLVE = 0, diff --git a/src/debug.h b/src/debug.h index 5403ef66..cd83db65 100644 --- a/src/debug.h +++ b/src/debug.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ From 34c6905414536bc11b253fcf74fb7d9778cdff70 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 13:22:19 +0200 Subject: [PATCH 052/132] Made SolverIF more C++ like --- src/ABsearch.cpp | 20 +++--- src/ABsearch.h | 20 +++--- src/SolverIF.cpp | 172 +++++++++++++++++++++-------------------------- 3 files changed, 97 insertions(+), 115 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index f6e44621..8d2e8103 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -108,8 +108,8 @@ const int handDelta[DDS_SUITS] = { 256, 16, 1, 0 }; bool ABsearch( pos * posPoint, - int target, - int depth, + const int target, + const int depth, ThreadData * thrp) { /* posPoint points to the current look-ahead position, @@ -201,8 +201,8 @@ bool ABsearch( bool ABsearch0( pos * posPoint, - int target, - int depth, + const int target, + const int depth, ThreadData * thrp) { /* posPoint points to the current look-ahead position, @@ -516,8 +516,8 @@ bool ABsearch0( bool ABsearch1( pos * posPoint, - int target, - int depth, + const int target, + const int depth, ThreadData * thrp) { int trump = thrp->trump; @@ -602,8 +602,8 @@ bool ABsearch1( bool ABsearch2( pos * posPoint, - int target, - int depth, + const int target, + const int depth, ThreadData * thrp) { int hand = handId(posPoint->first[depth], 2); @@ -683,8 +683,8 @@ bool ABsearch2( bool ABsearch3( pos * posPoint, - int target, - int depth, + const int target, + const int depth, ThreadData * thrp) { /* This is a specialized AB function for handRelFirst == 3. */ diff --git a/src/ABsearch.h b/src/ABsearch.h index 2e22b3b1..f3f66578 100644 --- a/src/ABsearch.h +++ b/src/ABsearch.h @@ -22,32 +22,32 @@ bool ABsearch( struct pos * posPoint, - int target, - int depth, + const int target, + const int depth, struct ThreadData * thrp); bool ABsearch0( struct pos * posPoint, - int target, - int depth, + const int target, + const int depth, struct ThreadData * thrp); bool ABsearch1( struct pos * posPoint, - int target, - int depth, + const int target, + const int depth, struct ThreadData * thrp); bool ABsearch2( struct pos * posPoint, - int target, - int depth, + const int target, + const int depth, struct ThreadData * thrp); bool ABsearch3( struct pos * posPoint, - int target, - int depth, + const int target, + const int depth, struct ThreadData * thrp); void Make0( diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index d2772cbc..3e1f9443 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -7,6 +7,10 @@ See LICENSE and README. */ +#include +#include +#include + #include "dds.h" #include "Init.h" #include "ABsearch.h" @@ -49,21 +53,23 @@ int DumpInput( const int solutions, const int mode); +string PrintSuit(const unsigned short suitCode); + void PrintDeal( - FILE * fp, + ofstream& fout, const unsigned short ranks[][DDS_SUITS]); bool (* AB_ptr_list[DDS_HANDS])( pos * posPoint, - int target, - int depth, + const int target, + const int depth, ThreadData * thrp) = { ABsearch, ABsearch1, ABsearch2, ABsearch3 }; bool (* AB_ptr_trace_list[DDS_HANDS])( pos * posPoint, - int target, - int depth, + const int target, + const int depth, ThreadData * thrp) = { ABsearch0, ABsearch1, ABsearch2, ABsearch3 }; @@ -102,6 +108,8 @@ int SolveBoardInternal( // Formal parameter checks. // ---------------------------------------------------------- +DumpInput(RETURN_TARGET_WRONG_LO, dl, target, solutions, mode); + int ret = BoardRangeChecks(dl, target, solutions, mode); if (ret != RETURN_NO_FAULT) return ret; @@ -1179,113 +1187,87 @@ int DumpInput( const int solutions, const int mode) { - FILE * fp; - int i, j, k; - unsigned short ranks[4][4]; + ofstream fout; + fout.open("dump.txt"); + + fout << "Error code=" << errCode << "\n\n"; + fout << "Deal data:\n"; + fout << "trump="; - fp = fopen("dump.txt", "w"); - if (fp == nullptr) - return RETURN_UNKNOWN_FAULT; - fprintf(fp, "Error code=%d\n", errCode); - fprintf(fp, "\n"); - fprintf(fp, "Deal data:\n"); - if (dl.trump != 4) - fprintf(fp, "trump=%c\n", cardSuit[dl.trump]); + if (dl.trump == DDS_NOTRUMP) + fout << "N\n"; else - fprintf(fp, "trump=N\n"); - fprintf(fp, "first=%c\n", cardHand[dl.first]); - for (k = 0; k <= 2; k++) + fout << cardSuit[dl.trump] << "\n"; + fout << "first=" << cardHand[dl.first] << "\n"; + + unsigned short ranks[4][4]; + + for (int k = 0; k <= 2; k++) if (dl.currentTrickRank[k] != 0) - fprintf(fp, "index=%d currentTrickSuit=%c currentTrickRank=%c\n", - k, cardSuit[dl.currentTrickSuit[k]], - cardRank[dl.currentTrickRank[k]]); - for (i = 0; i <= 3; i++) - for (j = 0; j <= 3; j++) { - fprintf(fp, "index1=%d index2=%d remainCards=%d\n", - i, j, dl.remainCards[i][j]); - ranks[i][j] = static_cast - (dl.remainCards[i][/*3-*/j] >> 2); + fout << "index=" << k << + " currentTrickSuit=" << cardSuit[dl.currentTrickSuit[k]] << + " currentTrickRank= " << cardRank[dl.currentTrickRank[k]] << "\n"; } - fprintf(fp, "\n"); - fprintf(fp, "target=%d\n", target); - fprintf(fp, "solutions=%d\n", solutions); - fprintf(fp, "mode=%d\n", mode); - fprintf(fp, "\n"); - PrintDeal(fp, ranks); - fclose(fp); + + for (int h = 0; h < DDS_HANDS; h++) + for (int s = 0; s < DDS_SUITS; s++) + { + fout << "index1=" << h << " index2=" << s << + " remainCards=" << dl.remainCards[h][s] << "\n"; + ranks[h][s] = static_cast + (dl.remainCards[h][s] >> 2); + } + + fout << "\ntarget=" << target << "\n"; + fout << "solutions=" << solutions << "\n"; + fout << "mode=" << mode << "\n\n\n"; + PrintDeal(fout, ranks); + fout.close(); return 0; } +string PrintSuit(const unsigned short suitCode) +{ + if (! suitCode) + return "--"; + + string st; + for (int r = 14; r >= 2; r--) + if ((suitCode & bitMapRank[r])) + st += cardRank[r]; + return st; +} + + void PrintDeal( - FILE * fp, - const unsigned short ranks[][4]) + ofstream& fout, + const unsigned short ranks[][DDS_SUITS]) { - int i, count, trickCount = 0, s, r; - bool ec[4]; - for (i = 0; i <= 3; i++) + for (int s = 0; s < DDS_SUITS; s++) { - count = counttable[ranks[3][i]]; - if (count > 5) - ec[i] = true; - else - ec[i] = false; - trickCount = trickCount + count; + fout << setw(8) << "" << + cardSuit[s] << " " << + PrintSuit(ranks[0][s]) << "\n"; } - fprintf(fp, "\n"); - for (s = 0; s < DDS_SUITS; s++) + + for (int s = 0; s < DDS_SUITS; s++) { - fprintf(fp, "\t%c ", cardSuit[s]); - if (!ranks[0][s]) - fprintf(fp, "--"); - else - { - for (r = 14; r >= 2; r--) - if ((ranks[0][s] & bitMapRank[r]) != 0) - fprintf(fp, "%c", cardRank[r]); - } - fprintf(fp, "\n"); + fout << cardSuit[s] << " " << + setw(14) << left << PrintSuit(ranks[3][s]) << + cardSuit[s] << " " << + PrintSuit(ranks[1][s]) << "\n"; } - for (s = 0; s < DDS_SUITS; s++) - { - fprintf(fp, "%c ", cardSuit[s]); - if (!ranks[3][s]) - fprintf(fp, "--"); - else - { - for (r = 14; r >= 2; r--) - if ((ranks[3][s] & bitMapRank[r]) != 0) - fprintf(fp, "%c", cardRank[r]); - } - if (ec[s]) - fprintf(fp, "\t%c ", cardSuit[s]); - else - fprintf(fp, "\t\t%c ", cardSuit[s]); - if (!ranks[1][s]) - fprintf(fp, "--"); - else - { - for (r = 14; r >= 2; r--) - if ((ranks[1][s] & bitMapRank[r]) != 0) - fprintf(fp, "%c", cardRank[r]); - } - fprintf(fp, "\n"); - } - for (s = 0; s < DDS_SUITS; s++) + + for (int s = 0; s < DDS_SUITS; s++) { - fprintf(fp, "\t%c ", cardSuit[s]); - if (!ranks[2][s]) - fprintf(fp, "--"); - else - { - for (r = 14; r >= 2; r--) - if ((ranks[2][s] & bitMapRank[r]) != 0) - fprintf(fp, "%c", cardRank[r]); - } - fprintf(fp, "\n"); + fout << setw(8) << "" << + cardSuit[s] << " " << + PrintSuit(ranks[2][s]) << "\n"; } - fprintf(fp, "\n"); + + fout << "\n"; return; } From 1e8e6fefc98efa9c0c0bf9f1aeba3f7f7871cbf8 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 13:39:56 +0200 Subject: [PATCH 053/132] PlayAnalyser more C++ like --- src/PlayAnalyser.cpp | 60 +++++++++++++++++++++++++++----------------- src/SolverIF.cpp | 2 -- 2 files changed, 37 insertions(+), 25 deletions(-) diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index d9978289..bef98fe1 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -7,6 +7,10 @@ See LICENSE and README. */ +#include +#include +#include +#include #include "dds.h" #include "SolverIF.h" @@ -16,11 +20,14 @@ #include "PBN.h" #include "debug.h" +using namespace std; + + // Only single-threaded debugging here. #define DEBUG 0 #if DEBUG -FILE * fp; + ofstream fout; #endif struct playparamType @@ -82,14 +89,14 @@ int STDCALL AnalysePlayBin( int solved_declarer = solvedp->tricks[0]; #if DEBUG int initial_par = solved_declarer; - fp = fopen("trace.txt", "a"); - fprintf(fp, "Initial solve: %d\n", initial_par); - fprintf(fp, "no %d, Last trick %d, last card %d\n", - play.number, last_trick, last_card); - fprintf(fp, "%5s %5s %5s %8s %6s %6s %5s %5s %5s\n", - "trick", "card", "rest", "declarer", - "player", "side", "soln0", "soln1", "diff"); - fclose(fp); + fout.open("trace.txt", ofstream::out | ofstream::app); + fout << "Initial solve: " << initial_par << "\n"; + fout << "no " << play.number << ", Last trick " << last_trick << + ", last card " << last_card << "\n"; + fout << setw(5) << "trick" << setw(6) << "card" << + setw(6) << "rest" << setw(9) << "declarer" << + setw(7) << "player" << setw(7) << "side" << + setw(6) << "soln0" << setw(6) << "soln1" << setw(6) << "diff" << "\n"; #endif for (int trick = 1; trick <= last_trick; trick++) @@ -149,10 +156,10 @@ int STDCALL AnalysePlayBin( if (! usingCurrent) { #if DEBUG - fp = fopen("trace.txt", "a"); - fprintf(fp, "ERR Trick %d card %d pl %d: suit %d hold %d\n", - trick, card, running_player, suit, hold); - fclose(fp); + fout << "ERR Trick " << trick << " card " << card << + " pl " << running_player << ": suit " << suit << + " hold " << hold << "\n"; + fout.close(); #endif return RETURN_PLAY_FAULT; } @@ -200,8 +207,8 @@ int STDCALL AnalysePlayBin( != RETURN_NO_FAULT) { #if DEBUG - fp = fopen("trace.txt", "a"); - fprintf(fp, "SolveBoard failed, ret %d\n", ret); + fout << "SolveBoard failed, ret " << ret << "\n"; + fout.close(); #endif return ret; } @@ -212,13 +219,15 @@ int STDCALL AnalysePlayBin( solvedp->tricks[offset + card] = new_solved_decl; #if DEBUG - fp = fopen("trace.txt", "a"); - fprintf(fp, "%5d %5d %5d %8d %6c %6d %5d %5d %5d\n", - trick, card, running_remainder, running_declarer, - cardHand[resp_player], running_side, - solved_declarer, new_solved_decl, - new_solved_decl - solved_declarer); - fclose(fp); + fout << setw(5) << trick << + setw(6) << card << + setw(6) << running_remainder << + setw(9) << running_declarer << + setw(7) << cardHand[resp_player] << + setw(7) << running_side << + setw(6) << solved_declarer << + setw(6) << new_solved_decl << + setw(6) << new_solved_decl - solved_declarer << "\n"; #endif solved_declarer = new_solved_decl; @@ -226,6 +235,9 @@ int STDCALL AnalysePlayBin( } solvedp->number = 4 * last_trick + last_card - 3 - (numCardsPlayed - 1); +#if DEBUG + fout.close(); +#endif return RETURN_NO_FAULT; } @@ -261,7 +273,9 @@ int STDCALL AnalysePlayPBN( void PlayChunkCommon(const int thrId) { - solvedPlay solved[MAXNOOFBOARDS]; + vector solved; + solved.resize(playparam.noOfBoards); + // solvedPlay solved[MAXNOOFBOARDS]; int index; schedType st; diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 3e1f9443..ca8c324d 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -108,8 +108,6 @@ int SolveBoardInternal( // Formal parameter checks. // ---------------------------------------------------------- -DumpInput(RETURN_TARGET_WRONG_LO, dl, target, solutions, mode); - int ret = BoardRangeChecks(dl, target, solutions, mode); if (ret != RETURN_NO_FAULT) return ret; From ec76f0dcf260932d888ca64523a3eea1c0b05dd7 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 14:22:49 +0200 Subject: [PATCH 054/132] Had broken the DDS_DEBUG_ALL flag --- src/ABsearch.cpp | 1 + src/ABstats.h | 2 ++ src/Init.cpp | 1 + src/Memory.h | 4 ++-- src/Moves.cpp | 31 ++++++++++++++++--------------- src/Moves.h | 2 +- src/SolverIF.cpp | 1 + src/TimerList.h | 1 + src/TransTable.cpp | 1 + src/debug.h | 5 ----- 10 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index 8d2e8103..9eca2049 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -21,6 +21,7 @@ #include "ABstats.h" #include "TimerList.h" #include "Memory.h" +#include "debug.h" #define DDS_POS_LINES 5 #define DDS_HAND_LINES 12 diff --git a/src/ABstats.h b/src/ABstats.h index 7c4bfefc..a5ae06f3 100644 --- a/src/ABstats.h +++ b/src/ABstats.h @@ -15,6 +15,8 @@ #include #include +#include "debug.h" + using namespace std; diff --git a/src/Init.cpp b/src/Init.cpp index 42dfd5e8..decf02d7 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -11,6 +11,7 @@ #include "Init.h" #include "System.h" #include "Scheduler.h" +#include "debug.h" System sysdep; diff --git a/src/Memory.h b/src/Memory.h index 76451337..10e7d90f 100644 --- a/src/Memory.h +++ b/src/Memory.h @@ -17,11 +17,11 @@ #include "debug.h" #ifdef DDS_AB_STATS - include "ABstats.h" + #include "ABstats.h" #endif #ifdef DDS_TIMING - include "TimerList.h" + #include "TimerList.h" #endif using namespace std; diff --git a/src/Moves.cpp b/src/Moves.cpp index 034fc6da..16eed688 100644 --- a/src/Moves.cpp +++ b/src/Moves.cpp @@ -11,6 +11,7 @@ #include "dds.h" #include "Moves.h" #include "ABsearch.h" +#include "debug.h" #ifdef DDS_MOVES #define MG_REGISTER(a, b) lastCall[currTrick][b] = a @@ -19,7 +20,7 @@ #endif -int RegisterList[16] = +const int RegisterList[16] = { MG_NT0, MG_TRUMP0, -1, -1, @@ -37,19 +38,19 @@ int RegisterList[16] = Moves::Moves() { - sprintf(funcName[MG_NT0] , "%s", "NT0"); - sprintf(funcName[MG_TRUMP0] , "%s", "Trump0"); - sprintf(funcName[MG_NT_VOID1] , "%s", "NT_Void1"); - sprintf(funcName[MG_TRUMP_VOID1] , "%s", "Trump_Void1"); - sprintf(funcName[MG_NT_NOTVOID1] , "%s", "NT_Notvoid1"); - sprintf(funcName[MG_TRUMP_NOTVOID1], "%s", "Trump_Notvoid1"); - sprintf(funcName[MG_NT_VOID2] , "%s", "NT_Void2"); - sprintf(funcName[MG_TRUMP_VOID2] , "%s", "Trump_Void2"); - sprintf(funcName[MG_NT_NOTVOID2] , "%s", "NT_Notvoid2"); - sprintf(funcName[MG_TRUMP_NOTVOID2], "%s", "Trump_Notvoid2"); - sprintf(funcName[MG_NT_VOID3] , "%s", "NT_Void3"); - sprintf(funcName[MG_TRUMP_VOID3] , "%s", "Trump_Void3"); - sprintf(funcName[MG_COMB_NOTVOID3] , "%s", "Comb_Notvoid3"); + funcName[MG_NT0] = "NT0"; + funcName[MG_TRUMP0] = "Trump0"; + funcName[MG_NT_VOID1] = "NT_Void1"; + funcName[MG_TRUMP_VOID1] = "Trump_Void1"; + funcName[MG_NT_NOTVOID1] = "NT_Notvoid1"; + funcName[MG_TRUMP_NOTVOID1] = "Trump_Notvoid1"; + funcName[MG_NT_VOID2] = "NT_Void2"; + funcName[MG_TRUMP_VOID2] = "Trump_Void2"; + funcName[MG_NT_NOTVOID2] = "NT_Notvoid2"; + funcName[MG_TRUMP_NOTVOID2] = "Trump_Notvoid2"; + funcName[MG_NT_VOID3] = "NT_Void3"; + funcName[MG_TRUMP_VOID3] = "Trump_Void3"; + funcName[MG_COMB_NOTVOID3] = "Comb_Notvoid3"; for (int t = 0; t < 13; t++) { @@ -2561,7 +2562,7 @@ void Moves::PrintFunctionTable( if (statp->list[f].findex != fr) continue; - sprintf(str[0], "%-15s", funcName[fr]); + sprintf(str[0], "%-15s", funcName[fr].c_str()); fprintf(fp, "%s %34s\n", str[0], diff --git a/src/Moves.h b/src/Moves.h index 7da0eb19..ccbb073f 100644 --- a/src/Moves.h +++ b/src/Moves.h @@ -89,7 +89,7 @@ class Moves int lastCall[13][DDS_HANDS]; - char funcName[13][40]; + string funcName[MG_NUM_FUNCTIONS]; struct moveStatType { diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index ca8c324d..97074615 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -18,6 +18,7 @@ #include "TimerList.h" #include "System.h" #include "Scheduler.h" +#include "debug.h" extern System sysdep; extern Memory memory; diff --git a/src/TimerList.h b/src/TimerList.h index 24c9a4b5..2f804c84 100644 --- a/src/TimerList.h +++ b/src/TimerList.h @@ -48,6 +48,7 @@ #include #include "TimerGroup.h" +#include "debug.h" using namespace std; diff --git a/src/TransTable.cpp b/src/TransTable.cpp index 218aac37..0131e523 100644 --- a/src/TransTable.cpp +++ b/src/TransTable.cpp @@ -11,6 +11,7 @@ #include "dds.h" #include "TransTable.h" +#include "debug.h" extern unsigned char cardRank[16]; extern char relRank[8192][15]; diff --git a/src/debug.h b/src/debug.h index cd83db65..9536676a 100644 --- a/src/debug.h +++ b/src/debug.h @@ -88,15 +88,10 @@ // #define DDS_TIMING #define DDS_TIMING_PREFIX "timer" -// Enables extra detail. -#define DDS_TIMING_DETAILS - // Enables statistics on move generation quality. // #define DDS_MOVES #define DDS_MOVES_PREFIX "movestats" -// #define DDS_MOVES_DETAILS - // Enables timing in the scheduler. // #define DDS_SCHEDULER #define DDS_SCHEDULER_PREFIX "sched" From 20fd8d8b367b42cccb637bdc841c079367eeb1cd Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 15:08:26 +0200 Subject: [PATCH 055/132] Fixed small scheduler bug --- src/Makefiles/depends_obj.txt | 110 +++++++++------------ src/Moves.cpp | 42 ++++---- src/Moves.h | 4 +- src/Scheduler.cpp | 6 +- src/SolveBoard.cpp | 1 + test/Makefiles/dds_sources.txt | 1 + test/Makefiles/depends_obj.txt | 169 ++++++++++++--------------------- test/itest.cpp | 3 +- 8 files changed, 138 insertions(+), 198 deletions(-) diff --git a/src/Makefiles/depends_obj.txt b/src/Makefiles/depends_obj.txt index 3e36a58f..155b243f 100644 --- a/src/Makefiles/depends_obj.txt +++ b/src/Makefiles/depends_obj.txt @@ -1,67 +1,43 @@ -dds.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -dds.obj: TimeStatList.h TimeStat.h Init.h -ABsearch.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -ABsearch.obj: TimeStatList.h TimeStat.h QuickTricks.h -ABsearch.obj: LaterTricks.h ABsearch.h -ABstats.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -ABstats.obj: TimeStatList.h TimeStat.h -CalcTables.obj: dds.h debug.h ../include/portab.h TransTable.h -CalcTables.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -CalcTables.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h SolveBoard.h -CalcTables.obj: PBN.h -DealerPar.obj: dds.h debug.h ../include/portab.h TransTable.h -DealerPar.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -DealerPar.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h -Init.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -Init.obj: TimeStatList.h TimeStat.h Init.h ABsearch.h System.h -LaterTricks.obj: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -LaterTricks.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h -LaterTricks.obj: LaterTricks.h -Moves.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -Moves.obj: TimeStatList.h TimeStat.h ABsearch.h -Par.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -Par.obj: TimeStatList.h TimeStat.h -PlayAnalyser.obj: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -PlayAnalyser.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h -PlayAnalyser.obj: SolverIF.h System.h PBN.h -PBN.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -PBN.obj: TimeStatList.h TimeStat.h PBN.h -QuickTricks.obj: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -QuickTricks.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h -QuickTricks.obj: QuickTricks.h -Scheduler.obj: Scheduler.h TimeStatList.h TimeStat.h dds.h debug.h -Scheduler.obj: ../include/portab.h TransTable.h ../include/dll.h TimerList.h -Scheduler.obj: TimerGroup.h Timer.h ABstats.h Moves.h -SolveBoard.obj: dds.h debug.h ../include/portab.h TransTable.h -SolveBoard.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -SolveBoard.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h -SolveBoard.obj: SolverIF.h SolveBoard.h System.h PBN.h -SolverIF.obj: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -SolverIF.obj: TimeStatList.h TimeStat.h Init.h ABsearch.h -SolverIF.obj: SolverIF.h -System.obj: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -System.obj: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -System.obj: TimeStatList.h TimeStat.h System.h SolveBoard.h PlayAnalyser.h -Timer.obj: Timer.h ../include/portab.h -TimerGroup.obj: TimerGroup.h Timer.h dds.h debug.h ../include/portab.h -TimerGroup.obj: TransTable.h ../include/dll.h TimerList.h ABstats.h Moves.h -TimerGroup.obj: Scheduler.h TimeStatList.h TimeStat.h -TimerList.obj: TimerList.h TimerGroup.h Timer.h dds.h debug.h -TimerList.obj: ../include/portab.h TransTable.h ../include/dll.h ABstats.h -TimerList.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h -TimeStat.obj: ../include/portab.h TimeStat.h -TimeStatList.obj: TimeStatList.h TimeStat.h ../include/portab.h -TransTable.obj: dds.h debug.h ../include/portab.h TransTable.h -TransTable.obj: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -TransTable.obj: Moves.h Scheduler.h TimeStatList.h TimeStat.h +dds.obj: ../include/dll.h Init.h dds.h ../include/portab.h Memory.h +dds.obj: TransTable.h Moves.h debug.h +ABsearch.obj: dds.h ../include/portab.h ../include/dll.h TransTable.h Moves.h +ABsearch.obj: QuickTricks.h Memory.h debug.h LaterTricks.h ABsearch.h +ABsearch.obj: ABstats.h TimerList.h TimerGroup.h Timer.h +ABstats.obj: dds.h ../include/portab.h ../include/dll.h ABstats.h debug.h +CalcTables.obj: dds.h ../include/portab.h ../include/dll.h SolveBoard.h PBN.h +DealerPar.obj: dds.h ../include/portab.h ../include/dll.h +Init.obj: Init.h dds.h ../include/portab.h ../include/dll.h Memory.h +Init.obj: TransTable.h Moves.h debug.h System.h Scheduler.h TimeStatList.h +Init.obj: TimeStat.h Timer.h +LaterTricks.obj: LaterTricks.h dds.h ../include/portab.h ../include/dll.h +LaterTricks.obj: Memory.h TransTable.h Moves.h debug.h +Memory.obj: Memory.h TransTable.h ../include/dll.h dds.h ../include/portab.h +Memory.obj: Moves.h debug.h +Moves.obj: dds.h ../include/portab.h ../include/dll.h Moves.h ABsearch.h +Moves.obj: debug.h +Par.obj: dds.h ../include/portab.h ../include/dll.h PBN.h +PlayAnalyser.obj: dds.h ../include/portab.h ../include/dll.h SolverIF.h +PlayAnalyser.obj: Memory.h TransTable.h Moves.h debug.h System.h Scheduler.h +PlayAnalyser.obj: TimeStatList.h TimeStat.h Timer.h PBN.h +PBN.obj: dds.h ../include/portab.h ../include/dll.h PBN.h +QuickTricks.obj: dds.h ../include/portab.h ../include/dll.h QuickTricks.h +QuickTricks.obj: Memory.h TransTable.h Moves.h debug.h +Scheduler.obj: Scheduler.h TimeStatList.h TimeStat.h Timer.h dds.h +Scheduler.obj: ../include/portab.h ../include/dll.h +SolveBoard.obj: SolverIF.h Memory.h TransTable.h ../include/dll.h dds.h +SolveBoard.obj: ../include/portab.h Moves.h debug.h SolveBoard.h System.h +SolveBoard.obj: Scheduler.h TimeStatList.h TimeStat.h Timer.h PBN.h +SolverIF.obj: dds.h ../include/portab.h ../include/dll.h Init.h Memory.h +SolverIF.obj: TransTable.h Moves.h debug.h ABsearch.h SolverIF.h TimerList.h +SolverIF.obj: TimerGroup.h Timer.h System.h Scheduler.h TimeStatList.h +SolverIF.obj: TimeStat.h +System.obj: ../include/dll.h dds.h ../include/portab.h System.h SolveBoard.h +System.obj: PlayAnalyser.h +Timer.obj: Timer.h +TimerGroup.obj: TimerGroup.h Timer.h +TimerList.obj: TimerList.h TimerGroup.h Timer.h debug.h dds.h +TimerList.obj: ../include/portab.h ../include/dll.h +TimeStat.obj: TimeStat.h +TimeStatList.obj: TimeStatList.h TimeStat.h +TransTable.obj: dds.h ../include/portab.h ../include/dll.h TransTable.h +TransTable.obj: debug.h diff --git a/src/Moves.cpp b/src/Moves.cpp index 16eed688..a555d157 100644 --- a/src/Moves.cpp +++ b/src/Moves.cpp @@ -10,7 +10,6 @@ #include "dds.h" #include "Moves.h" -#include "ABsearch.h" #include "debug.h" #ifdef DDS_MOVES @@ -52,6 +51,8 @@ Moves::Moves() funcName[MG_TRUMP_VOID3] = "Trump_Void3"; funcName[MG_COMB_NOTVOID3] = "Comb_Notvoid3"; + fname = ""; + for (int t = 0; t < 13; t++) { for (int h = 0; h < DDS_HANDS; h++) @@ -71,7 +72,7 @@ Moves::Moves() } } - trickFuncTable .nfuncs = 0; + trickFuncTable.nfuncs = 0; trickFuncSuitTable.nfuncs = 0; for (int i = 0; i < MG_NUM_FUNCTIONS; i++) { @@ -79,8 +80,6 @@ Moves::Moves() trickFuncSuitTable.list[i].count = 0; } - fp = stdout; - WeightList[ 4] = &Moves::WeightAllocNTNotvoid1; WeightList[ 5] = &Moves::WeightAllocTrumpNotvoid1; WeightList[ 6] = &Moves::WeightAllocNTVoid1; @@ -100,19 +99,13 @@ Moves::Moves() void Moves::SetFile(const string& ourFname) { - if (fp != stdout) // Already set - return; - - fp = fopen(ourFname.c_str(), "w"); - if (! fp) - fp = stdout; + fname = ourFname; + remove(fname.c_str()); // May fail -- that's OK } Moves::~Moves() { - if (fp != stdout && fp != nullptr) - fclose(fp); } @@ -2504,6 +2497,7 @@ char * Moves::FullAverageString( void Moves::PrintTrickTable( + FILE * fp, moveStatType tablep[][DDS_HANDS]) { fprintf(fp, "%5s %11s %11s %11s %11s\n", @@ -2535,16 +2529,20 @@ void Moves::PrintTrickTable( void Moves::PrintTrickStats() { + FILE * fp; + fp = fopen(fname.c_str(), "a"); fprintf(fp, "Overall statistics\n\n"); - Moves::PrintTrickTable(trickTable); + Moves::PrintTrickTable(fp, trickTable); fprintf(fp, "\n\nStatistics for winning suit\n\n"); - Moves::PrintTrickTable(trickSuitTable); + Moves::PrintTrickTable(fp, trickSuitTable); fprintf(fp, "\n\n"); + fclose(fp); } void Moves::PrintFunctionTable( + FILE * fp, moveStatsType * statp) { char str[2][40]; @@ -2573,6 +2571,8 @@ void Moves::PrintFunctionTable( void Moves::PrintTrickDetails() { + FILE * fp; + fp = fopen(fname.c_str(), "a"); fprintf(fp, "Trick detail statistics\n\n"); for (int t = 12; t >= 0; t--) @@ -2580,7 +2580,7 @@ void Moves::PrintTrickDetails() for (int h = 0; h < DDS_HANDS; h++) { fprintf(fp, "Trick %d, relative hand %d\n", t, h); - Moves::PrintFunctionTable(&trickDetailTable[t][h]); + Moves::PrintFunctionTable(fp, &trickDetailTable[t][h]); fprintf(fp, "\n"); } } @@ -2592,23 +2592,29 @@ void Moves::PrintTrickDetails() for (int h = 0; h < DDS_HANDS; h++) { fprintf(fp, "Trick %d, relative hand %d\n", t, h); - Moves::PrintFunctionTable(&trickDetailSuitTable[t][h]); + Moves::PrintFunctionTable(fp, &trickDetailSuitTable[t][h]); fprintf(fp, "\n"); } } fprintf(fp, "\n\n"); + fclose(fp); } void Moves::PrintFunctionStats() { + FILE * fp; + fp = fopen(fname.c_str(), "a"); + fprintf(fp, "Function statistics\n\n"); - Moves::PrintFunctionTable(&trickFuncTable); + Moves::PrintFunctionTable(fp, &trickFuncTable); fprintf(fp, "\n\nFunction statistics for winning suit\n\n"); - Moves::PrintFunctionTable(&trickFuncSuitTable); + Moves::PrintFunctionTable(fp, &trickFuncSuitTable); fprintf(fp, "\n\n"); + + fclose(fp); } diff --git a/src/Moves.h b/src/Moves.h index ccbb073f..702ab1fb 100644 --- a/src/Moves.h +++ b/src/Moves.h @@ -117,7 +117,7 @@ class Moves moveStatsType trickFuncSuitTable; - FILE * fp; + string fname; void WeightAllocTrump0( @@ -203,9 +203,11 @@ class Moves char str[]); void PrintTrickTable( + FILE * fp, moveStatType tablep[][DDS_HANDS]); void PrintFunctionTable( + FILE * fp, moveStatsType * tablep); public: diff --git a/src/Scheduler.cpp b/src/Scheduler.cpp index 2954e302..f574ecce 100644 --- a/src/Scheduler.cpp +++ b/src/Scheduler.cpp @@ -17,7 +17,7 @@ Scheduler::Scheduler() { - numThreads = 1; + numThreads = 0; numHands = 0; Scheduler::InitHighCards(); @@ -32,7 +32,7 @@ Scheduler::Scheduler() } #endif - Scheduler::RegisterThreads(numThreads); + Scheduler::RegisterThreads(1); } @@ -102,7 +102,6 @@ void Scheduler::Reset() for (int key = 0; key < HASH_MAX; key++) list[strain][key].first = -1; - for (int t = 0; t < numThreads; t++) { threadGroup[t] = -1; @@ -162,7 +161,6 @@ void Scheduler::RegisterRun( Scheduler::FinetuneGroups(); Scheduler::SortHands(mode); - } diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 4f5d13bb..2bbfa4a5 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -149,6 +149,7 @@ void SolveChunkDDtableCommon( } +#include int SolveAllBoardsN( boards * bop, solvedBoards * solvedp, diff --git a/test/Makefiles/dds_sources.txt b/test/Makefiles/dds_sources.txt index c3c4f366..9c15befb 100644 --- a/test/Makefiles/dds_sources.txt +++ b/test/Makefiles/dds_sources.txt @@ -6,6 +6,7 @@ DDS_SOURCE_FILES = \ ../src/DealerPar.cpp \ ../src/Init.cpp \ ../src/LaterTricks.cpp \ + ../src/Memory.cpp \ ../src/Moves.cpp \ ../src/Par.cpp \ ../src/PlayAnalyser.cpp \ diff --git a/test/Makefiles/depends_obj.txt b/test/Makefiles/depends_obj.txt index f31383ba..58dcc1d2 100644 --- a/test/Makefiles/depends_obj.txt +++ b/test/Makefiles/depends_obj.txt @@ -1,114 +1,71 @@ -../src/dds.obj: ../include/dll.h ../src/dds.h ../src/debug.h -../src/dds.obj: ../include/portab.h ../src/TransTable.h ../src/TimerList.h -../src/dds.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/dds.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/dds.obj: ../src/TimeStat.h ../src/Init.h -../src/ABsearch.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABsearch.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/ABsearch.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/ABsearch.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/ABsearch.obj: ../src/TimeStat.h ../src/threadmem.h -../src/ABsearch.obj: ../src/QuickTricks.h ../src/LaterTricks.h -../src/ABsearch.obj: ../src/ABsearch.h -../src/ABstats.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABstats.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/ABstats.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/ABstats.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/ABstats.obj: ../src/TimeStat.h -../src/CalcTables.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/CalcTables.obj: ../src/TransTable.h ../include/dll.h -../src/CalcTables.obj: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h -../src/CalcTables.obj: ../src/ABstats.h ../src/Moves.h ../src/Scheduler.h -../src/CalcTables.obj: ../src/TimeStatList.h ../src/TimeStat.h +../src/dds.obj: ../include/dll.h ../src/Init.h ../src/dds.h +../src/dds.obj: ../include/portab.h ../src/Memory.h ../src/TransTable.h +../src/dds.obj: ../src/Moves.h ../src/debug.h +../src/ABsearch.obj: ../src/dds.h ../include/portab.h ../include/dll.h +../src/ABsearch.obj: ../src/TransTable.h ../src/Moves.h ../src/QuickTricks.h +../src/ABsearch.obj: ../src/Memory.h ../src/debug.h ../src/LaterTricks.h +../src/ABsearch.obj: ../src/ABsearch.h ../src/ABstats.h ../src/TimerList.h +../src/ABsearch.obj: ../src/TimerGroup.h ../src/Timer.h +../src/ABstats.obj: ../src/dds.h ../include/portab.h ../include/dll.h +../src/ABstats.obj: ../src/ABstats.h ../src/debug.h +../src/CalcTables.obj: ../src/dds.h ../include/portab.h ../include/dll.h ../src/CalcTables.obj: ../src/SolveBoard.h ../src/PBN.h -../src/DealerPar.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/DealerPar.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/DealerPar.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/DealerPar.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/DealerPar.obj: ../src/TimeStat.h -../src/Init.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Init.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/Init.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/Init.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/Init.obj: ../src/TimeStat.h ../src/threadmem.h ../src/Init.h -../src/Init.obj: ../src/ABsearch.h ../src/System.h -../src/LaterTricks.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/LaterTricks.obj: ../src/TransTable.h ../include/dll.h -../src/LaterTricks.obj: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h -../src/LaterTricks.obj: ../src/ABstats.h ../src/Moves.h ../src/Scheduler.h -../src/LaterTricks.obj: ../src/TimeStatList.h ../src/TimeStat.h -../src/LaterTricks.obj: ../src/threadmem.h ../src/LaterTricks.h -../src/Moves.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Moves.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/Moves.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/Moves.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/Moves.obj: ../src/TimeStat.h ../src/ABsearch.h -../src/Par.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Par.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/Par.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/Par.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/Par.obj: ../src/TimeStat.h -../src/PlayAnalyser.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PlayAnalyser.obj: ../src/TransTable.h ../include/dll.h -../src/PlayAnalyser.obj: ../src/TimerList.h ../src/TimerGroup.h -../src/PlayAnalyser.obj: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/PlayAnalyser.obj: ../src/Scheduler.h ../src/TimeStatList.h -../src/PlayAnalyser.obj: ../src/TimeStat.h ../src/threadmem.h -../src/PlayAnalyser.obj: ../src/SolverIF.h ../src/System.h ../src/PBN.h -../src/PBN.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PBN.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/PBN.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/PBN.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/PBN.obj: ../src/TimeStat.h ../src/PBN.h -../src/QuickTricks.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/QuickTricks.obj: ../src/TransTable.h ../include/dll.h -../src/QuickTricks.obj: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h -../src/QuickTricks.obj: ../src/ABstats.h ../src/Moves.h ../src/Scheduler.h -../src/QuickTricks.obj: ../src/TimeStatList.h ../src/TimeStat.h -../src/QuickTricks.obj: ../src/threadmem.h ../src/QuickTricks.h +../src/DealerPar.obj: ../src/dds.h ../include/portab.h ../include/dll.h +../src/Init.obj: ../src/Init.h ../src/dds.h ../include/portab.h +../src/Init.obj: ../include/dll.h ../src/Memory.h ../src/TransTable.h +../src/Init.obj: ../src/Moves.h ../src/debug.h ../src/System.h +../src/Init.obj: ../src/Scheduler.h ../src/TimeStatList.h ../src/TimeStat.h +../src/Init.obj: ../src/Timer.h +../src/LaterTricks.obj: ../src/LaterTricks.h ../src/dds.h ../include/portab.h +../src/LaterTricks.obj: ../include/dll.h ../src/Memory.h ../src/TransTable.h +../src/LaterTricks.obj: ../src/Moves.h ../src/debug.h +../src/Memory.obj: ../src/Memory.h ../src/TransTable.h ../include/dll.h +../src/Memory.obj: ../src/dds.h ../include/portab.h ../src/Moves.h +../src/Memory.obj: ../src/debug.h +../src/Moves.obj: ../src/dds.h ../include/portab.h ../include/dll.h +../src/Moves.obj: ../src/Moves.h ../src/ABsearch.h ../src/debug.h +../src/Par.obj: ../src/dds.h ../include/portab.h ../include/dll.h +../src/Par.obj: ../src/PBN.h +../src/PlayAnalyser.obj: ../src/dds.h ../include/portab.h ../include/dll.h +../src/PlayAnalyser.obj: ../src/SolverIF.h ../src/Memory.h +../src/PlayAnalyser.obj: ../src/TransTable.h ../src/Moves.h ../src/debug.h +../src/PlayAnalyser.obj: ../src/System.h ../src/Scheduler.h +../src/PlayAnalyser.obj: ../src/TimeStatList.h ../src/TimeStat.h +../src/PlayAnalyser.obj: ../src/Timer.h ../src/PBN.h +../src/PBN.obj: ../src/dds.h ../include/portab.h ../include/dll.h +../src/PBN.obj: ../src/PBN.h +../src/QuickTricks.obj: ../src/dds.h ../include/portab.h ../include/dll.h +../src/QuickTricks.obj: ../src/QuickTricks.h ../src/Memory.h +../src/QuickTricks.obj: ../src/TransTable.h ../src/Moves.h ../src/debug.h ../src/Scheduler.obj: ../src/Scheduler.h ../src/TimeStatList.h -../src/Scheduler.obj: ../src/TimeStat.h ../src/dds.h ../src/debug.h -../src/Scheduler.obj: ../include/portab.h ../src/TransTable.h -../src/Scheduler.obj: ../include/dll.h ../src/TimerList.h ../src/TimerGroup.h -../src/Scheduler.obj: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/SolveBoard.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard.obj: ../src/TransTable.h ../include/dll.h -../src/SolveBoard.obj: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h -../src/SolveBoard.obj: ../src/ABstats.h ../src/Moves.h ../src/Scheduler.h -../src/SolveBoard.obj: ../src/TimeStatList.h ../src/TimeStat.h -../src/SolveBoard.obj: ../src/threadmem.h ../src/SolverIF.h -../src/SolveBoard.obj: ../src/SolveBoard.h ../src/System.h ../src/PBN.h -../src/SolverIF.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolverIF.obj: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/SolverIF.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/SolverIF.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/SolverIF.obj: ../src/TimeStat.h ../src/Init.h ../src/threadmem.h -../src/SolverIF.obj: ../src/ABsearch.h ../src/SolverIF.h -../src/System.obj: ../include/dll.h ../src/dds.h ../src/debug.h -../src/System.obj: ../include/portab.h ../src/TransTable.h ../src/TimerList.h -../src/System.obj: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/System.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/System.obj: ../src/TimeStat.h ../src/System.h ../src/SolveBoard.h -../src/System.obj: ../src/PlayAnalyser.h -../src/Timer.obj: ../src/Timer.h ../include/portab.h -../src/TimerGroup.obj: ../src/TimerGroup.h ../src/Timer.h ../src/dds.h -../src/TimerGroup.obj: ../src/debug.h ../include/portab.h ../src/TransTable.h -../src/TimerGroup.obj: ../include/dll.h ../src/TimerList.h ../src/ABstats.h -../src/TimerGroup.obj: ../src/Moves.h ../src/Scheduler.h -../src/TimerGroup.obj: ../src/TimeStatList.h ../src/TimeStat.h +../src/Scheduler.obj: ../src/TimeStat.h ../src/Timer.h ../src/dds.h +../src/Scheduler.obj: ../include/portab.h ../include/dll.h +../src/SolveBoard.obj: ../src/SolverIF.h ../src/Memory.h ../src/TransTable.h +../src/SolveBoard.obj: ../include/dll.h ../src/dds.h ../include/portab.h +../src/SolveBoard.obj: ../src/Moves.h ../src/debug.h ../src/SolveBoard.h +../src/SolveBoard.obj: ../src/System.h ../src/Scheduler.h +../src/SolveBoard.obj: ../src/TimeStatList.h ../src/TimeStat.h ../src/Timer.h +../src/SolveBoard.obj: ../src/PBN.h +../src/SolverIF.obj: ../src/dds.h ../include/portab.h ../include/dll.h +../src/SolverIF.obj: ../src/Init.h ../src/Memory.h ../src/TransTable.h +../src/SolverIF.obj: ../src/Moves.h ../src/debug.h ../src/ABsearch.h +../src/SolverIF.obj: ../src/SolverIF.h ../src/TimerList.h ../src/TimerGroup.h +../src/SolverIF.obj: ../src/Timer.h ../src/System.h ../src/Scheduler.h +../src/SolverIF.obj: ../src/TimeStatList.h ../src/TimeStat.h +../src/System.obj: ../include/dll.h ../src/dds.h ../include/portab.h +../src/System.obj: ../src/System.h ../src/SolveBoard.h ../src/PlayAnalyser.h +../src/Timer.obj: ../src/Timer.h +../src/TimerGroup.obj: ../src/TimerGroup.h ../src/Timer.h ../src/TimerList.obj: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h -../src/TimerList.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/TimerList.obj: ../src/TransTable.h ../include/dll.h ../src/ABstats.h -../src/TimerList.obj: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/TimerList.obj: ../src/TimeStat.h -../src/TransTable.obj: ../src/dds.h ../src/debug.h ../include/portab.h -../src/TransTable.obj: ../src/TransTable.h ../include/dll.h -../src/TransTable.obj: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h -../src/TransTable.obj: ../src/ABstats.h ../src/Moves.h ../src/Scheduler.h -../src/TransTable.obj: ../src/TimeStatList.h ../src/TimeStat.h +../src/TimerList.obj: ../src/debug.h ../src/dds.h ../include/portab.h +../src/TimerList.obj: ../include/dll.h +../src/TimeStat.obj: ../src/TimeStat.h +../src/TimeStatList.obj: ../src/TimeStatList.h ../src/TimeStat.h +../src/TransTable.obj: ../src/dds.h ../include/portab.h ../include/dll.h +../src/TransTable.obj: ../src/TransTable.h ../src/debug.h testcommon.obj: ../include/dll.h ../include/portab.h testStats.h TestTimer.h testcommon.obj: dtest.h -testStats.obj: ../include/portab.h testStats.h TestTimer.obj: TestTimer.h +testStats.obj: ../include/portab.h testStats.h itest.obj: ../include/dll.h testcommon.h dtest.obj: ../include/dll.h testcommon.h diff --git a/test/itest.cpp b/test/itest.cpp index 06d10ee2..d4f768ba 100644 --- a/test/itest.cpp +++ b/test/itest.cpp @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -14,7 +14,6 @@ #include "testcommon.h" - int main(int argc, char * argv[]) { int nthreads = 0; From 00ac5b781c4c2d9aebb0d250073c7a6486ad9dc1 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 15:30:21 +0200 Subject: [PATCH 056/132] Changed Moves function headers --- src/Moves.cpp | 200 +++++++++++++++++++++++++------------------------- src/Moves.h | 158 +++++++++++++++++++-------------------- 2 files changed, 177 insertions(+), 181 deletions(-) diff --git a/src/Moves.cpp b/src/Moves.cpp index a555d157..4b6a85c8 100644 --- a/src/Moves.cpp +++ b/src/Moves.cpp @@ -110,13 +110,13 @@ Moves::~Moves() void Moves::Init( - int tricks, - int relStartHand, + const int tricks, + const int relStartHand, const int initialRanks[], const int initialSuits[], const unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], - int ourTrump, - int ourLeadHand) + const int ourTrump, + const int ourLeadHand) { currTrick = tricks; trump = ourTrump; @@ -153,19 +153,19 @@ void Moves::Init( void Moves::Reinit( - int tricks, - int ourLeadHand) + const int tricks, + const int ourLeadHand) { track[tricks].leadHand = ourLeadHand; } int Moves::MoveGen0( - int tricks, - pos * posPoint, - moveType * bestMove, - moveType * bestMoveTT, - relRanksType thrp_rel[]) + const int tricks, + pos const * posPoint, + moveType const * bestMove, + moveType const * bestMoveTT, + const relRanksType thrp_rel[]) { trackp = &track[tricks]; leadHand = trackp->leadHand; @@ -234,9 +234,9 @@ int Moves::MoveGen0( int Moves::MoveGen123( - int tricks, - int handRel, - pos * posPoint) + const int tricks, + const int handRel, + pos const * posPoint) { trackp = &track[tricks]; leadHand = trackp->leadHand; @@ -293,8 +293,6 @@ int Moves::MoveGen123( if (numMoves == 1) return numMoves; - // WeightFnc = WeightList[findex]; - // (this->*WeightFnc)(posPoint); (this->*WeightList[findex])(posPoint); Moves::MergeSort(); @@ -346,10 +344,10 @@ int Moves::MoveGen123( void Moves::WeightAllocTrump0( - pos * posPoint, - moveType * bestMove, - moveType * bestMoveTT, - relRanksType thrp_rel[]) + pos const * posPoint, + moveType const * bestMove, + moveType const * bestMoveTT, + const relRanksType thrp_rel[]) { unsigned short suitCount = posPoint->length[leadHand][suit]; unsigned short suitCountLH = posPoint->length[lho[leadHand]][suit]; @@ -608,10 +606,10 @@ void Moves::WeightAllocTrump0( void Moves::WeightAllocNT0( - pos * posPoint, - moveType * bestMove, - moveType * bestMoveTT, - relRanksType thrp_rel[]) + pos const * posPoint, + moveType const * bestMove, + moveType const * bestMoveTT, + const relRanksType thrp_rel[]) { int aggr = posPoint->aggr[suit]; @@ -755,7 +753,7 @@ void Moves::WeightAllocNT0( void Moves::WeightAllocTrumpNotvoid1( - pos * posPoint) + pos const * posPoint) { int max3rd = highestRank[ posPoint->rankInSuit[partner[leadHand]][leadSuit]]; @@ -871,7 +869,7 @@ void Moves::WeightAllocTrumpNotvoid1( void Moves::WeightAllocNTNotvoid1( - pos * posPoint) + pos const * posPoint) { // FIX: Second test should come first, and outside loop. // Why is better not to be able to beat later players than @@ -924,7 +922,7 @@ void Moves::WeightAllocNTNotvoid1( void Moves::WeightAllocTrumpVoid1( - pos * posPoint) + pos const * posPoint) { // FIX: // leadSuit == trump: Why differentiate? @@ -1046,7 +1044,7 @@ void Moves::WeightAllocTrumpVoid1( void Moves::WeightAllocNTVoid1( - pos * posPoint) + pos const * posPoint) { // FIX: // Why the different penalties depending on partner? @@ -1090,7 +1088,7 @@ void Moves::WeightAllocNTVoid1( void Moves::WeightAllocTrumpNotvoid2( - pos * posPoint) + pos const * posPoint) { int cards4th = posPoint->rankInSuit[rho[leadHand]][leadSuit]; int max4th = highestRank[cards4th]; @@ -1266,7 +1264,7 @@ void Moves::WeightAllocTrumpNotvoid2( int Moves::RankForcesAce( - int cards4th) + const int cards4th) { // Figure out how high we have to play to force out the top. moveGroupType * mp = &groupData[cards4th]; @@ -1309,17 +1307,17 @@ int Moves::RankForcesAce( void Moves::GetTopNumber( - int ris, - int prank, - int * topNumber, - int * mno) + const int ris, + const int prank, + int& topNumber, + int& mno) { - * topNumber = -10; + topNumber = -10; // Find the lowest move that still overtakes partner's card. - *mno = 0; - while (*mno < numMoves - 1 && mply[1 + *mno].rank > prank) - (*mno)++; + mno = 0; + while (mno < numMoves - 1 && mply[1 + mno].rank > prank) + mno++; moveGroupType * mp = &groupData[ris]; int g = mp->lastGroup; @@ -1333,13 +1331,13 @@ void Moves::GetTopNumber( while (g >= 1 && ((mp->gap[g] & removed) == mp->gap[g])) fullseq |= mp->fullseq[--g]; - *topNumber = counttable[fullseq] - 1; + topNumber = counttable[fullseq] - 1; } void Moves::WeightAllocNTNotvoid2( - pos * posPoint) + pos const * posPoint) { // One of the main remaining issues here is cashing out long // suits. Examples: @@ -1374,7 +1372,7 @@ void Moves::WeightAllocNTNotvoid2( int topNumber, mno; GetTopNumber(posPoint->rankInSuit[partner[leadHand]][leadSuit], - trackp->move[0].rank, &topNumber, &mno); + trackp->move[0].rank, topNumber, mno); if (oppLen <= topNumber) mply[mno].weight += 20; @@ -1409,7 +1407,7 @@ void Moves::WeightAllocNTNotvoid2( void Moves::WeightAllocTrumpVoid2( - pos * posPoint) + pos const * posPoint) { // Compared to "v2.8": // Moved a test for partner's win out of the k loop. @@ -1512,7 +1510,7 @@ void Moves::WeightAllocTrumpVoid2( void Moves::WeightAllocNTVoid2( - pos * posPoint) + pos const * posPoint) { // Compared to "v2.8": // Took only the second branch. The first branch (partner @@ -1537,7 +1535,7 @@ void Moves::WeightAllocNTVoid2( void Moves::WeightAllocCombinedNotvoid3( - pos * posPoint) + pos const * posPoint) // moveType mply[]) { // We're always following suit. @@ -1572,8 +1570,7 @@ void Moves::WeightAllocCombinedNotvoid3( void Moves::WeightAllocTrumpVoid3( - pos * posPoint) -// moveType mply[]) + pos const * posPoint) { // Compared to "v2.8": // val removed for trump plays (doesn't really matter, though). @@ -1640,8 +1637,7 @@ void Moves::WeightAllocTrumpVoid3( void Moves::WeightAllocNTVoid3( - pos * posPoint) -// moveType mply[]) + pos const * posPoint) { int mylen = posPoint->length[currHand][suit]; int val = (mylen << 6) / 27; @@ -1657,9 +1653,9 @@ void Moves::WeightAllocNTVoid3( inline bool Moves::WinningMove( - moveType * mvp1, - extCard * mvp2, - int ourTrump) + moveType const * mvp1, + extCard const * mvp2, + const int ourTrump) const { /* Return true if move 1 wins over move 2, with the assumption that move 2 is the presently winning card of the trick */ @@ -1680,8 +1676,8 @@ inline bool Moves::WinningMove( int Moves::GetLength( - int trick, - int relHand) + const int trick, + const int relHand) const { return moveList[trick][relHand].last + 1; } @@ -1755,9 +1751,9 @@ void Moves::MakeSpecific( moveType * Moves::MakeNext( - int trick, - int relHand, - unsigned short int ourWinRanks[DDS_SUITS]) + const int trick, + const int relHand, + const unsigned short int ourWinRanks[DDS_SUITS]) { // Find moves that are >= ourWinRanks[suit], but allow one // "small" move per suit. @@ -1865,8 +1861,8 @@ moveType * Moves::MakeNext( moveType * Moves::MakeNextSimple( - int trick, - int relHand) + const int trick, + const int relHand) { // Don't worry about small moves. Why not, actually? @@ -1930,25 +1926,25 @@ moveType * Moves::MakeNextSimple( void Moves::Step( - int tricks, - int relHand) + const int tricks, + const int relHand) { moveList[tricks][relHand].current++; } void Moves::Rewind( - int tricks, - int relHand) + const int tricks, + const int relHand) { moveList[tricks][relHand].current = 0; } void Moves::Purge( - int trick, - int ourLeadHand, - moveType forbiddenMoves[]) + const int trick, + const int ourLeadHand, + const moveType forbiddenMoves[]) { movePlyType * ourMply = &moveList[trick][ourLeadHand]; @@ -1974,8 +1970,8 @@ void Moves::Purge( void Moves::Reward( - int tricks, - int relHand) + const int tricks, + const int relHand) { moveList[tricks][relHand]. move[ moveList[tricks][relHand].current - 1 ].weight += 100; @@ -1983,7 +1979,7 @@ void Moves::Reward( trickDataType * Moves::GetTrickData( - int tricks) + const int tricks) { trickDataType * datap = &track[tricks].trickData; for (int s = 0; s < DDS_SUITS; s++) @@ -2009,8 +2005,8 @@ trickDataType * Moves::GetTrickData( void Moves::Sort( - int tricks, - int relHand) + const int tricks, + const int relHand) { numMoves = moveList[tricks][relHand].last + 1; mply = moveList[tricks][relHand].move; @@ -2266,7 +2262,7 @@ void Moves::MergeSort() void Moves::PrintMove( - movePlyType * ourMply) + movePlyType const * ourMply) const { printf("current %d, last %d\n", ourMply->current, ourMply->last); printf(" i suit sequence rank wgt\n"); @@ -2283,10 +2279,10 @@ void Moves::PrintMove( void Moves::PrintMoves( - int trick, - int relHand) + const int trick, + const int relHand) const { - movePlyType * listp = &moveList[trick][relHand]; + movePlyType const * listp = &moveList[trick][relHand]; printf("trick %d relHand %d last %d current %d\n", trick, relHand, listp->last, listp->current); Moves::PrintMove(listp); @@ -2294,36 +2290,36 @@ void Moves::PrintMoves( void Moves::TrickToText( - int trick, - char line[]) + const int trick, + char line[]) const { - movePlyType * listp0 = &moveList[trick][0], - * listp1 = &moveList[trick][1], - * listp2 = &moveList[trick][2], - * listp3 = &moveList[trick][3]; + const movePlyType& listp0 = moveList[trick][0]; + const movePlyType& listp1 = moveList[trick][1]; + const movePlyType& listp2 = moveList[trick][2]; + const movePlyType& listp3 = moveList[trick][3]; sprintf(line, "Last trick\t%c: %c%c - %c%c - %c%c - %c%c\n", cardHand[ track[trick].leadHand ], - cardSuit[ listp0->move[listp0->current].suit ], - cardRank[ listp0->move[listp0->current].rank ], + cardSuit[ listp0.move[listp0.current].suit ], + cardRank[ listp0.move[listp0.current].rank ], - cardSuit[ listp1->move[listp1->current].suit ], - cardRank[ listp1->move[listp1->current].rank ], + cardSuit[ listp1.move[listp1.current].suit ], + cardRank[ listp1.move[listp1.current].rank ], - cardSuit[ listp2->move[listp2->current].suit ], - cardRank[ listp2->move[listp2->current].rank ], + cardSuit[ listp2.move[listp2.current].suit ], + cardRank[ listp2.move[listp2.current].rank ], - cardSuit[ listp3->move[listp3->current].suit ], - cardRank[ listp3->move[listp3->current].rank ]); + cardSuit[ listp3.move[listp3.current].suit ], + cardRank[ listp3.move[listp3.current].rank ]); } void Moves::UpdateStatsEntry( moveStatsType * statp, - int findex, - int hit, - int len) + const int findex, + const int hit, + const int len) const { bool found = false; int fno = 0; @@ -2366,8 +2362,8 @@ void Moves::UpdateStatsEntry( void Moves::RegisterHit( - int trick, - int relHand) + const int trick, + const int relHand) { movePlyType * listp = &moveList[trick][relHand]; @@ -2459,8 +2455,8 @@ void Moves::RegisterHit( char * Moves::AverageString( - moveStatType * statp, - char str[]) + moveStatType const * statp, + char str[]) const { if (statp->count == 0) sprintf(str, "%5s %4s", "--", "--"); @@ -2474,8 +2470,8 @@ char * Moves::AverageString( char * Moves::FullAverageString( - moveStatType * statp, - char str[]) + moveStatType const * statp, + char str[]) const { if (statp->count == 0) sprintf(str, "%5s %5s %4s %8s %8s", @@ -2498,7 +2494,7 @@ char * Moves::FullAverageString( void Moves::PrintTrickTable( FILE * fp, - moveStatType tablep[][DDS_HANDS]) + const moveStatType tablep[][DDS_HANDS]) const { fprintf(fp, "%5s %11s %11s %11s %11s\n", "Trick", @@ -2527,7 +2523,7 @@ void Moves::PrintTrickTable( } -void Moves::PrintTrickStats() +void Moves::PrintTrickStats() const { FILE * fp; fp = fopen(fname.c_str(), "a"); @@ -2543,7 +2539,7 @@ void Moves::PrintTrickStats() void Moves::PrintFunctionTable( FILE * fp, - moveStatsType * statp) + moveStatsType const * statp) const { char str[2][40]; @@ -2569,7 +2565,7 @@ void Moves::PrintFunctionTable( } } -void Moves::PrintTrickDetails() +void Moves::PrintTrickDetails() const { FILE * fp; fp = fopen(fname.c_str(), "a"); @@ -2602,7 +2598,7 @@ void Moves::PrintTrickDetails() } -void Moves::PrintFunctionStats() +void Moves::PrintFunctionStats() const { FILE * fp; fp = fopen(fname.c_str(), "a"); diff --git a/src/Moves.h b/src/Moves.h index 702ab1fb..324cd60d 100644 --- a/src/Moves.h +++ b/src/Moves.h @@ -121,94 +121,94 @@ class Moves void WeightAllocTrump0( - pos * posPoint, - moveType * bestMove, - moveType * bestMoveTT, - relRanksType thrp_rel[]); + pos const * posPoint, + moveType const * bestMove, + moveType const * bestMoveTT, + const relRanksType thrp_rel[]); void WeightAllocNT0( - pos * posPoint, - moveType * bestMove, - moveType * bestMoveTT, - relRanksType thrp_rel[]); + pos const * posPoint, + moveType const * bestMove, + moveType const * bestMoveTT, + const relRanksType thrp_rel[]); void WeightAllocTrumpNotvoid1( - pos * posPoint); + pos const * posPoint); void WeightAllocNTNotvoid1( - pos * posPoint); + pos const * posPoint); void WeightAllocTrumpVoid1( - pos * posPoint); + pos const * posPoint); void WeightAllocNTVoid1( - pos * posPoint); + pos const * posPoint); void WeightAllocTrumpNotvoid2( - pos * posPoint); + pos const * posPoint); void WeightAllocNTNotvoid2( - pos * posPoint); + pos const * posPoint); void WeightAllocTrumpVoid2( - pos * posPoint); + pos const * posPoint); void WeightAllocNTVoid2( - pos * posPoint); + pos const * posPoint); void WeightAllocCombinedNotvoid3( - pos * posPoint); + pos const * posPoint); void WeightAllocTrumpVoid3( - pos * posPoint); + pos const * posPoint); void WeightAllocNTVoid3( - pos * posPoint); + pos const * posPoint); void GetTopNumber( - int ris, - int prank, - int * topNumber, - int * mno); + const int ris, + const int prank, + int& topNumber, + int& mno); int RankForcesAce( int cards4th); - typedef void (Moves::*WeightPtr)(pos * posPoint); + typedef void (Moves::*WeightPtr)(pos const * posPoint); WeightPtr WeightList[16]; inline bool WinningMove( - moveType * mvp1, - extCard * mvp2, - int trump); + moveType const * mvp1, + extCard const * mvp2, + const int trump) const; void PrintMove( - movePlyType * mply); + movePlyType const * mply) const; void MergeSort(); void UpdateStatsEntry( moveStatsType * statp, - int findex, - int hit, - int len); + const int findex, + const int hit, + const int len) const; char * AverageString( - moveStatType * statp, - char str[]); + const moveStatType * statp, + char str[]) const; char * FullAverageString( - moveStatType * statp, - char str[]); + const moveStatType * statp, + char str[]) const; void PrintTrickTable( FILE * fp, - moveStatType tablep[][DDS_HANDS]); + const moveStatType tablep[][DDS_HANDS]) const ; void PrintFunctionTable( FILE * fp, - moveStatsType * tablep); + moveStatsType const * tablep) const; public: Moves(); @@ -218,33 +218,33 @@ class Moves void SetFile(const string& fname); void Init( - int tricks, - int relStartHand, + const int tricks, + const int relStartHand, const int initialRanks[], const int initialSuits[], const unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], - int trump, - int leadHand); + const int trump, + const int leadHand); void Reinit( - int tricks, - int leadHand); + const int tricks, + const int leadHand); int MoveGen0( - int tricks, - pos * posPoint, - moveType * bestMove, - moveType * bestMoveTT, - relRanksType thrp_rel[]); + const int tricks, + pos const * posPoint, + moveType const * bestMove, + moveType const * bestMoveTT, + const relRanksType thrp_rel[]); int MoveGen123( - int tricks, - int relHand, - pos * posPoint); + const int tricks, + const int relHand, + pos const * posPoint); int GetLength( - int trick, - int relHand); + const int trick, + const int relHand) const; void MakeSpecific( moveType const * mply, @@ -252,55 +252,55 @@ class Moves const int relHand); moveType * MakeNext( - int trick, - int relHand, - unsigned short int winRanks[DDS_SUITS]); + const int trick, + const int relHand, + const unsigned short int winRanks[DDS_SUITS]); moveType * MakeNextSimple( - int trick, - int relHand); + const int trick, + const int relHand); void Step( - int tricks, - int relHand); + const int tricks, + const int relHand); void Rewind( - int tricks, - int relHand); + const int tricks, + const int relHand); void Purge( - int tricks, - int relHand, - moveType forbiddenMoves[]); + const int tricks, + const int relHand, + const moveType forbiddenMoves[]); void Reward( - int trick, - int relHand); + const int trick, + const int relHand); trickDataType * GetTrickData( - int tricks); + const int tricks); void Sort( - int tricks, - int relHand); + const int tricks, + const int relHand); void PrintMoves( - int trick, - int relHand); + const int trick, + const int relHand) const; void RegisterHit( - int tricks, - int relHand); + const int tricks, + const int relHand); void TrickToText( - int trick, - char text[]); + const int trick, + char text[]) const; - void PrintTrickStats(); + void PrintTrickStats() const; - void PrintTrickDetails(); + void PrintTrickDetails() const; - void PrintFunctionStats(); + void PrintFunctionStats() const; }; From 1e6c08a7573e6fe5ccc2ac0a6fb14653f1964ba9 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 15:38:15 +0200 Subject: [PATCH 057/132] More interfacing --- src/ABsearch.cpp | 8 ++++---- src/Moves.cpp | 38 +++++++++++++++++++------------------- src/Moves.h | 12 ++++++------ src/SolverIF.cpp | 8 ++++---- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index 9eca2049..67262d67 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -135,8 +135,8 @@ bool ABsearch( thrp->moves.MoveGen0( tricks, posPoint, - &thrp->bestMove[depth], - &thrp->bestMoveTT[depth], + thrp->bestMove[depth], + thrp->bestMoveTT[depth], thrp->rel); thrp->moves.Purge(tricks, 0, thrp->forbiddenMoves); @@ -402,8 +402,8 @@ bool ABsearch0( thrp->moves.MoveGen0( tricks, posPoint, - &thrp->bestMove[depth], - &thrp->bestMoveTT[depth], + thrp->bestMove[depth], + thrp->bestMoveTT[depth], thrp->rel); TIMER_END(TIMER_NO_MOVEGEN, depth); diff --git a/src/Moves.cpp b/src/Moves.cpp index 4b6a85c8..47ef99be 100644 --- a/src/Moves.cpp +++ b/src/Moves.cpp @@ -163,8 +163,8 @@ void Moves::Reinit( int Moves::MoveGen0( const int tricks, pos const * posPoint, - moveType const * bestMove, - moveType const * bestMoveTT, + const moveType& bestMove, + const moveType& bestMoveTT, const relRanksType thrp_rel[]) { trackp = &track[tricks]; @@ -345,8 +345,8 @@ int Moves::MoveGen123( void Moves::WeightAllocTrump0( pos const * posPoint, - moveType const * bestMove, - moveType const * bestMoveTT, + const moveType& bestMove, + const moveType& bestMoveTT, const relRanksType thrp_rel[]) { unsigned short suitCount = posPoint->length[leadHand][suit]; @@ -534,11 +534,11 @@ void Moves::WeightAllocTrump0( or was stored as the best move in a transposition table entry match. */ - if ((bestMove->suit == suit) && - (bestMove->rank == mply[k].rank)) + if ((bestMove.suit == suit) && + (bestMove.rank == mply[k].rank)) mply[k].weight += 55; - else if ((bestMoveTT->suit == suit) && - (bestMoveTT->rank == mply[k].rank)) + else if ((bestMoveTT.suit == suit) && + (bestMoveTT.rank == mply[k].rank)) mply[k].weight += 18; } else @@ -597,8 +597,8 @@ void Moves::WeightAllocTrump0( or was stored as the best move in a transposition table entry match. */ - if ((bestMove->suit == suit) && - (bestMove->rank == mply[k].rank)) + if ((bestMove.suit == suit) && + (bestMove.rank == mply[k].rank)) mply[k].weight += 18; } } @@ -607,8 +607,8 @@ void Moves::WeightAllocTrump0( void Moves::WeightAllocNT0( pos const * posPoint, - moveType const * bestMove, - moveType const * bestMoveTT, + const moveType& bestMove, + const moveType& bestMoveTT, const relRanksType thrp_rel[]) { int aggr = posPoint->aggr[suit]; @@ -673,11 +673,11 @@ void Moves::WeightAllocNT0( or was stored as the best move in a transposition table entry match. */ - if ((bestMove->suit == suit) && - (bestMove->rank == mply[k].rank)) + if ((bestMove.suit == suit) && + (bestMove.rank == mply[k].rank)) mply[k].weight += 126; - else if ((bestMoveTT->suit == suit) && - (bestMoveTT->rank == mply[k].rank)) + else if ((bestMoveTT.suit == suit) && + (bestMoveTT.rank == mply[k].rank)) mply[k].weight += 32; } else @@ -742,10 +742,10 @@ void Moves::WeightAllocNT0( or was stored as the best move in a transposition table entry match. */ - if ((bestMove->suit == suit) && (bestMove->rank == mply[k].rank)) + if ((bestMove.suit == suit) && (bestMove.rank == mply[k].rank)) mply[k].weight += 47; - else if ((bestMoveTT->suit == suit) && - (bestMoveTT->rank == mply[k].rank)) + else if ((bestMoveTT.suit == suit) && + (bestMoveTT.rank == mply[k].rank)) mply[k].weight += 19; } } diff --git a/src/Moves.h b/src/Moves.h index 324cd60d..3faa0461 100644 --- a/src/Moves.h +++ b/src/Moves.h @@ -122,14 +122,14 @@ class Moves void WeightAllocTrump0( pos const * posPoint, - moveType const * bestMove, - moveType const * bestMoveTT, + const moveType& bestMove, + const moveType& bestMoveTT, const relRanksType thrp_rel[]); void WeightAllocNT0( pos const * posPoint, - moveType const * bestMove, - moveType const * bestMoveTT, + const moveType& bestMove, + const moveType& bestMoveTT, const relRanksType thrp_rel[]); void WeightAllocTrumpNotvoid1( @@ -233,8 +233,8 @@ class Moves int MoveGen0( const int tricks, pos const * posPoint, - moveType const * bestMove, - moveType const * bestMoveTT, + const moveType& bestMove, + const moveType& bestMoveTT, const relRanksType thrp_rel[]); int MoveGen123( diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 97074615..08bd081c 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -278,8 +278,8 @@ int SolveBoardInternal( thrp->moves.MoveGen0( trick, &thrp->lookAheadPos, - &thrp->bestMove[iniDepth], - &thrp->bestMoveTT[iniDepth], + thrp->bestMove[iniDepth], + thrp->bestMoveTT[iniDepth], thrp->rel); else thrp->moves.MoveGen123( @@ -315,8 +315,8 @@ int SolveBoardInternal( thrp->moves.MoveGen0( trick, &thrp->lookAheadPos, - &thrp->bestMove[iniDepth], - &thrp->bestMoveTT[iniDepth], + thrp->bestMove[iniDepth], + thrp->bestMoveTT[iniDepth], thrp->rel); else thrp->moves.MoveGen123( From 798b724126c0c253d0c627de1a3f2a95fa71641c Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 15:49:17 +0200 Subject: [PATCH 058/132] More Moves cleanup --- src/Moves.cpp | 80 +++++++++++++++++++++++++-------------------------- src/Moves.h | 49 +++++++++---------------------- 2 files changed, 53 insertions(+), 76 deletions(-) diff --git a/src/Moves.cpp b/src/Moves.cpp index 47ef99be..c2cff6a7 100644 --- a/src/Moves.cpp +++ b/src/Moves.cpp @@ -349,10 +349,10 @@ void Moves::WeightAllocTrump0( const moveType& bestMoveTT, const relRanksType thrp_rel[]) { - unsigned short suitCount = posPoint->length[leadHand][suit]; - unsigned short suitCountLH = posPoint->length[lho[leadHand]][suit]; - unsigned short suitCountRH = posPoint->length[rho[leadHand]][suit]; - unsigned short aggr = posPoint->aggr[suit]; + const unsigned short suitCount = posPoint->length[leadHand][suit]; + const unsigned short suitCountLH = posPoint->length[lho[leadHand]][suit]; + const unsigned short suitCountRH = posPoint->length[rho[leadHand]][suit]; + const unsigned short aggr = posPoint->aggr[suit]; // Why? int countLH = (suitCountLH == 0 ? currTrick + 1 : suitCountLH) << 2; @@ -755,13 +755,13 @@ void Moves::WeightAllocNT0( void Moves::WeightAllocTrumpNotvoid1( pos const * posPoint) { - int max3rd = highestRank[ + const int max3rd = highestRank[ posPoint->rankInSuit[partner[leadHand]][leadSuit]]; - int maxpd = highestRank[ + const int maxpd = highestRank[ posPoint->rankInSuit[rho[leadHand] ][leadSuit]]; - int min3rd = lowestRank [ + const int min3rd = lowestRank [ posPoint->rankInSuit[partner[leadHand]][leadSuit]]; - int minpd = lowestRank [ + const int minpd = lowestRank [ posPoint->rankInSuit[rho[leadHand] ][leadSuit]]; for (int k = 0; k < numMoves; k++) @@ -876,9 +876,9 @@ void Moves::WeightAllocNTNotvoid1( // not to be able to beat the lead? // Why rRank? - int max3rd = highestRank[ + const int max3rd = highestRank[ posPoint->rankInSuit[partner[leadHand]][leadSuit]]; - int maxpd = highestRank[ + const int maxpd = highestRank[ posPoint->rankInSuit[rho[leadHand]][leadSuit] ]; if (maxpd > trackp->move[0].rank && maxpd > max3rd) @@ -929,7 +929,7 @@ void Moves::WeightAllocTrumpVoid1( // suit != trump: Same question. // Don't ruff ahead of partner? - unsigned short suitCount = posPoint->length[currHand][suit]; + const unsigned short suitCount = posPoint->length[currHand][suit]; int suitAdd; if (leadSuit == trump) // We pitch @@ -1090,10 +1090,10 @@ void Moves::WeightAllocNTVoid1( void Moves::WeightAllocTrumpNotvoid2( pos const * posPoint) { - int cards4th = posPoint->rankInSuit[rho[leadHand]][leadSuit]; - int max4th = highestRank[cards4th]; - int min4th = lowestRank [cards4th]; - int max3rd = mply[0].rank; + const int cards4th = posPoint->rankInSuit[rho[leadHand]][leadSuit]; + const int max4th = highestRank[cards4th]; + const int min4th = lowestRank [cards4th]; + const int max3rd = mply[0].rank; if (leadSuit == trump) { @@ -1264,22 +1264,22 @@ void Moves::WeightAllocTrumpNotvoid2( int Moves::RankForcesAce( - const int cards4th) + const int cards4th) const { // Figure out how high we have to play to force out the top. - moveGroupType * mp = &groupData[cards4th]; + const moveGroupType& mp = groupData[cards4th]; - int g = mp->lastGroup; + int g = mp.lastGroup; int removed = static_cast(trackp->removedRanks[leadSuit]); - while (g >= 1 && ((mp->gap[g] & removed) == mp->gap[g])) + while (g >= 1 && ((mp.gap[g] & removed) == mp.gap[g])) g--; if (! g) return -1; // RHO's second-highest rank. - int secondRHO = (g == 0 ? 0 : mp->rank[g - 1]); + int secondRHO = (g == 0 ? 0 : mp.rank[g-1]); if (secondRHO > trackp->move[1].rank) { @@ -1310,7 +1310,7 @@ void Moves::GetTopNumber( const int ris, const int prank, int& topNumber, - int& mno) + int& mno) const { topNumber = -10; @@ -1319,17 +1319,17 @@ void Moves::GetTopNumber( while (mno < numMoves - 1 && mply[1 + mno].rank > prank) mno++; - moveGroupType * mp = &groupData[ris]; - int g = mp->lastGroup; + const moveGroupType& mp = groupData[ris]; + int g = mp.lastGroup; // Remove partner's card as well. int removed = static_cast(trackp->removedRanks[leadSuit] | bitMapRank[prank]); - int fullseq = mp->fullseq[g]; + int fullseq = mp.fullseq[g]; - while (g >= 1 && ((mp->gap[g] & removed) == mp->gap[g])) - fullseq |= mp->fullseq[--g]; + while (g >= 1 && ((mp.gap[g] & removed) == mp.gap[g])) + fullseq |= mp.fullseq[--g]; topNumber = counttable[fullseq] - 1; } @@ -1345,10 +1345,10 @@ void Moves::WeightAllocNTNotvoid2( // KQx opposite Jxxxx, don't block on the ace. // KJTx opposite 9 with Qx in dummy, do win the T. - int cards4th = posPoint->rankInSuit[rho[leadHand]][leadSuit]; - int max4th = highestRank[cards4th]; - int min4th = lowestRank [cards4th]; - int max3rd = mply[0].rank; + const int cards4th = posPoint->rankInSuit[rho[leadHand]][leadSuit]; + const int max4th = highestRank[cards4th]; + const int min4th = lowestRank [cards4th]; + const int max3rd = mply[0].rank; if (trackp->high[1] == 0 && trackp->move[0].rank > max4th) { @@ -1413,8 +1413,8 @@ void Moves::WeightAllocTrumpVoid2( // Moved a test for partner's win out of the k loop. int suitAdd; - unsigned short suitCount = posPoint->length[currHand][suit]; - int max4th = highestRank[ + const unsigned short suitCount = posPoint->length[currHand][suit]; + const int max4th = highestRank[ posPoint->rankInSuit[rho[leadHand]][leadSuit] ]; if (leadSuit == trump || suit != trump) @@ -1518,7 +1518,7 @@ void Moves::WeightAllocNTVoid2( // for no reason that I could see. This is the same or a tiny // bit better. - unsigned short suitCount = posPoint->length[currHand][suit]; + const unsigned short suitCount = posPoint->length[currHand][suit]; int suitAdd = (suitCount << 6) / 24; // Try not to pitch from Kx or stiff ace. @@ -1536,7 +1536,6 @@ void Moves::WeightAllocNTVoid2( void Moves::WeightAllocCombinedNotvoid3( pos const * posPoint) -// moveType mply[]) { // We're always following suit. // This function is very good, but occasionally it is better @@ -1579,7 +1578,7 @@ void Moves::WeightAllocTrumpVoid3( // rRank vs rank // Don't pitch from Kx or stiff ace. - int mylen = posPoint->length[currHand][suit]; + const int mylen = posPoint->length[currHand][suit]; int val = (mylen << 6) / 24; if ((mylen == 2) && (posPoint->secondBest[suit].hand == currHand)) val -= 2; @@ -1653,28 +1652,27 @@ void Moves::WeightAllocNTVoid3( inline bool Moves::WinningMove( - moveType const * mvp1, - extCard const * mvp2, + const moveType& mvp1, + const extCard& mvp2, const int ourTrump) const { /* Return true if move 1 wins over move 2, with the assumption that move 2 is the presently winning card of the trick */ - if (mvp1->suit == mvp2->suit) + if (mvp1.suit == mvp2.suit) { - if ((mvp1->rank) > (mvp2->rank)) + if (mvp1.rank > mvp2.rank) return true; else return false; } - else if ((mvp1->suit) == ourTrump) + else if (mvp1.suit == ourTrump) return true; else return false; } - int Moves::GetLength( const int trick, const int relHand) const diff --git a/src/Moves.h b/src/Moves.h index 3faa0461..07cdfb02 100644 --- a/src/Moves.h +++ b/src/Moves.h @@ -135,52 +135,31 @@ class Moves void WeightAllocTrumpNotvoid1( pos const * posPoint); - void WeightAllocNTNotvoid1( - pos const * posPoint); - - void WeightAllocTrumpVoid1( - pos const * posPoint); - - void WeightAllocNTVoid1( - pos const * posPoint); - - void WeightAllocTrumpNotvoid2( - pos const * posPoint); - - void WeightAllocNTNotvoid2( - pos const * posPoint); - - void WeightAllocTrumpVoid2( - pos const * posPoint); - - void WeightAllocNTVoid2( - pos const * posPoint); - - void WeightAllocCombinedNotvoid3( - pos const * posPoint); - - void WeightAllocTrumpVoid3( - pos const * posPoint); - - void WeightAllocNTVoid3( - pos const * posPoint); + void WeightAllocNTNotvoid1(pos const * posPoint); + void WeightAllocTrumpVoid1(pos const * posPoint); + void WeightAllocNTVoid1(pos const * posPoint); + void WeightAllocTrumpNotvoid2(pos const * posPoint); + void WeightAllocNTNotvoid2(pos const * posPoint); + void WeightAllocTrumpVoid2(pos const * posPoint); + void WeightAllocNTVoid2(pos const * posPoint); + void WeightAllocCombinedNotvoid3(pos const * posPoint); + void WeightAllocTrumpVoid3(pos const * posPoint); + void WeightAllocNTVoid3(pos const * posPoint); void GetTopNumber( const int ris, const int prank, int& topNumber, - int& mno); + int& mno) const; - int RankForcesAce( - int cards4th); + int RankForcesAce(int cards4th) const; typedef void (Moves::*WeightPtr)(pos const * posPoint); - WeightPtr WeightList[16]; inline bool WinningMove( - moveType const * mvp1, - extCard const * mvp2, + const moveType& mvp1, + const extCard& mvp2, const int trump) const; void PrintMove( From 9a364fb2da5560b85923a2452dbb1e9b1a6956ba Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 15:58:12 +0200 Subject: [PATCH 059/132] Starting on QuickTricks --- src/ABsearch.cpp | 2 +- src/QuickTricks.cpp | 34 ++++++++++++++++------------------ src/QuickTricks.h | 19 ++++++++++--------- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index 67262d67..f6587e55 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -293,7 +293,7 @@ bool ABsearch0( bool res; TIMER_START(TIMER_NO_QT, depth); int qtricks = QuickTricks(posPoint, hand, depth, target, - trump, &res, thrp); + trump, res, thrp); TIMER_END(TIMER_NO_QT, depth); if (thrp->nodeTypeStore[hand] == MAXNODE) diff --git a/src/QuickTricks.cpp b/src/QuickTricks.cpp index a2246d3d..36b76979 100644 --- a/src/QuickTricks.cpp +++ b/src/QuickTricks.cpp @@ -8,9 +8,7 @@ */ -#include "dds.h" #include "QuickTricks.h" -#include "Memory.h" int QtricksLeadHandNT( @@ -62,7 +60,7 @@ int QuickTricksPartnerHandTrump( int commSuit, int commRank, int * res, - ThreadData * thrp); + ThreadData const * thrp); int QuickTricksPartnerHandNT( int hand, @@ -78,24 +76,24 @@ int QuickTricksPartnerHandNT( int commSuit, int commRank, int * res, - ThreadData * thrp); + ThreadData const * thrp); int QuickTricks( pos * posPoint, - int hand, - int depth, - int target, - int trump, - bool * result, - ThreadData * thrp) + const int hand, + const int depth, + const int target, + const int trump, + bool& result, + ThreadData const * thrp) { int suit, commRank = 0, commSuit = -1; int res; int lhoTrumpRanks = 0, rhoTrumpRanks = 0; int cutoff, lowestQtricks = 0; - *result = true; + result = true; int qtricks = 0; if (thrp->nodeTypeStore[hand] == MAXNODE) @@ -104,9 +102,9 @@ int QuickTricks( cutoff = posPoint->tricksMAX - target + (depth >> 2) + 2; bool commPartner = false; - unsigned short (* ris)[DDS_SUITS] = posPoint->rankInSuit; - unsigned char (* len)[DDS_SUITS] = posPoint->length; - highCardType * winner = posPoint->winner; + const unsigned short (* ris)[DDS_SUITS] = posPoint->rankInSuit; + const unsigned char (* len)[DDS_SUITS] = posPoint->length; + highCardType const * winner = posPoint->winner; for (int s = 0; s < DDS_SUITS; s++) { @@ -657,7 +655,7 @@ int QuickTricks( } } - *result = false; + result = false; return qtricks; } @@ -868,7 +866,7 @@ int QuickTricksPartnerHandTrump( int commSuit, int commRank, int * res, - ThreadData * thrp) + ThreadData const * thrp) { /* res=0 Continue with same suit. res=1 Cutoff. @@ -1004,7 +1002,7 @@ int QuickTricksPartnerHandNT( int commSuit, int commRank, int * res, - ThreadData * thrp) + ThreadData const * thrp) { *res = 1; int qt = qtricks; @@ -1099,7 +1097,7 @@ bool QuickTricksSecondHand( int depth, int target, int trump, - ThreadData * thrp) + ThreadData const * thrp) { if (depth == thrp->iniDepth) return false; diff --git a/src/QuickTricks.h b/src/QuickTricks.h index 4668cf44..01f50333 100644 --- a/src/QuickTricks.h +++ b/src/QuickTricks.h @@ -10,24 +10,25 @@ #ifndef DDS_QUICKTRICKS_H #define DDS_QUICKTRICKS_H +#include "dds.h" #include "Memory.h" int QuickTricks( - struct pos * posPoint, - int hand, - int depth, - int target, - int trump, - bool * result, - ThreadData * thrp); + pos * posPoint, + const int hand, + const int depth, + const int target, + const int trump, + bool& result, + ThreadData const * thrp); bool QuickTricksSecondHand( - struct pos * posPoint, + pos * posPoint, int hand, int depth, int target, int trump, - ThreadData * thrp); + ThreadData const * thrp); #endif From 69a26c5a75dabeea7d636a24392238a05361beaa Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 16:16:26 +0200 Subject: [PATCH 060/132] QT cleaner now --- src/QuickTricks.cpp | 286 ++++++++++++++++++++++---------------------- src/QuickTricks.h | 8 +- 2 files changed, 148 insertions(+), 146 deletions(-) diff --git a/src/QuickTricks.cpp b/src/QuickTricks.cpp index 36b76979..37453b39 100644 --- a/src/QuickTricks.cpp +++ b/src/QuickTricks.cpp @@ -12,70 +12,70 @@ int QtricksLeadHandNT( - int hand, + const int hand, pos * posPoint, - int cutoff, - int depth, - int countLho, - int countRho, - int * lhoTrumpRanks, - int * rhoTrumpRanks, - bool commPartner, - int commSuit, - int countOwn, - int countPart, - int suit, - int qtricks, - int trump, - int * res); + const int cutoff, + const int depth, + const int countLho, + const int countRho, + int& lhoTrumpRanks, + int& rhoTrumpRanks, + const bool commPartner, + const int commSuit, + const int countOwn, + const int countPart, + const int suit, + const int qtricks, + const int trump, + int& res); int QtricksLeadHandTrump( - int hand, + const int hand, pos * posPoint, - int cutoff, - int depth, - int countLho, - int countRho, - int lhoTrumpRanks, - int rhoTrumpRanks, - int countOwn, - int countPart, - int suit, - int qtricks, - int * res); + const int cutoff, + const int depth, + const int countLho, + const int countRho, + const int lhoTrumpRanks, + const int rhoTrumpRanks, + const int countOwn, + const int countPart, + const int suit, + const int qtricks, + int& res); int QuickTricksPartnerHandTrump( - int hand, + const int hand, pos * posPoint, - int cutoff, - int depth, - int countLho, - int countRho, - int lhoTrumpRanks, - int rhoTrumpRanks, - int countOwn, - int countPart, - int suit, - int qtricks, - int commSuit, - int commRank, - int * res, + const int cutoff, + const int depth, + const int countLho, + const int countRho, + const int lhoTrumpRanks, + const int rhoTrumpRanks, + const int countOwn, + const int countPart, + const int suit, + const int qtricks, + const int commSuit, + const int commRank, + int& res, ThreadData const * thrp); int QuickTricksPartnerHandNT( - int hand, + const int hand, pos * posPoint, - int cutoff, - int depth, - int countLho, - int countRho, - int countOwn, - int countPart, - int suit, - int qtricks, - int commSuit, - int commRank, - int * res, + const int cutoff, + const int depth, + const int countLho, + const int countRho, + const int countOwn, + const int countPart, + const int suit, + const int qtricks, + const int commSuit, + const int commRank, + int& res, ThreadData const * thrp); @@ -431,7 +431,7 @@ int QuickTricks( { qtricks = QtricksLeadHandTrump(hand, posPoint, cutoff, depth, countLho, countRho, lhoTrumpRanks, rhoTrumpRanks, - countOwn, countPart, suit, qtricks, &res); + countOwn, countPart, suit, qtricks, res); if (res == 1) return qtricks; @@ -446,9 +446,9 @@ int QuickTricks( else { qtricks = QtricksLeadHandNT(hand, posPoint, cutoff, depth, - countLho, countRho, &lhoTrumpRanks, &rhoTrumpRanks, + countLho, countRho, lhoTrumpRanks, rhoTrumpRanks, commPartner, commSuit, countOwn, countPart, - suit, qtricks, trump, &res); + suit, qtricks, trump, res); if (res == 1) return qtricks; @@ -484,7 +484,7 @@ int QuickTricks( qtricks = QuickTricksPartnerHandTrump(hand, posPoint, cutoff, depth, countLho, countRho, lhoTrumpRanks, rhoTrumpRanks, countOwn, - countPart, suit, qtricks, commSuit, commRank, &res, thrp); + countPart, suit, qtricks, commSuit, commRank, res, thrp); if (res == 1) return qtricks; @@ -500,7 +500,7 @@ int QuickTricks( { qtricks = QuickTricksPartnerHandNT(hand, posPoint, cutoff, depth, countLho, countRho, countOwn, countPart, - suit, qtricks, commSuit, commRank, &res, thrp); + suit, qtricks, commSuit, commRank, res, thrp); if (res == 1) return qtricks; @@ -661,25 +661,25 @@ int QuickTricks( int QtricksLeadHandTrump( - int hand, + const int hand, pos * posPoint, - int cutoff, - int depth, - int countLho, - int countRho, - int lhoTrumpRanks, - int rhoTrumpRanks, - int countOwn, - int countPart, - int suit, - int qtricks, - int * res) + const int cutoff, + const int depth, + const int countLho, + const int countRho, + const int lhoTrumpRanks, + const int rhoTrumpRanks, + const int countOwn, + const int countPart, + const int suit, + const int qtricks, + int& res) { /* res=0 Continue with same suit. res=1 Cutoff. res=2 Continue with next suit. */ - *res = 1; + res = 1; int qt = qtricks; if (((countLho != 0) || (lhoTrumpRanks == 0)) && @@ -700,7 +700,7 @@ int QtricksLeadHandTrump( qt += countOwn - 1; if (qt >= cutoff) return qt; - *res = 2; + res = 2; return qt; } } @@ -719,7 +719,7 @@ int QtricksLeadHandTrump( qt += countOwn - 2; if (qt >= cutoff) return qt; - *res = 2; + res = 2; return qt; } } @@ -743,38 +743,38 @@ int QtricksLeadHandTrump( qt += Max(countOwn - 2, countPart - 2); if (qt >= cutoff) return qt; - *res = 2; + res = 2; return qt; } } } - *res = 0; + res = 0; return qt; } int QtricksLeadHandNT( - int hand, + const int hand, pos * posPoint, - int cutoff, - int depth, - int countLho, - int countRho, - int * lhoTrumpRanks, - int * rhoTrumpRanks, - bool commPartner, - int commSuit, - int countOwn, - int countPart, - int suit, - int qtricks, - int trump, - int * res) + const int cutoff, + const int depth, + const int countLho, + const int countRho, + int& lhoTrumpRanks, + int& rhoTrumpRanks, + const bool commPartner, + const int commSuit, + const int countOwn, + const int countPart, + const int suit, + const int qtricks, + const int trump, + int& res) { /* res=0 Continue with same suit. res=1 Cutoff. res=2 Continue with next suit. */ - *res = 1; + res = 1; int qt = qtricks; posPoint->winRanks[depth][suit] |= bitMapRank[posPoint->winner[suit].rank]; @@ -784,8 +784,8 @@ int QtricksLeadHandNT( return qt; if ((trump == suit) && ((!commPartner) || (suit != commSuit))) { - (*lhoTrumpRanks) = Max(0, (*lhoTrumpRanks) - 1); - (*rhoTrumpRanks) = Max(0, (*rhoTrumpRanks) - 1); + lhoTrumpRanks = Max(0, lhoTrumpRanks - 1); + rhoTrumpRanks = Max(0, rhoTrumpRanks - 1); } if ((countLho <= 1) && (countRho <= 1) && (countPart <= 1)) @@ -793,7 +793,7 @@ int QtricksLeadHandNT( qt += countOwn - 1; if (qt >= cutoff) return qt; - *res = 2; + res = 2; return qt; } @@ -806,15 +806,15 @@ int QtricksLeadHandNT( return qt; if ((trump == suit) && ((!commPartner) || (suit != commSuit))) { - (*lhoTrumpRanks) = Max(0, (*lhoTrumpRanks) - 1); - (*rhoTrumpRanks) = Max(0, (*rhoTrumpRanks) - 1); + lhoTrumpRanks = Max(0, lhoTrumpRanks - 1); + rhoTrumpRanks = Max(0, rhoTrumpRanks - 1); } if ((countLho <= 2) && (countRho <= 2) && (countPart <= 2)) { qt += countOwn - 2; if (qt >= cutoff) return qt; - *res = 2; + res = 2; return qt; } } @@ -830,8 +830,8 @@ int QtricksLeadHandNT( return qt; if ((trump == suit) && ((!commPartner) || (suit != commSuit))) { - (*lhoTrumpRanks) = Max(0, (*lhoTrumpRanks) - 1); - (*rhoTrumpRanks) = Max(0, (*rhoTrumpRanks) - 1); + lhoTrumpRanks = Max(0, lhoTrumpRanks - 1); + rhoTrumpRanks = Max(0, rhoTrumpRanks - 1); } if ((countLho <= 2) && (countRho <= 2) && @@ -840,39 +840,39 @@ int QtricksLeadHandNT( qt += Max(countOwn - 2, countPart - 2); if (qt >= cutoff) return qt; - *res = 2; + res = 2; return qt; } } - *res = 0; + res = 0; return qt; } int QuickTricksPartnerHandTrump( - int hand, + const int hand, pos * posPoint, - int cutoff, - int depth, - int countLho, - int countRho, - int lhoTrumpRanks, - int rhoTrumpRanks, - int countOwn, - int countPart, - int suit, - int qtricks, - int commSuit, - int commRank, - int * res, + const int cutoff, + const int depth, + const int countLho, + const int countRho, + const int lhoTrumpRanks, + const int rhoTrumpRanks, + const int countOwn, + const int countPart, + const int suit, + const int qtricks, + const int commSuit, + const int commRank, + int& res, ThreadData const * thrp) { /* res=0 Continue with same suit. res=1 Cutoff. res=2 Continue with next suit. */ - *res = 1; + res = 1; int qt = qtricks; if (((countLho != 0) || (lhoTrumpRanks == 0)) && ((countRho != 0) || (rhoTrumpRanks == 0))) @@ -894,7 +894,7 @@ int QuickTricksPartnerHandTrump( qt += countPart - 1; if (qt >= cutoff) return qt; - *res = 2; + res = 2; return qt; } } @@ -917,7 +917,7 @@ int QuickTricksPartnerHandTrump( qt += countPart - 2; if (qt >= cutoff) return qt; - *res = 2; + res = 2; return qt; } } @@ -947,7 +947,7 @@ int QuickTricksPartnerHandTrump( qt += Max(countPart - 2, countOwn - 2); if (qt >= cutoff) return qt; - *res = 2; + res = 2; return qt; } } @@ -983,28 +983,28 @@ int QuickTricksPartnerHandTrump( } } } - *res = 0; + res = 0; return qt; } int QuickTricksPartnerHandNT( - int hand, + const int hand, pos * posPoint, - int cutoff, - int depth, - int countLho, - int countRho, - int countOwn, - int countPart, - int suit, - int qtricks, - int commSuit, - int commRank, - int * res, + const int cutoff, + const int depth, + const int countLho, + const int countRho, + const int countOwn, + const int countPart, + const int suit, + const int qtricks, + const int commSuit, + const int commRank, + int& res, ThreadData const * thrp) { - *res = 1; + res = 1; int qt = qtricks; posPoint->winRanks[depth][suit] |= @@ -1020,7 +1020,7 @@ int QuickTricksPartnerHandNT( qt += countPart - 1; if (qt >= cutoff) return qt; - *res = 2; + res = 2; return qt; } @@ -1038,7 +1038,7 @@ int QuickTricksPartnerHandNT( qt += countPart - 2; if (qt >= cutoff) return qt; - *res = 2; + res = 2; return qt; } } @@ -1060,7 +1060,7 @@ int QuickTricksPartnerHandNT( qt += Max(countPart - 2, countOwn - 2); if (qt >= cutoff) return qt; - *res = 2; + res = 2; return qt; } } @@ -1080,23 +1080,25 @@ int QuickTricksPartnerHandNT( return qt; if ((countOwn <= 2) && (countLho <= 2) && (countRho <= 2)) { - qtricks += countPart - 2; + // TODO: Is the fix to qt correct? + // qtricks += countPart - 2; + qt += countPart - 2; if (qt >= cutoff) return qt; } } } - *res = 0; + res = 0; return qt; } bool QuickTricksSecondHand( pos * posPoint, - int hand, - int depth, - int target, - int trump, + const int hand, + const int depth, + const int target, + const int trump, ThreadData const * thrp) { if (depth == thrp->iniDepth) diff --git a/src/QuickTricks.h b/src/QuickTricks.h index 01f50333..d3e7b828 100644 --- a/src/QuickTricks.h +++ b/src/QuickTricks.h @@ -25,10 +25,10 @@ int QuickTricks( bool QuickTricksSecondHand( pos * posPoint, - int hand, - int depth, - int target, - int trump, + const int hand, + const int depth, + const int target, + const int trump, ThreadData const * thrp); #endif From 98837a8fcad3d310bcc5023804ebe9c72310a973 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 16:24:45 +0200 Subject: [PATCH 061/132] Scheduler consts --- src/Scheduler.cpp | 41 ++++++++++++++++++++--------------------- src/Scheduler.h | 26 ++++++++++---------------- 2 files changed, 30 insertions(+), 37 deletions(-) diff --git a/src/Scheduler.cpp b/src/Scheduler.cpp index f574ecce..43cc84e4 100644 --- a/src/Scheduler.cpp +++ b/src/Scheduler.cpp @@ -391,8 +391,8 @@ void Scheduler::FinetuneGroups() bool Scheduler::SameHand( - int hno1, - int hno2) + const int hno1, + const int hno2) const { for (int h = 0; h < DDS_HANDS; h++) for (int s = 0; s < DDS_SUITS; s++) @@ -663,25 +663,25 @@ void Scheduler::SortTrace() int Scheduler::Strength( - deal const * dl) + deal const * dl) const { // If the strength in all suits is evenly split, then the // "strength" returned is close to 0. Maximum is 49. - unsigned sp = (dl->remainCards[0][0] | dl->remainCards[2][0]) >> 2; - unsigned he = (dl->remainCards[0][1] | dl->remainCards[2][1]) >> 2; - unsigned di = (dl->remainCards[0][2] | dl->remainCards[2][2]) >> 2; - unsigned cl = (dl->remainCards[0][3] | dl->remainCards[2][3]) >> 2; + const unsigned sp = (dl->remainCards[0][0] | dl->remainCards[2][0]) >> 2; + const unsigned he = (dl->remainCards[0][1] | dl->remainCards[2][1]) >> 2; + const unsigned di = (dl->remainCards[0][2] | dl->remainCards[2][2]) >> 2; + const unsigned cl = (dl->remainCards[0][3] | dl->remainCards[2][3]) >> 2; - int hsp = highCards[sp]; - int hhe = highCards[he]; - int hdi = highCards[di]; - int hcl = highCards[cl]; + const int hsp = highCards[sp]; + const int hhe = highCards[he]; + const int hdi = highCards[di]; + const int hcl = highCards[cl]; int dev = (hsp >= 14 ? hsp - 14 : 14 - hsp) + - (hhe >= 14 ? hhe - 14 : 14 - hhe) + - (hdi >= 14 ? hdi - 14 : 14 - hdi) + - (hcl >= 14 ? hcl - 14 : 14 - hcl); + (hhe >= 14 ? hhe - 14 : 14 - hhe) + + (hdi >= 14 ? hdi - 14 : 14 - hdi) + + (hcl >= 14 ? hcl - 14 : 14 - hcl); if (dev >= 50) dev = 49; @@ -690,7 +690,7 @@ int Scheduler::Strength( int Scheduler::Fanout( - deal const * dl) + deal const * dl) const { // The fanout for a given suit and a given player is the number // of bit groups, so KT982 has 3 groups. In a given suit the @@ -719,8 +719,7 @@ int Scheduler::Fanout( } -schedType Scheduler::GetNumber( - int thrId) +schedType Scheduler::GetNumber(const int thrId) { int g = threadGroup[thrId]; listType * lp; @@ -802,14 +801,14 @@ schedType Scheduler::GetNumber( #ifdef DDS_SCHEDULER -void Scheduler::StartThreadTimer(int thrId) +void Scheduler::StartThreadTimer(const int thrId) { timersThread[thrId].Reset(); timersThread[thrId].Start(); } -void Scheduler::EndThreadTimer(int thrId) +void Scheduler::EndThreadTimer(const int thrId) { timersThread[thrId].End(); int timeUser = timersThread[thrId].UserTime(); @@ -892,7 +891,7 @@ void Scheduler::EndBlockTimer() } -void Scheduler::PrintTiming() +void Scheduler::PrintTiming() const { const string fname = string(DDS_SCHEDULER_PREFIX) + DDS_DEBUG_SUFFIX; ofstream fout; @@ -942,7 +941,7 @@ void Scheduler::PrintTiming() int Scheduler::PredictedTime( deal * dl, - int number) + int number) const { int trump = dl->trump; int NT = (trump == 4 ? 100 : 0); diff --git a/src/Scheduler.h b/src/Scheduler.h index 02a49e4e..5a830c70 100644 --- a/src/Scheduler.h +++ b/src/Scheduler.h @@ -12,9 +12,9 @@ #include +#include "dds.h" #include "TimeStatList.h" #include "Timer.h" -#include "dds.h" using namespace std; @@ -99,11 +99,8 @@ class Scheduler void SortHands(const enum RunMode mode); - int Strength( - deal const * dl); - - int Fanout( - deal const * dl); + int Strength(deal const * dl) const; + int Fanout(deal const * dl) const; void Reset(); @@ -116,8 +113,8 @@ class Scheduler void FinetuneGroups(); bool SameHand( - int hno1, - int hno2); + const int hno1, + const int hno2) const; void SortSolve(), SortCalc(), @@ -148,7 +145,7 @@ class Scheduler int PredictedTime( deal * dl, - int number); + int number) const; public: @@ -169,21 +166,18 @@ class Scheduler const enum RunMode mode, boards const * bop); - schedType GetNumber( - int thrId); + schedType GetNumber(const int thrId); #ifdef DDS_SCHEDULER - void StartThreadTimer( - int thrId); + void StartThreadTimer(const int thrId); - void EndThreadTimer( - int thrId); + void EndThreadTimer(const int thrId); void StartBlockTimer(); void EndBlockTimer(); - void PrintTiming(); + void PrintTiming() const; #endif }; From f7eed3e9e272ea9c5b83b84d33fb9c8df834eecf Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 16:31:07 +0200 Subject: [PATCH 062/132] Small checkin --- src/CalcTables.cpp | 2 -- src/TransTable.cpp | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/CalcTables.cpp b/src/CalcTables.cpp index d10c890c..f35aacd6 100644 --- a/src/CalcTables.cpp +++ b/src/CalcTables.cpp @@ -8,8 +8,6 @@ */ -#include - #include "dds.h" #include "SolveBoard.h" #include "PBN.h" diff --git a/src/TransTable.cpp b/src/TransTable.cpp index 0131e523..71142adf 100644 --- a/src/TransTable.cpp +++ b/src/TransTable.cpp @@ -7,8 +7,6 @@ See LICENSE and README. */ -#include - #include "dds.h" #include "TransTable.h" #include "debug.h" From d453d565d9f7dd5b2f4337040d7c9cbd6b916e45 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 21:19:00 +0200 Subject: [PATCH 063/132] Intermediate changes to ABstats --- src/ABstats.cpp | 54 +++++++++++++++++------------------ src/ABstats.h | 18 ++++++++++-- src/Makefiles/depends_obj.txt | 9 +++--- src/PlayAnalyser.cpp | 1 - src/SolveBoard.cpp | 1 - 5 files changed, 46 insertions(+), 37 deletions(-) diff --git a/src/ABstats.cpp b/src/ABstats.cpp index 0c5cd73d..9bdfdb0d 100644 --- a/src/ABstats.cpp +++ b/src/ABstats.cpp @@ -22,8 +22,10 @@ ABstats::ABstats() fileSet = false; fp = stdout; + for (int p = 0; p < DDS_AB_POS; p++) + sprintf(name[p], "Position %4d", p); + ABstats::Reset(); - ABstats::ResetCum(); } @@ -39,7 +41,8 @@ void ABstats::Reset() { for (int p = 0; p < DDS_AB_POS; p++) { - sprintf(name[p], "Position %4d", p); + sumNew[p] = 0; + psumNew[p] = 0; for (int depth = 0; depth < DDS_MAXDEPTH; depth++) counter[p][depth] = 0; @@ -103,6 +106,9 @@ void ABstats::IncrPos( return; counter[no][depth]++; + sumNew[no]++; + psumNew[no] += depth; + if (side) score[1][depth]++; else @@ -113,16 +119,24 @@ void ABstats::IncrPos( void ABstats::IncrNode(int depth) { nodes[depth]++; + nodesCum[depth]++; allnodes++; } -int ABstats::GetNodes() +int ABstats::GetNodes() const { return allnodes; } +#include "../include/portab.h" +void ABstats::PrintStatsPosition(FILE * fpl) const +{ + UNUSED(fpl); +} + + void ABstats::PrintStats() { if (! fileSet) @@ -136,15 +150,9 @@ void ABstats::PrintStats() fileSet = true; } + int sumScore1 = 0 , sumScore0 = 0; int psumScore1 = 0 , psumScore0 = 0; - int sum[DDS_AB_POS], psum[DDS_AB_POS]; - - for (int p = 0; p < DDS_AB_POS; p++) - { - sum[p] = 0; - psum[p] = 0; - } for (int d = 0; d < DDS_MAXDEPTH; d++) { @@ -153,14 +161,6 @@ void ABstats::PrintStats() psumScore1 += d * score[1][d]; psumScore0 += d * score[0][d]; - - for (int p = 0; p < DDS_AB_POS; p++) - { - sum[p] += counter[p][d]; - psum[p] += d * counter[p][d]; - } - - nodesCum[d] += nodes[d]; } allnodesCum += allnodes; @@ -173,8 +173,8 @@ void ABstats::PrintStats() for (int p = 0; p < DDS_AB_POS; p++) { - counterCum[p] += sum[p]; - pcounterCum[p] += psum[p]; + counterCum[p] += sumNew[p]; + pcounterCum[p] += psumNew[p]; } int s = sumScore1 + sumScore0; @@ -216,14 +216,14 @@ void ABstats::PrintStats() for (int p = 0; p < DDS_AB_POS; p++) { - if (sum[p]) + if (sumNew[p]) { fprintf(fp, "%2d %-20s %8d %5.1f %5.1f %8d %5.1f %5.1f\n", p, name[p], - sum[p], - 100. * sum[p] / static_cast(s), - psum[p] / static_cast(sum[p]), + sumNew[p], + 100. * sumNew[p] / static_cast(s), + psumNew[p] / static_cast(sumNew[p]), counterCum[p], 100. * counterCum[p] / static_cast(cs), pcounterCum[p] / static_cast(counterCum[p])); @@ -233,8 +233,8 @@ void ABstats::PrintStats() fprintf(fp, "%2d %-20s %8d %5.1f %5s %8d %5.1f %5.1f\n", p, name[p], - sum[p], - 100. * sum[p] / static_cast(s), + sumNew[p], + 100. * sumNew[p] / static_cast(s), "", counterCum[p], 100. * counterCum[p] / static_cast(cs), @@ -334,7 +334,7 @@ void ABstats::PrintStats() "S", sumScore1, sumScore0); for (int p = 0; p < DDS_AB_POS; p++) - fprintf(fp, " %5d", sum[p]); + fprintf(fp, " %5d", sumNew[p]); fprintf(fp, "\n\n"); #endif diff --git a/src/ABstats.h b/src/ABstats.h index a5ae06f3..d97e1ca5 100644 --- a/src/ABstats.h +++ b/src/ABstats.h @@ -64,20 +64,32 @@ class ABstats int pscoreCum[2]; int nodes[DDS_MAXDEPTH]; int nodesCum[DDS_MAXDEPTH]; - int allnodes, - allnodesCum; + int sumNew[DDS_AB_POS]; + int psumNew[DDS_AB_POS]; + int allnodes; + int allnodesCum; int iniDepth; + void PrintStatsPosition(FILE * fpl) const; + public: ABstats(); ~ABstats(); + void Reset(); + void ResetCum(); + void SetFile(const string& fnameIn); + void SetName(int no, char * name); + void IncrPos(int no, bool side, int depth); + void IncrNode(int depth); - int GetNodes(); + + int GetNodes() const; + void PrintStats(); }; diff --git a/src/Makefiles/depends_obj.txt b/src/Makefiles/depends_obj.txt index 155b243f..be2e3cef 100644 --- a/src/Makefiles/depends_obj.txt +++ b/src/Makefiles/depends_obj.txt @@ -13,17 +13,16 @@ LaterTricks.obj: LaterTricks.h dds.h ../include/portab.h ../include/dll.h LaterTricks.obj: Memory.h TransTable.h Moves.h debug.h Memory.obj: Memory.h TransTable.h ../include/dll.h dds.h ../include/portab.h Memory.obj: Moves.h debug.h -Moves.obj: dds.h ../include/portab.h ../include/dll.h Moves.h ABsearch.h -Moves.obj: debug.h +Moves.obj: dds.h ../include/portab.h ../include/dll.h Moves.h debug.h Par.obj: dds.h ../include/portab.h ../include/dll.h PBN.h PlayAnalyser.obj: dds.h ../include/portab.h ../include/dll.h SolverIF.h PlayAnalyser.obj: Memory.h TransTable.h Moves.h debug.h System.h Scheduler.h PlayAnalyser.obj: TimeStatList.h TimeStat.h Timer.h PBN.h PBN.obj: dds.h ../include/portab.h ../include/dll.h PBN.h -QuickTricks.obj: dds.h ../include/portab.h ../include/dll.h QuickTricks.h +QuickTricks.obj: QuickTricks.h dds.h ../include/portab.h ../include/dll.h QuickTricks.obj: Memory.h TransTable.h Moves.h debug.h -Scheduler.obj: Scheduler.h TimeStatList.h TimeStat.h Timer.h dds.h -Scheduler.obj: ../include/portab.h ../include/dll.h +Scheduler.obj: Scheduler.h dds.h ../include/portab.h ../include/dll.h +Scheduler.obj: TimeStatList.h TimeStat.h Timer.h SolveBoard.obj: SolverIF.h Memory.h TransTable.h ../include/dll.h dds.h SolveBoard.obj: ../include/portab.h Moves.h debug.h SolveBoard.h System.h SolveBoard.obj: Scheduler.h TimeStatList.h TimeStat.h Timer.h PBN.h diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index bef98fe1..3878aae0 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -275,7 +275,6 @@ void PlayChunkCommon(const int thrId) { vector solved; solved.resize(playparam.noOfBoards); - // solvedPlay solved[MAXNOOFBOARDS]; int index; schedType st; diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 2bbfa4a5..4f5d13bb 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -149,7 +149,6 @@ void SolveChunkDDtableCommon( } -#include int SolveAllBoardsN( boards * bop, solvedBoards * solvedp, From a89be38f6b5f9405ec2d39164ebd7343a6a57bca Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 21:49:17 +0200 Subject: [PATCH 064/132] Another intermediate step --- src/ABstats.cpp | 63 ++++++++++++++++++++++++++++++++++++++++++------- src/ABstats.h | 13 ++++++++++ 2 files changed, 68 insertions(+), 8 deletions(-) diff --git a/src/ABstats.cpp b/src/ABstats.cpp index 9bdfdb0d..3184176b 100644 --- a/src/ABstats.cpp +++ b/src/ABstats.cpp @@ -58,6 +58,16 @@ void ABstats::Reset() nodes[depth] = 0; allnodes = 0; + + for (int side = 0; side < 2; side++) + { + for (int depth = 0; depth < DDS_MAXDEPTH; depth++) + ABscores[side].list[depth] = 0; + + ABscores[side].sum = 0; + ABscores[side].sumWeighted = 0; + + } } @@ -79,6 +89,12 @@ void ABstats::ResetCum() counterCum[p] = 0; pcounterCum[p] = 0; } + + for (int side = 0; side < 2; side++) + { + ABscores[side].sumCum = 0; + ABscores[side].sumCumWeighted = 0; + } } @@ -109,10 +125,16 @@ void ABstats::IncrPos( sumNew[no]++; psumNew[no] += depth; - if (side) - score[1][depth]++; - else - score[0][depth]++; + const int iside = (side ? 1 : 0); + + score[iside][depth]++; + + ABscores[iside].list[depth]++; + ABscores[iside].sum++; + ABscores[iside].sumWeighted += depth; + ABscores[iside].sumCum++; + ABscores[iside].sumCumWeighted += depth; + } @@ -156,19 +178,19 @@ void ABstats::PrintStats() for (int d = 0; d < DDS_MAXDEPTH; d++) { - sumScore1 += score[1][d]; + sumScore1 += score[1][d]; // ABscores[1].sum sumScore0 += score[0][d]; - psumScore1 += d * score[1][d]; + psumScore1 += d * score[1][d]; // ABscores[1].sumWeighted; psumScore0 += d * score[0][d]; } allnodesCum += allnodes; - scoreCum[1] += sumScore1; + scoreCum[1] += sumScore1; // ABscores[1].sumCum; scoreCum[0] += sumScore0; - pscoreCum[1] += psumScore1; + pscoreCum[1] += psumScore1; // ABscores[1].sumCumWeighted pscoreCum[0] += psumScore0; for (int p = 0; p < DDS_AB_POS; p++) @@ -177,6 +199,31 @@ void ABstats::PrintStats() pcounterCum[p] += psumNew[p]; } +if (ABscores[1].sum != sumScore1) + fprintf(fp, "1sum %d %d\n", ABscores[1].sum, sumScore1); + +if (ABscores[0].sum != sumScore0) + fprintf(fp, "0sum %d %d\n", ABscores[0].sum, sumScore0); + +if (ABscores[1].sumWeighted != psumScore1) + fprintf(fp, "1sumw %d %d\n", ABscores[1].sumWeighted, psumScore1); + +if (ABscores[0].sumWeighted != psumScore0) + fprintf(fp, "0sumw %d %d\n", ABscores[0].sumWeighted, psumScore0); + +if (ABscores[1].sumCum != scoreCum[1]) + fprintf(fp, "1sumc %d %d\n", ABscores[1].sumCum, scoreCum[1]); + +if (ABscores[0].sumCum != scoreCum[0]) + fprintf(fp, "0sumc %d %d\n", ABscores[0].sumCum, scoreCum[0]); + +if (ABscores[1].sumCumWeighted != pscoreCum[1]) + fprintf(fp, "1sumcw %d %d\n", ABscores[1].sumCumWeighted, pscoreCum[1]); + +if (ABscores[0].sumCumWeighted != pscoreCum[0]) + fprintf(fp, "0sumcw %d %d\n", ABscores[0].sumCumWeighted, pscoreCum[0]); + + int s = sumScore1 + sumScore0; int cs = scoreCum[1] + scoreCum[0]; if (s) diff --git a/src/ABstats.h b/src/ABstats.h index d97e1ca5..984e7eb6 100644 --- a/src/ABstats.h +++ b/src/ABstats.h @@ -47,6 +47,15 @@ using namespace std; #define DDS_AB_POS 7 +struct ABtracker +{ + int list[DDS_MAXDEPTH]; + int sum; + int sumWeighted; + int sumCum; + int sumCumWeighted; +}; + class ABstats { @@ -66,6 +75,10 @@ class ABstats int nodesCum[DDS_MAXDEPTH]; int sumNew[DDS_AB_POS]; int psumNew[DDS_AB_POS]; + + ABtracker ABscores[2]; + + int allnodes; int allnodesCum; int iniDepth; From 2c0fddae6d3c1100ac90d0efd36ab213cb964195 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 21:56:30 +0200 Subject: [PATCH 065/132] Further step --- src/ABstats.cpp | 76 +++++++++++-------------------------------------- 1 file changed, 16 insertions(+), 60 deletions(-) diff --git a/src/ABstats.cpp b/src/ABstats.cpp index 3184176b..e7e9bf4b 100644 --- a/src/ABstats.cpp +++ b/src/ABstats.cpp @@ -172,60 +172,16 @@ void ABstats::PrintStats() fileSet = true; } - - int sumScore1 = 0 , sumScore0 = 0; - int psumScore1 = 0 , psumScore0 = 0; - - for (int d = 0; d < DDS_MAXDEPTH; d++) - { - sumScore1 += score[1][d]; // ABscores[1].sum - sumScore0 += score[0][d]; - - psumScore1 += d * score[1][d]; // ABscores[1].sumWeighted; - psumScore0 += d * score[0][d]; - } - allnodesCum += allnodes; - scoreCum[1] += sumScore1; // ABscores[1].sumCum; - scoreCum[0] += sumScore0; - - pscoreCum[1] += psumScore1; // ABscores[1].sumCumWeighted - pscoreCum[0] += psumScore0; - for (int p = 0; p < DDS_AB_POS; p++) { counterCum[p] += sumNew[p]; pcounterCum[p] += psumNew[p]; } -if (ABscores[1].sum != sumScore1) - fprintf(fp, "1sum %d %d\n", ABscores[1].sum, sumScore1); - -if (ABscores[0].sum != sumScore0) - fprintf(fp, "0sum %d %d\n", ABscores[0].sum, sumScore0); - -if (ABscores[1].sumWeighted != psumScore1) - fprintf(fp, "1sumw %d %d\n", ABscores[1].sumWeighted, psumScore1); - -if (ABscores[0].sumWeighted != psumScore0) - fprintf(fp, "0sumw %d %d\n", ABscores[0].sumWeighted, psumScore0); - -if (ABscores[1].sumCum != scoreCum[1]) - fprintf(fp, "1sumc %d %d\n", ABscores[1].sumCum, scoreCum[1]); - -if (ABscores[0].sumCum != scoreCum[0]) - fprintf(fp, "0sumc %d %d\n", ABscores[0].sumCum, scoreCum[0]); - -if (ABscores[1].sumCumWeighted != pscoreCum[1]) - fprintf(fp, "1sumcw %d %d\n", ABscores[1].sumCumWeighted, pscoreCum[1]); - -if (ABscores[0].sumCumWeighted != pscoreCum[0]) - fprintf(fp, "0sumcw %d %d\n", ABscores[0].sumCumWeighted, pscoreCum[0]); - - - int s = sumScore1 + sumScore0; - int cs = scoreCum[1] + scoreCum[0]; + int s = ABscores[1].sum + ABscores[0].sum; + int cs = ABscores[1].sumCum + ABscores[0].sumCum; if (s) { fprintf(fp, "%2s %-20s %8s %5s %5s %8s %5s %5s\n", @@ -244,22 +200,22 @@ if (ABscores[0].sumCumWeighted != pscoreCum[0]) fprintf(fp, "%2s %-20s %8d %5.1f %5.1f %8d %5.1f %5.1f\n", "", "Side1", - sumScore1, - 100. * sumScore1 / static_cast(s), - psumScore1 / static_cast(s), - scoreCum[1], - 100. * scoreCum[1] / static_cast(cs), - pscoreCum[1] / static_cast(cs)); + ABscores[1].sum, + 100. * ABscores[1].sum / static_cast(s), + ABscores[1].sumWeighted / static_cast(s), + ABscores[1].sumCum, + 100. * ABscores[1].sumCum / static_cast(cs), + ABscores[1].sumCumWeighted / static_cast(cs)); fprintf(fp, "%2s %-20s %8d %5.1f %5.1f %8d %5.1f %5.1f\n\n", "", "Side0", - sumScore0, - 100. * sumScore0 / static_cast(s), - psumScore0 / static_cast(s), - scoreCum[0], - 100. * scoreCum[0] / static_cast(cs), - pscoreCum[0] / static_cast(cs)); + ABscores[0].sum, + 100. * ABscores[0].sum / static_cast(s), + ABscores[0].sumWeighted / static_cast(s), + ABscores[0].sumCum, + 100. * ABscores[0].sumCum / static_cast(cs), + ABscores[0].sumCumWeighted / static_cast(cs)); for (int p = 0; p < DDS_AB_POS; p++) { @@ -347,7 +303,7 @@ if (ABscores[0].sumCumWeighted != pscoreCum[0]) } fprintf(fp, "%-5s %6d\n\n\n", "Diff", - allnodes - sumScore1 - sumScore0); + allnodes - ABscores[1].sum - ABscores[0].sum); #ifdef DDS_AB_DETAILS fprintf(fp, "%2s %6s %6s", @@ -378,7 +334,7 @@ if (ABscores[0].sumCumWeighted != pscoreCum[0]) fprintf(fp, "---------------------------\n"); fprintf(fp, "%2s %6d %6d", - "S", sumScore1, sumScore0); + "S", ABscores[1].sum, ABscores[0].sum); for (int p = 0; p < DDS_AB_POS; p++) fprintf(fp, " %5d", sumNew[p]); From 6c3d59b824d9c9d0d9f3ed0705aef3c482f623e7 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 22:13:14 +0200 Subject: [PATCH 066/132] Further step --- src/ABstats.cpp | 93 +++++++++++++++++++++++++++++++++++-------------- src/ABstats.h | 3 +- 2 files changed, 69 insertions(+), 27 deletions(-) diff --git a/src/ABstats.cpp b/src/ABstats.cpp index e7e9bf4b..9ca8a60f 100644 --- a/src/ABstats.cpp +++ b/src/ABstats.cpp @@ -62,11 +62,19 @@ void ABstats::Reset() for (int side = 0; side < 2; side++) { for (int depth = 0; depth < DDS_MAXDEPTH; depth++) - ABscores[side].list[depth] = 0; + ABsides[side].list[depth] = 0; - ABscores[side].sum = 0; - ABscores[side].sumWeighted = 0; + ABsides[side].sum = 0; + ABsides[side].sumWeighted = 0; + } + + for (int place = 0; place < DDS_AB_POS; place++) + { + for (int depth = 0; depth < DDS_MAXDEPTH; depth++) + ABplaces[place].list[depth] = 0; + ABplaces[place].sum = 0; + ABplaces[place].sumWeighted = 0; } } @@ -92,8 +100,14 @@ void ABstats::ResetCum() for (int side = 0; side < 2; side++) { - ABscores[side].sumCum = 0; - ABscores[side].sumCumWeighted = 0; + ABsides[side].sumCum = 0; + ABsides[side].sumCumWeighted = 0; + } + + for (int place = 0; place < DDS_AB_POS; place++) + { + ABplaces[place].sumCum = 0; + ABplaces[place].sumCumWeighted = 0; } } @@ -125,15 +139,21 @@ void ABstats::IncrPos( sumNew[no]++; psumNew[no] += depth; + ABplaces[no].list[depth]++; + ABplaces[no].sum++; + ABplaces[no].sumWeighted += depth; + ABplaces[no].sumCum++; + ABplaces[no].sumCumWeighted += depth; + const int iside = (side ? 1 : 0); score[iside][depth]++; - ABscores[iside].list[depth]++; - ABscores[iside].sum++; - ABscores[iside].sumWeighted += depth; - ABscores[iside].sumCum++; - ABscores[iside].sumCumWeighted += depth; + ABsides[iside].list[depth]++; + ABsides[iside].sum++; + ABsides[iside].sumWeighted += depth; + ABsides[iside].sumCum++; + ABsides[iside].sumCumWeighted += depth; } @@ -174,14 +194,35 @@ void ABstats::PrintStats() allnodesCum += allnodes; + // sumNew[p], ABplaces[p].sum + // psumNew[p], ABplaces[p].sumWeighted + // counterCum[p], ABplaces[p].sumCum + // pcounterCum[p], ABplaces[p].sumCumWeighted + for (int p = 0; p < DDS_AB_POS; p++) { counterCum[p] += sumNew[p]; pcounterCum[p] += psumNew[p]; } - int s = ABscores[1].sum + ABscores[0].sum; - int cs = ABscores[1].sumCum + ABscores[0].sumCum; +for (int p = 0; p < DDS_AB_POS; p++) +{ + if (ABplaces[p].sum != sumNew[p]) + fprintf(fp, "sum %d: %d %d\n", p, ABplaces[p].sum, sumNew[p]); + + if (ABplaces[p].sumWeighted != psumNew[p]) + fprintf(fp, "sumw %d: %d %d\n", p, ABplaces[p].sumWeighted, psumNew[p]); + + if (ABplaces[p].sumCum != counterCum[p]) + fprintf(fp, "sumc %d: %d %d\n", p, ABplaces[p].sumCum, counterCum[p]); + + if (ABplaces[p].sumCumWeighted != pcounterCum[p]) + fprintf(fp, "sumcw %d: %d %d\n", p, ABplaces[p].sumCumWeighted, pcounterCum[p]); + +} + + int s = ABsides[1].sum + ABsides[0].sum; + int cs = ABsides[1].sumCum + ABsides[0].sumCum; if (s) { fprintf(fp, "%2s %-20s %8s %5s %5s %8s %5s %5s\n", @@ -200,22 +241,22 @@ void ABstats::PrintStats() fprintf(fp, "%2s %-20s %8d %5.1f %5.1f %8d %5.1f %5.1f\n", "", "Side1", - ABscores[1].sum, - 100. * ABscores[1].sum / static_cast(s), - ABscores[1].sumWeighted / static_cast(s), - ABscores[1].sumCum, - 100. * ABscores[1].sumCum / static_cast(cs), - ABscores[1].sumCumWeighted / static_cast(cs)); + ABsides[1].sum, + 100. * ABsides[1].sum / static_cast(s), + ABsides[1].sumWeighted / static_cast(s), + ABsides[1].sumCum, + 100. * ABsides[1].sumCum / static_cast(cs), + ABsides[1].sumCumWeighted / static_cast(cs)); fprintf(fp, "%2s %-20s %8d %5.1f %5.1f %8d %5.1f %5.1f\n\n", "", "Side0", - ABscores[0].sum, - 100. * ABscores[0].sum / static_cast(s), - ABscores[0].sumWeighted / static_cast(s), - ABscores[0].sumCum, - 100. * ABscores[0].sumCum / static_cast(cs), - ABscores[0].sumCumWeighted / static_cast(cs)); + ABsides[0].sum, + 100. * ABsides[0].sum / static_cast(s), + ABsides[0].sumWeighted / static_cast(s), + ABsides[0].sumCum, + 100. * ABsides[0].sumCum / static_cast(cs), + ABsides[0].sumCumWeighted / static_cast(cs)); for (int p = 0; p < DDS_AB_POS; p++) { @@ -303,7 +344,7 @@ void ABstats::PrintStats() } fprintf(fp, "%-5s %6d\n\n\n", "Diff", - allnodes - ABscores[1].sum - ABscores[0].sum); + allnodes - ABsides[1].sum - ABsides[0].sum); #ifdef DDS_AB_DETAILS fprintf(fp, "%2s %6s %6s", @@ -334,7 +375,7 @@ void ABstats::PrintStats() fprintf(fp, "---------------------------\n"); fprintf(fp, "%2s %6d %6d", - "S", ABscores[1].sum, ABscores[0].sum); + "S", ABsides[1].sum, ABsides[0].sum); for (int p = 0; p < DDS_AB_POS; p++) fprintf(fp, " %5d", sumNew[p]); diff --git a/src/ABstats.h b/src/ABstats.h index 984e7eb6..39045d79 100644 --- a/src/ABstats.h +++ b/src/ABstats.h @@ -76,7 +76,8 @@ class ABstats int sumNew[DDS_AB_POS]; int psumNew[DDS_AB_POS]; - ABtracker ABscores[2]; + ABtracker ABsides[2]; + ABtracker ABplaces[DDS_AB_POS]; int allnodes; From b1a162537e782428d395236f27dae6b0b6d38fcb Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 22:17:33 +0200 Subject: [PATCH 067/132] Further step --- src/ABstats.cpp | 55 +++++++++++++------------------------------------ 1 file changed, 14 insertions(+), 41 deletions(-) diff --git a/src/ABstats.cpp b/src/ABstats.cpp index 9ca8a60f..972bba7e 100644 --- a/src/ABstats.cpp +++ b/src/ABstats.cpp @@ -194,33 +194,6 @@ void ABstats::PrintStats() allnodesCum += allnodes; - // sumNew[p], ABplaces[p].sum - // psumNew[p], ABplaces[p].sumWeighted - // counterCum[p], ABplaces[p].sumCum - // pcounterCum[p], ABplaces[p].sumCumWeighted - - for (int p = 0; p < DDS_AB_POS; p++) - { - counterCum[p] += sumNew[p]; - pcounterCum[p] += psumNew[p]; - } - -for (int p = 0; p < DDS_AB_POS; p++) -{ - if (ABplaces[p].sum != sumNew[p]) - fprintf(fp, "sum %d: %d %d\n", p, ABplaces[p].sum, sumNew[p]); - - if (ABplaces[p].sumWeighted != psumNew[p]) - fprintf(fp, "sumw %d: %d %d\n", p, ABplaces[p].sumWeighted, psumNew[p]); - - if (ABplaces[p].sumCum != counterCum[p]) - fprintf(fp, "sumc %d: %d %d\n", p, ABplaces[p].sumCum, counterCum[p]); - - if (ABplaces[p].sumCumWeighted != pcounterCum[p]) - fprintf(fp, "sumcw %d: %d %d\n", p, ABplaces[p].sumCumWeighted, pcounterCum[p]); - -} - int s = ABsides[1].sum + ABsides[0].sum; int cs = ABsides[1].sumCum + ABsides[0].sumCum; if (s) @@ -260,29 +233,29 @@ for (int p = 0; p < DDS_AB_POS; p++) for (int p = 0; p < DDS_AB_POS; p++) { - if (sumNew[p]) + if (ABplaces[p].sum) { fprintf(fp, "%2d %-20s %8d %5.1f %5.1f %8d %5.1f %5.1f\n", p, name[p], - sumNew[p], - 100. * sumNew[p] / static_cast(s), - psumNew[p] / static_cast(sumNew[p]), - counterCum[p], - 100. * counterCum[p] / static_cast(cs), - pcounterCum[p] / static_cast(counterCum[p])); + ABplaces[p].sum, + 100. * ABplaces[p].sum / static_cast(s), + ABplaces[p].sumWeighted / static_cast(ABplaces[p].sum), + ABplaces[p].sumCum, + 100. * ABplaces[p].sumCum / static_cast(cs), + ABplaces[p].sumCumWeighted / static_cast(ABplaces[p].sumCum)); } - else if (counterCum[p]) + else if (ABplaces[p].sumCum) { fprintf(fp, "%2d %-20s %8d %5.1f %5s %8d %5.1f %5.1f\n", p, name[p], - sumNew[p], - 100. * sumNew[p] / static_cast(s), + ABplaces[p].sum, + 100. * ABplaces[p].sum / static_cast(s), "", - counterCum[p], - 100. * counterCum[p] / static_cast(cs), - pcounterCum[p] / static_cast(counterCum[p])); + ABplaces[p].sumCum, + 100. * ABplaces[p].sumCum / static_cast(cs), + ABplaces[p].sumCumWeighted / static_cast(ABplaces[p].sumCum)); } } } @@ -378,7 +351,7 @@ for (int p = 0; p < DDS_AB_POS; p++) "S", ABsides[1].sum, ABsides[0].sum); for (int p = 0; p < DDS_AB_POS; p++) - fprintf(fp, " %5d", sumNew[p]); + fprintf(fp, " %5d", ABplaces[p].sum); fprintf(fp, "\n\n"); #endif From c1a46b9000d08bdfbe8e5194716c18becdfadd2f Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 22:21:00 +0200 Subject: [PATCH 068/132] Cleanup --- src/ABstats.cpp | 17 ----------------- src/ABstats.h | 7 ------- 2 files changed, 24 deletions(-) diff --git a/src/ABstats.cpp b/src/ABstats.cpp index 972bba7e..643cebbb 100644 --- a/src/ABstats.cpp +++ b/src/ABstats.cpp @@ -41,9 +41,6 @@ void ABstats::Reset() { for (int p = 0; p < DDS_AB_POS; p++) { - sumNew[p] = 0; - psumNew[p] = 0; - for (int depth = 0; depth < DDS_MAXDEPTH; depth++) counter[p][depth] = 0; } @@ -86,18 +83,6 @@ void ABstats::ResetCum() allnodesCum = 0; - scoreCum[1] = 0; - scoreCum[0] = 0; - - pscoreCum[1] = 0; - pscoreCum[0] = 0; - - for (int p = 0; p < DDS_AB_POS; p++) - { - counterCum[p] = 0; - pcounterCum[p] = 0; - } - for (int side = 0; side < 2; side++) { ABsides[side].sumCum = 0; @@ -136,8 +121,6 @@ void ABstats::IncrPos( return; counter[no][depth]++; - sumNew[no]++; - psumNew[no] += depth; ABplaces[no].list[depth]++; ABplaces[no].sum++; diff --git a/src/ABstats.h b/src/ABstats.h index 39045d79..59e52551 100644 --- a/src/ABstats.h +++ b/src/ABstats.h @@ -66,20 +66,13 @@ class ABstats char name[DDS_AB_POS][40]; int counter[DDS_AB_POS][DDS_MAXDEPTH]; - int counterCum[DDS_AB_POS]; - int pcounterCum[DDS_AB_POS]; int score[2][DDS_MAXDEPTH]; - int scoreCum[2]; - int pscoreCum[2]; int nodes[DDS_MAXDEPTH]; int nodesCum[DDS_MAXDEPTH]; - int sumNew[DDS_AB_POS]; - int psumNew[DDS_AB_POS]; ABtracker ABsides[2]; ABtracker ABplaces[DDS_AB_POS]; - int allnodes; int allnodesCum; int iniDepth; From ac9f419ed69882c87d5be3ae8b98d4a0f441e468 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 25 Mar 2018 22:29:23 +0200 Subject: [PATCH 069/132] Deletions --- src/ABstats.cpp | 22 +++------------------- src/ABstats.h | 2 -- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/ABstats.cpp b/src/ABstats.cpp index 643cebbb..e5aadc64 100644 --- a/src/ABstats.cpp +++ b/src/ABstats.cpp @@ -39,18 +39,6 @@ ABstats::~ABstats() void ABstats::Reset() { - for (int p = 0; p < DDS_AB_POS; p++) - { - for (int depth = 0; depth < DDS_MAXDEPTH; depth++) - counter[p][depth] = 0; - } - - for (int side = 0; side < 2; side++) - { - for (int depth = 0; depth < DDS_MAXDEPTH; depth++) - score[side][depth] = 0; - } - for (int depth = 0; depth < DDS_MAXDEPTH; depth++) nodes[depth] = 0; @@ -120,8 +108,6 @@ void ABstats::IncrPos( if (no < 0 || no >= DDS_AB_POS) return; - counter[no][depth]++; - ABplaces[no].list[depth]++; ABplaces[no].sum++; ABplaces[no].sumWeighted += depth; @@ -130,8 +116,6 @@ void ABstats::IncrPos( const int iside = (side ? 1 : 0); - score[iside][depth]++; - ABsides[iside].list[depth]++; ABsides[iside].sum++; ABsides[iside].sumWeighted += depth; @@ -316,14 +300,14 @@ void ABstats::PrintStats() for (int d = DDS_MAXDEPTH - 1; d >= 0; d--) { - if (score[1][d] == 0 && score[0][d] == 0) + if (ABsides[1].list[d] == 0 && ABsides[0].list[d] == 0) continue; fprintf(fp, "%2d %6d %6d", - d, score[1][d], score[0][d]); + d, ABsides[1].list[d], ABsides[0].list[d]); for (int p = 0; p < DDS_AB_POS; p++) - fprintf(fp, " %5d", counter[p][d]); + fprintf(fp, " %5d", ABplaces[p].list[d]); fprintf(fp, "\n"); } diff --git a/src/ABstats.h b/src/ABstats.h index 59e52551..b2db78ec 100644 --- a/src/ABstats.h +++ b/src/ABstats.h @@ -65,8 +65,6 @@ class ABstats bool fileSet; char name[DDS_AB_POS][40]; - int counter[DDS_AB_POS][DDS_MAXDEPTH]; - int score[2][DDS_MAXDEPTH]; int nodes[DDS_MAXDEPTH]; int nodesCum[DDS_MAXDEPTH]; From 7280f7d3a24326a6810011a1636ae8d6965a6693 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Mon, 26 Mar 2018 08:16:50 +0200 Subject: [PATCH 070/132] Update Visual Makefiles --- src/Init.cpp | 8 ++++---- src/Makefiles/Makefile_Visual | 4 ++-- test/Makefiles/Makefile_Visual | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Init.cpp b/src/Init.cpp index decf02d7..5a5986c8 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -211,8 +211,8 @@ void InitConstants() } } - /* The use of the counttable to give the number of bits set to - one in an integer follows an implementation by Thomas Andrews. */ + // The use of the counttable to give the number of bits set to + // one in an integer follows an implementation by Thomas Andrews. // counttable[aggr] is the number of '1' bits (binary weight) // in aggr. @@ -476,8 +476,8 @@ void SetDealTables( unsigned int topBitRank = 1; unsigned int topBitNo = 2; - /* Initialization of the rel structure is inspired by - a solution given by Thomas Andrews */ + // Initialization of the rel structure is inspired by + // a solution given by Thomas Andrews. // rel[aggr].absRank[absolute rank][suit].hand is the hand // (N = 0, E = 1 etc.) which holds the absolute rank in diff --git a/src/Makefiles/Makefile_Visual b/src/Makefiles/Makefile_Visual index b2e0e6e1..2f2c98dd 100644 --- a/src/Makefiles/Makefile_Visual +++ b/src/Makefiles/Makefile_Visual @@ -61,7 +61,7 @@ SCHEDULER = /DDDS_SCHEDULER # All that matters from no. 3 and no. 4 is the following. Here you # can add $(SMALL_MEMORY) etc. -DDS_BEHAVIOR = +DDS_BEHAVIOR = $(DEBUG_ALL) # ----------------------- OFTEN OK ------------------------------ @@ -129,7 +129,7 @@ $(VFILE).obj: $(DLLBASE).res cvtres /MACHINE:X86 /OUT:$(VFILE).obj $(DLLBASE).res depend: - makedepend -Y -o.obj -- $(SOURCE_FILES) + makedepend $(DDS_BEHAVIOR) -Y -o.obj -- $(SOURCE_FILES) clean: rm -f $(OBJ_FILES) $(DLL) $(DLLBASE).{lib,exp,def,obj,res} diff --git a/test/Makefiles/Makefile_Visual b/test/Makefiles/Makefile_Visual index fb492e8b..e27b2d53 100644 --- a/test/Makefiles/Makefile_Visual +++ b/test/Makefiles/Makefile_Visual @@ -53,6 +53,7 @@ WARN_FLAGS = \ /wd4530 \ /wd4555 \ /wd4577 \ + /wd4592 \ /wd4625 \ /wd4626 \ /wd4668 \ @@ -96,7 +97,7 @@ ITEST_SOURCE_FILES = \ $(DTEST_SOURCE_FILES) \ itest.cpp -ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) +ITEST_OBJ_FILES = $(subst .cpp,.obj,$(ITEST_SOURCE_FILES)) dtest: $(DTEST_OBJ_FILES) link $(LINK1_FLAGS) $(DTEST_OBJ_FILES) $(DLIB) \ @@ -119,4 +120,3 @@ clean: # If you don't have a Linux-like setup, use "del" instead of "rm". include $(INCL_DEPENDS) - From 6ce8510519d34e39d68ffd7a1bca3c54766fa1b4 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Tue, 27 Mar 2018 12:31:15 +0200 Subject: [PATCH 071/132] parallel for_each for STL now works for Solve at least --- include/dll.h | 5 +- src/Init.cpp | 3 +- src/PlayAnalyser.cpp | 2 +- src/SolveBoard.cpp | 108 +++++++++++++++++++++++++++++++++++++++++-- src/SolveBoard.h | 17 +++++++ src/System.cpp | 76 ++++++++++++++++++++++++++++-- src/System.h | 7 ++- test/testcommon.cpp | 6 +-- 8 files changed, 209 insertions(+), 15 deletions(-) diff --git a/include/dll.h b/include/dll.h index a4cbb8bd..84ed61b8 100644 --- a/include/dll.h +++ b/include/dll.h @@ -363,8 +363,9 @@ struct DDSInfo // 2 = OpenMP, // 3 = GCD, // 4 = Boost, - // 5 = STL - // 6 = TBB + // 5 = STL, + // 6 = TBB, + // 7 = STLIMPL (for_each) int threading; // The actual number of threads configured diff --git a/src/Init.cpp b/src/Init.cpp index 5a5986c8..84d8d71d 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -143,7 +143,8 @@ void STDCALL SetMaxThreads( int oldNoOfThreads = noOfThreads; if (userThreads) - noOfThreads = Min(ncores, userThreads); + noOfThreads = userThreads; + // noOfThreads = Min(ncores, userThreads); TODO Switch back? else noOfThreads = ncores; diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 3878aae0..4cc6432d 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -321,7 +321,7 @@ int STDCALL AnalyseAllPlaysBin( traceparam.solvedp = solvedp; scheduler.RegisterRun(DDS_RUN_TRACE, bop, plp); - sysdep.RegisterRun(DDS_RUN_TRACE); + sysdep.RegisterRun(DDS_RUN_TRACE, bop); START_BLOCK_TIMER; int retRun = sysdep.RunThreads(chunkSize); diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 4f5d13bb..3b8305c4 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -24,6 +24,44 @@ extern System sysdep; extern Memory memory; extern Scheduler scheduler; +bool SameBoard( + boards const * bop, + const unsigned index1, + const unsigned index2); + + +void SolveSingleCommon( + const int thrId, + const int bno) +{ + futureTricks fut; + + START_THREAD_TIMER(thrId); + int res = SolveBoard( + param.bop->deals[bno], + param.bop->target[bno], + param.bop->solutions[bno], + param.bop->mode[bno], + &fut, + thrId); + END_THREAD_TIMER(thrId); + + if (res == 1) + param.solvedp->solvedBoard[bno] = fut; + else + param.error = res; +} + + +void CopySingleCommon( + const int bnoFrom, + const int bnoTo) +{ + START_THREAD_TIMER(thrId); + param.solvedp->solvedBoard[bnoTo] = param.solvedp->solvedBoard[bnoFrom]; + END_THREAD_TIMER(thrId); +} + void SolveChunkCommon( const int thrId) @@ -56,6 +94,7 @@ void SolveChunkCommon( } else { + // TODO: Could use SolveSingleCommon START_THREAD_TIMER(thrId); int res = SolveBoard( param.bop->deals[index], @@ -168,12 +207,12 @@ int SolveAllBoardsN( if (source == 0) { scheduler.RegisterRun(DDS_RUN_SOLVE, bop); - sysdep.RegisterRun(DDS_RUN_SOLVE); + sysdep.RegisterRun(DDS_RUN_SOLVE, bop); } else { scheduler.RegisterRun(DDS_RUN_CALC, bop); - sysdep.RegisterRun(DDS_RUN_CALC); + sysdep.RegisterRun(DDS_RUN_CALC, bop); // TODO Not working yet (bop) } for (int k = 0; k < MAXNOOFBOARDS; k++) @@ -186,7 +225,6 @@ int SolveAllBoardsN( if (retRun != RETURN_NO_FAULT) return retRun; - /* Calculate number of solved boards. */ solvedp->noOfBoards = param.noOfBoards; #ifdef DDS_SCHEDULER @@ -296,3 +334,67 @@ int STDCALL SolveAllChunksBin( return SolveAllBoardsN(bop, solvedp, 1, 0); } + +void DetectDuplicates( + boards const * bop, + vector& uniques, + vector& crossrefs) +{ + const unsigned nu = static_cast(bop->noOfBoards); + for (unsigned i = 0; i < nu; i++) + crossrefs[i] = -1; + + for (unsigned i = 0; i < nu; i++) + { + if (crossrefs[i] != -1) + continue; + + uniques.push_back(i); + + for (unsigned index = i+1; index < nu; index++) + { + if (SameBoard(bop, i, index)) + crossrefs[index] = i; + } + } +} + + +bool SameBoard( + boards const * bop, + const unsigned index1, + const unsigned index2) +{ + for (int h = 0; h < DDS_HANDS; h++) + { + for (int s = 0; s < DDS_SUITS; s++) + { + if (bop->deals[index1].remainCards[h][s] != + bop->deals[index2].remainCards[h][s]) + return false; + } + } + + if (bop->mode[index1] != bop->mode[index2]) + return false; + if (bop->solutions[index1] != bop->solutions[index2]) + return false; + if (bop->target[index1] != bop->target[index2]) + return false; + if (bop->deals[index1].first != bop->deals[index2].first) + return false; + if (bop->deals[index1].trump != bop->deals[index2].trump) + return false; + + for (int k = 0; k < 3; k++) + { + if (bop->deals[index1].currentTrickSuit[k] != + bop->deals[index2].currentTrickSuit[k]) + return false; + if (bop->deals[index1].currentTrickRank[k] != + bop->deals[index2].currentTrickRank[k]) + return false; + } + return true; +} + diff --git a/src/SolveBoard.h b/src/SolveBoard.h index 30cffba3..9e51da89 100644 --- a/src/SolveBoard.h +++ b/src/SolveBoard.h @@ -10,8 +10,20 @@ #ifndef DDS_SOLVEBOARD_H #define DDS_SOLVEBOARD_H +#include + #include "dds.h" +using namespace std; + + +void SolveSingleCommon( + const int thrId, + const int bno); + +void CopySingleCommon( + const int bnoFrom, + const int bnoTo); void SolveChunkCommon( const int thrId); @@ -25,4 +37,9 @@ int SolveAllBoardsN( const int chunkSize, const int source); // 0 source, 1 calc +void DetectDuplicates( + boards const * bop, + vector& uniques, + vector& crossrefs); // TODO: Should maybe go into System.cpp? + #endif diff --git a/src/System.cpp b/src/System.cpp index 978df4d1..948721a2 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -13,6 +13,8 @@ #include #include +#include "SolveBoard.h" // For DetectDuplicates + // Boost: Disable some header warnings. #ifdef DDS_THREADS_BOOST @@ -36,6 +38,10 @@ #include #endif +#ifdef DDS_THREADS_STLIMPL + #include +#endif + #ifdef DDS_THREADS_TBB #ifdef _MSC_VER #pragma warning(push) @@ -97,7 +103,8 @@ const vector DDS_SYSTEM_THREADING = "GCD", "Boost", "STL", - "TBB" + "TBB", + "STL-impl" }; #define DDS_SYSTEM_THREAD_BASIC 0 @@ -107,7 +114,8 @@ const vector DDS_SYSTEM_THREADING = #define DDS_SYSTEM_THREAD_BOOST 4 #define DDS_SYSTEM_THREAD_STL 5 #define DDS_SYSTEM_THREAD_TBB 6 -#define DDS_SYSTEM_THREAD_SIZE 7 +#define DDS_SYSTEM_THREAD_STLIMPL 7 +#define DDS_SYSTEM_THREAD_SIZE 8 System::System() @@ -156,6 +164,10 @@ void System::Reset() availableSystem[DDS_SYSTEM_THREAD_TBB] = true; #endif +#ifdef DDS_THREADS_STLIMPL + availableSystem[DDS_SYSTEM_THREAD_STLIMPL] = true; +#endif + // Take the first of any multi-threading system defined. for (unsigned k = 1; k < availableSystem.size(); k++) { @@ -174,6 +186,8 @@ void System::Reset() RunPtrList[DDS_SYSTEM_THREAD_BOOST] = &System::RunThreadsBoost; RunPtrList[DDS_SYSTEM_THREAD_STL] = &System::RunThreadsSTL; RunPtrList[DDS_SYSTEM_THREAD_TBB] = &System::RunThreadsTBB; + RunPtrList[DDS_SYSTEM_THREAD_STLIMPL] = + &System::RunThreadsSTLIMPL; // DDS_RUN_CALC doesn't happen. CallbackSimpleList.resize(DDS_RUN_SIZE); @@ -265,12 +279,15 @@ int System::RegisterParams( } -int System::RegisterRun(const RunMode mode) +int System::RegisterRun( + const RunMode mode, + boards * const bopIn) { if (mode >= DDS_RUN_SIZE) return RETURN_THREAD_MISSING; // Not quite right; runCat = mode; + bop = bopIn; return RETURN_NO_FAULT; } @@ -478,6 +495,57 @@ int System::RunThreadsSTL() } +int System::RunThreadsSTLIMPL() +{ +#ifdef DDS_THREADS_STLIMPL + atomic thrIdNext = 0; + thread_local int thrId = -1; + bool err = false; + + vector uniques; + vector crossrefs; + uniques.clear(); + crossrefs.resize(bop->noOfBoards); + + // TODO: More general + DetectDuplicates(bop, uniques, crossrefs); +// TEMP +// cout << "uniques " << uniques.size() << endl; + + for_each(std::execution::par, uniques.begin(), uniques.end(), + [&](int &bno) + { + if (thrId == -1) + { + thrId = thrIdNext; + thrIdNext++; + + if (thrIdNext > 16) // Hmm... + err = true; + } + + // TODO: Use some kind of fptr + SolveSingleCommon(thrId, bno); + }); +// cout << "used up to " << thrIdNext-1 << endl; + + if (err) + return RETURN_THREAD_INDEX; // TODO: Not quite right + + for (unsigned i = 0; i < crossrefs.size(); i++) + { + if (crossrefs[i] != -1) + { + // TODO: Only works for Solve at the moment + CopySingleCommon(crossrefs[i], i); + } + } +#endif + + return RETURN_NO_FAULT; +} + + ////////////////////////////////////////////////////////////////////// // TBB // ////////////////////////////////////////////////////////////////////// @@ -542,7 +610,7 @@ string System::GetSystem(int& sys) const sys = 3; #elif defined(__APPLE__) sys = 4; -#ellse +#else sys = 0; #endif diff --git a/src/System.h b/src/System.h index 1934dc2c..1889e732 100644 --- a/src/System.h +++ b/src/System.h @@ -47,6 +47,8 @@ class System fptrType fptr; + boards * bop; + int RunThreadsBasic(); int RunThreadsBoost(); int RunThreadsOpenMP(); @@ -54,6 +56,7 @@ class System int RunThreadsWinAPI(); int RunThreadsSTL(); int RunThreadsTBB(); + int RunThreadsSTLIMPL(); string GetVersion( int& major, @@ -79,7 +82,9 @@ class System const int mem_def_MB, const int mem_max_MB); - int RegisterRun(const RunMode r); + int RegisterRun( + const RunMode r, + boards * const bop); bool ThreadOK(const int thrId) const; diff --git a/test/testcommon.cpp b/test/testcommon.cpp index ee12ea22..61bac76a 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -265,8 +265,10 @@ int threadingCode(char * arg) return 5; else if (str == "tbb") return 6; - else + else if (str == "stlimpl") return 7; + else + return 8; } @@ -1017,9 +1019,7 @@ void loop_solve( for (int j = 0; j < count; j++) { if (! compare_FUT(&solvedbdp->solvedBoard[j], &fut_list[i + j])) - { printf("loop_solve i %d, j %d: Difference\n", i, j); - } } } From e2b075f28bfebafd99a50fb835cb8300e9fe9b85 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Tue, 27 Mar 2018 12:48:50 +0200 Subject: [PATCH 072/132] Now also Play --- src/PlayAnalyser.cpp | 21 +++++++++++++++++++++ src/PlayAnalyser.h | 4 ++++ src/SolveBoard.cpp | 2 +- src/SolveBoard.h | 2 +- src/System.cpp | 23 +++++++++++++++++++---- 5 files changed, 46 insertions(+), 6 deletions(-) diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 4cc6432d..7a488d65 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -271,6 +271,26 @@ int STDCALL AnalysePlayPBN( } +void PlaySingleCommon( + const int thrId, + const int bno) +{ + solvedPlay solved; + + int res = AnalysePlayBin( + playparam.bop->deals[bno], + traceparam.plp->plays[bno], + &solved, + thrId); + + // If there are multiple errors, this will catch one of them. + if (res == 1) + traceparam.solvedp->solved[bno] = solved; + else + playparam.error = res; +} + + void PlayChunkCommon(const int thrId) { vector solved; @@ -285,6 +305,7 @@ void PlayChunkCommon(const int thrId) if (index == -1) break; + // TODO: Could use PlaySingleCommon int res = AnalysePlayBin( playparam.bop->deals[index], traceparam.plp->plays[index], diff --git a/src/PlayAnalyser.h b/src/PlayAnalyser.h index 5b8b8fdb..009de5e2 100644 --- a/src/PlayAnalyser.h +++ b/src/PlayAnalyser.h @@ -11,6 +11,10 @@ #define DDS_PLAYANALYSER_H +void PlaySingleCommon( + const int thrId, + const int bno); + void PlayChunkCommon( const int thrId); diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 3b8305c4..37b78782 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -53,7 +53,7 @@ void SolveSingleCommon( } -void CopySingleCommon( +void CopySolveSingle( const int bnoFrom, const int bnoTo) { diff --git a/src/SolveBoard.h b/src/SolveBoard.h index 9e51da89..d86a1fb7 100644 --- a/src/SolveBoard.h +++ b/src/SolveBoard.h @@ -21,7 +21,7 @@ void SolveSingleCommon( const int thrId, const int bno); -void CopySingleCommon( +void CopySolveSingle( const int bnoFrom, const int bnoTo); diff --git a/src/System.cpp b/src/System.cpp index 948721a2..77c14a82 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -13,7 +13,8 @@ #include #include -#include "SolveBoard.h" // For DetectDuplicates +#include "SolveBoard.h" +#include "PlayAnalyser.h" // Boost: Disable some header warnings. @@ -508,7 +509,17 @@ int System::RunThreadsSTLIMPL() crossrefs.resize(bop->noOfBoards); // TODO: More general - DetectDuplicates(bop, uniques, crossrefs); + if (runCat == DDS_RUN_SOLVE) + DetectDuplicates(bop, uniques, crossrefs); + else if (runCat == DDS_RUN_TRACE) + { + uniques.resize(bop->noOfBoards); + for (unsigned i = 0; i < static_cast(bop->noOfBoards); i++) + { + uniques[i] = i; + crossrefs[i] = -1; + } + } // TEMP // cout << "uniques " << uniques.size() << endl; @@ -525,7 +536,10 @@ int System::RunThreadsSTLIMPL() } // TODO: Use some kind of fptr - SolveSingleCommon(thrId, bno); + if (runCat == DDS_RUN_SOLVE) + SolveSingleCommon(thrId, bno); + else if (runCat == DDS_RUN_TRACE) + PlaySingleCommon(thrId, bno); }); // cout << "used up to " << thrIdNext-1 << endl; @@ -537,7 +551,8 @@ int System::RunThreadsSTLIMPL() if (crossrefs[i] != -1) { // TODO: Only works for Solve at the moment - CopySingleCommon(crossrefs[i], i); + if (runCat == DDS_RUN_SOLVE) + CopySolveSingle(crossrefs[i], i); } } #endif From 36b95da09f7f2c7c1b43a4df96420e8f323f3bbe Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Tue, 27 Mar 2018 15:18:54 +0200 Subject: [PATCH 073/132] Moved some code to CalcTables. Bizarre play bug? --- include/dll.h | 2 +- src/CalcTables.cpp | 152 +++++++++++++++++++++++++++++++++++++++---- src/CalcTables.h | 23 +++++++ src/PlayAnalyser.cpp | 4 +- src/SolveBoard.cpp | 79 +--------------------- src/SolveBoard.h | 3 - src/System.cpp | 13 ++-- src/System.h | 2 +- 8 files changed, 175 insertions(+), 103 deletions(-) create mode 100644 src/CalcTables.h diff --git a/include/dll.h b/include/dll.h index 84ed61b8..f35c0c1b 100644 --- a/include/dll.h +++ b/include/dll.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2015 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ diff --git a/src/CalcTables.cpp b/src/CalcTables.cpp index f35aacd6..59147e7c 100644 --- a/src/CalcTables.cpp +++ b/src/CalcTables.cpp @@ -9,10 +9,146 @@ #include "dds.h" -#include "SolveBoard.h" +#include "SolverIF.h" +#include "System.h" +#include "Memory.h" +#include "Scheduler.h" #include "PBN.h" +paramType cparam; + +extern System sysdep; +extern Memory memory; +extern Scheduler scheduler; + + +void CalcChunkCommon( + const int thrId) +{ + ThreadData * thrp = memory.GetPtr(static_cast(thrId)); + + vector fut; + fut.resize(cparam.noOfBoards); + + int index; + schedType st; + + while (1) + { + st = scheduler.GetNumber(thrId); + index = st.number; + if (index == -1) + break; + + if (st.repeatOf != -1) + { + START_THREAD_TIMER(thrId); + for (int k = 0; k < 4; k++) + { + cparam.bop->deals[index].first = k; + + cparam.solvedp->solvedBoard[index].score[k] = + cparam.solvedp->solvedBoard[ st.repeatOf ].score[k]; + } + END_THREAD_TIMER(thrId); + continue; + } + + cparam.bop->deals[index].first = 0; + + START_THREAD_TIMER(thrId); + int res = SolveBoard( + cparam.bop->deals[index], + cparam.bop->target[index], + cparam.bop->solutions[index], + cparam.bop->mode[index], + &fut[index], + thrId); + + // SH: I'm making a terrible use of the fut structure here. + + if (res == 1) + cparam.solvedp->solvedBoard[index].score[0] = fut[index].score[0]; + else + cparam.error = res; + + for (int k = 1; k < 4; k++) + { + int hint = (k == 2 ? fut[index].score[0] : + 13 - fut[index].score[0]); + + cparam.bop->deals[index].first = k; // Next declarer + + res = SolveSameBoard( + thrp, + cparam.bop->deals[index], + &fut[index], + hint); + + if (res == 1) + cparam.solvedp->solvedBoard[index].score[k] = + fut[index].score[0]; + else + cparam.error = res; + } + END_THREAD_TIMER(thrId); + } +} + + +int CalcAllBoardsN( + boards * bop, + solvedBoards * solvedp, + const int chunkSize, + const int source) // 0 solve, 1 calc +{ + UNUSED(chunkSize); + cparam.error = 0; + + if (bop->noOfBoards > MAXNOOFBOARDS) + return RETURN_TOO_MANY_BOARDS; + + cparam.bop = bop; + cparam.solvedp = solvedp; + cparam.noOfBoards = bop->noOfBoards; + + // TODO Now always 1 + if (source == 0) + { + scheduler.RegisterRun(DDS_RUN_SOLVE, bop); + sysdep.RegisterRun(DDS_RUN_SOLVE, bop); + } + else + { + scheduler.RegisterRun(DDS_RUN_CALC, bop); + sysdep.RegisterRun(DDS_RUN_CALC, bop); // TODO Not working yet (bop) + } + + for (int k = 0; k < MAXNOOFBOARDS; k++) + solvedp->solvedBoard[k].cards = 0; + + START_BLOCK_TIMER; + int retRun = sysdep.RunThreads(); + END_BLOCK_TIMER; + + if (retRun != RETURN_NO_FAULT) + return retRun; + + solvedp->noOfBoards = cparam.noOfBoards; + +#ifdef DDS_SCHEDULER + scheduler.PrintTiming(); +#endif + + if (cparam.error == 0) + return RETURN_NO_FAULT; + else + return cparam.error; +} + + + int STDCALL CalcDDtable( ddTableDeal tableDeal, ddTableResults * tablep) @@ -44,7 +180,7 @@ int STDCALL CalcDDtable( ind++; } - int res = SolveAllBoardsN(&bo, &solved, 4, 1); + int res = CalcAllBoardsN(&bo, &solved, 4, 1); if (res == 1) { for (int index = 0; index < 5; index++) @@ -133,7 +269,7 @@ int STDCALL CalcAllTables( bo.noOfBoards = lastIndex + 1; - int res = SolveAllBoardsN(&bo, &solved, 4, 1); + int res = CalcAllBoardsN(&bo, &solved, 4, 1); if (res != 1) return res; @@ -178,17 +314,14 @@ int STDCALL CalcAllTablesPBN( ddTablesRes * resp, allParResults * presp) { - int res; ddTableDeals dls; - for (int k = 0; k < dealsp->noOfTables; k++) if (ConvertFromPBN(dealsp->deals[k].cards, dls.deals[k].cards) != 1) return RETURN_PBN_FAULT; dls.noOfTables = dealsp->noOfTables; - res = CalcAllTables(&dls, mode, trumpFilter, resp, presp); - + int res = CalcAllTables(&dls, mode, trumpFilter, resp, presp); return res; } @@ -198,13 +331,10 @@ int STDCALL CalcDDtablePBN( ddTableResults * tablep) { ddTableDeal tableDeal; - int res; - if (ConvertFromPBN(tableDealPBN.cards, tableDeal.cards) != 1) return RETURN_PBN_FAULT; - res = CalcDDtable(tableDeal, tablep); - + int res = CalcDDtable(tableDeal, tablep); return res; } diff --git a/src/CalcTables.h b/src/CalcTables.h new file mode 100644 index 00000000..f07681f0 --- /dev/null +++ b/src/CalcTables.h @@ -0,0 +1,23 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_CALCTABLES_H +#define DDS_CALCTABLES_H + +#include + +#include "dds.h" + +using namespace std; + + +void CalcChunkCommon( + const int thrId); + +#endif diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 7a488d65..6af1d827 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -327,6 +327,8 @@ int STDCALL AnalyseAllPlaysBin( solvedPlays * solvedp, int chunkSize) { + UNUSED(chunkSize); + playparam.error = 0; if (bop->noOfBoards > MAXNOOFBOARDS) @@ -345,7 +347,7 @@ int STDCALL AnalyseAllPlaysBin( sysdep.RegisterRun(DDS_RUN_TRACE, bop); START_BLOCK_TIMER; - int retRun = sysdep.RunThreads(chunkSize); + int retRun = sysdep.RunThreads(); END_BLOCK_TIMER; if (retRun != RETURN_NO_FAULT) diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 37b78782..c9e6cb45 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -17,7 +17,6 @@ #include "debug.h" -long chunk; paramType param; extern System sysdep; @@ -114,87 +113,13 @@ void SolveChunkCommon( } -void SolveChunkDDtableCommon( - const int thrId) -{ - ThreadData * thrp = memory.GetPtr(static_cast(thrId)); - - vector fut; - fut.resize(param.noOfBoards); - - int index; - schedType st; - - while (1) - { - st = scheduler.GetNumber(thrId); - index = st.number; - if (index == -1) - break; - - if (st.repeatOf != -1) - { - START_THREAD_TIMER(thrId); - for (int k = 0; k < chunk; k++) - { - param.bop->deals[index].first = k; - - param.solvedp->solvedBoard[index].score[k] = - param.solvedp->solvedBoard[ st.repeatOf ].score[k]; - } - END_THREAD_TIMER(thrId); - continue; - } - - param.bop->deals[index].first = 0; - - START_THREAD_TIMER(thrId); - int res = SolveBoard( - param.bop->deals[index], - param.bop->target[index], - param.bop->solutions[index], - param.bop->mode[index], - &fut[index], - thrId); - - // SH: I'm making a terrible use of the fut structure here. - - if (res == 1) - param.solvedp->solvedBoard[index].score[0] = fut[index].score[0]; - else - param.error = res; - - for (int k = 1; k < chunk; k++) - { - int hint = (k == 2 ? fut[index].score[0] : - 13 - fut[index].score[0]); - - param.bop->deals[index].first = k; // Next declarer - - res = SolveSameBoard( - thrp, - param.bop->deals[index], - &fut[index], - hint); - - if (res == 1) - param.solvedp->solvedBoard[index].score[k] = - fut[index].score[0]; - else - param.error = res; - } - END_THREAD_TIMER(thrId); - } -} - - int SolveAllBoardsN( boards * bop, solvedBoards * solvedp, const int chunkSize, const int source) // 0 solve, 1 calc { - chunk = chunkSize; + UNUSED(chunkSize); param.error = 0; if (bop->noOfBoards > MAXNOOFBOARDS) @@ -219,7 +144,7 @@ int SolveAllBoardsN( solvedp->solvedBoard[k].cards = 0; START_BLOCK_TIMER; - int retRun = sysdep.RunThreads(chunkSize); + int retRun = sysdep.RunThreads(); END_BLOCK_TIMER; if (retRun != RETURN_NO_FAULT) diff --git a/src/SolveBoard.h b/src/SolveBoard.h index d86a1fb7..c47ee2fb 100644 --- a/src/SolveBoard.h +++ b/src/SolveBoard.h @@ -28,9 +28,6 @@ void CopySolveSingle( void SolveChunkCommon( const int thrId); -void SolveChunkDDtableCommon( - const int thrId); - int SolveAllBoardsN( boards * bop, solvedBoards * solvedp, diff --git a/src/System.cpp b/src/System.cpp index 77c14a82..078e7637 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -14,6 +14,7 @@ #include #include "SolveBoard.h" +#include "CalcTables.h" #include "PlayAnalyser.h" // Boost: Disable some header warnings. @@ -193,13 +194,8 @@ void System::Reset() // DDS_RUN_CALC doesn't happen. CallbackSimpleList.resize(DDS_RUN_SIZE); CallbackSimpleList[DDS_RUN_SOLVE] = SolveChunkCommon; - CallbackSimpleList[DDS_RUN_CALC] = SolveChunkCommon; + CallbackSimpleList[DDS_RUN_CALC] = CalcChunkCommon; CallbackSimpleList[DDS_RUN_TRACE] = PlayChunkCommon; - - CallbackComplexList.resize(DDS_RUN_SIZE); - CallbackComplexList[DDS_RUN_SOLVE] = SolveChunkDDtableCommon; - CallbackComplexList[DDS_RUN_CALC] = SolveChunkDDtableCommon; - CallbackComplexList[DDS_RUN_TRACE] = PlayChunkCommon; } @@ -587,10 +583,9 @@ int System::RunThreadsTBB() } -int System::RunThreads(const int chunkSize) +int System::RunThreads() { - fptr = (chunkSize == 1 ? - CallbackSimpleList[runCat] : CallbackComplexList[runCat]); + fptr = CallbackSimpleList[runCat]; return (this->*RunPtrList[preferredSystem])(); } diff --git a/src/System.h b/src/System.h index 1889e732..45c1c424 100644 --- a/src/System.h +++ b/src/System.h @@ -94,7 +94,7 @@ class System int PreferThreading(const unsigned code); - int RunThreads(const int chunkSize); + int RunThreads(); string str(DDSInfo * info) const; }; From 22c721faee3bc91967b8ac39cdeebb8edc8097f4 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Tue, 27 Mar 2018 16:52:27 +0200 Subject: [PATCH 074/132] Calc runs with STLIMPL as well (still Play buglet) --- src/CalcTables.cpp | 164 ++++++++++++++++++---------------- src/CalcTables.h | 15 +++- src/Makefiles/depends_obj.txt | 8 +- src/PlayAnalyser.cpp | 28 ++++++ src/PlayAnalyser.h | 9 ++ src/SolveBoard.cpp | 3 +- src/SolveBoard.h | 4 +- src/System.cpp | 24 +++-- src/TimerList.cpp | 2 +- 9 files changed, 160 insertions(+), 97 deletions(-) diff --git a/src/CalcTables.cpp b/src/CalcTables.cpp index 59147e7c..48c05395 100644 --- a/src/CalcTables.cpp +++ b/src/CalcTables.cpp @@ -10,6 +10,7 @@ #include "dds.h" #include "SolverIF.h" +#include "SolveBoard.h" #include "System.h" #include "Memory.h" #include "Scheduler.h" @@ -23,11 +24,65 @@ extern Memory memory; extern Scheduler scheduler; -void CalcChunkCommon( - const int thrId) +void CalcSingleCommon( + const int thrId, + const int bno) { + // Solves a single deal and strain for all four declarers. + + futureTricks fut; + cparam.bop->deals[bno].first = 0; + + START_THREAD_TIMER(thrId); + int res = SolveBoard( + cparam.bop->deals[bno], + cparam.bop->target[bno], + cparam.bop->solutions[bno], + cparam.bop->mode[bno], + &fut, + thrId); + + // SH: I'm making a terrible use of the fut structure here. + + if (res == 1) + cparam.solvedp->solvedBoard[bno].score[0] = fut.score[0]; + else + cparam.error = res; + ThreadData * thrp = memory.GetPtr(static_cast(thrId)); + for (int k = 1; k < DDS_HANDS; k++) + { + int hint = (k == 2 ? fut.score[0] : 13 - fut.score[0]); + + cparam.bop->deals[bno].first = k; // Next declarer + + res = SolveSameBoard(thrp, cparam.bop->deals[bno], &fut, hint); + + if (res == 1) + cparam.solvedp->solvedBoard[bno].score[k] = fut.score[0]; + else + cparam.error = res; + } + END_THREAD_TIMER(thrId); +} + +void CopyCalcSingle( + const int bnoFrom, + const int bnoTo) +{ + START_THREAD_TIMER(thrId); + for (int k = 0; k < DDS_HANDS; k++) + cparam.solvedp->solvedBoard[bnoTo].score[k] = + cparam.solvedp->solvedBoard[bnoFrom].score[k]; + END_THREAD_TIMER(thrId); +} + + +void CalcChunkCommon( + const int thrId) +{ + // Solves each deal and strain for all four declarers. vector fut; fut.resize(cparam.noOfBoards); @@ -44,7 +99,7 @@ void CalcChunkCommon( if (st.repeatOf != -1) { START_THREAD_TIMER(thrId); - for (int k = 0; k < 4; k++) + for (int k = 0; k < DDS_HANDS; k++) { cparam.bop->deals[index].first = k; @@ -55,55 +110,15 @@ void CalcChunkCommon( continue; } - cparam.bop->deals[index].first = 0; - - START_THREAD_TIMER(thrId); - int res = SolveBoard( - cparam.bop->deals[index], - cparam.bop->target[index], - cparam.bop->solutions[index], - cparam.bop->mode[index], - &fut[index], - thrId); - - // SH: I'm making a terrible use of the fut structure here. - - if (res == 1) - cparam.solvedp->solvedBoard[index].score[0] = fut[index].score[0]; - else - cparam.error = res; - - for (int k = 1; k < 4; k++) - { - int hint = (k == 2 ? fut[index].score[0] : - 13 - fut[index].score[0]); - - cparam.bop->deals[index].first = k; // Next declarer - - res = SolveSameBoard( - thrp, - cparam.bop->deals[index], - &fut[index], - hint); - - if (res == 1) - cparam.solvedp->solvedBoard[index].score[k] = - fut[index].score[0]; - else - cparam.error = res; - } - END_THREAD_TIMER(thrId); + CalcSingleCommon(thrId, index); } } int CalcAllBoardsN( boards * bop, - solvedBoards * solvedp, - const int chunkSize, - const int source) // 0 solve, 1 calc + solvedBoards * solvedp) { - UNUSED(chunkSize); cparam.error = 0; if (bop->noOfBoards > MAXNOOFBOARDS) @@ -113,17 +128,8 @@ int CalcAllBoardsN( cparam.solvedp = solvedp; cparam.noOfBoards = bop->noOfBoards; - // TODO Now always 1 - if (source == 0) - { - scheduler.RegisterRun(DDS_RUN_SOLVE, bop); - sysdep.RegisterRun(DDS_RUN_SOLVE, bop); - } - else - { - scheduler.RegisterRun(DDS_RUN_CALC, bop); - sysdep.RegisterRun(DDS_RUN_CALC, bop); // TODO Not working yet (bop) - } + scheduler.RegisterRun(DDS_RUN_CALC, bop); + sysdep.RegisterRun(DDS_RUN_CALC, bop); for (int k = 0; k < MAXNOOFBOARDS; k++) solvedp->solvedBoard[k].cards = 0; @@ -168,9 +174,9 @@ int STDCALL CalcDDtable( } int ind = 0; - bo.noOfBoards = 5; + bo.noOfBoards = DDS_STRAINS; - for (int tr = 4; tr >= 0; tr--) + for (int tr = DDS_STRAINS-1; tr >= 0; tr--) { dl.trump = tr; bo.deals[ind] = dl; @@ -180,25 +186,23 @@ int STDCALL CalcDDtable( ind++; } - int res = CalcAllBoardsN(&bo, &solved, 4, 1); - if (res == 1) + int res = CalcAllBoardsN(&bo, &solved); + if (res != 1) + return res; + + for (int index = 0; index < DDS_STRAINS; index++) { - for (int index = 0; index < 5; index++) - { - int strain = bo.deals[index].trump; + int strain = bo.deals[index].trump; - // SH: I'm making a terrible use of the fut structure here. + // SH: I'm making a terrible use of the fut structure here. - for (int first = 0; first < DDS_HANDS; first++) - { - tablep->resTable[strain][ rho[first] ] = - 13 - solved.solvedBoard[index].score[first]; - } + for (int first = 0; first < DDS_HANDS; first++) + { + tablep->resTable[strain][ rho[first] ] = + 13 - solved.solvedBoard[index].score[first]; } - return RETURN_NO_FAULT; } - - return res; + return RETURN_NO_FAULT; } @@ -220,7 +224,7 @@ int STDCALL CalcAllTables( int count = 0; bool okey = false; - for (int k = 0; k < 5; k++) + for (int k = 0; k < DDS_STRAINS; k++) { if (!trumpFilter[k]) { @@ -241,7 +245,7 @@ int STDCALL CalcAllTables( for (int m = 0; m < dealsp->noOfTables; m++) { - for (int tr = 4; tr >= 0; tr--) + for (int tr = DDS_STRAINS-1; tr >= 0; tr--) { if (trumpFilter[tr]) continue; @@ -269,7 +273,7 @@ int STDCALL CalcAllTables( bo.noOfBoards = lastIndex + 1; - int res = CalcAllBoardsN(&bo, &solved, 4, 1); + int res = CalcAllBoardsN(&bo, &solved); if (res != 1) return res; @@ -339,3 +343,13 @@ int STDCALL CalcDDtablePBN( } +void DetectCalcDuplicates( + boards * const bop, + vector& uniques, + vector& crossrefs) +{ + // Could save a little bit of time with a dedicated checker that + // only looks at the cards. + return DetectSolveDuplicates(bop, uniques, crossrefs); +} + diff --git a/src/CalcTables.h b/src/CalcTables.h index f07681f0..17a94e87 100644 --- a/src/CalcTables.h +++ b/src/CalcTables.h @@ -10,14 +10,25 @@ #ifndef DDS_CALCTABLES_H #define DDS_CALCTABLES_H -#include - #include "dds.h" using namespace std; +void CalcSingleCommon( + const int thrID, + const int bno); + +void CopyCalcSingle( + const int bnoFrom, + const int bnoTo); + void CalcChunkCommon( const int thrId); +void DetectCalcDuplicates( + boards * const bop, + vector& uniques, + vector& crossrefs); + #endif diff --git a/src/Makefiles/depends_obj.txt b/src/Makefiles/depends_obj.txt index be2e3cef..d3c2a245 100644 --- a/src/Makefiles/depends_obj.txt +++ b/src/Makefiles/depends_obj.txt @@ -4,7 +4,9 @@ ABsearch.obj: dds.h ../include/portab.h ../include/dll.h TransTable.h Moves.h ABsearch.obj: QuickTricks.h Memory.h debug.h LaterTricks.h ABsearch.h ABsearch.obj: ABstats.h TimerList.h TimerGroup.h Timer.h ABstats.obj: dds.h ../include/portab.h ../include/dll.h ABstats.h debug.h -CalcTables.obj: dds.h ../include/portab.h ../include/dll.h SolveBoard.h PBN.h +CalcTables.obj: dds.h ../include/portab.h ../include/dll.h SolverIF.h +CalcTables.obj: Memory.h TransTable.h Moves.h debug.h System.h Scheduler.h +CalcTables.obj: TimeStatList.h TimeStat.h Timer.h PBN.h DealerPar.obj: dds.h ../include/portab.h ../include/dll.h Init.obj: Init.h dds.h ../include/portab.h ../include/dll.h Memory.h Init.obj: TransTable.h Moves.h debug.h System.h Scheduler.h TimeStatList.h @@ -30,8 +32,8 @@ SolverIF.obj: dds.h ../include/portab.h ../include/dll.h Init.h Memory.h SolverIF.obj: TransTable.h Moves.h debug.h ABsearch.h SolverIF.h TimerList.h SolverIF.obj: TimerGroup.h Timer.h System.h Scheduler.h TimeStatList.h SolverIF.obj: TimeStat.h -System.obj: ../include/dll.h dds.h ../include/portab.h System.h SolveBoard.h -System.obj: PlayAnalyser.h +System.obj: SolveBoard.h dds.h ../include/portab.h ../include/dll.h +System.obj: CalcTables.h PlayAnalyser.h System.h Timer.obj: Timer.h TimerGroup.obj: TimerGroup.h Timer.h TimerList.obj: TimerList.h TimerGroup.h Timer.h debug.h dds.h diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 6af1d827..c8ef5953 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -413,3 +413,31 @@ int STDCALL AnalyseAllPlaysPBN( return AnalyseAllPlaysBin(&bd, &pl, solvedp, chunkSize); } + +void DetectPlayDuplicates( + boards const * bop, + vector& uniques, + vector& crossrefs) +{ + // This dummy function is there for consistency in System.cpp. + // In practice there is not much point in deteting play repeats, + // as it is highly unlikely that the play went identically at + // two tables. + + uniques.resize(bop->noOfBoards); + for (unsigned i = 0; i < static_cast(bop->noOfBoards); i++) + { + uniques[i] = i; + crossrefs[i] = -1; + } +} + + +void CopyPlaySingle( + const int bnoFrom, + const int bnoTo) +{ + UNUSED(bnoFrom); + UNUSED(bnoTo); +} + diff --git a/src/PlayAnalyser.h b/src/PlayAnalyser.h index 009de5e2..3ee764e9 100644 --- a/src/PlayAnalyser.h +++ b/src/PlayAnalyser.h @@ -18,4 +18,13 @@ void PlaySingleCommon( void PlayChunkCommon( const int thrId); +void DetectPlayDuplicates( + boards const * bop, + vector& uniques, + vector& crossrefs); + +void CopyPlaySingle( + const int bnoFrom, + const int bnoTo); + #endif diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index c9e6cb45..88257127 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -136,6 +136,7 @@ int SolveAllBoardsN( } else { + // TODO Only == 0 branch is needed here anymore. scheduler.RegisterRun(DDS_RUN_CALC, bop); sysdep.RegisterRun(DDS_RUN_CALC, bop); // TODO Not working yet (bop) } @@ -260,7 +261,7 @@ int STDCALL SolveAllChunksBin( } -void DetectDuplicates( +void DetectSolveDuplicates( boards const * bop, vector& uniques, vector& crossrefs) diff --git a/src/SolveBoard.h b/src/SolveBoard.h index c47ee2fb..bda497e4 100644 --- a/src/SolveBoard.h +++ b/src/SolveBoard.h @@ -34,9 +34,9 @@ int SolveAllBoardsN( const int chunkSize, const int source); // 0 source, 1 calc -void DetectDuplicates( +void DetectSolveDuplicates( boards const * bop, vector& uniques, - vector& crossrefs); // TODO: Should maybe go into System.cpp? + vector& crossrefs); #endif diff --git a/src/System.cpp b/src/System.cpp index 078e7637..29a1c69a 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -504,21 +504,15 @@ int System::RunThreadsSTLIMPL() uniques.clear(); crossrefs.resize(bop->noOfBoards); - // TODO: More general + // TODO: More general. Could have separate calc detector, + // doesn't need to check quite as much. if (runCat == DDS_RUN_SOLVE) - DetectDuplicates(bop, uniques, crossrefs); + DetectSolveDuplicates(bop, uniques, crossrefs); + else if (runCat == DDS_RUN_CALC) + DetectCalcDuplicates(bop, uniques, crossrefs); else if (runCat == DDS_RUN_TRACE) - { - uniques.resize(bop->noOfBoards); - for (unsigned i = 0; i < static_cast(bop->noOfBoards); i++) - { - uniques[i] = i; - crossrefs[i] = -1; - } - } -// TEMP -// cout << "uniques " << uniques.size() << endl; - + DetectPlayDuplicates(bop, uniques, crossrefs); + for_each(std::execution::par, uniques.begin(), uniques.end(), [&](int &bno) { @@ -534,6 +528,8 @@ int System::RunThreadsSTLIMPL() // TODO: Use some kind of fptr if (runCat == DDS_RUN_SOLVE) SolveSingleCommon(thrId, bno); + else if (runCat == DDS_RUN_CALC) + CalcSingleCommon(thrId, bno); else if (runCat == DDS_RUN_TRACE) PlaySingleCommon(thrId, bno); }); @@ -549,6 +545,8 @@ int System::RunThreadsSTLIMPL() // TODO: Only works for Solve at the moment if (runCat == DDS_RUN_SOLVE) CopySolveSingle(crossrefs[i], i); + else if (runCat == DDS_RUN_CALC) + CopyCalcSingle(crossrefs[i], i); } } #endif diff --git a/src/TimerList.cpp b/src/TimerList.cpp index 27f891c5..87b6eb18 100644 --- a/src/TimerList.cpp +++ b/src/TimerList.cpp @@ -14,8 +14,8 @@ #include -#include "TimerList.h" #include "dds.h" +#include "TimerList.h" #define DDS_TIMERS 50 From 0880d6078da378ac21990297c67ba2f558ea28af Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Tue, 27 Mar 2018 18:16:12 +0200 Subject: [PATCH 075/132] Seems to work --- src/CalcTables.cpp | 22 +++++++++++++--------- src/CalcTables.h | 5 ++--- src/PlayAnalyser.cpp | 7 ++----- src/PlayAnalyser.h | 3 +-- src/SolveBoard.cpp | 20 ++++++++++++++------ src/SolveBoard.h | 3 +-- src/System.cpp | 34 +++++++++++++++++++++------------- src/System.h | 8 +++++++- 8 files changed, 61 insertions(+), 41 deletions(-) diff --git a/src/CalcTables.cpp b/src/CalcTables.cpp index 48c05395..0f6be36f 100644 --- a/src/CalcTables.cpp +++ b/src/CalcTables.cpp @@ -67,15 +67,19 @@ void CalcSingleCommon( } -void CopyCalcSingle( - const int bnoFrom, - const int bnoTo) +void CopyCalcSingle(const vector& crossrefs) { - START_THREAD_TIMER(thrId); - for (int k = 0; k < DDS_HANDS; k++) - cparam.solvedp->solvedBoard[bnoTo].score[k] = - cparam.solvedp->solvedBoard[bnoFrom].score[k]; - END_THREAD_TIMER(thrId); + for (unsigned i = 0; i < crossrefs.size(); i++) + { + if (crossrefs[i] == -1) + continue; + + START_THREAD_TIMER(thrId); + for (int k = 0; k < DDS_HANDS; k++) + cparam.solvedp->solvedBoard[i].score[k] = + cparam.solvedp->solvedBoard[ crossrefs[i] ].score[k]; + END_THREAD_TIMER(thrId); + } } @@ -344,7 +348,7 @@ int STDCALL CalcDDtablePBN( void DetectCalcDuplicates( - boards * const bop, + boards const * bop, vector& uniques, vector& crossrefs) { diff --git a/src/CalcTables.h b/src/CalcTables.h index 17a94e87..88384d47 100644 --- a/src/CalcTables.h +++ b/src/CalcTables.h @@ -20,14 +20,13 @@ void CalcSingleCommon( const int bno); void CopyCalcSingle( - const int bnoFrom, - const int bnoTo); + const vector& crossrefs); void CalcChunkCommon( const int thrId); void DetectCalcDuplicates( - boards * const bop, + boards const * bop, vector& uniques, vector& crossrefs); diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index c8ef5953..0fb99c2a 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -433,11 +433,8 @@ void DetectPlayDuplicates( } -void CopyPlaySingle( - const int bnoFrom, - const int bnoTo) +void CopyPlaySingle(const vector& crossrefs) { - UNUSED(bnoFrom); - UNUSED(bnoTo); + UNUSED(crossrefs); } diff --git a/src/PlayAnalyser.h b/src/PlayAnalyser.h index 3ee764e9..b11e20ed 100644 --- a/src/PlayAnalyser.h +++ b/src/PlayAnalyser.h @@ -24,7 +24,6 @@ void DetectPlayDuplicates( vector& crossrefs); void CopyPlaySingle( - const int bnoFrom, - const int bnoTo); + const vector& crossrefs); #endif diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 88257127..82ae08f9 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -29,6 +29,7 @@ bool SameBoard( const unsigned index2); +#include void SolveSingleCommon( const int thrId, const int bno) @@ -45,6 +46,8 @@ void SolveSingleCommon( thrId); END_THREAD_TIMER(thrId); +string st = "Sslved " + to_string(bno) + " res " + to_string(res) + "\n"; +cout << st; if (res == 1) param.solvedp->solvedBoard[bno] = fut; else @@ -52,13 +55,18 @@ void SolveSingleCommon( } -void CopySolveSingle( - const int bnoFrom, - const int bnoTo) +void CopySolveSingle(const vector& crossrefs) { - START_THREAD_TIMER(thrId); - param.solvedp->solvedBoard[bnoTo] = param.solvedp->solvedBoard[bnoFrom]; - END_THREAD_TIMER(thrId); + for (unsigned i = 0; i < crossrefs.size(); i++) + { + if (crossrefs[i] == -1) + continue; + + START_THREAD_TIMER(thrId); + param.solvedp->solvedBoard[i] = + param.solvedp->solvedBoard[crossrefs[i]]; + END_THREAD_TIMER(thrId); + } } diff --git a/src/SolveBoard.h b/src/SolveBoard.h index bda497e4..64ac085d 100644 --- a/src/SolveBoard.h +++ b/src/SolveBoard.h @@ -22,8 +22,7 @@ void SolveSingleCommon( const int bno); void CopySolveSingle( - const int bnoFrom, - const int bnoTo); + const vector& crossrefs); void SolveChunkCommon( const int thrId); diff --git a/src/System.cpp b/src/System.cpp index 29a1c69a..d21ce3ce 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -191,11 +191,25 @@ void System::Reset() RunPtrList[DDS_SYSTEM_THREAD_STLIMPL] = &System::RunThreadsSTLIMPL; - // DDS_RUN_CALC doesn't happen. CallbackSimpleList.resize(DDS_RUN_SIZE); CallbackSimpleList[DDS_RUN_SOLVE] = SolveChunkCommon; CallbackSimpleList[DDS_RUN_CALC] = CalcChunkCommon; CallbackSimpleList[DDS_RUN_TRACE] = PlayChunkCommon; + + CallbackDuplList.resize(DDS_RUN_SIZE); + CallbackDuplList[DDS_RUN_SOLVE] = DetectSolveDuplicates; + CallbackDuplList[DDS_RUN_CALC] = DetectCalcDuplicates; + CallbackDuplList[DDS_RUN_TRACE] = DetectPlayDuplicates; + + CallbackSingleList.resize(DDS_RUN_SIZE); + CallbackSingleList[DDS_RUN_SOLVE] = SolveSingleCommon; + CallbackSingleList[DDS_RUN_CALC] = CalcSingleCommon; + CallbackSingleList[DDS_RUN_TRACE] = PlaySingleCommon; + + CallbackCopyList.resize(DDS_RUN_SIZE); + CallbackCopyList[DDS_RUN_SOLVE] = CopySolveSingle; + CallbackCopyList[DDS_RUN_CALC] = CopyCalcSingle; + CallbackCopyList[DDS_RUN_TRACE] = CopyPlaySingle; } @@ -533,22 +547,16 @@ int System::RunThreadsSTLIMPL() else if (runCat == DDS_RUN_TRACE) PlaySingleCommon(thrId, bno); }); -// cout << "used up to " << thrIdNext-1 << endl; if (err) return RETURN_THREAD_INDEX; // TODO: Not quite right - for (unsigned i = 0; i < crossrefs.size(); i++) - { - if (crossrefs[i] != -1) - { - // TODO: Only works for Solve at the moment - if (runCat == DDS_RUN_SOLVE) - CopySolveSingle(crossrefs[i], i); - else if (runCat == DDS_RUN_CALC) - CopyCalcSingle(crossrefs[i], i); - } - } + if (runCat == DDS_RUN_SOLVE) + CopySolveSingle(crossrefs); + else if (runCat == DDS_RUN_CALC) + CopyCalcSingle(crossrefs); + else if (runCat == DDS_RUN_TRACE) + CopyPlaySingle(crossrefs); #endif return RETURN_NO_FAULT; diff --git a/src/System.h b/src/System.h index 45c1c424..b111704c 100644 --- a/src/System.h +++ b/src/System.h @@ -22,6 +22,10 @@ using namespace std; typedef void (*fptrType)(const int thid); +typedef void (*fduplType)( + boards const * bop, vector& uniques, vector& crossrefs); +typedef void (*fsingleType)(const int thid, const int bno); +typedef void (*fcopyType)(const vector& crossrefs); class System @@ -40,7 +44,9 @@ class System vector availableSystem; vector CallbackSimpleList; - vector CallbackComplexList; + vector CallbackDuplList; + vector CallbackSingleList; + vector CallbackCopyList; typedef int (System::*RunPtr)(); vector RunPtrList; From ec1a73f740d5296068cd13f1d94239ab15611a1b Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Tue, 27 Mar 2018 19:07:10 +0200 Subject: [PATCH 076/132] Added PPL, but segfaults non-deterministically --- include/dll.h | 3 +- src/PlayAnalyser.cpp | 1 + src/SolveBoard.cpp | 5 +- src/System.cpp | 118 +++++++++++++++++++++++++++++-------------- src/System.h | 1 + test/testcommon.cpp | 4 +- 6 files changed, 89 insertions(+), 43 deletions(-) diff --git a/include/dll.h b/include/dll.h index f35c0c1b..25737040 100644 --- a/include/dll.h +++ b/include/dll.h @@ -365,7 +365,8 @@ struct DDSInfo // 4 = Boost, // 5 = STL, // 6 = TBB, - // 7 = STLIMPL (for_each) + // 7 = STLIMPL (for_each), + // 8 = PPLIMPL (for_each), int threading; // The actual number of threads configured diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 0fb99c2a..44c60c11 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -425,6 +425,7 @@ void DetectPlayDuplicates( // two tables. uniques.resize(bop->noOfBoards); + crossrefs.resize(bop->noOfBoards); for (unsigned i = 0; i < static_cast(bop->noOfBoards); i++) { uniques[i] = i; diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 82ae08f9..a63404d3 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -46,8 +46,6 @@ void SolveSingleCommon( thrId); END_THREAD_TIMER(thrId); -string st = "Sslved " + to_string(bno) + " res " + to_string(res) + "\n"; -cout << st; if (res == 1) param.solvedp->solvedBoard[bno] = fut; else @@ -274,6 +272,9 @@ void DetectSolveDuplicates( vector& uniques, vector& crossrefs) { + uniques.clear(); + crossrefs.resize(bop->noOfBoards); + const unsigned nu = static_cast(bop->noOfBoards); for (unsigned i = 0; i < nu; i++) crossrefs[i] = -1; diff --git a/src/System.cpp b/src/System.cpp index d21ce3ce..5cb0ab83 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -20,16 +20,16 @@ // Boost: Disable some header warnings. #ifdef DDS_THREADS_BOOST - #ifdef _MSC_VER - #pragma warning(push) - #pragma warning(disable: 4061 4191 4619 4623 5031) - #endif + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable: 4061 4191 4619 4623 5031) + #endif #include - #ifdef _MSC_VER - #pragma warning(pop) - #endif + #ifdef _MSC_VER + #pragma warning(pop) + #endif #endif #ifdef DDS_THREADS_GCD @@ -44,6 +44,19 @@ #include #endif +#ifdef DDS_THREADS_PPLIMPL + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable: 4355 4619 5038) + #endif + + #include "ppl.h" + + #ifdef _MSC_VER + #pragma warning(pop) + #endif +#endif + #ifdef DDS_THREADS_TBB #ifdef _MSC_VER #pragma warning(push) @@ -106,7 +119,8 @@ const vector DDS_SYSTEM_THREADING = "Boost", "STL", "TBB", - "STL-impl" + "STL-impl", + "PPL-impl" }; #define DDS_SYSTEM_THREAD_BASIC 0 @@ -117,7 +131,8 @@ const vector DDS_SYSTEM_THREADING = #define DDS_SYSTEM_THREAD_STL 5 #define DDS_SYSTEM_THREAD_TBB 6 #define DDS_SYSTEM_THREAD_STLIMPL 7 -#define DDS_SYSTEM_THREAD_SIZE 8 +#define DDS_SYSTEM_THREAD_PPLIMPL 8 +#define DDS_SYSTEM_THREAD_SIZE 9 System::System() @@ -170,6 +185,10 @@ void System::Reset() availableSystem[DDS_SYSTEM_THREAD_STLIMPL] = true; #endif +#ifdef DDS_THREADS_PPLIMPL + availableSystem[DDS_SYSTEM_THREAD_PPLIMPL] = true; +#endif + // Take the first of any multi-threading system defined. for (unsigned k = 1; k < availableSystem.size(); k++) { @@ -190,6 +209,8 @@ void System::Reset() RunPtrList[DDS_SYSTEM_THREAD_TBB] = &System::RunThreadsTBB; RunPtrList[DDS_SYSTEM_THREAD_STLIMPL] = &System::RunThreadsSTLIMPL; + RunPtrList[DDS_SYSTEM_THREAD_PPLIMPL] = + &System::RunThreadsPPLIMPL; CallbackSimpleList.resize(DDS_RUN_SIZE); CallbackSimpleList[DDS_RUN_SOLVE] = SolveChunkCommon; @@ -509,54 +530,31 @@ int System::RunThreadsSTL() int System::RunThreadsSTLIMPL() { #ifdef DDS_THREADS_STLIMPL + vector uniques; + vector crossrefs; + (* CallbackDuplList[runCat])(bop, uniques, crossrefs); + atomic thrIdNext = 0; thread_local int thrId = -1; bool err = false; - vector uniques; - vector crossrefs; - uniques.clear(); - crossrefs.resize(bop->noOfBoards); - - // TODO: More general. Could have separate calc detector, - // doesn't need to check quite as much. - if (runCat == DDS_RUN_SOLVE) - DetectSolveDuplicates(bop, uniques, crossrefs); - else if (runCat == DDS_RUN_CALC) - DetectCalcDuplicates(bop, uniques, crossrefs); - else if (runCat == DDS_RUN_TRACE) - DetectPlayDuplicates(bop, uniques, crossrefs); - for_each(std::execution::par, uniques.begin(), uniques.end(), [&](int &bno) { if (thrId == -1) { - thrId = thrIdNext; - thrIdNext++; - + thrId = thrIdNext++; if (thrIdNext > 16) // Hmm... err = true; } - // TODO: Use some kind of fptr - if (runCat == DDS_RUN_SOLVE) - SolveSingleCommon(thrId, bno); - else if (runCat == DDS_RUN_CALC) - CalcSingleCommon(thrId, bno); - else if (runCat == DDS_RUN_TRACE) - PlaySingleCommon(thrId, bno); + (* CallbackSingleList[runCat])(thrId, bno); }); if (err) return RETURN_THREAD_INDEX; // TODO: Not quite right - if (runCat == DDS_RUN_SOLVE) - CopySolveSingle(crossrefs); - else if (runCat == DDS_RUN_CALC) - CopyCalcSingle(crossrefs); - else if (runCat == DDS_RUN_TRACE) - CopyPlaySingle(crossrefs); + (* CallbackCopyList[runCat])(crossrefs); #endif return RETURN_NO_FAULT; @@ -589,6 +587,48 @@ int System::RunThreadsTBB() } +////////////////////////////////////////////////////////////////////// +// PPL // +////////////////////////////////////////////////////////////////////// + + +#include +#include +int System::RunThreadsPPLIMPL() +{ +#ifdef DDS_THREADS_PPLIMPL + vector uniques; + vector crossrefs; + (* CallbackDuplList[runCat])(bop, uniques, crossrefs); + + atomic thrIdNext = 0; + thread_local int thrId = -1; + bool err = false; + + Concurrency::parallel_for_each(uniques.begin(), uniques.end(), + [&](int &bno) + { + if (thrId == -1) + { + thrId = thrIdNext++; + if (thrIdNext > 16) // Hmm... + err = true; + } + + (* CallbackSingleList[runCat])(thrId, bno); + }); + + if (err) + return RETURN_THREAD_INDEX; // TODO: Not quite right + + (* CallbackCopyList[runCat])(crossrefs); +#endif + + return RETURN_NO_FAULT; +} + + + int System::RunThreads() { fptr = CallbackSimpleList[runCat]; diff --git a/src/System.h b/src/System.h index b111704c..50388c03 100644 --- a/src/System.h +++ b/src/System.h @@ -63,6 +63,7 @@ class System int RunThreadsSTL(); int RunThreadsTBB(); int RunThreadsSTLIMPL(); + int RunThreadsPPLIMPL(); string GetVersion( int& major, diff --git a/test/testcommon.cpp b/test/testcommon.cpp index 61bac76a..a98c885f 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -267,8 +267,10 @@ int threadingCode(char * arg) return 6; else if (str == "stlimpl") return 7; - else + else if (str == "pplimpl") return 8; + else + return 9; } From e9f88301e7170bb5f33d6592095e6acab911d674 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Tue, 27 Mar 2018 22:11:45 +0200 Subject: [PATCH 077/132] Makefiles --- src/Makefiles/Makefile_Visual | 14 ++++++++++---- test/Makefiles/Makefile_Visual | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Makefiles/Makefile_Visual b/src/Makefiles/Makefile_Visual index 2f2c98dd..3318b559 100644 --- a/src/Makefiles/Makefile_Visual +++ b/src/Makefiles/Makefile_Visual @@ -38,8 +38,11 @@ THR_GCD = /DDDS_THREADS_GCD THR_OPENMP = /DDDS_THREADS_OPENMP THR_WINAPI = /DDDS_THREADS_WINAPI THR_STL = /DDDS_THREADS_STL +THR_STLIMPL = /DDDS_THREADS_STLIMPL +THR_PPLIMPL = /DDDS_THREADS_PPLIMPL -THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_WINAPI) $(THR_STL) +THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_WINAPI) \ + $(THR_STL) $(THR_STLIMPL) $(THR_PPLIMPL) # If you need to add something for a threading system, this is # the place. @@ -61,7 +64,7 @@ SCHEDULER = /DDDS_SCHEDULER # All that matters from no. 3 and no. 4 is the following. Here you # can add $(SMALL_MEMORY) etc. -DDS_BEHAVIOR = $(DEBUG_ALL) +DDS_BEHAVIOR = # ----------------------- OFTEN OK ------------------------------ @@ -85,6 +88,7 @@ WARN_FLAGS = \ /wd4514 \ /wd4555 \ /wd4571 \ + /wd4623 \ /wd4625 \ /wd4626 \ /wd4668 \ @@ -97,7 +101,9 @@ WARN_FLAGS = \ /wd5027 \ /WX -COMPILE_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs \ +# If you don't have /std:c++17, you won't get THR_STLIMPL. + +COMPILE_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs /std:c++17 \ $(WARN_FLAGS) \ $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) @@ -129,7 +135,7 @@ $(VFILE).obj: $(DLLBASE).res cvtres /MACHINE:X86 /OUT:$(VFILE).obj $(DLLBASE).res depend: - makedepend $(DDS_BEHAVIOR) -Y -o.obj -- $(SOURCE_FILES) + makedepend -Y -o.obj -- $(SOURCE_FILES) clean: rm -f $(OBJ_FILES) $(DLL) $(DLLBASE).{lib,exp,def,obj,res} diff --git a/test/Makefiles/Makefile_Visual b/test/Makefiles/Makefile_Visual index e27b2d53..fb492e8b 100644 --- a/test/Makefiles/Makefile_Visual +++ b/test/Makefiles/Makefile_Visual @@ -53,7 +53,6 @@ WARN_FLAGS = \ /wd4530 \ /wd4555 \ /wd4577 \ - /wd4592 \ /wd4625 \ /wd4626 \ /wd4668 \ @@ -97,7 +96,7 @@ ITEST_SOURCE_FILES = \ $(DTEST_SOURCE_FILES) \ itest.cpp -ITEST_OBJ_FILES = $(subst .cpp,.obj,$(ITEST_SOURCE_FILES)) +ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) dtest: $(DTEST_OBJ_FILES) link $(LINK1_FLAGS) $(DTEST_OBJ_FILES) $(DLIB) \ @@ -120,3 +119,4 @@ clean: # If you don't have a Linux-like setup, use "del" instead of "rm". include $(INCL_DEPENDS) + From 6a45719514985f99b2fd6cf0899e9a2241014629 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Wed, 28 Mar 2018 07:55:29 +0200 Subject: [PATCH 078/132] Made parallel.h --- src/System.cpp | 66 +------------------------------------------- src/parallel.h | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 65 deletions(-) create mode 100644 src/parallel.h diff --git a/src/System.cpp b/src/System.cpp index 5cb0ab83..5f74eeef 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -16,71 +16,7 @@ #include "SolveBoard.h" #include "CalcTables.h" #include "PlayAnalyser.h" - -// Boost: Disable some header warnings. - -#ifdef DDS_THREADS_BOOST - #ifdef _MSC_VER - #pragma warning(push) - #pragma warning(disable: 4061 4191 4619 4623 5031) - #endif - - #include - - #ifdef _MSC_VER - #pragma warning(pop) - #endif -#endif - -#ifdef DDS_THREADS_GCD - #include -#endif - -#ifdef DDS_THREADS_STL - #include -#endif - -#ifdef DDS_THREADS_STLIMPL - #include -#endif - -#ifdef DDS_THREADS_PPLIMPL - #ifdef _MSC_VER - #pragma warning(push) - #pragma warning(disable: 4355 4619 5038) - #endif - - #include "ppl.h" - - #ifdef _MSC_VER - #pragma warning(pop) - #endif -#endif - -#ifdef DDS_THREADS_TBB - #ifdef _MSC_VER - #pragma warning(push) - #pragma warning(disable: 4574) - #endif - - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wold-style-cast" - #pragma GCC diagnostic ignored "-Wsign-conversion" - #pragma GCC diagnostic ignored "-Wctor-dtor-privacy" - - #include "tbb/tbb.h" - #include "tbb/tbb_thread.h" - - #pragma GCC diagnostic pop - - #ifdef _MSC_VER - #pragma warning(pop) - #endif -#endif - -#include "../include/dll.h" -#include "dds.h" - +#include "parallel.h" #include "System.h" #include "SolveBoard.h" #include "PlayAnalyser.h" diff --git a/src/parallel.h b/src/parallel.h new file mode 100644 index 00000000..62dada55 --- /dev/null +++ b/src/parallel.h @@ -0,0 +1,75 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_PARALLEL_H +#define DDS_PARALLEL_H + +// Boost: Disable some header warnings. + +#ifdef DDS_THREADS_BOOST + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable: 4061 4191 4619 4623 5031) + #endif + + #include + + #ifdef _MSC_VER + #pragma warning(pop) + #endif +#endif + +#ifdef DDS_THREADS_GCD + #include +#endif + +#ifdef DDS_THREADS_STL + #include +#endif + +#ifdef DDS_THREADS_STLIMPL + #include +#endif + +#ifdef DDS_THREADS_PPLIMPL + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable: 4355 4619 5038) + #endif + + #include "ppl.h" + + #ifdef _MSC_VER + #pragma warning(pop) + #endif +#endif + +#ifdef DDS_THREADS_TBB + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable: 4574) + #endif + + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wold-style-cast" + #pragma GCC diagnostic ignored "-Wsign-conversion" + #pragma GCC diagnostic ignored "-Wctor-dtor-privacy" + + #include "tbb/tbb.h" + #include "tbb/tbb_thread.h" + + #pragma GCC diagnostic pop + + #ifdef _MSC_VER + #pragma warning(pop) + #endif +#endif + +#endif + From 21307d44ad5824c956c6aa52304d85d1438f1b81 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Wed, 28 Mar 2018 15:02:53 +0200 Subject: [PATCH 079/132] Competing push, does this work? --- src/System.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/System.cpp b/src/System.cpp index 5cb0ab83..2c7e026c 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -605,19 +605,28 @@ int System::RunThreadsPPLIMPL() thread_local int thrId = -1; bool err = false; + // Not sure this actually works... + using namespace Concurrency; + Scheduler * sched = Scheduler::Create( + SchedulerPolicy(1, MaxConcurrency, numThreads)); + sched->Attach(); + Concurrency::parallel_for_each(uniques.begin(), uniques.end(), [&](int &bno) { if (thrId == -1) { thrId = thrIdNext++; - if (thrIdNext > 16) // Hmm... + if (thrId >= numThreads) err = true; } (* CallbackSingleList[runCat])(thrId, bno); }); + CurrentScheduler::Detach(); + sched->Release(); + if (err) return RETURN_THREAD_INDEX; // TODO: Not quite right From 5bd4f7c46f0f39b1412d7060bd8f8aa54f3ede05 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Wed, 28 Mar 2018 16:42:43 +0200 Subject: [PATCH 080/132] Cleanup --- src/PlayAnalyser.cpp | 15 +-------------- src/Scheduler.cpp | 6 ++++++ src/Scheduler.h | 2 ++ src/SolveBoard.cpp | 43 ++++++++----------------------------------- src/SolveBoard.h | 4 +--- src/System.cpp | 40 +++++++++++++++++++++++++++++++++++++--- 6 files changed, 55 insertions(+), 55 deletions(-) diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 44c60c11..9f339d70 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -293,8 +293,6 @@ void PlaySingleCommon( void PlayChunkCommon(const int thrId) { - vector solved; - solved.resize(playparam.noOfBoards); int index; schedType st; @@ -305,18 +303,7 @@ void PlayChunkCommon(const int thrId) if (index == -1) break; - // TODO: Could use PlaySingleCommon - int res = AnalysePlayBin( - playparam.bop->deals[index], - traceparam.plp->plays[index], - &solved[index], - thrId); - - // If there are multiple errors, this will catch one of them. - if (res == 1) - traceparam.solvedp->solved[index] = solved[index]; - else - playparam.error = res; + PlaySingleCommon(thrId, index); } } diff --git a/src/Scheduler.cpp b/src/Scheduler.cpp index 43cc84e4..dc9ba0ae 100644 --- a/src/Scheduler.cpp +++ b/src/Scheduler.cpp @@ -800,6 +800,12 @@ schedType Scheduler::GetNumber(const int thrId) } +int Scheduler::NumGroups() const +{ + return numGroups; +} + + #ifdef DDS_SCHEDULER void Scheduler::StartThreadTimer(const int thrId) { diff --git a/src/Scheduler.h b/src/Scheduler.h index 5a830c70..47ba5c2c 100644 --- a/src/Scheduler.h +++ b/src/Scheduler.h @@ -168,6 +168,8 @@ class Scheduler schedType GetNumber(const int thrId); + int NumGroups() const; + #ifdef DDS_SCHEDULER void StartThreadTimer(const int thrId); diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index a63404d3..1666a88b 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -71,8 +71,6 @@ void CopySolveSingle(const vector& crossrefs) void SolveChunkCommon( const int thrId) { - vector fut; - fut.resize(param.noOfBoards); int index; schedType st; @@ -93,27 +91,14 @@ void SolveChunkCommon( param.bop->deals[st.repeatOf].first) { START_THREAD_TIMER(thrId); - param.solvedp->solvedBoard[index] = fut[ st.repeatOf ]; + param.solvedp->solvedBoard[index] = + param.solvedp->solvedBoard[st.repeatOf]; END_THREAD_TIMER(thrId); continue; } else { - // TODO: Could use SolveSingleCommon - START_THREAD_TIMER(thrId); - int res = SolveBoard( - param.bop->deals[index], - param.bop->target[index], - param.bop->solutions[index], - param.bop->mode[index], - &fut[index], - thrId); - END_THREAD_TIMER(thrId); - - if (res == 1) - param.solvedp->solvedBoard[index] = fut[index]; - else - param.error = res; + SolveSingleCommon(thrId, index); } } } @@ -121,11 +106,8 @@ void SolveChunkCommon( int SolveAllBoardsN( boards * bop, - solvedBoards * solvedp, - const int chunkSize, - const int source) // 0 solve, 1 calc + solvedBoards * solvedp) { - UNUSED(chunkSize); param.error = 0; if (bop->noOfBoards > MAXNOOFBOARDS) @@ -135,17 +117,8 @@ int SolveAllBoardsN( param.solvedp = solvedp; param.noOfBoards = bop->noOfBoards; - if (source == 0) - { - scheduler.RegisterRun(DDS_RUN_SOLVE, bop); - sysdep.RegisterRun(DDS_RUN_SOLVE, bop); - } - else - { - // TODO Only == 0 branch is needed here anymore. - scheduler.RegisterRun(DDS_RUN_CALC, bop); - sysdep.RegisterRun(DDS_RUN_CALC, bop); // TODO Not working yet (bop) - } + scheduler.RegisterRun(DDS_RUN_SOLVE, bop); + sysdep.RegisterRun(DDS_RUN_SOLVE, bop); for (int k = 0; k < MAXNOOFBOARDS; k++) solvedp->solvedBoard[k].cards = 0; @@ -223,7 +196,7 @@ int STDCALL SolveAllBoards( return RETURN_PBN_FAULT; } - int res = SolveAllBoardsN(&bo, solvedp, 1, 0); + int res = SolveAllBoardsN(&bo, solvedp); return res; } @@ -263,7 +236,7 @@ int STDCALL SolveAllChunksBin( if (chunkSize < 1) return RETURN_CHUNK_SIZE; - return SolveAllBoardsN(bop, solvedp, 1, 0); + return SolveAllBoardsN(bop, solvedp); } diff --git a/src/SolveBoard.h b/src/SolveBoard.h index 64ac085d..843a9c1b 100644 --- a/src/SolveBoard.h +++ b/src/SolveBoard.h @@ -29,9 +29,7 @@ void SolveChunkCommon( int SolveAllBoardsN( boards * bop, - solvedBoards * solvedp, - const int chunkSize, - const int source); // 0 source, 1 calc + solvedBoards * solvedp); void DetectSolveDuplicates( boards const * bop, diff --git a/src/System.cpp b/src/System.cpp index 70536fa6..e65ca16f 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -20,6 +20,10 @@ #include "System.h" #include "SolveBoard.h" #include "PlayAnalyser.h" +#include "Scheduler.h" + +extern Scheduler scheduler; + const vector DDS_SYSTEM_PLATFORM = { @@ -256,6 +260,11 @@ int System::RegisterRun( runCat = mode; bop = bopIn; + + // TODO: The implicit thread models don't need the scheduler(?). + // if (preferredSystem <= DDS_SYSTEM_THREAD_TBB) + // scheduler.RegisterRun(mode, bopIn); + return RETURN_NO_FAULT; } @@ -441,11 +450,26 @@ int System::RunThreadsBoost() // STL // ////////////////////////////////////////////////////////////////////// +// TODO Remove +// int runSched = 0; +// int runDetect = 0; + int System::RunThreadsSTL() { #ifdef DDS_THREADS_STL vector threads; + vector uniques; + vector crossrefs; + (* CallbackDuplList[runCat])(bop, uniques, crossrefs); + +// TODO Remove +// int numGroups = scheduler.NumGroups(); +// runSched += numGroups; +// runDetect += uniques.size(); +// cout << "scheduler groups " << runSched << ", uniques " << +// runDetect << endl; + const unsigned nu = static_cast(numThreads); threads.resize(nu); @@ -463,6 +487,11 @@ int System::RunThreadsSTL() } +// TODO Remove +// #include "Memory.h" +// #include "TimerList.h" +// extern Memory memory; + int System::RunThreadsSTLIMPL() { #ifdef DDS_THREADS_STLIMPL @@ -470,6 +499,13 @@ int System::RunThreadsSTLIMPL() vector crossrefs; (* CallbackDuplList[runCat])(bop, uniques, crossrefs); +// TODO Remove +// int numGroups = scheduler.NumGroups(); +// runSched += numGroups; +// runDetect += uniques.size(); +// cout << "scheduler groups " << runSched << ", uniques " << + // runDetect << endl; + atomic thrIdNext = 0; thread_local int thrId = -1; bool err = false; @@ -528,8 +564,6 @@ int System::RunThreadsTBB() ////////////////////////////////////////////////////////////////////// -#include -#include int System::RunThreadsPPLIMPL() { #ifdef DDS_THREADS_PPLIMPL @@ -543,7 +577,7 @@ int System::RunThreadsPPLIMPL() // Not sure this actually works... using namespace Concurrency; - Scheduler * sched = Scheduler::Create( + Concurrency::Scheduler * sched = Concurrency::Scheduler::Create( SchedulerPolicy(1, MaxConcurrency, numThreads)); sched->Attach(); From f4f29b2f5b1a83333df711b44bca031c8427eaef Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Thu, 29 Mar 2018 14:41:48 +0200 Subject: [PATCH 081/132] Working on ABstats --- src/ABsearch.cpp | 6 +- src/ABstats.cpp | 227 +++++++++++++++++++++++++---------------------- src/ABstats.h | 29 +++--- src/Init.cpp | 12 +-- 4 files changed, 153 insertions(+), 121 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index f6587e55..fb076628 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -535,7 +535,11 @@ bool ABsearch1( int res = QuickTricksSecondHand(posPoint, hand, depth, target, trump, thrp); TIMER_END(TIMER_NO_QT, depth); - if (res) return success; + if (res) + { + AB_COUNT(AB_QUICKTRICKS_2ND, true, depth); + return success; + } TIMER_START(TIMER_NO_MOVEGEN, depth); for (int ss = 0; ss < DDS_SUITS; ss++) diff --git a/src/ABstats.cpp b/src/ABstats.cpp index e5aadc64..95140ce9 100644 --- a/src/ABstats.cpp +++ b/src/ABstats.cpp @@ -40,9 +40,10 @@ ABstats::~ABstats() void ABstats::Reset() { for (int depth = 0; depth < DDS_MAXDEPTH; depth++) - nodes[depth] = 0; + ABnodes.list[depth] = 0; - allnodes = 0; + ABnodes.sum = 0; + ABnodes.sumWeighted = 0; for (int side = 0; side < 2; side++) { @@ -69,7 +70,8 @@ void ABstats::ResetCum() for (int depth = 0; depth < DDS_MAXDEPTH; depth++) nodesCum[depth] = 0; - allnodesCum = 0; + ABnodesCum.sumCum = 0; + ABnodesCum.sumCumWeighted = 0; for (int side = 0; side < 2; side++) { @@ -127,25 +129,111 @@ void ABstats::IncrPos( void ABstats::IncrNode(int depth) { - nodes[depth]++; nodesCum[depth]++; - allnodes++; + + ABnodes.list[depth]++; + ABnodes.sum++; + ABnodes.sumWeighted += depth; + + ABnodesCum.list[depth]++; + ABnodesCum.sumCum++; + ABnodesCum.sumCumWeighted += depth; } int ABstats::GetNodes() const { - return allnodes; + return ABnodes.sum; } -#include "../include/portab.h" -void ABstats::PrintStatsPosition(FILE * fpl) const +void ABstats::PrintHeaderPosition(FILE * fpl) const +{ + fprintf(fpl, "%2s %-20s %8s %5s %5s %8s %5s %5s\n", + "No", + "Return", + "Count", + "%", + "d_avg", + "Cumul", + "%", + "d_avg"); + + fprintf(fpl, "-----------------------------------"); + fprintf(fpl, "------------------------------\n"); +} + +void ABstats::PrintStatsPosition( + FILE * fpl, + int no, + char * text, + const ABtracker& abt, + const ABtracker& divisor) const +{ + if (abt.sum) + { + fprintf(fpl, "%2s %-20s %8d %5.1f %5.1f %8d %5.1f %5.1f\n", + (no == -1 ? "" : to_string(no).c_str()), + text, + abt.sum, + 100. * abt.sum / static_cast(divisor.sum), + abt.sumWeighted / static_cast(abt.sum), + abt.sumCum, + 100. * abt.sumCum / static_cast(divisor.sumCum), + abt.sumCumWeighted / static_cast(abt.sumCum)); + } + else if (abt.sumCum) + { + fprintf(fp, "%2s %-20s %8d %5.1f %5s %8d %5.1f %5.1f\n", + (no == -1 ? "" : to_string(no).c_str()), + text, + abt.sum, + 100. * abt.sum / static_cast(divisor.sum), + "", + abt.sumCum, + 100. * abt.sumCum / static_cast(divisor.sumCum), + abt.sumCumWeighted / static_cast(abt.sumCum)); + } +} + + +void ABstats::PrintHeaderDepth(FILE * fpl) const +{ + fprintf(fpl, "\n%5s %6s %6s %5s %5s %6s\n", + "Depth", + "Nodes", + "Cumul", + "Cum%", + "Cumc%", + "Branch"); + + fprintf(fp, "------------------------------------------\n"); +} + + +void ABstats::PrintAverageDepth(FILE * fpl) const { - UNUSED(fpl); + fprintf(fpl, "\n%-5s %6d %6d\n", + "Total", ABnodes.sum, ABnodesCum.sumCum); + + if (ABnodes.sum) + { + fprintf(fpl, "%-5s %6.1f %6.1f\n", + "d_avg", + ABnodes.sumWeighted / static_cast(ABnodes.sum), + ABnodesCum.sumCumWeighted / static_cast(ABnodesCum.sumCum)); + } + else if (ABnodes.sumCum) + { + fprintf(fpl, "\n%-5s %6s %6.1f\n", + "Avg", + "-", + ABnodes.sumCumWeighted / static_cast(ABnodesCum.sumCum)); + } } +#include "../include/portab.h" void ABstats::PrintStats() { if (! fileSet) @@ -159,101 +247,41 @@ void ABstats::PrintStats() fileSet = true; } - allnodesCum += allnodes; + ABtracker ABsidesSum; + ABsidesSum.sum = ABsides[1].sum + ABsides[0].sum; + ABsidesSum.sumCum = ABsides[1].sumCum + ABsides[0].sumCum; - int s = ABsides[1].sum + ABsides[0].sum; - int cs = ABsides[1].sumCum + ABsides[0].sumCum; - if (s) + if (ABsidesSum.sum) { - fprintf(fp, "%2s %-20s %8s %5s %5s %8s %5s %5s\n", - "No", - "Return", - "Count", - "%", - "d_avg", - "Cumul", - "%", - "d_avg"); - - fprintf(fp, "-----------------------------------"); - fprintf(fp, "------------------------------\n"); - - fprintf(fp, "%2s %-20s %8d %5.1f %5.1f %8d %5.1f %5.1f\n", - "", - "Side1", - ABsides[1].sum, - 100. * ABsides[1].sum / static_cast(s), - ABsides[1].sumWeighted / static_cast(s), - ABsides[1].sumCum, - 100. * ABsides[1].sumCum / static_cast(cs), - ABsides[1].sumCumWeighted / static_cast(cs)); - - fprintf(fp, "%2s %-20s %8d %5.1f %5.1f %8d %5.1f %5.1f\n\n", - "", - "Side0", - ABsides[0].sum, - 100. * ABsides[0].sum / static_cast(s), - ABsides[0].sumWeighted / static_cast(s), - ABsides[0].sumCum, - 100. * ABsides[0].sumCum / static_cast(cs), - ABsides[0].sumCumWeighted / static_cast(cs)); + ABstats::PrintHeaderPosition(fp); + + ABstats::PrintStatsPosition(fp, -1, "Side1", ABsides[1], ABsidesSum); + ABstats::PrintStatsPosition(fp, -1, "Side0", ABsides[0], ABsidesSum); + fprintf(fp, "\n"); for (int p = 0; p < DDS_AB_POS; p++) - { - if (ABplaces[p].sum) - { - fprintf(fp, "%2d %-20s %8d %5.1f %5.1f %8d %5.1f %5.1f\n", - p, - name[p], - ABplaces[p].sum, - 100. * ABplaces[p].sum / static_cast(s), - ABplaces[p].sumWeighted / static_cast(ABplaces[p].sum), - ABplaces[p].sumCum, - 100. * ABplaces[p].sumCum / static_cast(cs), - ABplaces[p].sumCumWeighted / static_cast(ABplaces[p].sumCum)); - } - else if (ABplaces[p].sumCum) - { - fprintf(fp, "%2d %-20s %8d %5.1f %5s %8d %5.1f %5.1f\n", - p, - name[p], - ABplaces[p].sum, - 100. * ABplaces[p].sum / static_cast(s), - "", - ABplaces[p].sumCum, - 100. * ABplaces[p].sumCum / static_cast(cs), - ABplaces[p].sumCumWeighted / static_cast(ABplaces[p].sumCum)); - } - } + ABstats::PrintStatsPosition(fp, p, name[p], ABplaces[p], ABsidesSum); } - fprintf(fp, "\n%5s %6s %6s %5s %5s %6s\n", - "Depth", - "Nodes", - "Cumul", - "Cum%", - "Cumc%", - "Branch"); - - fprintf(fp, "------------------------------------------\n"); + ABstats::PrintHeaderDepth(fp); int c = 0; - double np = 0., ncp = 0.; for (int d = DDS_MAXDEPTH - 1; d >= 0; d--) { if (nodesCum[d] == 0) continue; +if (nodesCum[d] != ABnodesCum.list[d]) + fprintf(fp, "Err %d %d\n", nodesCum[d], ABnodesCum.list[d]); + c += nodesCum[d]; - np += d * nodes[d]; - ncp += d * nodesCum[d]; fprintf(fp, "%5d %6d %6d %5.1f %5.1f", d, - nodes[d], + ABnodes.list[d], nodesCum[d], - 100. * nodesCum[d] / static_cast(allnodesCum), - 100. * c / static_cast(allnodesCum)); + 100. * nodesCum[d] / static_cast(ABnodesCum.sumCum), + 100. * c / static_cast(ABnodesCum.sumCum)); // "Branching factor" from end of one trick to end of // the previous trick. @@ -265,26 +293,15 @@ void ABstats::PrintStats() fprintf(fp, "\n"); } - fprintf(fp, "\n%-5s %6d %6d\n", - "Total", allnodes, allnodesCum); - - if (allnodes) - { - fprintf(fp, "%-5s %6.1f %6.1f\n", - "d_avg", - np / static_cast(allnodes), - ncp / static_cast(allnodesCum)); - } - else if (allnodesCum) - { - fprintf(fp, "\n%-5s %6s %6.1f\n", - "Avg", - "-", - ncp / static_cast(allnodesCum)); - } + ABstats::PrintAverageDepth(fp); + fprintf(fp, "\n"); - fprintf(fp, "%-5s %6d\n\n\n", "Diff", - allnodes - ABsides[1].sum - ABsides[0].sum); + fprintf(fp, "%5s%7d%7d\n", "Nodes", ABnodes.sum, ABnodesCum.sumCum); + fprintf(fp, "%5s%7d%7d\n", "Ends", ABsidesSum.sum, ABsidesSum.sumCum); + if (ABsidesSum.sum) + fprintf(fp, "%5s%6.0f%%%6.0f%%\n\n", "Ratio", + 100. * ABsidesSum.sum / static_cast(ABnodes.sum), + 100. * ABsidesSum.sumCum / static_cast(ABnodesCum.sumCum)); #ifdef DDS_AB_DETAILS fprintf(fp, "%2s %6s %6s", diff --git a/src/ABstats.h b/src/ABstats.h index b2db78ec..40cd7b8d 100644 --- a/src/ABstats.h +++ b/src/ABstats.h @@ -35,10 +35,11 @@ using namespace std; #define AB_TARGET_REACHED 0 #define AB_DEPTH_ZERO 1 #define AB_QUICKTRICKS 2 -#define AB_LATERTRICKS 3 -#define AB_MAIN_LOOKUP 4 -#define AB_SIDE_LOOKUP 5 -#define AB_MOVE_LOOP 6 +#define AB_QUICKTRICKS_2ND 3 +#define AB_LATERTRICKS 4 +#define AB_MAIN_LOOKUP 5 +#define AB_SIDE_LOOKUP 6 +#define AB_MOVE_LOOP 7 @@ -65,17 +66,25 @@ class ABstats bool fileSet; char name[DDS_AB_POS][40]; - int nodes[DDS_MAXDEPTH]; - int nodesCum[DDS_MAXDEPTH]; + + ABtracker ABnodes; + ABtracker ABnodesCum; ABtracker ABsides[2]; ABtracker ABplaces[DDS_AB_POS]; - int allnodes; - int allnodesCum; - int iniDepth; + void PrintHeaderPosition(FILE * fpl) const; + + void PrintStatsPosition( + FILE * fpl, + int no, + char * text, + const ABtracker& abt, + const ABtracker& divisor) const; + + void PrintHeaderDepth(FILE * fpl) const; - void PrintStatsPosition(FILE * fpl) const; + void PrintAverageDepth(FILE * fpl) const; public: ABstats(); diff --git a/src/Init.cpp b/src/Init.cpp index 84d8d71d..d80a5d55 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -367,11 +367,13 @@ void InitDebugFiles() thrp->ABStats.SetFile(DDS_AB_STATS_PREFIX + send); thrp->ABStats.SetName(AB_TARGET_REACHED, "Target decided"); thrp->ABStats.SetName(AB_DEPTH_ZERO , "depth == 0"); - thrp->ABStats.SetName(AB_QUICKTRICKS , "QuickTricks"); - thrp->ABStats.SetName(AB_LATERTRICKS , "LaterTricks"); - thrp->ABStats.SetName(AB_MAIN_LOOKUP , "Main lookup"); - thrp->ABStats.SetName(AB_SIDE_LOOKUP , "Other lookup"); - thrp->ABStats.SetName(AB_MOVE_LOOP , "Move trial"); + thrp->ABStats.SetName(AB_QUICKTRICKS, "QuickTricks"); + thrp->ABStats.SetName(AB_QUICKTRICKS_2ND, + "QuickTricks 2nd"); + thrp->ABStats.SetName(AB_LATERTRICKS, "LaterTricks"); + thrp->ABStats.SetName(AB_MAIN_LOOKUP, "Main lookup"); + thrp->ABStats.SetName(AB_SIDE_LOOKUP, "Other lookup"); + thrp->ABStats.SetName(AB_MOVE_LOOP, "Move trial"); #endif #ifdef DDS_AB_HITS From 5094d49e51325e27f3d1ff06c44053b1a58e9e4e Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Thu, 29 Mar 2018 16:35:57 +0200 Subject: [PATCH 082/132] Done with ABstats --- src/ABstats.cpp | 341 ++++++++++++++++++++++++++---------------------- src/ABstats.h | 58 +++++--- 2 files changed, 222 insertions(+), 177 deletions(-) diff --git a/src/ABstats.cpp b/src/ABstats.cpp index 95140ce9..854914ed 100644 --- a/src/ABstats.cpp +++ b/src/ABstats.cpp @@ -12,6 +12,8 @@ */ +#include + #include "dds.h" #include "ABstats.h" @@ -19,11 +21,9 @@ ABstats::ABstats() { fname = ""; - fileSet = false; - fp = stdout; for (int p = 0; p < DDS_AB_POS; p++) - sprintf(name[p], "Position %4d", p); + name[p] = "Position " + to_string(p); ABstats::Reset(); } @@ -31,9 +31,6 @@ ABstats::ABstats() ABstats::~ABstats() { - // Nothing to do - if (fp != stdout && fp != nullptr) - fclose(fp); } @@ -67,9 +64,6 @@ void ABstats::Reset() void ABstats::ResetCum() { - for (int depth = 0; depth < DDS_MAXDEPTH; depth++) - nodesCum[depth] = 0; - ABnodesCum.sumCum = 0; ABnodesCum.sumCumWeighted = 0; @@ -90,22 +84,25 @@ void ABstats::ResetCum() void ABstats::SetFile(const string& fnameIn) { fname = fnameIn; + remove(fname.c_str()); // May fail -- that's OK } -void ABstats::SetName(int no, char * ourName) +void ABstats::SetName( + const int no, + const string& nameIn) { if (no < 0 || no >= DDS_AB_POS) return; - sprintf(name[no], "%s", ourName); + name[no] = nameIn; } void ABstats::IncrPos( - int no, - bool side, - int depth) + const int no, + const bool side, + const int depth) { if (no < 0 || no >= DDS_AB_POS) return; @@ -127,10 +124,8 @@ void ABstats::IncrPos( } -void ABstats::IncrNode(int depth) +void ABstats::IncrNode(const int depth) { - nodesCum[depth]++; - ABnodes.list[depth]++; ABnodes.sum++; ABnodes.sumWeighted += depth; @@ -147,105 +142,177 @@ int ABstats::GetNodes() const } -void ABstats::PrintHeaderPosition(FILE * fpl) const +void ABstats::PrintHeaderPosition(ofstream& fout) const { - fprintf(fpl, "%2s %-20s %8s %5s %5s %8s %5s %5s\n", - "No", - "Return", - "Count", - "%", - "d_avg", - "Cumul", - "%", - "d_avg"); - - fprintf(fpl, "-----------------------------------"); - fprintf(fpl, "------------------------------\n"); + fout << "No " << + setw(20) << left << "Return" << + setw(9) << right << "Count" << + setw(6) << "%" << + setw(6) << "d_avg" << + setw(9) << "Cumul" << + setw(6) << "%" << + setw(6) << "d_avg" << "\n"; + + fout << string(65, '-') << "\n"; } + void ABstats::PrintStatsPosition( - FILE * fpl, - int no, - char * text, + ofstream& fout, + const int no, + const string& text, const ABtracker& abt, const ABtracker& divisor) const { + if (! abt.sumCum) + return; + + fout << setw(2) << (no == -1 ? "" : to_string(no)) << " " << + setw(20) << left << text << + setw(9) << right << abt.sum << + setw(6) << setprecision(1) << fixed << + 100. * abt.sum / static_cast(divisor.sum); + if (abt.sum) - { - fprintf(fpl, "%2s %-20s %8d %5.1f %5.1f %8d %5.1f %5.1f\n", - (no == -1 ? "" : to_string(no).c_str()), - text, - abt.sum, - 100. * abt.sum / static_cast(divisor.sum), - abt.sumWeighted / static_cast(abt.sum), - abt.sumCum, - 100. * abt.sumCum / static_cast(divisor.sumCum), - abt.sumCumWeighted / static_cast(abt.sumCum)); - } - else if (abt.sumCum) - { - fprintf(fp, "%2s %-20s %8d %5.1f %5s %8d %5.1f %5.1f\n", - (no == -1 ? "" : to_string(no).c_str()), - text, - abt.sum, - 100. * abt.sum / static_cast(divisor.sum), - "", - abt.sumCum, - 100. * abt.sumCum / static_cast(divisor.sumCum), - abt.sumCumWeighted / static_cast(abt.sumCum)); - } + fout << setw(6) << setprecision(1) << fixed << + abt.sumWeighted / static_cast(abt.sum); + else + fout << setw(6) << ""; + + fout << setw(9) << abt.sumCum << + setw(6) << setprecision(1) << fixed << + 100. * abt.sumCum / static_cast(divisor.sumCum) << + setw(6) << setprecision(1) << fixed << + abt.sumCumWeighted / static_cast(abt.sumCum) << "\n"; } -void ABstats::PrintHeaderDepth(FILE * fpl) const +void ABstats::PrintHeaderDepth(ofstream& fout) const { - fprintf(fpl, "\n%5s %6s %6s %5s %5s %6s\n", - "Depth", - "Nodes", - "Cumul", - "Cum%", - "Cumc%", - "Branch"); - - fprintf(fp, "------------------------------------------\n"); + fout << setw(5) << right << "Depth" << + setw(7) << "Nodes" << + setw(7) << "Cumul" << + setw(6) << "Cum%" << + setw(6) << "Cumc%" << + setw(7) << "Branch" << "\n"; + + fout << string(38, '-') << "\n"; } -void ABstats::PrintAverageDepth(FILE * fpl) const +void ABstats::PrintStatsDepth( + ofstream& fout, + const int depth, + const int cum) const { - fprintf(fpl, "\n%-5s %6d %6d\n", - "Total", ABnodes.sum, ABnodesCum.sumCum); + fout << setw(5) << depth << + setw(7) << ABnodes.list[depth] << + setw(7) << ABnodesCum.list[depth] << + setw(6) << setprecision(1) << fixed << + 100. * ABnodesCum.list[depth] / + static_cast(ABnodesCum.sumCum) << + setw(6) << setprecision(1) << fixed << + 100. * cum / static_cast(ABnodesCum.sumCum); + + // "Branching factor" from end of one trick to end of + // the previous trick. + if ((depth % 4 == 1) && + (depth < DDS_MAXDEPTH - 4) && + (ABnodesCum.list[depth + 4] > 0)) + fout << setw(6) << setprecision(2) << fixed << + ABnodesCum.list[depth] / + static_cast(ABnodesCum.list[depth + 4]); + fout << "\n"; +} + + +void ABstats::PrintAverageDepth( + ofstream& fout, + const ABtracker& ABsidesSum) const +{ + fout << "\nTotal" << + setw(7) << right << ABnodes.sum << + setw(7) << ABnodesCum.sumCum << "\n"; + + if (! ABnodesCum.sumCum) + return; + + fout << setw(5) << left << "Avg" << right; if (ABnodes.sum) - { - fprintf(fpl, "%-5s %6.1f %6.1f\n", - "d_avg", - ABnodes.sumWeighted / static_cast(ABnodes.sum), - ABnodesCum.sumCumWeighted / static_cast(ABnodesCum.sumCum)); - } - else if (ABnodes.sumCum) - { - fprintf(fpl, "\n%-5s %6s %6.1f\n", - "Avg", - "-", - ABnodes.sumCumWeighted / static_cast(ABnodesCum.sumCum)); - } + fout << setw(7) << setprecision(1) << fixed << + ABnodes.sumWeighted / static_cast(ABnodes.sum); + else + fout << setw(7) << ""; + + fout << setw(7) << setprecision(1) << fixed << + ABnodesCum.sumCumWeighted / static_cast(ABnodesCum.sumCum) << + "\n\n"; + + fout << setw(5) << left << "Nodes" << + setw(7) << right << ABnodes.sum << + setw(7) << ABnodesCum.sumCum << "\n"; + + fout << setw(5) << left << "Ends" << + setw(7) << right << ABsidesSum.sum << + setw(7) << ABsidesSum.sumCum << "\n"; + + if (ABsidesSum.sum) + fout << setw(5) << left << "Ratio" << + setw(6) << right << setprecision(0) << fixed << + 100. * ABsidesSum.sum / static_cast(ABnodes.sum) << "%" << + setw(6) << setprecision(0) << fixed << + 100. * ABsidesSum.sumCum / static_cast(ABnodesCum.sumCum) << + "%\n\n"; +} + + +void ABstats::PrintHeaderDetail(ofstream& fout) const +{ + fout << " d" << setw(7) << "Side1" << setw(7) << "Side0"; + + for (int p = 0; p < DDS_AB_POS; p++) + fout << setw(6) << p; + + fout << "\n" << string(65, '-') << "\n"; +} + + +void ABstats::PrintStatsDetail( + ofstream& fout, + const int depth) const +{ + if (ABsides[1].list[depth] == 0 && ABsides[0].list[depth] == 0) + return; + + fout << setw(2) << depth << + setw(7) << ABsides[1].list[depth] << + setw(7) << ABsides[0].list[depth]; + + for (int p = 0; p < DDS_AB_POS; p++) + fout << setw(6) << ABplaces[p].list[depth]; + fout << "\n"; +} + + +void ABstats::PrintSumDetail(ofstream& fout) const +{ + fout << string(65, '-') << "\n"; + + fout << setw(2) << "S" << + setw(7) << ABsides[1].sum << + setw(7) << ABsides[0].sum; + + for (int p = 0; p < DDS_AB_POS; p++) + fout << setw(6) << ABplaces[p].sum; + fout << "\n\n"; } -#include "../include/portab.h" void ABstats::PrintStats() { - if (! fileSet) - { - if (fname != "") - { - fp = fopen(fname.c_str(), "w"); - if (! fp) - fp = stdout; - } - fileSet = true; - } + ofstream fout; + fout.open(fname, ofstream::out | ofstream::app); ABtracker ABsidesSum; ABsidesSum.sum = ABsides[1].sum + ABsides[0].sum; @@ -253,90 +320,48 @@ void ABstats::PrintStats() if (ABsidesSum.sum) { - ABstats::PrintHeaderPosition(fp); + // First table: By side and position. - ABstats::PrintStatsPosition(fp, -1, "Side1", ABsides[1], ABsidesSum); - ABstats::PrintStatsPosition(fp, -1, "Side0", ABsides[0], ABsidesSum); - fprintf(fp, "\n"); + ABstats::PrintHeaderPosition(fout); + + ABstats::PrintStatsPosition(fout, -1, "Side1", ABsides[1], ABsidesSum); + ABstats::PrintStatsPosition(fout, -1, "Side0", ABsides[0], ABsidesSum); + fout << "\n"; for (int p = 0; p < DDS_AB_POS; p++) - ABstats::PrintStatsPosition(fp, p, name[p], ABplaces[p], ABsidesSum); + ABstats::PrintStatsPosition(fout, p, name[p], ABplaces[p], ABsidesSum); + fout << "\n"; } - ABstats::PrintHeaderDepth(fp); + ABstats::PrintHeaderDepth(fout); + + + // Second table: By depth. int c = 0; for (int d = DDS_MAXDEPTH - 1; d >= 0; d--) { - if (nodesCum[d] == 0) + if (ABnodesCum.list[d] == 0) continue; -if (nodesCum[d] != ABnodesCum.list[d]) - fprintf(fp, "Err %d %d\n", nodesCum[d], ABnodesCum.list[d]); - - c += nodesCum[d]; - - fprintf(fp, "%5d %6d %6d %5.1f %5.1f", - d, - ABnodes.list[d], - nodesCum[d], - 100. * nodesCum[d] / static_cast(ABnodesCum.sumCum), - 100. * c / static_cast(ABnodesCum.sumCum)); - - // "Branching factor" from end of one trick to end of - // the previous trick. - if ((d % 4 == 1) && - (d < DDS_MAXDEPTH - 4) && - (nodesCum[d + 4] > 0)) - fprintf(fp, " %5.2f", - nodesCum[d] / static_cast(nodesCum[d + 4])); - fprintf(fp, "\n"); + c += ABnodesCum.list[d]; + ABstats::PrintStatsDepth(fout, d, c); } - ABstats::PrintAverageDepth(fp); - fprintf(fp, "\n"); + ABstats::PrintAverageDepth(fout, ABsidesSum); - fprintf(fp, "%5s%7d%7d\n", "Nodes", ABnodes.sum, ABnodesCum.sumCum); - fprintf(fp, "%5s%7d%7d\n", "Ends", ABsidesSum.sum, ABsidesSum.sumCum); - if (ABsidesSum.sum) - fprintf(fp, "%5s%6.0f%%%6.0f%%\n\n", "Ratio", - 100. * ABsidesSum.sum / static_cast(ABnodes.sum), - 100. * ABsidesSum.sumCum / static_cast(ABnodesCum.sumCum)); #ifdef DDS_AB_DETAILS - fprintf(fp, "%2s %6s %6s", - "d", - "Side1", - "Side0"); - - for (int p = 0; p < DDS_AB_POS; p++) - fprintf(fp, " %5d", p); - fprintf(fp, "\n------------------------------"); - fprintf(fp, "-----------------------------\n"); + // Third table: All the detail. + ABstats::PrintHeaderDetail(fout); for (int d = DDS_MAXDEPTH - 1; d >= 0; d--) - { - if (ABsides[1].list[d] == 0 && ABsides[0].list[d] == 0) - continue; - - fprintf(fp, "%2d %6d %6d", - d, ABsides[1].list[d], ABsides[0].list[d]); + ABstats::PrintStatsDetail(fout, d); - for (int p = 0; p < DDS_AB_POS; p++) - fprintf(fp, " %5d", ABplaces[p].list[d]); - fprintf(fp, "\n"); - } - - fprintf(fp, "--------------------------------"); - fprintf(fp, "---------------------------\n"); - - fprintf(fp, "%2s %6d %6d", - "S", ABsides[1].sum, ABsides[0].sum); - - for (int p = 0; p < DDS_AB_POS; p++) - fprintf(fp, " %5d", ABplaces[p].sum); - fprintf(fp, "\n\n"); + ABstats::PrintSumDetail(fout); #endif - + + fout.close(); } + diff --git a/src/ABstats.h b/src/ABstats.h index 40cd7b8d..ef518032 100644 --- a/src/ABstats.h +++ b/src/ABstats.h @@ -10,9 +10,8 @@ #ifndef DDS_ABSTATS_H #define DDS_ABSTATS_H -#include -#include -#include +#include +#include #include #include "debug.h" @@ -41,11 +40,9 @@ using namespace std; #define AB_SIDE_LOOKUP 6 #define AB_MOVE_LOOP 7 - +#define DDS_AB_POS 8 #define DDS_MAXDEPTH 49 -#define DDS_LINE_LEN 20 -#define DDS_AB_POS 7 struct ABtracker @@ -61,33 +58,51 @@ struct ABtracker class ABstats { private: - FILE * fp; - string fname; - bool fileSet; - char name[DDS_AB_POS][40]; + string fname; + string name[DDS_AB_POS]; + // A node arises when a new move is generated. + // Not every move leads to an AB termination. ABtracker ABnodes; ABtracker ABnodesCum; + // AB terminations are tracked by side and position. ABtracker ABsides[2]; ABtracker ABplaces[DDS_AB_POS]; - void PrintHeaderPosition(FILE * fpl) const; + void PrintHeaderPosition(ofstream& fout) const; void PrintStatsPosition( - FILE * fpl, - int no, - char * text, + ofstream& fout, + const int no, + const string& text, const ABtracker& abt, const ABtracker& divisor) const; - void PrintHeaderDepth(FILE * fpl) const; + void PrintHeaderDepth(ofstream& fout) const; + + void PrintStatsDepth( + ofstream& fout, + const int depth, + const int cum) const; + + void PrintAverageDepth( + ofstream& fout, + const ABtracker& ABsidesSum) const; - void PrintAverageDepth(FILE * fpl) const; + void PrintHeaderDetail(ofstream& fout) const; + + void PrintStatsDetail( + ofstream& fout, + const int depth) const; + + void PrintSumDetail(ofstream& fout) const; public: + ABstats(); + ~ABstats(); void Reset(); @@ -96,11 +111,16 @@ class ABstats void SetFile(const string& fnameIn); - void SetName(int no, char * name); + void SetName( + const int no, + const string& nameIn); - void IncrPos(int no, bool side, int depth); + void IncrPos( + const int no, + const bool side, + const int depth); - void IncrNode(int depth); + void IncrNode(const int depth); int GetNodes() const; From 93aa60f38c67736af18119956d8f054f010d3972 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Thu, 29 Mar 2018 19:21:15 +0200 Subject: [PATCH 083/132] Moved code to new dump.cpp --- src/ABsearch.cpp | 409 +-------------------------- src/Makefiles/depends_obj.txt | 16 +- src/Makefiles/sources.txt | 1 + src/SolverIF.cpp | 94 +------ src/dump.cpp | 512 ++++++++++++++++++++++++++++++++++ src/dump.h | 39 +++ 6 files changed, 563 insertions(+), 508 deletions(-) create mode 100644 src/dump.cpp create mode 100644 src/dump.h diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index fb076628..4400cf7a 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -20,17 +20,9 @@ #include "ABsearch.h" #include "ABstats.h" #include "TimerList.h" -#include "Memory.h" +#include "dump.h" #include "debug.h" -#define DDS_POS_LINES 5 -#define DDS_HAND_LINES 12 -#define DDS_NODE_LINES 4 -#define DDS_FULL_LINE 80 -#define DDS_HAND_OFFSET 16 -#define DDS_HAND_OFFSET2 12 -#define DDS_DIAG_WIDTH 34 - void Make3Simple( pos * posPoint, @@ -65,44 +57,6 @@ void Undo3( int depth, moveType * mply); -void RankToDiagrams( - unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], - nodeCardsType * np, - char text[DDS_HAND_LINES][DDS_FULL_LINE]); - -void WinnersToText( - unsigned short int winRanks[DDS_SUITS], - char text[DDS_SUITS][DDS_FULL_LINE]); - -void NodeToText( - nodeCardsType * np, - char text[DDS_NODE_LINES][DDS_FULL_LINE]); - -void FullNodeToText( - nodeCardsType * np, - char text[DDS_NODE_LINES][DDS_FULL_LINE]); - -void PosToText( - pos * posPoint, - int target, - int depth, - char text[DDS_POS_LINES][DDS_FULL_LINE]); - -void DumpRetrieved( - FILE * fp, - pos * posPoint, - nodeCardsType * np, - int target, - int depth); - -void DumpStored( - FILE * fp, - pos * posPoint, - Moves * moves, - nodeCardsType * np, - int target, - int depth); - const int handDelta[DDS_SUITS] = { 256, 16, 1, 0 }; @@ -1109,364 +1063,3 @@ evalType Evaluate( return eval; } - -void RankToText( - unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], - char text[DDS_HAND_LINES][DDS_FULL_LINE]) -{ - int c, h, s, r; - - for (int l = 0; l < DDS_HAND_LINES; l++) - { - memset(text[l], ' ', DDS_FULL_LINE); - text[l][DDS_FULL_LINE - 1] = '\0'; - } - - for (h = 0; h < DDS_HANDS; h++) - { - int offset, line; - if (h == 0) - { - offset = DDS_HAND_OFFSET; - line = 0; - } - else if (h == 1) - { - offset = 2 * DDS_HAND_OFFSET; - line = 4; - } - else if (h == 2) - { - offset = DDS_HAND_OFFSET; - line = 8; - } - else - { - offset = 0; - line = 4; - } - - for (s = 0; s < DDS_SUITS; s++) - { - c = offset; - for (r = 14; r >= 2; r--) - { - if (rankInSuit[h][s] & bitMapRank[r]) - text[line + s][c++] = static_cast(cardRank[r]); - } - - if (c == offset) - text[line + s][c++] = '-'; - - if (h != 3) - text[line + s][c] = '\0'; - } - } -} - - -void RankToDiagrams( - unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], - nodeCardsType * np, - char text[DDS_HAND_LINES][DDS_FULL_LINE]) -{ - int c, h, s, r; - - for (int l = 0; l < DDS_HAND_LINES; l++) - { - memset(text[l], ' ', DDS_FULL_LINE); - text[l][DDS_FULL_LINE - 1] = '\0'; - text[l][DDS_DIAG_WIDTH ] = '|'; - } - - strncpy(text[0], "Sought", 6); - strncpy(&text[0][DDS_DIAG_WIDTH + 5], "Found", 5); - - for (h = 0; h < DDS_HANDS; h++) - { - int offset, line; - if (h == 0) - { - offset = DDS_HAND_OFFSET2; - line = 0; - } - else if (h == 1) - { - offset = 2 * DDS_HAND_OFFSET2; - line = 4; - } - else if (h == 2) - { - offset = DDS_HAND_OFFSET2; - line = 8; - } - else - { - offset = 0; - line = 4; - } - - for (s = 0; s < DDS_SUITS; s++) - { - c = offset; - for (r = 14; r >= 2; r--) - { - if (rankInSuit[h][s] & bitMapRank[r]) - { - text[line + s][c] = static_cast(cardRank[r]); - text[line + s][c + DDS_DIAG_WIDTH + 5] = - (r >= 15 - np->leastWin[s] ? - static_cast(cardRank[r]) : 'x'); - c++; - } - } - - if (c == offset) - { - text[line + s][c] = '-'; - text[line + s][c + DDS_DIAG_WIDTH + 5] = '-'; - c++; - } - - if (h != 3) - text[line + s][c + DDS_DIAG_WIDTH + 5] = '\0'; - } - } -} - - -void WinnersToText( - unsigned short int ourWinRanks[DDS_SUITS], - char text[DDS_SUITS][DDS_FULL_LINE]) -{ - int c, s, r; - - for (int l = 0; l < DDS_SUITS; l++) - memset(text[l], ' ', DDS_FULL_LINE); - - for (s = 0; s < DDS_SUITS; s++) - { - text[s][0] = static_cast(cardSuit[s]); - - c = 2; - for (r = 14; r >= 2; r--) - { - if (ourWinRanks[s] & bitMapRank[r]) - text[s][c++] = static_cast(cardRank[r]); - } - text[s][c] = '\0'; - } -} - - -void NodeToText( - nodeCardsType * np, - char text[DDS_NODE_LINES - 1][DDS_FULL_LINE]) - -{ - sprintf(text[0], "Address\t\t%p\n", static_cast(np)); - - sprintf(text[1], "Bounds\t\t%d to %d tricks\n", - static_cast(np->lbound), - static_cast(np->ubound)); - - sprintf(text[2], "Best move\t%c%c\n", - cardSuit[ static_cast(np->bestMoveSuit) ], - cardRank[ static_cast(np->bestMoveRank) ]); - -} - - -void FullNodeToText( - nodeCardsType * np, - char text[DDS_NODE_LINES][DDS_FULL_LINE]) - -{ - sprintf(text[0], "Address\t\t%p\n", static_cast(np)); - - sprintf(text[1], "Lowest used\t%c%c, %c%c, %c%c, %c%c\n", - cardSuit[0], cardRank[ 15 - static_cast(np->leastWin[0]) ], - cardSuit[1], cardRank[ 15 - static_cast(np->leastWin[1]) ], - cardSuit[2], cardRank[ 15 - static_cast(np->leastWin[2]) ], - cardSuit[3], cardRank[ 15 - static_cast(np->leastWin[3]) ]); - - sprintf(text[2], "Bounds\t\t%d to %d tricks\n", - static_cast(np->lbound), - static_cast(np->ubound)); - - sprintf(text[3], "Best move\t%c%c\n", - cardSuit[ static_cast(np->bestMoveSuit) ], - cardRank[ static_cast(np->bestMoveRank) ]); - -} - - -void PosToText( - pos * posPoint, - int target, - int depth, - char text[DDS_POS_LINES][DDS_FULL_LINE]) -{ - sprintf(text[0], "Target\t\t%d\n" , target); - sprintf(text[1], "Depth\t\t%d\n" , depth); - sprintf(text[2], "tricksMAX\t%d\n" , posPoint->tricksMAX); - sprintf(text[3], "First hand\t%c\n", - cardHand[ posPoint->first[depth] ]); - sprintf(text[4], "Next first\t%c\n", - cardHand[ posPoint->first[depth - 1] ]); -} - - -void DumpRetrieved( - FILE * fp, - pos * posPoint, - nodeCardsType * np, - int target, - int depth) -{ - // Big enough for all uses. - char text[DDS_HAND_LINES][DDS_FULL_LINE]; - - fprintf(fp, "Retrieved entry\n"); - fprintf(fp, "---------------\n"); - - PosToText(posPoint, target, depth, text); - for (int i = 0; i < DDS_POS_LINES; i++) - fprintf(fp, "%s", text[i]); - fprintf(fp, "\n"); - - FullNodeToText(np, text); - for (int i = 0; i < DDS_NODE_LINES; i++) - fprintf(fp, "%s", text[i]); - fprintf(fp, "\n"); - - RankToDiagrams(posPoint->rankInSuit, np, text); - for (int i = 0; i < DDS_HAND_LINES; i++) - fprintf(fp, "%s\n", text[i]); - fprintf(fp, "\n"); -} - - -void DumpStored( - FILE * fp, - pos * posPoint, - Moves * moves, - nodeCardsType * np, - int target, - int depth) -{ - // Big enough for all uses. - char text[DDS_HAND_LINES][DDS_FULL_LINE]; - - fprintf(fp, "Stored entry\n"); - fprintf(fp, "------------\n"); - - PosToText(posPoint, target, depth, text); - for (int i = 0; i < DDS_POS_LINES; i++) - fprintf(fp, "%s", text[i]); - fprintf(fp, "\n"); - - NodeToText(np, text); - for (int i = 0; i < DDS_NODE_LINES - 1; i++) - fprintf(fp, "%s", text[i]); - fprintf(fp, "\n"); - - moves->TrickToText((depth >> 2) + 1, text[0]); - fprintf(fp, "%s", text[0]); - fprintf(fp, "\n"); - - RankToText(posPoint->rankInSuit, text); - for (int i = 0; i < DDS_HAND_LINES; i++) - fprintf(fp, "%s\n", text[i]); - fprintf(fp, "\n"); -} - - -void DumpTopLevel( - ThreadData * thrp, - int tricks, - int lower, - int upper, - int printMode) -{ -#ifdef DDS_TOP_LEVEL - char text[DDS_HAND_LINES][DDS_FULL_LINE]; - pos * posPoint = &thrp->lookAheadPos; - FILE * fp = thrp->fpTopLevel; - - if (printMode == 0) - { - // Trying just one target. - sprintf(text[0], "Single target %d, %s\n", - tricks, - "achieved"); - } - else if (printMode == 1) - { - // Looking for best score. - if (thrp->val) - { - sprintf(text[0], - "Loop target %d, bounds %d .. %d, achieved with move %c%c\n", - tricks, - lower, - upper, - cardSuit[ thrp->bestMove[thrp->iniDepth].suit ], - cardRank[ thrp->bestMove[thrp->iniDepth].rank ]); - } - else - { - sprintf(text[0], - "Loop target %d, bounds %d .. %d, failed\n", - tricks, - lower, - upper); - } - } - else if (printMode == 2) - { - // Looking for other moves with best score. - if (thrp->val) - { - sprintf(text[0], - "Loop for cards with score %d, achieved with move %c%c\n", - tricks, - cardSuit[ thrp->bestMove[thrp->iniDepth].suit ], - cardRank[ thrp->bestMove[thrp->iniDepth].rank ]); - } - else - { - sprintf(text[0], - "Loop for cards with score %d, failed\n", - tricks); - } - } - - size_t l = strlen(text[0]) - 1; - - memset(text[1], '-', l); - text[1][l] = '\0'; - fprintf(fp, "%s%s\n\n", text[0], text[1]); - - RankToText(posPoint->rankInSuit, text); - for (int i = 0; i < DDS_HAND_LINES; i++) - fprintf(fp, "%s\n", text[i]); - fprintf(fp, "\n"); - - WinnersToText(posPoint->winRanks[ thrp->iniDepth ], text); - for (int i = 0; i < DDS_SUITS; i++) - fprintf(fp, "%s\n", text[i]); - fprintf(fp, "\n"); - - fprintf(fp, "%d AB nodes, %d trick nodes\n\n", - thrp->nodes, - thrp->trickNodes); -#else - UNUSED(thrp); - UNUSED(tricks); - UNUSED(lower); - UNUSED(upper); - UNUSED(printMode); -#endif -} - diff --git a/src/Makefiles/depends_obj.txt b/src/Makefiles/depends_obj.txt index d3c2a245..98185f41 100644 --- a/src/Makefiles/depends_obj.txt +++ b/src/Makefiles/depends_obj.txt @@ -1,12 +1,13 @@ dds.obj: ../include/dll.h Init.h dds.h ../include/portab.h Memory.h dds.obj: TransTable.h Moves.h debug.h +dump.obj: dds.h ../include/portab.h ../include/dll.h dump.h ABsearch.obj: dds.h ../include/portab.h ../include/dll.h TransTable.h Moves.h ABsearch.obj: QuickTricks.h Memory.h debug.h LaterTricks.h ABsearch.h -ABsearch.obj: ABstats.h TimerList.h TimerGroup.h Timer.h +ABsearch.obj: ABstats.h TimerList.h TimerGroup.h Timer.h dump.h ABstats.obj: dds.h ../include/portab.h ../include/dll.h ABstats.h debug.h CalcTables.obj: dds.h ../include/portab.h ../include/dll.h SolverIF.h -CalcTables.obj: Memory.h TransTable.h Moves.h debug.h System.h Scheduler.h -CalcTables.obj: TimeStatList.h TimeStat.h Timer.h PBN.h +CalcTables.obj: Memory.h TransTable.h Moves.h debug.h SolveBoard.h System.h +CalcTables.obj: Scheduler.h TimeStatList.h TimeStat.h Timer.h PBN.h DealerPar.obj: dds.h ../include/portab.h ../include/dll.h Init.obj: Init.h dds.h ../include/portab.h ../include/dll.h Memory.h Init.obj: TransTable.h Moves.h debug.h System.h Scheduler.h TimeStatList.h @@ -31,13 +32,14 @@ SolveBoard.obj: Scheduler.h TimeStatList.h TimeStat.h Timer.h PBN.h SolverIF.obj: dds.h ../include/portab.h ../include/dll.h Init.h Memory.h SolverIF.obj: TransTable.h Moves.h debug.h ABsearch.h SolverIF.h TimerList.h SolverIF.obj: TimerGroup.h Timer.h System.h Scheduler.h TimeStatList.h -SolverIF.obj: TimeStat.h +SolverIF.obj: TimeStat.h dump.h System.obj: SolveBoard.h dds.h ../include/portab.h ../include/dll.h -System.obj: CalcTables.h PlayAnalyser.h System.h +System.obj: CalcTables.h PlayAnalyser.h parallel.h System.h Scheduler.h +System.obj: TimeStatList.h TimeStat.h Timer.h Timer.obj: Timer.h TimerGroup.obj: TimerGroup.h Timer.h -TimerList.obj: TimerList.h TimerGroup.h Timer.h debug.h dds.h -TimerList.obj: ../include/portab.h ../include/dll.h +TimerList.obj: dds.h ../include/portab.h ../include/dll.h TimerList.h +TimerList.obj: TimerGroup.h Timer.h debug.h TimeStat.obj: TimeStat.h TimeStatList.obj: TimeStatList.h TimeStat.h TransTable.obj: dds.h ../include/portab.h ../include/dll.h TransTable.h diff --git a/src/Makefiles/sources.txt b/src/Makefiles/sources.txt index b24a6fb2..064d52f0 100644 --- a/src/Makefiles/sources.txt +++ b/src/Makefiles/sources.txt @@ -1,5 +1,6 @@ SOURCE_FILES = \ dds.cpp \ + dump.cpp \ ABsearch.cpp \ ABstats.cpp \ CalcTables.cpp \ diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 08bd081c..d7d3338a 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -18,6 +18,7 @@ #include "TimerList.h" #include "System.h" #include "Scheduler.h" +#include "dump.h" #include "debug.h" extern System sysdep; @@ -1177,96 +1178,3 @@ void LastTrickWinner( partner[handToPlay] == maxHand) ? 1 : 0); } - - -int DumpInput( - const int errCode, - const deal& dl, - const int target, - const int solutions, - const int mode) -{ - ofstream fout; - fout.open("dump.txt"); - - fout << "Error code=" << errCode << "\n\n"; - fout << "Deal data:\n"; - fout << "trump="; - - if (dl.trump == DDS_NOTRUMP) - fout << "N\n"; - else - fout << cardSuit[dl.trump] << "\n"; - fout << "first=" << cardHand[dl.first] << "\n"; - - unsigned short ranks[4][4]; - - for (int k = 0; k <= 2; k++) - if (dl.currentTrickRank[k] != 0) - { - fout << "index=" << k << - " currentTrickSuit=" << cardSuit[dl.currentTrickSuit[k]] << - " currentTrickRank= " << cardRank[dl.currentTrickRank[k]] << "\n"; - } - - for (int h = 0; h < DDS_HANDS; h++) - for (int s = 0; s < DDS_SUITS; s++) - { - fout << "index1=" << h << " index2=" << s << - " remainCards=" << dl.remainCards[h][s] << "\n"; - ranks[h][s] = static_cast - (dl.remainCards[h][s] >> 2); - } - - fout << "\ntarget=" << target << "\n"; - fout << "solutions=" << solutions << "\n"; - fout << "mode=" << mode << "\n\n\n"; - PrintDeal(fout, ranks); - fout.close(); - return 0; -} - - -string PrintSuit(const unsigned short suitCode) -{ - if (! suitCode) - return "--"; - - string st; - for (int r = 14; r >= 2; r--) - if ((suitCode & bitMapRank[r])) - st += cardRank[r]; - return st; -} - - -void PrintDeal( - ofstream& fout, - const unsigned short ranks[][DDS_SUITS]) -{ - for (int s = 0; s < DDS_SUITS; s++) - { - fout << setw(8) << "" << - cardSuit[s] << " " << - PrintSuit(ranks[0][s]) << "\n"; - } - - for (int s = 0; s < DDS_SUITS; s++) - { - fout << cardSuit[s] << " " << - setw(14) << left << PrintSuit(ranks[3][s]) << - cardSuit[s] << " " << - PrintSuit(ranks[1][s]) << "\n"; - } - - for (int s = 0; s < DDS_SUITS; s++) - { - fout << setw(8) << "" << - cardSuit[s] << " " << - PrintSuit(ranks[2][s]) << "\n"; - } - - fout << "\n"; - return; -} - diff --git a/src/dump.cpp b/src/dump.cpp new file mode 100644 index 00000000..2033751f --- /dev/null +++ b/src/dump.cpp @@ -0,0 +1,512 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#include +#include +#include +#include + +#include "dds.h" +#include "TransTable.h" +#include "Moves.h" +#include "Memory.h" +#include "dump.h" + + +#define DDS_POS_LINES 5 +#define DDS_HAND_LINES 12 +#define DDS_NODE_LINES 4 +#define DDS_FULL_LINE 80 +#define DDS_HAND_OFFSET 16 +#define DDS_HAND_OFFSET2 12 +#define DDS_DIAG_WIDTH 34 + + +string PrintSuit(const unsigned short suitCode); + +void PrintDeal( + ofstream& fout, + const unsigned short ranks[][DDS_SUITS]); + +void RankToDiagrams( + unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], + nodeCardsType * np, + char text[DDS_HAND_LINES][DDS_FULL_LINE]); + +void WinnersToText( + unsigned short int winRanks[DDS_SUITS], + char text[DDS_SUITS][DDS_FULL_LINE]); + +void NodeToText( + nodeCardsType * np, + char text[DDS_NODE_LINES][DDS_FULL_LINE]); + +void FullNodeToText( + nodeCardsType * np, + char text[DDS_NODE_LINES][DDS_FULL_LINE]); + +void PosToText( + pos * posPoint, + int target, + int depth, + char text[DDS_POS_LINES][DDS_FULL_LINE]); + + +string PrintSuit(const unsigned short suitCode) +{ + if (! suitCode) + return "--"; + + string st; + for (int r = 14; r >= 2; r--) + if ((suitCode & bitMapRank[r])) + st += cardRank[r]; + return st; +} + + +void PrintDeal( + ofstream& fout, + const unsigned short ranks[][DDS_SUITS]) +{ + for (int s = 0; s < DDS_SUITS; s++) + { + fout << setw(8) << "" << + cardSuit[s] << " " << + PrintSuit(ranks[0][s]) << "\n"; + } + + for (int s = 0; s < DDS_SUITS; s++) + { + fout << cardSuit[s] << " " << + setw(14) << left << PrintSuit(ranks[3][s]) << + cardSuit[s] << " " << + PrintSuit(ranks[1][s]) << "\n"; + } + + for (int s = 0; s < DDS_SUITS; s++) + { + fout << setw(8) << "" << + cardSuit[s] << " " << + PrintSuit(ranks[2][s]) << "\n"; + } + + fout << "\n"; + return; +} + + +void RankToText( + unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], + char text[DDS_HAND_LINES][DDS_FULL_LINE]) +{ + int c, h, s, r; + + for (int l = 0; l < DDS_HAND_LINES; l++) + { + memset(text[l], ' ', DDS_FULL_LINE); + text[l][DDS_FULL_LINE - 1] = '\0'; + } + + for (h = 0; h < DDS_HANDS; h++) + { + int offset, line; + if (h == 0) + { + offset = DDS_HAND_OFFSET; + line = 0; + } + else if (h == 1) + { + offset = 2 * DDS_HAND_OFFSET; + line = 4; + } + else if (h == 2) + { + offset = DDS_HAND_OFFSET; + line = 8; + } + else + { + offset = 0; + line = 4; + } + + for (s = 0; s < DDS_SUITS; s++) + { + c = offset; + for (r = 14; r >= 2; r--) + { + if (rankInSuit[h][s] & bitMapRank[r]) + text[line + s][c++] = static_cast(cardRank[r]); + } + + if (c == offset) + text[line + s][c++] = '-'; + + if (h != 3) + text[line + s][c] = '\0'; + } + } +} + + +void RankToDiagrams( + unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], + nodeCardsType * np, + char text[DDS_HAND_LINES][DDS_FULL_LINE]) +{ + int c, h, s, r; + + for (int l = 0; l < DDS_HAND_LINES; l++) + { + memset(text[l], ' ', DDS_FULL_LINE); + text[l][DDS_FULL_LINE - 1] = '\0'; + text[l][DDS_DIAG_WIDTH ] = '|'; + } + + strncpy(text[0], "Sought", 6); + strncpy(&text[0][DDS_DIAG_WIDTH + 5], "Found", 5); + + for (h = 0; h < DDS_HANDS; h++) + { + int offset, line; + if (h == 0) + { + offset = DDS_HAND_OFFSET2; + line = 0; + } + else if (h == 1) + { + offset = 2 * DDS_HAND_OFFSET2; + line = 4; + } + else if (h == 2) + { + offset = DDS_HAND_OFFSET2; + line = 8; + } + else + { + offset = 0; + line = 4; + } + + for (s = 0; s < DDS_SUITS; s++) + { + c = offset; + for (r = 14; r >= 2; r--) + { + if (rankInSuit[h][s] & bitMapRank[r]) + { + text[line + s][c] = static_cast(cardRank[r]); + text[line + s][c + DDS_DIAG_WIDTH + 5] = + (r >= 15 - np->leastWin[s] ? + static_cast(cardRank[r]) : 'x'); + c++; + } + } + + if (c == offset) + { + text[line + s][c] = '-'; + text[line + s][c + DDS_DIAG_WIDTH + 5] = '-'; + c++; + } + + if (h != 3) + text[line + s][c + DDS_DIAG_WIDTH + 5] = '\0'; + } + } +} + + +void WinnersToText( + unsigned short int ourWinRanks[DDS_SUITS], + char text[DDS_SUITS][DDS_FULL_LINE]) +{ + int c, s, r; + + for (int l = 0; l < DDS_SUITS; l++) + memset(text[l], ' ', DDS_FULL_LINE); + + for (s = 0; s < DDS_SUITS; s++) + { + text[s][0] = static_cast(cardSuit[s]); + + c = 2; + for (r = 14; r >= 2; r--) + { + if (ourWinRanks[s] & bitMapRank[r]) + text[s][c++] = static_cast(cardRank[r]); + } + text[s][c] = '\0'; + } +} + + +void NodeToText( + nodeCardsType * np, + char text[DDS_NODE_LINES - 1][DDS_FULL_LINE]) + +{ + sprintf(text[0], "Address\t\t%p\n", static_cast(np)); + + sprintf(text[1], "Bounds\t\t%d to %d tricks\n", + static_cast(np->lbound), + static_cast(np->ubound)); + + sprintf(text[2], "Best move\t%c%c\n", + cardSuit[ static_cast(np->bestMoveSuit) ], + cardRank[ static_cast(np->bestMoveRank) ]); + +} + + +void FullNodeToText( + nodeCardsType * np, + char text[DDS_NODE_LINES][DDS_FULL_LINE]) + +{ + sprintf(text[0], "Address\t\t%p\n", static_cast(np)); + + sprintf(text[1], "Lowest used\t%c%c, %c%c, %c%c, %c%c\n", + cardSuit[0], cardRank[ 15 - static_cast(np->leastWin[0]) ], + cardSuit[1], cardRank[ 15 - static_cast(np->leastWin[1]) ], + cardSuit[2], cardRank[ 15 - static_cast(np->leastWin[2]) ], + cardSuit[3], cardRank[ 15 - static_cast(np->leastWin[3]) ]); + + sprintf(text[2], "Bounds\t\t%d to %d tricks\n", + static_cast(np->lbound), + static_cast(np->ubound)); + + sprintf(text[3], "Best move\t%c%c\n", + cardSuit[ static_cast(np->bestMoveSuit) ], + cardRank[ static_cast(np->bestMoveRank) ]); + +} + + +void PosToText( + pos * posPoint, + int target, + int depth, + char text[DDS_POS_LINES][DDS_FULL_LINE]) +{ + sprintf(text[0], "Target\t\t%d\n" , target); + sprintf(text[1], "Depth\t\t%d\n" , depth); + sprintf(text[2], "tricksMAX\t%d\n" , posPoint->tricksMAX); + sprintf(text[3], "First hand\t%c\n", + cardHand[ posPoint->first[depth] ]); + sprintf(text[4], "Next first\t%c\n", + cardHand[ posPoint->first[depth - 1] ]); +} + + +int DumpInput( + const int errCode, + const deal& dl, + const int target, + const int solutions, + const int mode) +{ + ofstream fout; + fout.open("dump.txt"); + + fout << "Error code=" << errCode << "\n\n"; + fout << "Deal data:\n"; + fout << "trump="; + + if (dl.trump == DDS_NOTRUMP) + fout << "N\n"; + else + fout << cardSuit[dl.trump] << "\n"; + fout << "first=" << cardHand[dl.first] << "\n"; + + unsigned short ranks[4][4]; + + for (int k = 0; k <= 2; k++) + if (dl.currentTrickRank[k] != 0) + { + fout << "index=" << k << + " currentTrickSuit=" << cardSuit[dl.currentTrickSuit[k]] << + " currentTrickRank= " << cardRank[dl.currentTrickRank[k]] << "\n"; + } + + for (int h = 0; h < DDS_HANDS; h++) + for (int s = 0; s < DDS_SUITS; s++) + { + fout << "index1=" << h << " index2=" << s << + " remainCards=" << dl.remainCards[h][s] << "\n"; + ranks[h][s] = static_cast + (dl.remainCards[h][s] >> 2); + } + + fout << "\ntarget=" << target << "\n"; + fout << "solutions=" << solutions << "\n"; + fout << "mode=" << mode << "\n\n\n"; + PrintDeal(fout, ranks); + fout.close(); + return 0; +} + + +void DumpRetrieved( + FILE * fp, + pos * posPoint, + nodeCardsType * np, + int target, + int depth) +{ + // Big enough for all uses. + char text[DDS_HAND_LINES][DDS_FULL_LINE]; + + fprintf(fp, "Retrieved entry\n"); + fprintf(fp, "---------------\n"); + + PosToText(posPoint, target, depth, text); + for (int i = 0; i < DDS_POS_LINES; i++) + fprintf(fp, "%s", text[i]); + fprintf(fp, "\n"); + + FullNodeToText(np, text); + for (int i = 0; i < DDS_NODE_LINES; i++) + fprintf(fp, "%s", text[i]); + fprintf(fp, "\n"); + + RankToDiagrams(posPoint->rankInSuit, np, text); + for (int i = 0; i < DDS_HAND_LINES; i++) + fprintf(fp, "%s\n", text[i]); + fprintf(fp, "\n"); +} + + +void DumpStored( + FILE * fp, + pos * posPoint, + Moves * moves, + nodeCardsType * np, + int target, + int depth) +{ + // Big enough for all uses. + char text[DDS_HAND_LINES][DDS_FULL_LINE]; + + fprintf(fp, "Stored entry\n"); + fprintf(fp, "------------\n"); + + PosToText(posPoint, target, depth, text); + for (int i = 0; i < DDS_POS_LINES; i++) + fprintf(fp, "%s", text[i]); + fprintf(fp, "\n"); + + NodeToText(np, text); + for (int i = 0; i < DDS_NODE_LINES - 1; i++) + fprintf(fp, "%s", text[i]); + fprintf(fp, "\n"); + + moves->TrickToText((depth >> 2) + 1, text[0]); + fprintf(fp, "%s", text[0]); + fprintf(fp, "\n"); + + RankToText(posPoint->rankInSuit, text); + for (int i = 0; i < DDS_HAND_LINES; i++) + fprintf(fp, "%s\n", text[i]); + fprintf(fp, "\n"); +} + + +void DumpTopLevel( + ThreadData * thrp, + int tricks, + int lower, + int upper, + int printMode) +{ +#ifdef DDS_TOP_LEVEL + char text[DDS_HAND_LINES][DDS_FULL_LINE]; + pos * posPoint = &thrp->lookAheadPos; + FILE * fp = thrp->fpTopLevel; + + if (printMode == 0) + { + // Trying just one target. + sprintf(text[0], "Single target %d, %s\n", + tricks, + "achieved"); + } + else if (printMode == 1) + { + // Looking for best score. + if (thrp->val) + { + sprintf(text[0], + "Loop target %d, bounds %d .. %d, achieved with move %c%c\n", + tricks, + lower, + upper, + cardSuit[ thrp->bestMove[thrp->iniDepth].suit ], + cardRank[ thrp->bestMove[thrp->iniDepth].rank ]); + } + else + { + sprintf(text[0], + "Loop target %d, bounds %d .. %d, failed\n", + tricks, + lower, + upper); + } + } + else if (printMode == 2) + { + // Looking for other moves with best score. + if (thrp->val) + { + sprintf(text[0], + "Loop for cards with score %d, achieved with move %c%c\n", + tricks, + cardSuit[ thrp->bestMove[thrp->iniDepth].suit ], + cardRank[ thrp->bestMove[thrp->iniDepth].rank ]); + } + else + { + sprintf(text[0], + "Loop for cards with score %d, failed\n", + tricks); + } + } + + size_t l = strlen(text[0]) - 1; + + memset(text[1], '-', l); + text[1][l] = '\0'; + fprintf(fp, "%s%s\n\n", text[0], text[1]); + + RankToText(posPoint->rankInSuit, text); + for (int i = 0; i < DDS_HAND_LINES; i++) + fprintf(fp, "%s\n", text[i]); + fprintf(fp, "\n"); + + WinnersToText(posPoint->winRanks[ thrp->iniDepth ], text); + for (int i = 0; i < DDS_SUITS; i++) + fprintf(fp, "%s\n", text[i]); + fprintf(fp, "\n"); + + fprintf(fp, "%d AB nodes, %d trick nodes\n\n", + thrp->nodes, + thrp->trickNodes); +#else + UNUSED(thrp); + UNUSED(tricks); + UNUSED(lower); + UNUSED(upper); + UNUSED(printMode); +#endif +} + diff --git a/src/dump.h b/src/dump.h new file mode 100644 index 00000000..739cb529 --- /dev/null +++ b/src/dump.h @@ -0,0 +1,39 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_DUMP_H +#define DDS_DUMP_H + +#include "dds.h" + + +int DumpInput( + const int errCode, + const deal& dl, + const int target, + const int solutions, + const int mode); + +void DumpRetrieved( + FILE * fp, + pos * posPoint, + nodeCardsType * np, + int target, + int depth); + +void DumpStored( + FILE * fp, + pos * posPoint, + Moves * moves, + nodeCardsType * np, + int target, + int depth); + +#endif + From 46953b3c9f49ee3447bf9153f10306b7139d939c Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Thu, 29 Mar 2018 20:55:51 +0200 Subject: [PATCH 084/132] Starting on dump.cpp, now slow (too many open/close?) --- include/dll.h | 2 +- src/ABsearch.cpp | 6 +-- src/ABsearch.h | 21 +------- src/Init.cpp | 42 +++------------ src/Memory.h | 6 +-- src/dump.cpp | 136 ++++++++++++++++++++++++----------------------- src/dump.h | 35 ++++++++---- 7 files changed, 111 insertions(+), 137 deletions(-) diff --git a/include/dll.h b/include/dll.h index 25737040..11cd6360 100644 --- a/include/dll.h +++ b/include/dll.h @@ -372,7 +372,7 @@ struct DDSInfo // The actual number of threads configured int noOfThreads; - char systemString[512]; + char systemString[1024]; }; diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index 4400cf7a..e275e51d 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -197,7 +197,7 @@ bool ABsearch0( if (cardsP) { #ifdef DDS_AB_HITS - DumpRetrieved(thrp->fpRetrieved, posPoint, cardsP, target, depth); + DumpRetrieved(thrp->fnRetrieved, posPoint, cardsP, target, depth); #endif for (int ss = 0; ss < DDS_SUITS; ss++) @@ -324,7 +324,7 @@ bool ABsearch0( if (cardsP) { #ifdef DDS_AB_HITS - DumpRetrieved(thrp->fpRetrieved, posPoint, cardsP, target, depth); + DumpRetrieved(thrp->fnRetrieved, posPoint, cardsP, target, depth); #endif for (int ss = 0; ss < DDS_SUITS; ss++) @@ -460,7 +460,7 @@ bool ABsearch0( TIMER_END(TIMER_NO_BUILD, depth); #ifdef DDS_AB_HITS - DumpStored(thrp->fpStored, posPoint, &thrp->moves, + DumpStored(thrp->fnStored, posPoint, &thrp->moves, &first, target, depth); #endif diff --git a/src/ABsearch.h b/src/ABsearch.h index f3f66578..ae5fcf7b 100644 --- a/src/ABsearch.h +++ b/src/ABsearch.h @@ -10,14 +10,8 @@ #ifndef DDS_ABSEARCH_H #define DDS_ABSEARCH_H - -#define DDS_POS_LINES 5 -#define DDS_HAND_LINES 12 -#define DDS_NODE_LINES 4 -#define DDS_FULL_LINE 80 -#define DDS_HAND_OFFSET 16 -#define DDS_HAND_OFFSET2 12 -#define DDS_DIAG_WIDTH 34 +#include "dds.h" +#include "Memory.h" bool ABsearch( @@ -77,15 +71,4 @@ evalType Evaluate( int trump, ThreadData * thrp); -void DumpTopLevel( - struct ThreadData * thrp, - int tricks, - int lower, - int upper, - int printMode); - -void RankToText( - unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], - char text[DDS_HAND_LINES][DDS_FULL_LINE]); - #endif diff --git a/src/Init.cpp b/src/Init.cpp index d80a5d55..383e7662 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -357,10 +357,8 @@ void InitDebugFiles() const string send = to_string(thrId) + DDS_DEBUG_SUFFIX; #ifdef DDS_TOP_LEVEL - const string stop = DDS_TOP_LEVEL_PREFIX + send; - thrp->fpTopLevel = fopen(stop.c_str(), "w"); - if (! thrp->fpTopLevel) - thrp->fpTopLevel = stdout; + thrp->fnTopLevel = DDS_TOP_LEVEL_PREFIX + send; + remove(thrp->fnTopLevel.c_str()); // May fail -- that's OK #endif #ifdef DDS_AB_STATS @@ -377,24 +375,11 @@ void InitDebugFiles() #endif #ifdef DDS_AB_HITS - char fname[DDS_FNAME_LEN]; - sprintf(fname, "%s%d%s", - DDS_AB_HITS_RETRIEVED_PREFIX, - thrId, - DDS_DEBUG_SUFFIX); - - thrp->fpRetrieved = fopen(fname, "w"); - if (! thrp->fpRetrieved) - thrp->fpRetrieved = stdout; - - sprintf(fname, "%s%d%s", - DDS_AB_HITS_STORED_PREFIX, - thrId, - DDS_DEBUG_SUFFIX); - - thrp->fpStored = fopen(fname, "w"); - if (! thrp->fpStored) - thrp->fpStored = stdout; + thrp->fnRetrieved = DDS_AB_HITS_RETRIEVED_PREFIX + send; + remove(thrp->fnRetrieved.c_str()); + + thrp->fnStored = DDS_AB_HITS_STORED_PREFIX + send; + remove(thrp->fnStored.c_str()); #endif #ifdef DDS_TIMING @@ -422,18 +407,7 @@ void CloseDebugFiles() { ThreadData * thrp = memory.GetPtr(static_cast(thrId)); UNUSED(thrp); // To avoid compile errors -#ifdef DDS_TOP_LEVEL - if (thrp->fpTopLevel != stdout && thrp->fpTopLevel != nullptr) - fclose(thrp->fpTopLevel); -#endif - -#ifdef DDS_AB_HITS - if (thrp->fpRetrieved != stdout && thrp->fpRetrieved != nullptr) - fclose(thrp->fpRetrieved); - - if (thrp->fpStored != stdout && thrp->fpStored != nullptr) - fclose(thrp->fpStored); -#endif + // TODO Delete function } } diff --git a/src/Memory.h b/src/Memory.h index 10e7d90f..d0b2e9fb 100644 --- a/src/Memory.h +++ b/src/Memory.h @@ -81,12 +81,12 @@ struct ThreadData #endif #ifdef DDS_TOP_LEVEL - FILE * fpTopLevel; + string fnTopLevel; #endif #ifdef DDS_AB_HITS - FILE * fpRetrieved; - FILE * fpStored; + string fnRetrieved; + string fnStored; #endif }; diff --git a/src/dump.cpp b/src/dump.cpp index 2033751f..2c449724 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -20,9 +20,9 @@ #define DDS_POS_LINES 5 -#define DDS_HAND_LINES 12 +// #define DDS_HAND_LINES 12 #define DDS_NODE_LINES 4 -#define DDS_FULL_LINE 80 +// #define DDS_FULL_LINE 80 #define DDS_HAND_OFFSET 16 #define DDS_HAND_OFFSET2 12 #define DDS_DIAG_WIDTH 34 @@ -103,7 +103,7 @@ void PrintDeal( void RankToText( - unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], + const unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], char text[DDS_HAND_LINES][DDS_FULL_LINE]) { int c, h, s, r; @@ -158,8 +158,8 @@ void RankToText( void RankToDiagrams( - unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], - nodeCardsType * np, + const unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], + nodeCardsType const * np, char text[DDS_HAND_LINES][DDS_FULL_LINE]) { int c, h, s, r; @@ -228,7 +228,7 @@ void RankToDiagrams( void WinnersToText( - unsigned short int ourWinRanks[DDS_SUITS], + const unsigned short int ourWinRanks[DDS_SUITS], char text[DDS_SUITS][DDS_FULL_LINE]) { int c, s, r; @@ -252,11 +252,11 @@ void WinnersToText( void NodeToText( - nodeCardsType * np, + nodeCardsType const * np, char text[DDS_NODE_LINES - 1][DDS_FULL_LINE]) { - sprintf(text[0], "Address\t\t%p\n", static_cast(np)); + sprintf(text[0], "Address\t\t%p\n", static_cast(np)); sprintf(text[1], "Bounds\t\t%d to %d tricks\n", static_cast(np->lbound), @@ -270,11 +270,11 @@ void NodeToText( void FullNodeToText( - nodeCardsType * np, + nodeCardsType const * np, char text[DDS_NODE_LINES][DDS_FULL_LINE]) { - sprintf(text[0], "Address\t\t%p\n", static_cast(np)); + sprintf(text[0], "Address\t\t%p\n", static_cast(np)); sprintf(text[1], "Lowest used\t%c%c, %c%c, %c%c, %c%c\n", cardSuit[0], cardRank[ 15 - static_cast(np->leastWin[0]) ], @@ -294,9 +294,9 @@ void FullNodeToText( void PosToText( - pos * posPoint, - int target, - int depth, + pos const * posPoint, + const int target, + const int depth, char text[DDS_POS_LINES][DDS_FULL_LINE]) { sprintf(text[0], "Target\t\t%d\n" , target); @@ -358,81 +358,91 @@ int DumpInput( void DumpRetrieved( - FILE * fp, - pos * posPoint, - nodeCardsType * np, - int target, - int depth) + const string& fname, + pos const * posPoint, + nodeCardsType const * np, + const int target, + const int depth) { + ofstream fout; + fout.open(fname, ofstream::out | ofstream::app); + // Big enough for all uses. char text[DDS_HAND_LINES][DDS_FULL_LINE]; - fprintf(fp, "Retrieved entry\n"); - fprintf(fp, "---------------\n"); + fout << "Retrieved entry\n"; + fout << string(15, '-') << "\n"; PosToText(posPoint, target, depth, text); for (int i = 0; i < DDS_POS_LINES; i++) - fprintf(fp, "%s", text[i]); - fprintf(fp, "\n"); + fout << string(text[i]); + fout << "\n"; FullNodeToText(np, text); for (int i = 0; i < DDS_NODE_LINES; i++) - fprintf(fp, "%s", text[i]); - fprintf(fp, "\n"); + fout << string(text[i]); + fout << "\n"; RankToDiagrams(posPoint->rankInSuit, np, text); for (int i = 0; i < DDS_HAND_LINES; i++) - fprintf(fp, "%s\n", text[i]); - fprintf(fp, "\n"); + fout << string(text[i]) << "\n"; + fout << "\n"; + + fout.close(); } void DumpStored( - FILE * fp, - pos * posPoint, - Moves * moves, - nodeCardsType * np, - int target, - int depth) + const string& fname, + pos const * posPoint, + Moves const * moves, + nodeCardsType const * np, + const int target, + const int depth) { + ofstream fout; + fout.open(fname, ofstream::out | ofstream::app); + // Big enough for all uses. char text[DDS_HAND_LINES][DDS_FULL_LINE]; - fprintf(fp, "Stored entry\n"); - fprintf(fp, "------------\n"); + fout << "Stored entry\n"; + fout << string(12, '-') << "\n"; PosToText(posPoint, target, depth, text); for (int i = 0; i < DDS_POS_LINES; i++) - fprintf(fp, "%s", text[i]); - fprintf(fp, "\n"); + fout << string(text[i]); + fout << "\n"; NodeToText(np, text); for (int i = 0; i < DDS_NODE_LINES - 1; i++) - fprintf(fp, "%s", text[i]); - fprintf(fp, "\n"); + fout << string(text[i]); + fout << "\n"; moves->TrickToText((depth >> 2) + 1, text[0]); - fprintf(fp, "%s", text[0]); - fprintf(fp, "\n"); + fout << string(text[0]) << "\n"; RankToText(posPoint->rankInSuit, text); for (int i = 0; i < DDS_HAND_LINES; i++) - fprintf(fp, "%s\n", text[i]); - fprintf(fp, "\n"); + fout << string(text[i]) << "\n"; + fout << "\n"; + + fout.close(); } void DumpTopLevel( - ThreadData * thrp, - int tricks, - int lower, - int upper, - int printMode) + ThreadData const * thrp, + const int tricks, + const int lower, + const int upper, + const int printMode) { -#ifdef DDS_TOP_LEVEL + ofstream fout; + fout.open(thrp->fnTopLevel, ofstream::out | ofstream::app); + char text[DDS_HAND_LINES][DDS_FULL_LINE]; - pos * posPoint = &thrp->lookAheadPos; - FILE * fp = thrp->fpTopLevel; + pos const * posPoint = &thrp->lookAheadPos; if (printMode == 0) { @@ -486,27 +496,21 @@ void DumpTopLevel( memset(text[1], '-', l); text[1][l] = '\0'; - fprintf(fp, "%s%s\n\n", text[0], text[1]); + fout << string(text[0]) << string(text[1]) << "\n\n"; RankToText(posPoint->rankInSuit, text); for (int i = 0; i < DDS_HAND_LINES; i++) - fprintf(fp, "%s\n", text[i]); - fprintf(fp, "\n"); + fout << string(text[i]) << "\n"; + fout << "\n"; WinnersToText(posPoint->winRanks[ thrp->iniDepth ], text); for (int i = 0; i < DDS_SUITS; i++) - fprintf(fp, "%s\n", text[i]); - fprintf(fp, "\n"); - - fprintf(fp, "%d AB nodes, %d trick nodes\n\n", - thrp->nodes, - thrp->trickNodes); -#else - UNUSED(thrp); - UNUSED(tricks); - UNUSED(lower); - UNUSED(upper); - UNUSED(printMode); -#endif + fout << string(text[i]) << "\n"; + fout << "\n"; + + fout << thrp->nodes << " AB nodes, " << + thrp->trickNodes << " trick nodes\n\n"; + + fout.close(); } diff --git a/src/dump.h b/src/dump.h index 739cb529..1722bce2 100644 --- a/src/dump.h +++ b/src/dump.h @@ -12,6 +12,12 @@ #include "dds.h" +#define DDS_HAND_LINES 12 +#define DDS_FULL_LINE 80 + +void RankToText( + const unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], + const char text[DDS_HAND_LINES][DDS_FULL_LINE]); int DumpInput( const int errCode, @@ -20,20 +26,27 @@ int DumpInput( const int solutions, const int mode); +void DumpTopLevel( + ThreadData const * thrp, + const int tricks, + const int lower, + const int upper, + const int printMode); + void DumpRetrieved( - FILE * fp, - pos * posPoint, - nodeCardsType * np, - int target, - int depth); + const string& fname, + pos const * posPoint, + nodeCardsType const * np, + const int target, + const int depth); void DumpStored( - FILE * fp, - pos * posPoint, - Moves * moves, - nodeCardsType * np, - int target, - int depth); + const string& fname, + pos const * posPoint, + Moves const * moves, + nodeCardsType const * np, + const int target, + const int depth); #endif From aee865e9151fb5aca0fb6e2d9c3f9010a7a32f48 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Thu, 29 Mar 2018 21:07:29 +0200 Subject: [PATCH 085/132] Got rid of RankToText (used PrintDeal) --- src/Moves.cpp | 5 ++- src/SolverIF.cpp | 6 ---- src/dump.cpp | 79 ++++++------------------------------------------ src/dump.h | 4 --- 4 files changed, 12 insertions(+), 82 deletions(-) diff --git a/src/Moves.cpp b/src/Moves.cpp index c2cff6a7..e78e2206 100644 --- a/src/Moves.cpp +++ b/src/Moves.cpp @@ -2397,6 +2397,7 @@ void Moves::RegisterHit( } // Used for development +// PrintDeal below untested in this context. #if 0 if (findex == MG_COMB_NOTVOID3 && numSeen > 1 && trick >= 10) // if (0 && findex == MG_TRUMP_VOID3 && numSeen == 1 && curr > 1) @@ -2404,9 +2405,7 @@ void Moves::RegisterHit( char text[12][80]; RankToText(posPoint->rankInSuit, text); - for (int i = 0; i < 12; i++) - printf("%s\n", text[i]); - printf("\n", text); + PrintDeal(cout, posPoint->RankInsuit, 16); trackp = &track[trick]; diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index d7d3338a..8a7f15fa 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -55,12 +55,6 @@ int DumpInput( const int solutions, const int mode); -string PrintSuit(const unsigned short suitCode); - -void PrintDeal( - ofstream& fout, - const unsigned short ranks[][DDS_SUITS]); - bool (* AB_ptr_list[DDS_HANDS])( pos * posPoint, const int target, diff --git a/src/dump.cpp b/src/dump.cpp index 2c449724..1db9bd21 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -32,7 +32,8 @@ string PrintSuit(const unsigned short suitCode); void PrintDeal( ofstream& fout, - const unsigned short ranks[][DDS_SUITS]); + const unsigned short ranks[][DDS_SUITS], + const unsigned spacing); void RankToDiagrams( unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], @@ -73,11 +74,12 @@ string PrintSuit(const unsigned short suitCode) void PrintDeal( ofstream& fout, - const unsigned short ranks[][DDS_SUITS]) + const unsigned short ranks[][DDS_SUITS], + const unsigned spacing) { for (int s = 0; s < DDS_SUITS; s++) { - fout << setw(8) << "" << + fout << setw(spacing) << "" << cardSuit[s] << " " << PrintSuit(ranks[0][s]) << "\n"; } @@ -85,14 +87,14 @@ void PrintDeal( for (int s = 0; s < DDS_SUITS; s++) { fout << cardSuit[s] << " " << - setw(14) << left << PrintSuit(ranks[3][s]) << + setw(2*spacing - 2) << left << PrintSuit(ranks[3][s]) << cardSuit[s] << " " << PrintSuit(ranks[1][s]) << "\n"; } for (int s = 0; s < DDS_SUITS; s++) { - fout << setw(8) << "" << + fout << setw(spacing) << "" << cardSuit[s] << " " << PrintSuit(ranks[2][s]) << "\n"; } @@ -102,61 +104,6 @@ void PrintDeal( } -void RankToText( - const unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], - char text[DDS_HAND_LINES][DDS_FULL_LINE]) -{ - int c, h, s, r; - - for (int l = 0; l < DDS_HAND_LINES; l++) - { - memset(text[l], ' ', DDS_FULL_LINE); - text[l][DDS_FULL_LINE - 1] = '\0'; - } - - for (h = 0; h < DDS_HANDS; h++) - { - int offset, line; - if (h == 0) - { - offset = DDS_HAND_OFFSET; - line = 0; - } - else if (h == 1) - { - offset = 2 * DDS_HAND_OFFSET; - line = 4; - } - else if (h == 2) - { - offset = DDS_HAND_OFFSET; - line = 8; - } - else - { - offset = 0; - line = 4; - } - - for (s = 0; s < DDS_SUITS; s++) - { - c = offset; - for (r = 14; r >= 2; r--) - { - if (rankInSuit[h][s] & bitMapRank[r]) - text[line + s][c++] = static_cast(cardRank[r]); - } - - if (c == offset) - text[line + s][c++] = '-'; - - if (h != 3) - text[line + s][c] = '\0'; - } - } -} - - void RankToDiagrams( const unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], nodeCardsType const * np, @@ -351,7 +298,7 @@ int DumpInput( fout << "\ntarget=" << target << "\n"; fout << "solutions=" << solutions << "\n"; fout << "mode=" << mode << "\n\n\n"; - PrintDeal(fout, ranks); + PrintDeal(fout, ranks, 8); fout.close(); return 0; } @@ -422,10 +369,7 @@ void DumpStored( moves->TrickToText((depth >> 2) + 1, text[0]); fout << string(text[0]) << "\n"; - RankToText(posPoint->rankInSuit, text); - for (int i = 0; i < DDS_HAND_LINES; i++) - fout << string(text[i]) << "\n"; - fout << "\n"; + PrintDeal(fout, posPoint->rankInSuit, 16); fout.close(); } @@ -498,10 +442,7 @@ void DumpTopLevel( text[1][l] = '\0'; fout << string(text[0]) << string(text[1]) << "\n\n"; - RankToText(posPoint->rankInSuit, text); - for (int i = 0; i < DDS_HAND_LINES; i++) - fout << string(text[i]) << "\n"; - fout << "\n"; + PrintDeal(fout, posPoint->rankInSuit, 16); WinnersToText(posPoint->winRanks[ thrp->iniDepth ], text); for (int i = 0; i < DDS_SUITS; i++) diff --git a/src/dump.h b/src/dump.h index 1722bce2..bb60f67e 100644 --- a/src/dump.h +++ b/src/dump.h @@ -15,10 +15,6 @@ #define DDS_HAND_LINES 12 #define DDS_FULL_LINE 80 -void RankToText( - const unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], - const char text[DDS_HAND_LINES][DDS_FULL_LINE]); - int DumpInput( const int errCode, const deal& dl, From 8f3b00011d406345eb29bd4b56e004c9a28706f8 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Thu, 29 Mar 2018 21:51:30 +0200 Subject: [PATCH 086/132] Refactoring dump.cpp --- src/dump.cpp | 149 ++++++++++++++++++++------------------------------- 1 file changed, 57 insertions(+), 92 deletions(-) diff --git a/src/dump.cpp b/src/dump.cpp index 1db9bd21..2901c845 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -36,27 +36,21 @@ void PrintDeal( const unsigned spacing); void RankToDiagrams( - unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], + unsigned short rankInSuit[DDS_HANDS][DDS_SUITS], nodeCardsType * np, char text[DDS_HAND_LINES][DDS_FULL_LINE]); -void WinnersToText( - unsigned short int winRanks[DDS_SUITS], - char text[DDS_SUITS][DDS_FULL_LINE]); +string WinnersToText(const unsigned short winRanks[]); -void NodeToText( - nodeCardsType * np, - char text[DDS_NODE_LINES][DDS_FULL_LINE]); +string NodeToText(nodeCardsType const * np); -void FullNodeToText( - nodeCardsType * np, - char text[DDS_NODE_LINES][DDS_FULL_LINE]); +string FullNodeToText(nodeCardsType const * np); void PosToText( - pos * posPoint, - int target, - int depth, - char text[DDS_POS_LINES][DDS_FULL_LINE]); + pos const * posPoint, + const int target, + const int depth, + string& text); string PrintSuit(const unsigned short suitCode) @@ -105,7 +99,7 @@ void PrintDeal( void RankToDiagrams( - const unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], + const unsigned short rankInSuit[DDS_HANDS][DDS_SUITS], nodeCardsType const * np, char text[DDS_HAND_LINES][DDS_FULL_LINE]) { @@ -174,69 +168,49 @@ void RankToDiagrams( } -void WinnersToText( - const unsigned short int ourWinRanks[DDS_SUITS], - char text[DDS_SUITS][DDS_FULL_LINE]) +string WinnersToText(const unsigned short ourWinRanks[]) { - int c, s, r; - - for (int l = 0; l < DDS_SUITS; l++) - memset(text[l], ' ', DDS_FULL_LINE); - - for (s = 0; s < DDS_SUITS; s++) - { - text[s][0] = static_cast(cardSuit[s]); + stringstream ss; + for (int s = 0; s < DDS_SUITS; s++) + ss << cardSuit[s] << " " << PrintSuit(ourWinRanks[s]) << "\n"; - c = 2; - for (r = 14; r >= 2; r--) - { - if (ourWinRanks[s] & bitMapRank[r]) - text[s][c++] = static_cast(cardRank[r]); - } - text[s][c] = '\0'; - } + return ss.str(); } -void NodeToText( - nodeCardsType const * np, - char text[DDS_NODE_LINES - 1][DDS_FULL_LINE]) - +string NodeToText(nodeCardsType const * np) { - sprintf(text[0], "Address\t\t%p\n", static_cast(np)); + stringstream ss; + ss << setw(16) << left << "Address" << + static_cast(np) << "\n"; - sprintf(text[1], "Bounds\t\t%d to %d tricks\n", - static_cast(np->lbound), - static_cast(np->ubound)); + ss << setw(16) << left << "Bounds" << + static_cast(np->lbound) << " to " << + static_cast(np->ubound) << " tricks\n"; - sprintf(text[2], "Best move\t%c%c\n", - cardSuit[ static_cast(np->bestMoveSuit) ], - cardRank[ static_cast(np->bestMoveRank) ]); + ss << setw(16) << left << "Best move" << + cardSuit[ static_cast(np->bestMoveSuit) ] << + cardRank[ static_cast(np->bestMoveRank) ] << "\n"; + return ss.str(); } -void FullNodeToText( - nodeCardsType const * np, - char text[DDS_NODE_LINES][DDS_FULL_LINE]) +string FullNodeToText(nodeCardsType const * np) { - sprintf(text[0], "Address\t\t%p\n", static_cast(np)); - - sprintf(text[1], "Lowest used\t%c%c, %c%c, %c%c, %c%c\n", - cardSuit[0], cardRank[ 15 - static_cast(np->leastWin[0]) ], - cardSuit[1], cardRank[ 15 - static_cast(np->leastWin[1]) ], - cardSuit[2], cardRank[ 15 - static_cast(np->leastWin[2]) ], - cardSuit[3], cardRank[ 15 - static_cast(np->leastWin[3]) ]); - - sprintf(text[2], "Bounds\t\t%d to %d tricks\n", - static_cast(np->lbound), - static_cast(np->ubound)); - - sprintf(text[3], "Best move\t%c%c\n", - cardSuit[ static_cast(np->bestMoveSuit) ], - cardRank[ static_cast(np->bestMoveRank) ]); - + stringstream ss; + vector v(DDS_SUITS); + for (unsigned i = 0; i < DDS_SUITS; i++) + v[i] = 15 - static_cast(np->leastWin[i]); + + ss << setw(16) << left << "Lowest used" << + cardSuit[0] << cardRank[v[0]] << ", " << + cardSuit[1] << cardRank[v[1]] << ", " << + cardSuit[2] << cardRank[v[2]] << ", " << + cardSuit[3] << cardRank[v[3]] << "\n"; + + return NodeToText(np) + ss.str(); } @@ -244,15 +218,17 @@ void PosToText( pos const * posPoint, const int target, const int depth, - char text[DDS_POS_LINES][DDS_FULL_LINE]) + string& text) { - sprintf(text[0], "Target\t\t%d\n" , target); - sprintf(text[1], "Depth\t\t%d\n" , depth); - sprintf(text[2], "tricksMAX\t%d\n" , posPoint->tricksMAX); - sprintf(text[3], "First hand\t%c\n", - cardHand[ posPoint->first[depth] ]); - sprintf(text[4], "Next first\t%c\n", - cardHand[ posPoint->first[depth - 1] ]); + stringstream ss; + ss << setw(16) << left << "Target" << target << "\n"; + ss << setw(16) << "Depth" << depth << "\n"; + ss << setw(16) << "tricksMAX" << posPoint->tricksMAX << "\n"; + ss << setw(16) << "First hand" << + cardHand[ posPoint->first[depth] ] << "\n"; + ss << setw(16) << "Next first" << + cardHand[ posPoint->first[depth - 1] ] << "\n"; + text = ss.str(); } @@ -320,15 +296,11 @@ void DumpRetrieved( fout << "Retrieved entry\n"; fout << string(15, '-') << "\n"; - PosToText(posPoint, target, depth, text); - for (int i = 0; i < DDS_POS_LINES; i++) - fout << string(text[i]); - fout << "\n"; + string stext; + PosToText(posPoint, target, depth, stext); + fout << stext << "\n"; - FullNodeToText(np, text); - for (int i = 0; i < DDS_NODE_LINES; i++) - fout << string(text[i]); - fout << "\n"; + fout << FullNodeToText(np) << "\n"; RankToDiagrams(posPoint->rankInSuit, np, text); for (int i = 0; i < DDS_HAND_LINES; i++) @@ -356,15 +328,11 @@ void DumpStored( fout << "Stored entry\n"; fout << string(12, '-') << "\n"; - PosToText(posPoint, target, depth, text); - for (int i = 0; i < DDS_POS_LINES; i++) - fout << string(text[i]); - fout << "\n"; + string stext; + PosToText(posPoint, target, depth, stext); + fout << stext << "\n"; - NodeToText(np, text); - for (int i = 0; i < DDS_NODE_LINES - 1; i++) - fout << string(text[i]); - fout << "\n"; + fout << NodeToText(np); moves->TrickToText((depth >> 2) + 1, text[0]); fout << string(text[0]) << "\n"; @@ -444,10 +412,7 @@ void DumpTopLevel( PrintDeal(fout, posPoint->rankInSuit, 16); - WinnersToText(posPoint->winRanks[ thrp->iniDepth ], text); - for (int i = 0; i < DDS_SUITS; i++) - fout << string(text[i]) << "\n"; - fout << "\n"; + fout << WinnersToText(posPoint->winRanks[ thrp->iniDepth ]) << "\n"; fout << thrp->nodes << " AB nodes, " << thrp->trickNodes << " trick nodes\n\n"; From 7ce299c3fa389d1eeadf4bf45e85138c1e1569d1 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Thu, 29 Mar 2018 22:15:34 +0200 Subject: [PATCH 087/132] More refactoring --- src/dump.cpp | 94 ++++++++++++++++++++-------------------------------- 1 file changed, 36 insertions(+), 58 deletions(-) diff --git a/src/dump.cpp b/src/dump.cpp index 2901c845..0c35d945 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -46,11 +46,14 @@ string NodeToText(nodeCardsType const * np); string FullNodeToText(nodeCardsType const * np); -void PosToText( +string PosToText( pos const * posPoint, const int target, - const int depth, - string& text); + const int depth); + +string TopMove( + const bool val, + const moveType& bestMove); string PrintSuit(const unsigned short suitCode) @@ -214,11 +217,10 @@ string FullNodeToText(nodeCardsType const * np) } -void PosToText( +string PosToText( pos const * posPoint, const int target, - const int depth, - string& text) + const int depth) { stringstream ss; ss << setw(16) << left << "Target" << target << "\n"; @@ -228,7 +230,7 @@ void PosToText( cardHand[ posPoint->first[depth] ] << "\n"; ss << setw(16) << "Next first" << cardHand[ posPoint->first[depth - 1] ] << "\n"; - text = ss.str(); + return ss.str(); } @@ -295,11 +297,7 @@ void DumpRetrieved( fout << "Retrieved entry\n"; fout << string(15, '-') << "\n"; - - string stext; - PosToText(posPoint, target, depth, stext); - fout << stext << "\n"; - + fout << PosToText(posPoint, target, depth) << "\n"; fout << FullNodeToText(np) << "\n"; RankToDiagrams(posPoint->rankInSuit, np, text); @@ -327,11 +325,7 @@ void DumpStored( fout << "Stored entry\n"; fout << string(12, '-') << "\n"; - - string stext; - PosToText(posPoint, target, depth, stext); - fout << stext << "\n"; - + fout << PosToText(posPoint, target, depth) << "\n"; fout << NodeToText(np); moves->TrickToText((depth >> 2) + 1, text[0]); @@ -343,6 +337,23 @@ void DumpStored( } +string TopMove( + const bool val, + const moveType& bestMove) +{ + if (val) + { + stringstream ss; + ss << "achieved with move " << + cardSuit[ bestMove.suit ] << + cardRank[ bestMove.rank ]; + return ss.str(); + } + else + return "failed"; +} + + void DumpTopLevel( ThreadData const * thrp, const int tricks, @@ -353,62 +364,29 @@ void DumpTopLevel( ofstream fout; fout.open(thrp->fnTopLevel, ofstream::out | ofstream::app); - char text[DDS_HAND_LINES][DDS_FULL_LINE]; pos const * posPoint = &thrp->lookAheadPos; + string stext; if (printMode == 0) { // Trying just one target. - sprintf(text[0], "Single target %d, %s\n", - tricks, - "achieved"); + stext = "Single target " + to_string(tricks) + ", " + "achieved"; } else if (printMode == 1) { // Looking for best score. - if (thrp->val) - { - sprintf(text[0], - "Loop target %d, bounds %d .. %d, achieved with move %c%c\n", - tricks, - lower, - upper, - cardSuit[ thrp->bestMove[thrp->iniDepth].suit ], - cardRank[ thrp->bestMove[thrp->iniDepth].rank ]); - } - else - { - sprintf(text[0], - "Loop target %d, bounds %d .. %d, failed\n", - tricks, - lower, - upper); - } + stext = "Loop target " + to_string(tricks) + ", " + + "bounds " + to_string(lower) + " .. " + to_string(upper) + ", " + + TopMove(thrp->val, thrp->bestMove[thrp->iniDepth]) + ""; } else if (printMode == 2) { // Looking for other moves with best score. - if (thrp->val) - { - sprintf(text[0], - "Loop for cards with score %d, achieved with move %c%c\n", - tricks, - cardSuit[ thrp->bestMove[thrp->iniDepth].suit ], - cardRank[ thrp->bestMove[thrp->iniDepth].rank ]); - } - else - { - sprintf(text[0], - "Loop for cards with score %d, failed\n", - tricks); - } + stext = "Loop for cards with score " + to_string(tricks) + ", " + + TopMove(thrp->val, thrp->bestMove[thrp->iniDepth]); } - size_t l = strlen(text[0]) - 1; - - memset(text[1], '-', l); - text[1][l] = '\0'; - fout << string(text[0]) << string(text[1]) << "\n\n"; + fout << stext << "\n" << string(stext.size(), '-') << "\n\n"; PrintDeal(fout, posPoint->rankInSuit, 16); From 842c866be03eb72af8fbf9d62bb137ec5776f06f Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Fri, 30 Mar 2018 08:56:50 +0200 Subject: [PATCH 088/132] More refactoring --- src/Moves.cpp | 2 +- src/dump.cpp | 253 ++++++++++++++++++++++++-------------------------- 2 files changed, 122 insertions(+), 133 deletions(-) diff --git a/src/Moves.cpp b/src/Moves.cpp index e78e2206..81de7b5a 100644 --- a/src/Moves.cpp +++ b/src/Moves.cpp @@ -2405,7 +2405,7 @@ void Moves::RegisterHit( char text[12][80]; RankToText(posPoint->rankInSuit, text); - PrintDeal(cout, posPoint->RankInsuit, 16); + cout << PrintDeal(posPoint->RankInsuit, 16); trackp = &track[trick]; diff --git a/src/dump.cpp b/src/dump.cpp index 0c35d945..42550e05 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -19,26 +19,22 @@ #include "dump.h" -#define DDS_POS_LINES 5 // #define DDS_HAND_LINES 12 -#define DDS_NODE_LINES 4 // #define DDS_FULL_LINE 80 -#define DDS_HAND_OFFSET 16 -#define DDS_HAND_OFFSET2 12 -#define DDS_DIAG_WIDTH 34 string PrintSuit(const unsigned short suitCode); +string PrintSuit( + const unsigned short suitCode, + const char leastWin); -void PrintDeal( - ofstream& fout, +string PrintDeal( const unsigned short ranks[][DDS_SUITS], const unsigned spacing); void RankToDiagrams( - unsigned short rankInSuit[DDS_HANDS][DDS_SUITS], - nodeCardsType * np, - char text[DDS_HAND_LINES][DDS_FULL_LINE]); + unsigned short ranks[DDS_HANDS][DDS_SUITS], + nodeCardsType const * np); string WinnersToText(const unsigned short winRanks[]); @@ -55,6 +51,13 @@ string TopMove( const bool val, const moveType& bestMove); +string DumpTopHeader( + ThreadData const * thrp, + const int tricks, + const int lower, + const int upper, + const int printMode); + string PrintSuit(const unsigned short suitCode) { @@ -69,21 +72,43 @@ string PrintSuit(const unsigned short suitCode) } -void PrintDeal( - ofstream& fout, +string PrintSuit( + const unsigned short suitCode, + const char leastWin) +{ + if (! suitCode) + return "--"; + + string st; + for (int r = 14; r >= 2; r--) + { + if ((suitCode & bitMapRank[r])) + { + if (r >= 15 - leastWin) + st += cardRank[r]; + else + st += "x"; + } + } + return st; +} + + +string PrintDeal( const unsigned short ranks[][DDS_SUITS], const unsigned spacing) { + stringstream ss; for (int s = 0; s < DDS_SUITS; s++) { - fout << setw(spacing) << "" << + ss << setw(spacing) << "" << cardSuit[s] << " " << PrintSuit(ranks[0][s]) << "\n"; } for (int s = 0; s < DDS_SUITS; s++) { - fout << cardSuit[s] << " " << + ss << cardSuit[s] << " " << setw(2*spacing - 2) << left << PrintSuit(ranks[3][s]) << cardSuit[s] << " " << PrintSuit(ranks[1][s]) << "\n"; @@ -91,83 +116,47 @@ void PrintDeal( for (int s = 0; s < DDS_SUITS; s++) { - fout << setw(spacing) << "" << + ss << setw(spacing) << "" << cardSuit[s] << " " << PrintSuit(ranks[2][s]) << "\n"; } - fout << "\n"; - return; + return ss.str() + "\n"; } -void RankToDiagrams( - const unsigned short rankInSuit[DDS_HANDS][DDS_SUITS], - nodeCardsType const * np, - char text[DDS_HAND_LINES][DDS_FULL_LINE]) +string RankToDiagrams( + const unsigned short ranks[DDS_HANDS][DDS_SUITS], + nodeCardsType const * np) { - int c, h, s, r; - - for (int l = 0; l < DDS_HAND_LINES; l++) + stringstream ss; + for (int s = 0; s < DDS_SUITS; s++) { - memset(text[l], ' ', DDS_FULL_LINE); - text[l][DDS_FULL_LINE - 1] = '\0'; - text[l][DDS_DIAG_WIDTH ] = '|'; + ss << setw(12) << left << + (s == 0 ? "Sought" : "") << + cardSuit[s] << " " << setw(20) << PrintSuit(ranks[0][s]) << "| " << + setw(12) << (s == 0 ? "Found" : "") << + cardSuit[s] << " " << PrintSuit(ranks[0][s], np->leastWin[s]) << "\n"; } - strncpy(text[0], "Sought", 6); - strncpy(&text[0][DDS_DIAG_WIDTH + 5], "Found", 5); - - for (h = 0; h < DDS_HANDS; h++) + for (int s = 0; s < DDS_SUITS; s++) { - int offset, line; - if (h == 0) - { - offset = DDS_HAND_OFFSET2; - line = 0; - } - else if (h == 1) - { - offset = 2 * DDS_HAND_OFFSET2; - line = 4; - } - else if (h == 2) - { - offset = DDS_HAND_OFFSET2; - line = 8; - } - else - { - offset = 0; - line = 4; - } + ss << + cardSuit[s] << " " << setw(22) << left << PrintSuit(ranks[3][s]) << + cardSuit[s] << " " << setw(8) << PrintSuit(ranks[1][s]) << "| " << + cardSuit[s] << " " << + setw(22) << PrintSuit(ranks[3][s], np->leastWin[s]) << + cardSuit[s] << " " << PrintSuit(ranks[1][s], np->leastWin[s]) << "\n"; + } - for (s = 0; s < DDS_SUITS; s++) - { - c = offset; - for (r = 14; r >= 2; r--) - { - if (rankInSuit[h][s] & bitMapRank[r]) - { - text[line + s][c] = static_cast(cardRank[r]); - text[line + s][c + DDS_DIAG_WIDTH + 5] = - (r >= 15 - np->leastWin[s] ? - static_cast(cardRank[r]) : 'x'); - c++; - } - } - - if (c == offset) - { - text[line + s][c] = '-'; - text[line + s][c + DDS_DIAG_WIDTH + 5] = '-'; - c++; - } - - if (h != 3) - text[line + s][c + DDS_DIAG_WIDTH + 5] = '\0'; - } + for (int s = 0; s < DDS_SUITS; s++) + { + ss << setw(12) << left << "" << + cardSuit[s] << " " << setw(20) << PrintSuit(ranks[0][s]) << "| " << + setw(12) << "" << cardSuit[s] << " " << + PrintSuit(ranks[0][s], np->leastWin[s]) << "\n"; } + return ss.str(); } @@ -234,6 +223,53 @@ string PosToText( } +string DumpTopHeader( + ThreadData const * thrp, + const int tricks, + const int lower, + const int upper, + const int printMode) +{ + string stext; + if (printMode == 0) + { + // Trying just one target. + stext = "Single target " + to_string(tricks) + ", " + "achieved"; + } + else if (printMode == 1) + { + // Looking for best score. + stext = "Loop target " + to_string(tricks) + ", " + + "bounds " + to_string(lower) + " .. " + to_string(upper) + ", " + + TopMove(thrp->val, thrp->bestMove[thrp->iniDepth]) + ""; + } + else if (printMode == 2) + { + // Looking for other moves with best score. + stext = "Loop for cards with score " + to_string(tricks) + ", " + + TopMove(thrp->val, thrp->bestMove[thrp->iniDepth]); + } + return stext + "\n" + string(stext.size(), '-') + "\n"; +} + + +string TopMove( + const bool val, + const moveType& bestMove) +{ + if (val) + { + stringstream ss; + ss << "achieved with move " << + cardSuit[ bestMove.suit ] << + cardRank[ bestMove.rank ]; + return ss.str(); + } + else + return "failed"; +} + + int DumpInput( const int errCode, const deal& dl, @@ -276,7 +312,8 @@ int DumpInput( fout << "\ntarget=" << target << "\n"; fout << "solutions=" << solutions << "\n"; fout << "mode=" << mode << "\n\n\n"; - PrintDeal(fout, ranks, 8); + fout << PrintDeal(ranks, 8); + fout.close(); return 0; } @@ -292,18 +329,11 @@ void DumpRetrieved( ofstream fout; fout.open(fname, ofstream::out | ofstream::app); - // Big enough for all uses. - char text[DDS_HAND_LINES][DDS_FULL_LINE]; - fout << "Retrieved entry\n"; fout << string(15, '-') << "\n"; fout << PosToText(posPoint, target, depth) << "\n"; fout << FullNodeToText(np) << "\n"; - - RankToDiagrams(posPoint->rankInSuit, np, text); - for (int i = 0; i < DDS_HAND_LINES; i++) - fout << string(text[i]) << "\n"; - fout << "\n"; + fout << RankToDiagrams(posPoint->rankInSuit, np) << "\n"; fout.close(); } @@ -330,30 +360,12 @@ void DumpStored( moves->TrickToText((depth >> 2) + 1, text[0]); fout << string(text[0]) << "\n"; - - PrintDeal(fout, posPoint->rankInSuit, 16); + fout << PrintDeal(posPoint->rankInSuit, 16); fout.close(); } -string TopMove( - const bool val, - const moveType& bestMove) -{ - if (val) - { - stringstream ss; - ss << "achieved with move " << - cardSuit[ bestMove.suit ] << - cardRank[ bestMove.rank ]; - return ss.str(); - } - else - return "failed"; -} - - void DumpTopLevel( ThreadData const * thrp, const int tricks, @@ -361,37 +373,14 @@ void DumpTopLevel( const int upper, const int printMode) { - ofstream fout; - fout.open(thrp->fnTopLevel, ofstream::out | ofstream::app); - pos const * posPoint = &thrp->lookAheadPos; - string stext; - if (printMode == 0) - { - // Trying just one target. - stext = "Single target " + to_string(tricks) + ", " + "achieved"; - } - else if (printMode == 1) - { - // Looking for best score. - stext = "Loop target " + to_string(tricks) + ", " + - "bounds " + to_string(lower) + " .. " + to_string(upper) + ", " + - TopMove(thrp->val, thrp->bestMove[thrp->iniDepth]) + ""; - } - else if (printMode == 2) - { - // Looking for other moves with best score. - stext = "Loop for cards with score " + to_string(tricks) + ", " + - TopMove(thrp->val, thrp->bestMove[thrp->iniDepth]); - } - - fout << stext << "\n" << string(stext.size(), '-') << "\n\n"; - - PrintDeal(fout, posPoint->rankInSuit, 16); + ofstream fout; + fout.open(thrp->fnTopLevel, ofstream::out | ofstream::app); + fout << DumpTopHeader(thrp, tricks, lower, upper, printMode) << "\n"; + fout << PrintDeal(posPoint->rankInSuit, 16); fout << WinnersToText(posPoint->winRanks[ thrp->iniDepth ]) << "\n"; - fout << thrp->nodes << " AB nodes, " << thrp->trickNodes << " trick nodes\n\n"; From 04348e25d0930efe1ef4edd472c9a418c1d0636a Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Fri, 30 Mar 2018 09:33:59 +0200 Subject: [PATCH 089/132] Added a small File class --- src/ABsearch.cpp | 24 ++------- src/File.cpp | 60 +++++++++++++++++++++ src/File.h | 42 +++++++++++++++ src/Makefiles/sources.txt | 1 + src/Moves.cpp | 34 ++++++------ src/Moves.h | 5 +- src/SolverIF.cpp | 12 ++--- src/dump.cpp | 109 +++++++++++++++++--------------------- src/dump.h | 17 +++--- 9 files changed, 189 insertions(+), 115 deletions(-) create mode 100644 src/File.cpp create mode 100644 src/File.h diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index e275e51d..e9763658 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -197,7 +197,7 @@ bool ABsearch0( if (cardsP) { #ifdef DDS_AB_HITS - DumpRetrieved(thrp->fnRetrieved, posPoint, cardsP, target, depth); + DumpRetrieved(thrp->fnRetrieved, * posPoint, * cardsP, target, depth); #endif for (int ss = 0; ss < DDS_SUITS; ss++) @@ -288,22 +288,6 @@ bool ABsearch0( } } - /* - if (depth == 4) - { - char text[DDS_HAND_LINES][DDS_FULL_LINE]; - - RankToText(posPoint->rankInSuit, text); - for (int i = 0; i < DDS_HAND_LINES; i++) - printf("%s\n", text[i]); - printf("\nTrump %c, leader %c, target %d tricks\n", - cardSuit[trump], - cardHand[hand], - - posPoint->tricksMAX + target); - printf("----------------------------------\n\n"); - } - */ - if (depth < 20) { /* Find node that fits the suit lengths */ @@ -324,7 +308,7 @@ bool ABsearch0( if (cardsP) { #ifdef DDS_AB_HITS - DumpRetrieved(thrp->fnRetrieved, posPoint, cardsP, target, depth); + DumpRetrieved(thrp->fnRetrieved, * posPoint, * cardsP, target, depth); #endif for (int ss = 0; ss < DDS_SUITS; ss++) @@ -460,8 +444,8 @@ bool ABsearch0( TIMER_END(TIMER_NO_BUILD, depth); #ifdef DDS_AB_HITS - DumpStored(thrp->fnStored, posPoint, &thrp->moves, - &first, target, depth); + DumpStored(thrp->fnStored, * posPoint, thrp->moves, + first, target, depth); #endif AB_COUNT(AB_MOVE_LOOP, value, depth); diff --git a/src/File.cpp b/src/File.cpp new file mode 100644 index 00000000..7b8b34f1 --- /dev/null +++ b/src/File.cpp @@ -0,0 +1,60 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +// Keeps track of debug files without opening and closing them +// all the time, and without creating empty files. + + +#include "File.h" + + +File::File() +{ + File::Reset(); +} + + +File::~File() +{ + File::Close(); +} + + +void File::Reset() +{ + fname = ""; + fileOpen = false; +} + + +void File::SetName(const string& fnameIn) +{ + // No error checking! + fname = fnameIn; +} + + +ofstream& File::GetStream() +{ + if (! fileOpen) + fout.open(fname); + + return fout; +} + + +void File::Close() +{ + if (fileOpen) + { + fout.close(); + fileOpen = false; + } +} + diff --git a/src/File.h b/src/File.h new file mode 100644 index 00000000..a08d3606 --- /dev/null +++ b/src/File.h @@ -0,0 +1,42 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_FILE_H +#define DDS_FILE_H + +#include +#include + +using namespace std; + + +class File +{ + private: + + string fname; + bool fileOpen; + ofstream fout; + + public: + + File(); + + ~File(); + + void Reset(); + + void SetName(const string& fnameIn); + + ofstream& GetStream(); + + void Close(); +}; + +#endif diff --git a/src/Makefiles/sources.txt b/src/Makefiles/sources.txt index 064d52f0..db84e319 100644 --- a/src/Makefiles/sources.txt +++ b/src/Makefiles/sources.txt @@ -5,6 +5,7 @@ SOURCE_FILES = \ ABstats.cpp \ CalcTables.cpp \ DealerPar.cpp \ + File.cpp \ Init.cpp \ LaterTricks.cpp \ Memory.cpp \ diff --git a/src/Moves.cpp b/src/Moves.cpp index 81de7b5a..5833ee35 100644 --- a/src/Moves.cpp +++ b/src/Moves.cpp @@ -8,6 +8,10 @@ */ +#include +#include +#include + #include "dds.h" #include "Moves.h" #include "debug.h" @@ -2287,28 +2291,26 @@ void Moves::PrintMoves( } -void Moves::TrickToText( - const int trick, - char line[]) const +string Moves::TrickToText(const int trick) const { const movePlyType& listp0 = moveList[trick][0]; const movePlyType& listp1 = moveList[trick][1]; const movePlyType& listp2 = moveList[trick][2]; const movePlyType& listp3 = moveList[trick][3]; - sprintf(line, "Last trick\t%c: %c%c - %c%c - %c%c - %c%c\n", - cardHand[ track[trick].leadHand ], - cardSuit[ listp0.move[listp0.current].suit ], - cardRank[ listp0.move[listp0.current].rank ], - - cardSuit[ listp1.move[listp1.current].suit ], - cardRank[ listp1.move[listp1.current].rank ], - - cardSuit[ listp2.move[listp2.current].suit ], - cardRank[ listp2.move[listp2.current].rank ], - - cardSuit[ listp3.move[listp3.current].suit ], - cardRank[ listp3.move[listp3.current].rank ]); + stringstream ss; + ss << setw(16) << left << "Last trick" << + cardHand[ track[trick].leadHand ] << ": " << + cardSuit[ listp0.move[listp0.current].suit ] << + cardRank[ listp0.move[listp0.current].rank ] << " - " << + cardSuit[ listp1.move[listp1.current].suit ] << + cardRank[ listp1.move[listp1.current].rank ] << " - " << + cardSuit[ listp2.move[listp2.current].suit ] << + cardRank[ listp2.move[listp2.current].rank ] << " - " << + cardSuit[ listp3.move[listp3.current].suit ] << + cardRank[ listp3.move[listp3.current].rank ] << "\n"; + + return ss.str(); } diff --git a/src/Moves.h b/src/Moves.h index 07cdfb02..0981d4ac 100644 --- a/src/Moves.h +++ b/src/Moves.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include "dds.h" #include "../include/dll.h" @@ -271,9 +272,7 @@ class Moves const int tricks, const int relHand); - void TrickToText( - const int trick, - char text[]) const; + string TrickToText(const int trick) const; void PrintTrickStats() const; diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 8a7f15fa..efb60332 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -367,7 +367,7 @@ int SolveBoardInternal( TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL - DumpTopLevel(thrp, guess, lowerbound, upperbound, 1); + DumpTopLevel(* thrp, guess, lowerbound, upperbound, 1); #endif if (thrp->val) @@ -460,7 +460,7 @@ int SolveBoardInternal( TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL - DumpTopLevel(thrp, guess, lowerbound, upperbound, 1); + DumpTopLevel(* thrp, guess, lowerbound, upperbound, 1); #endif if (thrp->val) @@ -526,7 +526,7 @@ int SolveBoardInternal( TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL - DumpTopLevel(thrp, target, -1, -1, 0); + DumpTopLevel(* thrp, target, -1, -1, 0); #endif if (! thrp->val) @@ -591,7 +591,7 @@ int SolveBoardInternal( TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL - DumpTopLevel(thrp, target, -1, -1, 2); + DumpTopLevel(* thrp, target, -1, -1, 2); #endif if (! thrp->val) @@ -711,7 +711,7 @@ int SolveSameBoard( TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL - DumpTopLevel(thrp, guess, lowerbound, upperbound, 1); + DumpTopLevel(* thrp, guess, lowerbound, upperbound, 1); #endif if (thrp->val) @@ -861,7 +861,7 @@ int AnalyseLaterBoard( TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL - DumpTopLevel(thrp, guess, lowerbound, upperbound, 1); + DumpTopLevel(* thrp, guess, lowerbound, upperbound, 1); #endif if (thrp->val) diff --git a/src/dump.cpp b/src/dump.cpp index 42550e05..3a262467 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -12,17 +12,9 @@ #include #include -#include "dds.h" -#include "TransTable.h" -#include "Moves.h" -#include "Memory.h" #include "dump.h" -// #define DDS_HAND_LINES 12 -// #define DDS_FULL_LINE 80 - - string PrintSuit(const unsigned short suitCode); string PrintSuit( const unsigned short suitCode, @@ -34,16 +26,16 @@ string PrintDeal( void RankToDiagrams( unsigned short ranks[DDS_HANDS][DDS_SUITS], - nodeCardsType const * np); + const nodeCardsType& node); string WinnersToText(const unsigned short winRanks[]); -string NodeToText(nodeCardsType const * np); +string NodeToText(const nodeCardsType& node); -string FullNodeToText(nodeCardsType const * np); +string FullNodeToText(const nodeCardsType& node); string PosToText( - pos const * posPoint, + const pos& tpos, const int target, const int depth); @@ -52,7 +44,7 @@ string TopMove( const moveType& bestMove); string DumpTopHeader( - ThreadData const * thrp, + const ThreadData& thrd, const int tricks, const int lower, const int upper, @@ -127,7 +119,7 @@ string PrintDeal( string RankToDiagrams( const unsigned short ranks[DDS_HANDS][DDS_SUITS], - nodeCardsType const * np) + const nodeCardsType& node) { stringstream ss; for (int s = 0; s < DDS_SUITS; s++) @@ -136,7 +128,8 @@ string RankToDiagrams( (s == 0 ? "Sought" : "") << cardSuit[s] << " " << setw(20) << PrintSuit(ranks[0][s]) << "| " << setw(12) << (s == 0 ? "Found" : "") << - cardSuit[s] << " " << PrintSuit(ranks[0][s], np->leastWin[s]) << "\n"; + cardSuit[s] << " " << + PrintSuit(ranks[0][s], node.leastWin[s]) << "\n"; } for (int s = 0; s < DDS_SUITS; s++) @@ -145,8 +138,9 @@ string RankToDiagrams( cardSuit[s] << " " << setw(22) << left << PrintSuit(ranks[3][s]) << cardSuit[s] << " " << setw(8) << PrintSuit(ranks[1][s]) << "| " << cardSuit[s] << " " << - setw(22) << PrintSuit(ranks[3][s], np->leastWin[s]) << - cardSuit[s] << " " << PrintSuit(ranks[1][s], np->leastWin[s]) << "\n"; + setw(22) << PrintSuit(ranks[3][s], node.leastWin[s]) << + cardSuit[s] << " " << + PrintSuit(ranks[1][s], node.leastWin[s]) << "\n"; } for (int s = 0; s < DDS_SUITS; s++) @@ -154,7 +148,7 @@ string RankToDiagrams( ss << setw(12) << left << "" << cardSuit[s] << " " << setw(20) << PrintSuit(ranks[0][s]) << "| " << setw(12) << "" << cardSuit[s] << " " << - PrintSuit(ranks[0][s], np->leastWin[s]) << "\n"; + PrintSuit(ranks[0][s], node.leastWin[s]) << "\n"; } return ss.str(); } @@ -170,31 +164,31 @@ string WinnersToText(const unsigned short ourWinRanks[]) } -string NodeToText(nodeCardsType const * np) +string NodeToText(const nodeCardsType& node) { stringstream ss; ss << setw(16) << left << "Address" << - static_cast(np) << "\n"; + static_cast(&node) << "\n"; ss << setw(16) << left << "Bounds" << - static_cast(np->lbound) << " to " << - static_cast(np->ubound) << " tricks\n"; + static_cast(node.lbound) << " to " << + static_cast(node.ubound) << " tricks\n"; ss << setw(16) << left << "Best move" << - cardSuit[ static_cast(np->bestMoveSuit) ] << - cardRank[ static_cast(np->bestMoveRank) ] << "\n"; + cardSuit[ static_cast(node.bestMoveSuit) ] << + cardRank[ static_cast(node.bestMoveRank) ] << "\n"; return ss.str(); } -string FullNodeToText(nodeCardsType const * np) +string FullNodeToText(const nodeCardsType& node) { stringstream ss; vector v(DDS_SUITS); for (unsigned i = 0; i < DDS_SUITS; i++) - v[i] = 15 - static_cast(np->leastWin[i]); + v[i] = 15 - static_cast(node.leastWin[i]); ss << setw(16) << left << "Lowest used" << cardSuit[0] << cardRank[v[0]] << ", " << @@ -202,29 +196,27 @@ string FullNodeToText(nodeCardsType const * np) cardSuit[2] << cardRank[v[2]] << ", " << cardSuit[3] << cardRank[v[3]] << "\n"; - return NodeToText(np) + ss.str(); + return NodeToText(node) + ss.str(); } string PosToText( - pos const * posPoint, + const pos& tpos, const int target, const int depth) { stringstream ss; ss << setw(16) << left << "Target" << target << "\n"; ss << setw(16) << "Depth" << depth << "\n"; - ss << setw(16) << "tricksMAX" << posPoint->tricksMAX << "\n"; - ss << setw(16) << "First hand" << - cardHand[ posPoint->first[depth] ] << "\n"; - ss << setw(16) << "Next first" << - cardHand[ posPoint->first[depth - 1] ] << "\n"; + ss << setw(16) << "tricksMAX" << tpos.tricksMAX << "\n"; + ss << setw(16) << "First hand" << cardHand[tpos.first[depth]] << "\n"; + ss << setw(16) << "Next first" << cardHand[tpos.first[depth - 1]] << "\n"; return ss.str(); } string DumpTopHeader( - ThreadData const * thrp, + const ThreadData& thrd, const int tricks, const int lower, const int upper, @@ -241,13 +233,13 @@ string DumpTopHeader( // Looking for best score. stext = "Loop target " + to_string(tricks) + ", " + "bounds " + to_string(lower) + " .. " + to_string(upper) + ", " + - TopMove(thrp->val, thrp->bestMove[thrp->iniDepth]) + ""; + TopMove(thrd.val, thrd.bestMove[thrd.iniDepth]) + ""; } else if (printMode == 2) { // Looking for other moves with best score. stext = "Loop for cards with score " + to_string(tricks) + ", " + - TopMove(thrp->val, thrp->bestMove[thrp->iniDepth]); + TopMove(thrd.val, thrd.bestMove[thrd.iniDepth]); } return stext + "\n" + string(stext.size(), '-') + "\n"; } @@ -321,8 +313,8 @@ int DumpInput( void DumpRetrieved( const string& fname, - pos const * posPoint, - nodeCardsType const * np, + const pos& tpos, + const nodeCardsType& node, const int target, const int depth) { @@ -331,9 +323,9 @@ void DumpRetrieved( fout << "Retrieved entry\n"; fout << string(15, '-') << "\n"; - fout << PosToText(posPoint, target, depth) << "\n"; - fout << FullNodeToText(np) << "\n"; - fout << RankToDiagrams(posPoint->rankInSuit, np) << "\n"; + fout << PosToText(tpos, target, depth) << "\n"; + fout << FullNodeToText(node) << "\n"; + fout << RankToDiagrams(tpos.rankInSuit, node) << "\n"; fout.close(); } @@ -341,48 +333,43 @@ void DumpRetrieved( void DumpStored( const string& fname, - pos const * posPoint, - Moves const * moves, - nodeCardsType const * np, + const pos& tpos, + const Moves& moves, + const nodeCardsType& node, const int target, const int depth) { ofstream fout; fout.open(fname, ofstream::out | ofstream::app); - // Big enough for all uses. - char text[DDS_HAND_LINES][DDS_FULL_LINE]; - fout << "Stored entry\n"; fout << string(12, '-') << "\n"; - fout << PosToText(posPoint, target, depth) << "\n"; - fout << NodeToText(np); - - moves->TrickToText((depth >> 2) + 1, text[0]); - fout << string(text[0]) << "\n"; - fout << PrintDeal(posPoint->rankInSuit, 16); + fout << PosToText(tpos, target, depth) << "\n"; + fout << NodeToText(node); + fout << moves.TrickToText((depth >> 2) + 1) << "\n"; + fout << PrintDeal(tpos.rankInSuit, 16); fout.close(); } void DumpTopLevel( - ThreadData const * thrp, + const ThreadData& thrd, const int tricks, const int lower, const int upper, const int printMode) { - pos const * posPoint = &thrp->lookAheadPos; + const pos& tpos = thrd.lookAheadPos; ofstream fout; - fout.open(thrp->fnTopLevel, ofstream::out | ofstream::app); + fout.open(thrd.fnTopLevel, ofstream::out | ofstream::app); - fout << DumpTopHeader(thrp, tricks, lower, upper, printMode) << "\n"; - fout << PrintDeal(posPoint->rankInSuit, 16); - fout << WinnersToText(posPoint->winRanks[ thrp->iniDepth ]) << "\n"; - fout << thrp->nodes << " AB nodes, " << - thrp->trickNodes << " trick nodes\n\n"; + fout << DumpTopHeader(thrd, tricks, lower, upper, printMode) << "\n"; + fout << PrintDeal(tpos.rankInSuit, 16); + fout << WinnersToText(tpos.winRanks[thrd.iniDepth]) << "\n"; + fout << thrd.nodes << " AB nodes, " << + thrd.trickNodes << " trick nodes\n\n"; fout.close(); } diff --git a/src/dump.h b/src/dump.h index bb60f67e..fbb01557 100644 --- a/src/dump.h +++ b/src/dump.h @@ -11,9 +11,8 @@ #define DDS_DUMP_H #include "dds.h" - -#define DDS_HAND_LINES 12 -#define DDS_FULL_LINE 80 +#include "Moves.h" +#include "Memory.h" int DumpInput( const int errCode, @@ -23,7 +22,7 @@ int DumpInput( const int mode); void DumpTopLevel( - ThreadData const * thrp, + const ThreadData& thrd, const int tricks, const int lower, const int upper, @@ -31,16 +30,16 @@ void DumpTopLevel( void DumpRetrieved( const string& fname, - pos const * posPoint, - nodeCardsType const * np, + const pos& tpos, + const nodeCardsType& node, const int target, const int depth); void DumpStored( const string& fname, - pos const * posPoint, - Moves const * moves, - nodeCardsType const * np, + const pos& tpos, + const Moves& moves, + const nodeCardsType& node, const int target, const int depth); From 4a63ae6f615c10187fddb5035734ec25d8d136d5 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Fri, 30 Mar 2018 10:33:54 +0200 Subject: [PATCH 090/132] Cleanup --- src/ABsearch.cpp | 10 ++++++---- src/File.cpp | 3 +++ src/File.h | 2 ++ src/Init.cpp | 28 ++++++++++++++++++---------- src/Memory.h | 8 +++++--- src/SolverIF.cpp | 24 +++++++++++++++--------- src/System.cpp | 1 - src/Timer.cpp | 4 ++-- src/Timer.h | 2 +- src/TimerList.cpp | 33 +++++++++++++-------------------- src/TimerList.h | 33 ++++++++++++++++++--------------- src/dds.rc | 2 +- src/dump.cpp | 20 +++----------------- src/dump.h | 5 +++-- 14 files changed, 90 insertions(+), 85 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index e9763658..f74eaf1c 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -197,7 +197,8 @@ bool ABsearch0( if (cardsP) { #ifdef DDS_AB_HITS - DumpRetrieved(thrp->fnRetrieved, * posPoint, * cardsP, target, depth); + DumpRetrieved(thrp->fileRetrieved.GetStream(), + * posPoint, * cardsP, target, depth); #endif for (int ss = 0; ss < DDS_SUITS; ss++) @@ -308,7 +309,8 @@ bool ABsearch0( if (cardsP) { #ifdef DDS_AB_HITS - DumpRetrieved(thrp->fnRetrieved, * posPoint, * cardsP, target, depth); + DumpRetrieved(thrp->fileRetrieved.GetStream(), + * posPoint, * cardsP, target, depth); #endif for (int ss = 0; ss < DDS_SUITS; ss++) @@ -444,8 +446,8 @@ bool ABsearch0( TIMER_END(TIMER_NO_BUILD, depth); #ifdef DDS_AB_HITS - DumpStored(thrp->fnStored, * posPoint, thrp->moves, - first, target, depth); + DumpStored(thrp->fileStored.GetStream(), + * posPoint, thrp->moves, first, target, depth); #endif AB_COUNT(AB_MOVE_LOOP, value, depth); diff --git a/src/File.cpp b/src/File.cpp index 7b8b34f1..56f359df 100644 --- a/src/File.cpp +++ b/src/File.cpp @@ -43,7 +43,10 @@ void File::SetName(const string& fnameIn) ofstream& File::GetStream() { if (! fileOpen) + { fout.open(fname); + fileOpen = true; + } return fout; } diff --git a/src/File.h b/src/File.h index a08d3606..38a24290 100644 --- a/src/File.h +++ b/src/File.h @@ -21,7 +21,9 @@ class File private: string fname; + bool fileOpen; + ofstream fout; public: diff --git a/src/Init.cpp b/src/Init.cpp index 383e7662..cecaabe9 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -357,8 +357,7 @@ void InitDebugFiles() const string send = to_string(thrId) + DDS_DEBUG_SUFFIX; #ifdef DDS_TOP_LEVEL - thrp->fnTopLevel = DDS_TOP_LEVEL_PREFIX + send; - remove(thrp->fnTopLevel.c_str()); // May fail -- that's OK + thrp->fileTopLevel.SetName(DDS_TOP_LEVEL_PREFIX + send); #endif #ifdef DDS_AB_STATS @@ -375,15 +374,12 @@ void InitDebugFiles() #endif #ifdef DDS_AB_HITS - thrp->fnRetrieved = DDS_AB_HITS_RETRIEVED_PREFIX + send; - remove(thrp->fnRetrieved.c_str()); - - thrp->fnStored = DDS_AB_HITS_STORED_PREFIX + send; - remove(thrp->fnStored.c_str()); + thrp->fileRetrieved.SetName(DDS_AB_HITS_RETRIEVED_PREFIX + send); + thrp->fileStored.SetName(DDS_AB_HITS_STORED_PREFIX + send); #endif #ifdef DDS_TIMING - thrp->timerList.SetFile(DDS_TIMING_PREFIX + send); + thrp->fileTimerList.SetName(DDS_TIMING_PREFIX + send); #endif #ifdef DDS_TT_STATS @@ -406,8 +402,20 @@ void CloseDebugFiles() for (int thrId = 0; thrId < noOfThreads; thrId++) { ThreadData * thrp = memory.GetPtr(static_cast(thrId)); - UNUSED(thrp); // To avoid compile errors - // TODO Delete function + UNUSED(thrp); // To avoid compiler warning + +#ifdef DDS_TIMING + thrp->fileTimerList.Close(); +#endif + +#ifdef DDS_TOP_LEVEL + thrp->fileTopLevel.Close(); +#endif + +#ifdef DDS_AB_HITS + thrp->fileRetrieved.Close(); + thrp->fileStored.Close(); +#endif } } diff --git a/src/Memory.h b/src/Memory.h index d0b2e9fb..2df554ee 100644 --- a/src/Memory.h +++ b/src/Memory.h @@ -14,6 +14,7 @@ #include "TransTable.h" #include "Moves.h" +#include "File.h" #include "debug.h" #ifdef DDS_AB_STATS @@ -78,15 +79,16 @@ struct ThreadData #ifdef DDS_TIMING TimerList timerList; + File fileTimerList; #endif #ifdef DDS_TOP_LEVEL - string fnTopLevel; + File fileTopLevel; #endif #ifdef DDS_AB_HITS - string fnRetrieved; - string fnStored; + File fileRetrieved; + File fileStored; #endif }; diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index efb60332..9e132499 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -367,7 +367,8 @@ int SolveBoardInternal( TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL - DumpTopLevel(* thrp, guess, lowerbound, upperbound, 1); + DumpTopLevel(thrp->fileTopLevel.GetStream(), + * thrp, guess, lowerbound, upperbound, 1); #endif if (thrp->val) @@ -460,7 +461,8 @@ int SolveBoardInternal( TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL - DumpTopLevel(* thrp, guess, lowerbound, upperbound, 1); + DumpTopLevel(thrp->fileTopLevel.GetStream(), + * thrp, guess, lowerbound, upperbound, 1); #endif if (thrp->val) @@ -526,7 +528,8 @@ int SolveBoardInternal( TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL - DumpTopLevel(* thrp, target, -1, -1, 0); + DumpTopLevel(thrp->fileTopLevel.GetStream(), + * thrp, target, -1, -1, 0); #endif if (! thrp->val) @@ -591,7 +594,8 @@ int SolveBoardInternal( TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL - DumpTopLevel(* thrp, target, -1, -1, 2); + DumpTopLevel(thrp->fileTopLevel.GetStream(), + * thrp, target, -1, -1, 2); #endif if (! thrp->val) @@ -615,7 +619,7 @@ int SolveBoardInternal( } #ifdef DDS_TIMING - thrp->timerList.PrintStats(); + thrp->timerList.PrintStats(thrp->fileTimerList.GetStream()); #endif #ifdef DDS_TT_STATS @@ -711,7 +715,8 @@ int SolveSameBoard( TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL - DumpTopLevel(* thrp, guess, lowerbound, upperbound, 1); + DumpTopLevel(thrp->fileTopLevel.GetStream(), + * thrp, guess, lowerbound, upperbound, 1); #endif if (thrp->val) @@ -728,7 +733,7 @@ int SolveSameBoard( ThreadMemoryUsed(); #ifdef DDS_TIMING - thrp->timerList.PrintStats(); + thrp->timerList.PrintStats(thrp->fileTimerList.GetStream()); #endif #ifdef DDS_TT_STATS @@ -861,7 +866,8 @@ int AnalyseLaterBoard( TIMER_END(TIMER_NO_AB, iniDepth); #ifdef DDS_TOP_LEVEL - DumpTopLevel(* thrp, guess, lowerbound, upperbound, 1); + DumpTopLevel(thrp->fileTopLevel.GetStream(), + * thrp, guess, lowerbound, upperbound, 1); #endif if (thrp->val) @@ -879,7 +885,7 @@ int AnalyseLaterBoard( ThreadMemoryUsed(); #ifdef DDS_TIMING - thrp->timerList.PrintStats(); + thrp->timerList.PrintStats(thrp->fileTimerList.GetStream()); #endif #ifdef DDS_TT_STATS diff --git a/src/System.cpp b/src/System.cpp index e65ca16f..c13ae424 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -489,7 +489,6 @@ int System::RunThreadsSTL() // TODO Remove // #include "Memory.h" -// #include "TimerList.h" // extern Memory memory; int System::RunThreadsSTLIMPL() diff --git a/src/Timer.cpp b/src/Timer.cpp index a34053e7..f6ee618e 100644 --- a/src/Timer.cpp +++ b/src/Timer.cpp @@ -38,9 +38,9 @@ void Timer::Reset() } -void Timer::SetName(const string& s) +void Timer::SetName(const string& nameIn) { - name = s; + name = nameIn; } diff --git a/src/Timer.h b/src/Timer.h index ac9589e2..31ac9385 100644 --- a/src/Timer.h +++ b/src/Timer.h @@ -39,7 +39,7 @@ class Timer void Reset(); - void SetName(const string& s); + void SetName(const string& nameIn); void Start(); diff --git a/src/TimerList.cpp b/src/TimerList.cpp index 87b6eb18..2e119b09 100644 --- a/src/TimerList.cpp +++ b/src/TimerList.cpp @@ -12,13 +12,11 @@ See TimerList.h for some description. */ -#include +// #include -#include "dds.h" +// #include "dds.h" #include "TimerList.h" -#define DDS_TIMERS 50 - TimerList::TimerList() { @@ -35,7 +33,7 @@ void TimerList::Reset() { fname = ""; - timerGroups.resize(TIMER_GROUPS); + timerGroups.resize(TIMER_NO_SIZE); timerGroups[TIMER_NO_AB].SetNames("AB"); timerGroups[TIMER_NO_MAKE].SetNames("Make"); @@ -57,20 +55,20 @@ void TimerList::SetFile(const string& fnameIn) void TimerList::Start( - const unsigned groupno, + const ABTimerType groupno, const unsigned timerno) { - if (groupno >= TIMER_GROUPS) + if (groupno >= TIMER_NO_SIZE) return; timerGroups[groupno].Start(timerno); } void TimerList::End( - const unsigned groupno, + const ABTimerType groupno, const unsigned timerno) { - if (groupno >= TIMER_GROUPS) + if (groupno >= TIMER_NO_SIZE) return; timerGroups[groupno].End(timerno); } @@ -78,7 +76,7 @@ void TimerList::End( bool TimerList::Used() const { - for (unsigned g = 0; g < TIMER_GROUPS; g++) + for (unsigned g = 0; g < TIMER_NO_SIZE; g++) { if (timerGroups[g].Used()) return true; @@ -87,7 +85,7 @@ bool TimerList::Used() const } -void TimerList::PrintStats() const +void TimerList::PrintStats(ofstream& fout) const { if (! TimerList::Used()) return; @@ -101,7 +99,7 @@ void TimerList::PrintStats() const TimerGroup ABGroup; ABGroup = timerGroups[0]; ABGroup.Differentiate(); - for (unsigned g = 1; g < TIMER_GROUPS; g++) + for (unsigned g = 1; g < TIMER_NO_SIZE; g++) ABGroup -= timerGroups[g]; Timer ABTotal; @@ -110,19 +108,16 @@ void TimerList::PrintStats() const ABTotal.SetName("Sum"); Timer sumTotal = ABTotal; - for (unsigned g = 1; g < TIMER_GROUPS; g++) + for (unsigned g = 1; g < TIMER_NO_SIZE; g++) { Timer t; timerGroups[g].Sum(t); sumTotal += t; } - ofstream fout; - fout.open(fname); - fout << timerGroups[0].Header(); fout << ABGroup.SumLine(sumTotal); - for (unsigned g = 1; g < TIMER_GROUPS; g++) + for (unsigned g = 1; g < TIMER_NO_SIZE; g++) fout << timerGroups[g].SumLine(sumTotal); fout << timerGroups[0].DashLine(); fout << sumTotal.SumLine(sumTotal) << endl; @@ -137,11 +132,9 @@ void TimerList::PrintStats() const #ifdef DDS_TIMING_DETAILS fout << timerGroups[0].DetailHeader(); - for (unsigned g = 0; g < TIMER_GROUPS; g++) + for (unsigned g = 0; g < TIMER_NO_SIZE; g++) fout << timerGroups[g].DetailLines(); fout << endl; #endif - - fout.close(); } diff --git a/src/TimerList.h b/src/TimerList.h index 2f804c84..eef41f57 100644 --- a/src/TimerList.h +++ b/src/TimerList.h @@ -46,6 +46,7 @@ #include #include #include +#include #include "TimerGroup.h" #include "debug.h" @@ -61,18 +62,20 @@ using namespace std; #define TIMER_END(g, a) 1 #endif -#define TIMER_NO_AB 0 -#define TIMER_NO_MAKE 1 -#define TIMER_NO_UNDO 2 -#define TIMER_NO_EVALUATE 3 -#define TIMER_NO_NEXTMOVE 4 -#define TIMER_NO_QT 5 -#define TIMER_NO_LT 6 -#define TIMER_NO_MOVEGEN 7 -#define TIMER_NO_LOOKUP 8 -#define TIMER_NO_BUILD 9 - -#define TIMER_GROUPS 10 +enum ABTimerType +{ + TIMER_NO_AB = 0, + TIMER_NO_MAKE = 1, + TIMER_NO_UNDO = 2, + TIMER_NO_EVALUATE = 3, + TIMER_NO_NEXTMOVE = 4, + TIMER_NO_QT = 5, + TIMER_NO_LT = 6, + TIMER_NO_MOVEGEN = 7, + TIMER_NO_LOOKUP = 8, + TIMER_NO_BUILD = 9, + TIMER_NO_SIZE = 10 +}; class TimerList @@ -93,16 +96,16 @@ class TimerList void SetFile(const string& fnameIn); void Start( - const unsigned groupno, + const ABTimerType groupno, const unsigned timerno); void End( - const unsigned groupno, + const ABTimerType groupno, const unsigned timerno); bool Used() const; - void PrintStats() const; + void PrintStats(ofstream& fout) const; }; #endif diff --git a/src/dds.rc b/src/dds.rc index 464df709..0934fdcb 100644 --- a/src/dds.rc +++ b/src/dds.rc @@ -15,7 +15,7 @@ BEGIN VALUE "FileDescription", "dds MinGW" VALUE "FileVersion", "2.8.4.0" VALUE "InternalName", "dds.dll" - VALUE "LegalCopyright", "Copyright © 2006-2014 Bo Haglund / 2014-16 Bo Haglund Soren Hein" + VALUE "LegalCopyright", "Copyright © 2006-2014 Bo Haglund / 2014-18 Bo Haglund Soren Hein" VALUE "OriginalFilename", "dds.dll" VALUE "ProductName", "Bridge double dummy solver" VALUE "ProductVersion", "2.8.4.0" diff --git a/src/dump.cpp b/src/dump.cpp index 3a262467..01233a27 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -312,48 +312,39 @@ int DumpInput( void DumpRetrieved( - const string& fname, + ofstream& fout, const pos& tpos, const nodeCardsType& node, const int target, const int depth) { - ofstream fout; - fout.open(fname, ofstream::out | ofstream::app); - fout << "Retrieved entry\n"; fout << string(15, '-') << "\n"; fout << PosToText(tpos, target, depth) << "\n"; fout << FullNodeToText(node) << "\n"; fout << RankToDiagrams(tpos.rankInSuit, node) << "\n"; - - fout.close(); } void DumpStored( - const string& fname, + ofstream& fout, const pos& tpos, const Moves& moves, const nodeCardsType& node, const int target, const int depth) { - ofstream fout; - fout.open(fname, ofstream::out | ofstream::app); - fout << "Stored entry\n"; fout << string(12, '-') << "\n"; fout << PosToText(tpos, target, depth) << "\n"; fout << NodeToText(node); fout << moves.TrickToText((depth >> 2) + 1) << "\n"; fout << PrintDeal(tpos.rankInSuit, 16); - - fout.close(); } void DumpTopLevel( + ofstream& fout, const ThreadData& thrd, const int tricks, const int lower, @@ -362,15 +353,10 @@ void DumpTopLevel( { const pos& tpos = thrd.lookAheadPos; - ofstream fout; - fout.open(thrd.fnTopLevel, ofstream::out | ofstream::app); - fout << DumpTopHeader(thrd, tricks, lower, upper, printMode) << "\n"; fout << PrintDeal(tpos.rankInSuit, 16); fout << WinnersToText(tpos.winRanks[thrd.iniDepth]) << "\n"; fout << thrd.nodes << " AB nodes, " << thrd.trickNodes << " trick nodes\n\n"; - - fout.close(); } diff --git a/src/dump.h b/src/dump.h index fbb01557..f6a35736 100644 --- a/src/dump.h +++ b/src/dump.h @@ -22,6 +22,7 @@ int DumpInput( const int mode); void DumpTopLevel( + ofstream& fout, const ThreadData& thrd, const int tricks, const int lower, @@ -29,14 +30,14 @@ void DumpTopLevel( const int printMode); void DumpRetrieved( - const string& fname, + ofstream& fout, const pos& tpos, const nodeCardsType& node, const int target, const int depth); void DumpStored( - const string& fname, + ofstream& fout, const pos& tpos, const Moves& moves, const nodeCardsType& node, From 144f1c740c741b791fa1e5cbd6c69216bf681883 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Fri, 30 Mar 2018 10:58:31 +0200 Subject: [PATCH 091/132] More cleanup --- src/ABsearch.cpp | 2 +- src/ABstats.cpp | 53 +++++++++++++++++----------------------------- src/ABstats.h | 39 ++++++++++++++++------------------ src/Init.cpp | 15 +++++-------- src/Memory.h | 3 +++ src/TimerGroup.cpp | 10 ++++----- src/TimerGroup.h | 2 +- src/TimerList.cpp | 8 ------- src/TimerList.h | 4 ---- 9 files changed, 52 insertions(+), 84 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index f74eaf1c..4a27fbef 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -147,7 +147,7 @@ bool ABsearch( AB_COUNT(AB_MOVE_LOOP, value, depth); #ifdef DDS_AB_STATS - thrp->ABStats.PrintStats(); + thrp->ABStats.PrintStats(thrp->fileABstats.GetStream()); #endif return value; diff --git a/src/ABstats.cpp b/src/ABstats.cpp index 854914ed..f45ec888 100644 --- a/src/ABstats.cpp +++ b/src/ABstats.cpp @@ -14,18 +14,13 @@ #include -#include "dds.h" #include "ABstats.h" ABstats::ABstats() { - fname = ""; - - for (int p = 0; p < DDS_AB_POS; p++) - name[p] = "Position " + to_string(p); - ABstats::Reset(); + ABstats::SetNames(); } @@ -51,7 +46,7 @@ void ABstats::Reset() ABsides[side].sumWeighted = 0; } - for (int place = 0; place < DDS_AB_POS; place++) + for (int place = 0; place < AB_SIZE; place++) { for (int depth = 0; depth < DDS_MAXDEPTH; depth++) ABplaces[place].list[depth] = 0; @@ -73,7 +68,7 @@ void ABstats::ResetCum() ABsides[side].sumCumWeighted = 0; } - for (int place = 0; place < DDS_AB_POS; place++) + for (int place = 0; place < AB_SIZE; place++) { ABplaces[place].sumCum = 0; ABplaces[place].sumCumWeighted = 0; @@ -81,30 +76,25 @@ void ABstats::ResetCum() } -void ABstats::SetFile(const string& fnameIn) +void ABstats::SetNames() { - fname = fnameIn; - remove(fname.c_str()); // May fail -- that's OK -} - - -void ABstats::SetName( - const int no, - const string& nameIn) -{ - if (no < 0 || no >= DDS_AB_POS) - return; - - name[no] = nameIn; + name[AB_TARGET_REACHED] = "Target decided"; + name[AB_DEPTH_ZERO] = "depth == 0"; + name[AB_QUICKTRICKS] = "QuickTricks"; + name[AB_QUICKTRICKS_2ND] = "QuickTricks 2nd"; + name[AB_LATERTRICKS] = "LaterTricks"; + name[AB_MAIN_LOOKUP] = "Main lookup"; + name[AB_SIDE_LOOKUP] = "Other lookup"; + name[AB_MOVE_LOOP] = "Move trial"; } void ABstats::IncrPos( - const int no, + const ABCountType no, const bool side, const int depth) { - if (no < 0 || no >= DDS_AB_POS) + if (no < 0 || no >= AB_SIZE) return; ABplaces[no].list[depth]++; @@ -271,7 +261,7 @@ void ABstats::PrintHeaderDetail(ofstream& fout) const { fout << " d" << setw(7) << "Side1" << setw(7) << "Side0"; - for (int p = 0; p < DDS_AB_POS; p++) + for (int p = 0; p < AB_SIZE; p++) fout << setw(6) << p; fout << "\n" << string(65, '-') << "\n"; @@ -289,7 +279,7 @@ void ABstats::PrintStatsDetail( setw(7) << ABsides[1].list[depth] << setw(7) << ABsides[0].list[depth]; - for (int p = 0; p < DDS_AB_POS; p++) + for (int p = 0; p < AB_SIZE; p++) fout << setw(6) << ABplaces[p].list[depth]; fout << "\n"; } @@ -303,17 +293,14 @@ void ABstats::PrintSumDetail(ofstream& fout) const setw(7) << ABsides[1].sum << setw(7) << ABsides[0].sum; - for (int p = 0; p < DDS_AB_POS; p++) + for (int p = 0; p < AB_SIZE; p++) fout << setw(6) << ABplaces[p].sum; fout << "\n\n"; } -void ABstats::PrintStats() +void ABstats::PrintStats(ofstream& fout) { - ofstream fout; - fout.open(fname, ofstream::out | ofstream::app); - ABtracker ABsidesSum; ABsidesSum.sum = ABsides[1].sum + ABsides[0].sum; ABsidesSum.sumCum = ABsides[1].sumCum + ABsides[0].sumCum; @@ -328,7 +315,7 @@ void ABstats::PrintStats() ABstats::PrintStatsPosition(fout, -1, "Side0", ABsides[0], ABsidesSum); fout << "\n"; - for (int p = 0; p < DDS_AB_POS; p++) + for (int p = 0; p < AB_SIZE; p++) ABstats::PrintStatsPosition(fout, p, name[p], ABplaces[p], ABsidesSum); fout << "\n"; } @@ -361,7 +348,5 @@ void ABstats::PrintStats() ABstats::PrintSumDetail(fout); #endif - - fout.close(); } diff --git a/src/ABstats.h b/src/ABstats.h index ef518032..3312d410 100644 --- a/src/ABstats.h +++ b/src/ABstats.h @@ -31,16 +31,18 @@ using namespace std; #endif -#define AB_TARGET_REACHED 0 -#define AB_DEPTH_ZERO 1 -#define AB_QUICKTRICKS 2 -#define AB_QUICKTRICKS_2ND 3 -#define AB_LATERTRICKS 4 -#define AB_MAIN_LOOKUP 5 -#define AB_SIDE_LOOKUP 6 -#define AB_MOVE_LOOP 7 - -#define DDS_AB_POS 8 +enum ABCountType +{ + AB_TARGET_REACHED = 0, + AB_DEPTH_ZERO = 1, + AB_QUICKTRICKS = 2, + AB_QUICKTRICKS_2ND = 3, + AB_LATERTRICKS = 4, + AB_MAIN_LOOKUP = 5, + AB_SIDE_LOOKUP = 6, + AB_MOVE_LOOP = 7, + AB_SIZE = 8 +}; #define DDS_MAXDEPTH 49 @@ -59,8 +61,7 @@ class ABstats { private: - string fname; - string name[DDS_AB_POS]; + string name[AB_SIZE]; // A node arises when a new move is generated. // Not every move leads to an AB termination. @@ -69,7 +70,9 @@ class ABstats // AB terminations are tracked by side and position. ABtracker ABsides[2]; - ABtracker ABplaces[DDS_AB_POS]; + ABtracker ABplaces[AB_SIZE]; + + void SetNames(); void PrintHeaderPosition(ofstream& fout) const; @@ -109,14 +112,8 @@ class ABstats void ResetCum(); - void SetFile(const string& fnameIn); - - void SetName( - const int no, - const string& nameIn); - void IncrPos( - const int no, + const ABCountType no, const bool side, const int depth); @@ -124,7 +121,7 @@ class ABstats int GetNodes() const; - void PrintStats(); + void PrintStats(ofstream& fout); }; #endif diff --git a/src/Init.cpp b/src/Init.cpp index cecaabe9..1464197c 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -361,16 +361,7 @@ void InitDebugFiles() #endif #ifdef DDS_AB_STATS - thrp->ABStats.SetFile(DDS_AB_STATS_PREFIX + send); - thrp->ABStats.SetName(AB_TARGET_REACHED, "Target decided"); - thrp->ABStats.SetName(AB_DEPTH_ZERO , "depth == 0"); - thrp->ABStats.SetName(AB_QUICKTRICKS, "QuickTricks"); - thrp->ABStats.SetName(AB_QUICKTRICKS_2ND, - "QuickTricks 2nd"); - thrp->ABStats.SetName(AB_LATERTRICKS, "LaterTricks"); - thrp->ABStats.SetName(AB_MAIN_LOOKUP, "Main lookup"); - thrp->ABStats.SetName(AB_SIDE_LOOKUP, "Other lookup"); - thrp->ABStats.SetName(AB_MOVE_LOOP, "Move trial"); + thrp->fileABstats.SetName(DDS_AB_STATS_PREFIX + send); #endif #ifdef DDS_AB_HITS @@ -412,6 +403,10 @@ void CloseDebugFiles() thrp->fileTopLevel.Close(); #endif +#ifdef DDS_AB_STATS + thrp->fileABstats.Close(); +#endif + #ifdef DDS_AB_HITS thrp->fileRetrieved.Close(); thrp->fileStored.Close(); diff --git a/src/Memory.h b/src/Memory.h index 2df554ee..dd7cc35d 100644 --- a/src/Memory.h +++ b/src/Memory.h @@ -91,6 +91,9 @@ struct ThreadData File fileStored; #endif +#ifdef DDS_AB_STATS + File fileABstats; +#endif }; diff --git a/src/TimerGroup.cpp b/src/TimerGroup.cpp index 8705ac7d..dbc7a4f4 100644 --- a/src/TimerGroup.cpp +++ b/src/TimerGroup.cpp @@ -35,15 +35,15 @@ void TimerGroup::Reset() } -void TimerGroup::SetNames(const string& s) +void TimerGroup::SetNames(const string& baseName) { string st; - if (s == "AB") + if (baseName == "AB") { // Special format emphasizing the card number within the trick. for (unsigned i = 0; i < timers.size(); i++) { - st = s + to_string(i % 4) + " " + to_string(i); + st = baseName + to_string(i % 4) + " " + to_string(i); timers[i].SetName(st); } } @@ -51,11 +51,11 @@ void TimerGroup::SetNames(const string& s) { for (unsigned i = 0; i < timers.size(); i++) { - st = s + to_string(i); + st = baseName + to_string(i); timers[i].SetName(st); } } - bname = s; + bname = baseName; } diff --git a/src/TimerGroup.h b/src/TimerGroup.h index 6356a510..ef94c45b 100644 --- a/src/TimerGroup.h +++ b/src/TimerGroup.h @@ -33,7 +33,7 @@ class TimerGroup void Reset(); - void SetNames(const string& s); + void SetNames(const string& baseName); void Start(const unsigned no); diff --git a/src/TimerList.cpp b/src/TimerList.cpp index 2e119b09..1722ff57 100644 --- a/src/TimerList.cpp +++ b/src/TimerList.cpp @@ -31,8 +31,6 @@ TimerList::~TimerList() void TimerList::Reset() { - fname = ""; - timerGroups.resize(TIMER_NO_SIZE); timerGroups[TIMER_NO_AB].SetNames("AB"); @@ -48,12 +46,6 @@ void TimerList::Reset() } -void TimerList::SetFile(const string& fnameIn) -{ - fname = fnameIn; -} - - void TimerList::Start( const ABTimerType groupno, const unsigned timerno) diff --git a/src/TimerList.h b/src/TimerList.h index eef41f57..6838d4a3 100644 --- a/src/TimerList.h +++ b/src/TimerList.h @@ -82,8 +82,6 @@ class TimerList { private: - string fname; - vector timerGroups; public: @@ -93,8 +91,6 @@ class TimerList void Reset(); - void SetFile(const string& fnameIn); - void Start( const ABTimerType groupno, const unsigned timerno); From d7c267e253c796e761685007b6db3bfc518ff6c2 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Fri, 30 Mar 2018 11:03:02 +0200 Subject: [PATCH 092/132] Moved macros from debug to Scheduler --- src/Scheduler.h | 13 ++++++++++++- src/debug.h | 16 ---------------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/Scheduler.h b/src/Scheduler.h index 47ba5c2c..97a71291 100644 --- a/src/Scheduler.h +++ b/src/Scheduler.h @@ -18,9 +18,20 @@ using namespace std; - #define HASH_MAX 200 +#ifdef DDS_SCHEDULER + #define START_BLOCK_TIMER scheduler.StartBlockTimer() + #define END_BLOCK_TIMER scheduler.EndBlockTimer() + #define START_THREAD_TIMER(a) scheduler.StartThreadTimer(a) + #define END_THREAD_TIMER(a) scheduler.EndThreadTimer(a) +#else + #define START_BLOCK_TIMER 1 + #define END_BLOCK_TIMER 1 + #define START_THREAD_TIMER(a) 1 + #define END_THREAD_TIMER(a) 1 +#endif + struct schedType { diff --git a/src/debug.h b/src/debug.h index 9536676a..929575b3 100644 --- a/src/debug.h +++ b/src/debug.h @@ -131,24 +131,8 @@ // #define DDS_MEMORY_LEAKS -// Maximum number of characters in a debug file name. -#define DDS_FNAME_LEN 20 - #define COUNTER_SLOTS 200 extern long long counter[COUNTER_SLOTS]; - -#ifdef DDS_SCHEDULER - #define START_BLOCK_TIMER scheduler.StartBlockTimer() - #define END_BLOCK_TIMER scheduler.EndBlockTimer() - #define START_THREAD_TIMER(a) scheduler.StartThreadTimer(a) - #define END_THREAD_TIMER(a) scheduler.EndThreadTimer(a) -#else - #define START_BLOCK_TIMER 1 - #define END_BLOCK_TIMER 1 - #define START_THREAD_TIMER(a) 1 - #define END_THREAD_TIMER(a) 1 -#endif - #endif From 8020024baaa94fae0ceed0621cb7cfd076fd89d5 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Fri, 30 Mar 2018 11:17:16 +0200 Subject: [PATCH 093/132] More cleanup --- src/CalcTables.cpp | 4 ++-- src/CalcTables.h | 2 +- src/PlayAnalyser.cpp | 36 ++++++++++++++++-------------------- src/PlayAnalyser.h | 8 +++++++- src/SolveBoard.cpp | 8 ++++---- src/SolveBoard.h | 2 +- src/System.cpp | 6 +++--- src/System.h | 2 +- 8 files changed, 35 insertions(+), 33 deletions(-) diff --git a/src/CalcTables.cpp b/src/CalcTables.cpp index 0f6be36f..26b1e9f5 100644 --- a/src/CalcTables.cpp +++ b/src/CalcTables.cpp @@ -348,12 +348,12 @@ int STDCALL CalcDDtablePBN( void DetectCalcDuplicates( - boards const * bop, + const boards& bds, vector& uniques, vector& crossrefs) { // Could save a little bit of time with a dedicated checker that // only looks at the cards. - return DetectSolveDuplicates(bop, uniques, crossrefs); + return DetectSolveDuplicates(bds, uniques, crossrefs); } diff --git a/src/CalcTables.h b/src/CalcTables.h index 88384d47..084bad6b 100644 --- a/src/CalcTables.h +++ b/src/CalcTables.h @@ -26,7 +26,7 @@ void CalcChunkCommon( const int thrId); void DetectCalcDuplicates( - boards const * bop, + const boards& bds, vector& uniques, vector& crossrefs); diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 9f339d70..a034392d 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -7,12 +7,10 @@ See LICENSE and README. */ -#include -#include -#include -#include +// #include +// #include +// #include -#include "dds.h" #include "SolverIF.h" #include "System.h" #include "Memory.h" @@ -55,7 +53,7 @@ int STDCALL AnalysePlayBin( if (! sysdep.ThreadOK(thrId)) return RETURN_THREAD_INDEX; - struct ThreadData * thrp = memory.GetPtr(static_cast(thrId)); + ThreadData * thrp = memory.GetPtr(static_cast(thrId)); moveType move; futureTricks fut; @@ -368,22 +366,20 @@ int STDCALL AnalyseAllPlaysPBN( for (int k = 0; k < bopPBN->noOfBoards; k++) { - deal * dl; - dealPBN * dlp; + deal& dl = bd.deals[k]; + dealPBN& dlp = bopPBN->deals[k]; - dl = &(bd.deals[k]); - dlp = &(bopPBN->deals[k]); - if (ConvertFromPBN(dlp->remainCards, - dl->remainCards) != RETURN_NO_FAULT) + if (ConvertFromPBN(dlp.remainCards, + dl.remainCards) != RETURN_NO_FAULT) return RETURN_PBN_FAULT; - dl->trump = dlp->trump; - dl->first = dlp->first; + dl.trump = dlp.trump; + dl.first = dlp.first; for (int i = 0; i <= 2; i++) { - dl->currentTrickSuit[i] = dlp->currentTrickSuit[i]; - dl->currentTrickRank[i] = dlp->currentTrickRank[i]; + dl.currentTrickSuit[i] = dlp.currentTrickSuit[i]; + dl.currentTrickRank[i] = dlp.currentTrickRank[i]; } } @@ -402,7 +398,7 @@ int STDCALL AnalyseAllPlaysPBN( void DetectPlayDuplicates( - boards const * bop, + const boards& bds, vector& uniques, vector& crossrefs) { @@ -411,9 +407,9 @@ void DetectPlayDuplicates( // as it is highly unlikely that the play went identically at // two tables. - uniques.resize(bop->noOfBoards); - crossrefs.resize(bop->noOfBoards); - for (unsigned i = 0; i < static_cast(bop->noOfBoards); i++) + uniques.resize(bds.noOfBoards); + crossrefs.resize(bds.noOfBoards); + for (unsigned i = 0; i < uniques.size(); i++) { uniques[i] = i; crossrefs[i] = -1; diff --git a/src/PlayAnalyser.h b/src/PlayAnalyser.h index b11e20ed..7b860e49 100644 --- a/src/PlayAnalyser.h +++ b/src/PlayAnalyser.h @@ -10,6 +10,12 @@ #ifndef DDS_PLAYANALYSER_H #define DDS_PLAYANALYSER_H +#include + +#include "dds.h" + +using namespace std; + void PlaySingleCommon( const int thrId, @@ -19,7 +25,7 @@ void PlayChunkCommon( const int thrId); void DetectPlayDuplicates( - boards const * bop, + const boards& bds, vector& uniques, vector& crossrefs); diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 1666a88b..1ad8c780 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -241,14 +241,14 @@ int STDCALL SolveAllChunksBin( void DetectSolveDuplicates( - boards const * bop, + const boards& bds, vector& uniques, vector& crossrefs) { uniques.clear(); - crossrefs.resize(bop->noOfBoards); + crossrefs.resize(bds.noOfBoards); - const unsigned nu = static_cast(bop->noOfBoards); + const unsigned nu = static_cast(bds.noOfBoards); for (unsigned i = 0; i < nu; i++) crossrefs[i] = -1; @@ -261,7 +261,7 @@ void DetectSolveDuplicates( for (unsigned index = i+1; index < nu; index++) { - if (SameBoard(bop, i, index)) + if (SameBoard(&bds, i, index)) crossrefs[index] = i; } } diff --git a/src/SolveBoard.h b/src/SolveBoard.h index 843a9c1b..aeabc83b 100644 --- a/src/SolveBoard.h +++ b/src/SolveBoard.h @@ -32,7 +32,7 @@ int SolveAllBoardsN( solvedBoards * solvedp); void DetectSolveDuplicates( - boards const * bop, + const boards& bds, vector& uniques, vector& crossrefs); diff --git a/src/System.cpp b/src/System.cpp index c13ae424..b9676145 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -461,7 +461,7 @@ int System::RunThreadsSTL() vector uniques; vector crossrefs; - (* CallbackDuplList[runCat])(bop, uniques, crossrefs); + (* CallbackDuplList[runCat])(* bop, uniques, crossrefs); // TODO Remove // int numGroups = scheduler.NumGroups(); @@ -496,7 +496,7 @@ int System::RunThreadsSTLIMPL() #ifdef DDS_THREADS_STLIMPL vector uniques; vector crossrefs; - (* CallbackDuplList[runCat])(bop, uniques, crossrefs); + (* CallbackDuplList[runCat])(* bop, uniques, crossrefs); // TODO Remove // int numGroups = scheduler.NumGroups(); @@ -568,7 +568,7 @@ int System::RunThreadsPPLIMPL() #ifdef DDS_THREADS_PPLIMPL vector uniques; vector crossrefs; - (* CallbackDuplList[runCat])(bop, uniques, crossrefs); + (* CallbackDuplList[runCat])(* bop, uniques, crossrefs); atomic thrIdNext = 0; thread_local int thrId = -1; diff --git a/src/System.h b/src/System.h index 50388c03..40aabcde 100644 --- a/src/System.h +++ b/src/System.h @@ -23,7 +23,7 @@ using namespace std; typedef void (*fptrType)(const int thid); typedef void (*fduplType)( - boards const * bop, vector& uniques, vector& crossrefs); + const boards& bds, vector& uniques, vector& crossrefs); typedef void (*fsingleType)(const int thid, const int bno); typedef void (*fcopyType)(const vector& crossrefs); From f7c4340878f50f07f56382d372e846c9f3976fe7 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Fri, 30 Mar 2018 11:40:38 +0200 Subject: [PATCH 094/132] Cleanup --- src/ABsearch.cpp | 8 +- src/ABsearch.h | 28 +++--- src/Memory.h | 10 +- src/PBN.cpp | 29 +++--- src/PBN.h | 6 +- src/PlayAnalyser.cpp | 9 +- src/QuickTricks.cpp | 222 +++++++++++++++++++++---------------------- src/QuickTricks.h | 8 +- src/TransTable.h | 44 ++++----- src/dds.h | 10 +- 10 files changed, 183 insertions(+), 191 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index 4a27fbef..28e5309e 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -247,8 +247,8 @@ bool ABsearch0( bool res; TIMER_START(TIMER_NO_QT, depth); - int qtricks = QuickTricks(posPoint, hand, depth, target, - trump, res, thrp); + int qtricks = QuickTricks(* posPoint, hand, depth, target, + trump, res, * thrp); TIMER_END(TIMER_NO_QT, depth); if (thrp->nodeTypeStore[hand] == MAXNODE) @@ -472,8 +472,8 @@ bool ABsearch1( #endif TIMER_START(TIMER_NO_QT, depth); - int res = QuickTricksSecondHand(posPoint, hand, depth, target, - trump, thrp); + int res = QuickTricksSecondHand(* posPoint, hand, depth, target, + trump, * thrp); TIMER_END(TIMER_NO_QT, depth); if (res) { diff --git a/src/ABsearch.h b/src/ABsearch.h index ae5fcf7b..08f41074 100644 --- a/src/ABsearch.h +++ b/src/ABsearch.h @@ -15,52 +15,52 @@ bool ABsearch( - struct pos * posPoint, + pos * posPoint, const int target, const int depth, - struct ThreadData * thrp); + ThreadData * thrp); bool ABsearch0( - struct pos * posPoint, + pos * posPoint, const int target, const int depth, - struct ThreadData * thrp); + ThreadData * thrp); bool ABsearch1( - struct pos * posPoint, + pos * posPoint, const int target, const int depth, - struct ThreadData * thrp); + ThreadData * thrp); bool ABsearch2( - struct pos * posPoint, + pos * posPoint, const int target, const int depth, - struct ThreadData * thrp); + ThreadData * thrp); bool ABsearch3( - struct pos * posPoint, + pos * posPoint, const int target, const int depth, - struct ThreadData * thrp); + ThreadData * thrp); void Make0( - struct pos * posPoint, + pos * posPoint, const int depth, moveType const * mply); void Make1( - struct pos * posPoint, + pos * posPoint, const int depth, moveType const * mply); void Make2( - struct pos * posPoint, + pos * posPoint, const int depth, moveType const * mply); void Make3( - struct pos * posPoint, + pos * posPoint, unsigned short int trickCards[DDS_SUITS], const int depth, moveType const * mply, diff --git a/src/Memory.h b/src/Memory.h index dd7cc35d..3565fe82 100644 --- a/src/Memory.h +++ b/src/Memory.h @@ -53,13 +53,13 @@ struct ThreadData unsigned short int suit[DDS_HANDS][DDS_SUITS]; int trump; - struct pos lookAheadPos; // Recursive alpha-beta data + pos lookAheadPos; // Recursive alpha-beta data bool analysisFlag; unsigned short int lowestWin[50][DDS_SUITS]; WinnersType winners[13]; - struct moveType forbiddenMoves[14]; - struct moveType bestMove[50]; - struct moveType bestMoveTT[50]; + moveType forbiddenMoves[14]; + moveType bestMove[50]; + moveType bestMoveTT[50]; double memUsed; int nodes; @@ -67,7 +67,7 @@ struct ThreadData // Constant for a given hand. // 960 KB - struct relRanksType rel[8192]; + relRanksType rel[8192]; TransTable transTable; diff --git a/src/PBN.cpp b/src/PBN.cpp index b2dc9b5b..3a68688c 100644 --- a/src/PBN.cpp +++ b/src/PBN.cpp @@ -120,23 +120,18 @@ int IsCard(const char cardChar) case '9': return 9; case 'T': - return 10; - case 'J': - return 11; - case 'Q': - return 12; - case 'K': - return 13; - case 'A': - return 14; case 't': return 10; + case 'J': case 'j': return 11; + case 'Q': case 'q': return 12; + case 'K': case 'k': return 13; + case 'A': case 'a': return 14; default: @@ -146,19 +141,19 @@ int IsCard(const char cardChar) int ConvertPlayFromPBN( - playTracePBN const * playPBN, - playTraceBin * playBin) + const playTracePBN& playPBN, + playTraceBin& playBin) { - int n = playPBN->number; + const int n = playPBN.number; if (n < 0 || n > 52) return RETURN_PLAY_FAULT; - playBin->number = n; + playBin.number = n; for (int i = 0; i < 2 * n; i += 2) { - char suit = playPBN->cards[i]; + char suit = playPBN.cards[i]; int s; if (suit == 's' || suit == 'S') @@ -171,13 +166,13 @@ int ConvertPlayFromPBN( s = 3; else return RETURN_PLAY_FAULT; - playBin->suit[i >> 1] = s; + playBin.suit[i >> 1] = s; - int rank = IsCard(playPBN->cards[i + 1]); + int rank = IsCard(playPBN.cards[i+1]); if (rank == 0) return RETURN_PLAY_FAULT; - playBin->rank[i >> 1] = rank; + playBin.rank[i >> 1] = rank; } return RETURN_NO_FAULT; } diff --git a/src/PBN.h b/src/PBN.h index c9bd1ff5..543784ec 100644 --- a/src/PBN.h +++ b/src/PBN.h @@ -10,13 +10,15 @@ #ifndef DDS_PBN_H #define DDS_PBN_H +#include "../include/dll.h" + int ConvertFromPBN( char const * dealBuff, unsigned int remainCards[DDS_HANDS][DDS_SUITS]); int ConvertPlayFromPBN( - playTracePBN const * playPBN, - playTraceBin * playBin); + const playTracePBN& playPBN, + playTraceBin& playBin); #endif diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index a034392d..67f2c56f 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -7,10 +7,6 @@ See LICENSE and README. */ -// #include -// #include -// #include - #include "SolverIF.h" #include "System.h" #include "Memory.h" @@ -261,8 +257,7 @@ int STDCALL AnalysePlayPBN( dl.currentTrickRank[i] = dlPBN.currentTrickRank[i]; } - if (ConvertPlayFromPBN(&playPBN, &play) != - RETURN_NO_FAULT) + if (ConvertPlayFromPBN(playPBN, play) != RETURN_NO_FAULT) return RETURN_PLAY_FAULT; return AnalysePlayBin(dl, play, solvedp, thrId); @@ -387,7 +382,7 @@ int STDCALL AnalyseAllPlaysPBN( for (int k = 0; k < plpPBN->noOfBoards; k++) { - if (ConvertPlayFromPBN(&plpPBN->plays[k], &pl.plays[k]) != + if (ConvertPlayFromPBN(plpPBN->plays[k], pl.plays[k]) != RETURN_NO_FAULT) return RETURN_PLAY_FAULT; } diff --git a/src/QuickTricks.cpp b/src/QuickTricks.cpp index 37453b39..04879e3e 100644 --- a/src/QuickTricks.cpp +++ b/src/QuickTricks.cpp @@ -13,7 +13,7 @@ int QtricksLeadHandNT( const int hand, - pos * posPoint, + pos& tpos, const int cutoff, const int depth, const int countLho, @@ -31,7 +31,7 @@ int QtricksLeadHandNT( int QtricksLeadHandTrump( const int hand, - pos * posPoint, + pos& tpos, const int cutoff, const int depth, const int countLho, @@ -46,7 +46,7 @@ int QtricksLeadHandTrump( int QuickTricksPartnerHandTrump( const int hand, - pos * posPoint, + pos& tpos, const int cutoff, const int depth, const int countLho, @@ -60,11 +60,11 @@ int QuickTricksPartnerHandTrump( const int commSuit, const int commRank, int& res, - ThreadData const * thrp); + const ThreadData& thrd); int QuickTricksPartnerHandNT( const int hand, - pos * posPoint, + pos& tpos, const int cutoff, const int depth, const int countLho, @@ -76,17 +76,17 @@ int QuickTricksPartnerHandNT( const int commSuit, const int commRank, int& res, - ThreadData const * thrp); + const ThreadData& thrd); int QuickTricks( - pos * posPoint, + pos& tpos, const int hand, const int depth, const int target, const int trump, bool& result, - ThreadData const * thrp) + const ThreadData& thrd) { int suit, commRank = 0, commSuit = -1; int res; @@ -96,15 +96,15 @@ int QuickTricks( result = true; int qtricks = 0; - if (thrp->nodeTypeStore[hand] == MAXNODE) - cutoff = target - posPoint->tricksMAX; + if (thrd.nodeTypeStore[hand] == MAXNODE) + cutoff = target - tpos.tricksMAX; else - cutoff = posPoint->tricksMAX - target + (depth >> 2) + 2; + cutoff = tpos.tricksMAX - target + (depth >> 2) + 2; bool commPartner = false; - const unsigned short (* ris)[DDS_SUITS] = posPoint->rankInSuit; - const unsigned char (* len)[DDS_SUITS] = posPoint->length; - highCardType const * winner = posPoint->winner; + const unsigned short (* ris)[DDS_SUITS] = tpos.rankInSuit; + const unsigned char (* len)[DDS_SUITS] = tpos.length; + highCardType const * winner = tpos.winner; for (int s = 0; s < DDS_SUITS; s++) { @@ -126,7 +126,7 @@ int QuickTricks( break; } } - else if ((posPoint->secondBest[s].hand == partner[hand]) && + else if ((tpos.secondBest[s].hand == partner[hand]) && (winner[s].hand == hand) && (len[hand][s] >= 2) && (len[partner[hand]][s] >= 2)) @@ -139,7 +139,7 @@ int QuickTricks( { commPartner = true; commSuit = s; - commRank = posPoint->secondBest[s].rank; + commRank = tpos.secondBest[s].rank; break; } } @@ -157,7 +157,7 @@ int QuickTricks( break; } } - else if ((posPoint->secondBest[s].hand == partner[hand]) && + else if ((tpos.secondBest[s].hand == partner[hand]) && (winner[s].hand == hand) && (len[hand][s] >= 2) && (len[partner[hand]][s] >= 2)) @@ -165,7 +165,7 @@ int QuickTricks( /* Can cross to partner's card: Type Kx opposite Ax */ commPartner = true; commSuit = s; - commRank = posPoint->secondBest[s].rank; + commRank = tpos.secondBest[s].rank; break; } } @@ -319,7 +319,7 @@ int QuickTricks( if ((lhoTrumpRanks == 0) && (rhoTrumpRanks == 0)) { qtricks += countPart; - posPoint->winRanks[depth][commSuit] |= + tpos.winRanks[depth][commSuit] |= bitMapRank[commRank]; if (qtricks >= cutoff) @@ -341,7 +341,7 @@ int QuickTricks( else { qtricks += countPart; - posPoint->winRanks[depth][commSuit] |= + tpos.winRanks[depth][commSuit] |= bitMapRank[commRank]; if (qtricks >= cutoff) @@ -382,7 +382,7 @@ int QuickTricks( } if (sum >= cutoff) { - posPoint->winRanks[depth][commSuit] |= + tpos.winRanks[depth][commSuit] |= bitMapRank[commRank]; return sum; } @@ -429,7 +429,7 @@ int QuickTricks( { if ((trump != DDS_NOTRUMP) && (trump != suit)) { - qtricks = QtricksLeadHandTrump(hand, posPoint, cutoff, depth, + qtricks = QtricksLeadHandTrump(hand, tpos, cutoff, depth, countLho, countRho, lhoTrumpRanks, rhoTrumpRanks, countOwn, countPart, suit, qtricks, res); @@ -445,7 +445,7 @@ int QuickTricks( } else { - qtricks = QtricksLeadHandNT(hand, posPoint, cutoff, depth, + qtricks = QtricksLeadHandNT(hand, tpos, cutoff, depth, countLho, countRho, lhoTrumpRanks, rhoTrumpRanks, commPartner, commSuit, countOwn, countPart, suit, qtricks, trump, res); @@ -481,10 +481,10 @@ int QuickTricks( /* There is communication with the partner */ if ((trump != DDS_NOTRUMP) && (trump != suit)) { - qtricks = QuickTricksPartnerHandTrump(hand, posPoint, + qtricks = QuickTricksPartnerHandTrump(hand, tpos, cutoff, depth, countLho, countRho, lhoTrumpRanks, rhoTrumpRanks, countOwn, - countPart, suit, qtricks, commSuit, commRank, res, thrp); + countPart, suit, qtricks, commSuit, commRank, res, thrd); if (res == 1) return qtricks; @@ -498,9 +498,9 @@ int QuickTricks( } else { - qtricks = QuickTricksPartnerHandNT(hand, posPoint, cutoff, + qtricks = QuickTricksPartnerHandNT(hand, tpos, cutoff, depth, countLho, countRho, countOwn, countPart, - suit, qtricks, commSuit, commRank, res, thrp); + suit, qtricks, commSuit, commRank, res, thrd); if (res == 1) return qtricks; @@ -553,7 +553,7 @@ int QuickTricks( int rr = highestRank[ris[partner[hand]][trump]]; if (rr != 0) { - posPoint->winRanks[depth][trump] |= bitMapRank[rr]; + tpos.winRanks[depth][trump] |= bitMapRank[rr]; if (1 >= cutoff) return 1; } @@ -573,7 +573,7 @@ int QuickTricks( { if ((ris[partner[hand]][trump] & bitMapRank[rr]) != 0) { - posPoint->winRanks[depth][trump] |= bitMapRank[rr]; + tpos.winRanks[depth][trump] |= bitMapRank[rr]; break; } } @@ -595,7 +595,7 @@ int QuickTricks( { if ((ris[partner[hand]][trump] & bitMapRank[rr]) != 0) { - posPoint->winRanks[depth][trump] |= bitMapRank[rr]; + tpos.winRanks[depth][trump] |= bitMapRank[rr]; break; } } @@ -639,15 +639,15 @@ int QuickTricks( continue; if (len[hand][ss] > 0) { - posPoint->winRanks[depth][ss] = bitMapRank[winner[ss].rank]; + tpos.winRanks[depth][ss] = bitMapRank[winner[ss].rank]; } } - if (thrp->nodeTypeStore[hand] != MAXNODE) - cutoff = target - posPoint->tricksMAX; + if (thrd.nodeTypeStore[hand] != MAXNODE) + cutoff = target - tpos.tricksMAX; else { - cutoff = posPoint->tricksMAX - target + (depth >> 2) + 2; + cutoff = tpos.tricksMAX - target + (depth >> 2) + 2; } if (1 >= cutoff) @@ -662,7 +662,7 @@ int QuickTricks( int QtricksLeadHandTrump( const int hand, - pos * posPoint, + pos& tpos, const int cutoff, const int depth, const int countLho, @@ -685,8 +685,8 @@ int QtricksLeadHandTrump( (lhoTrumpRanks == 0)) && ((countRho != 0) || (rhoTrumpRanks == 0))) { - posPoint->winRanks[depth][suit] |= - bitMapRank[posPoint->winner[suit].rank]; + tpos.winRanks[depth][suit] |= + bitMapRank[tpos.winner[suit].rank]; qt++; if (qt >= cutoff) return qt; @@ -705,12 +705,12 @@ int QtricksLeadHandTrump( } } - if (posPoint->secondBest[suit].hand == hand) + if (tpos.secondBest[suit].hand == hand) { if ((lhoTrumpRanks == 0) && (rhoTrumpRanks == 0)) { - posPoint->winRanks[depth][suit] |= - bitMapRank[posPoint->secondBest[suit].rank]; + tpos.winRanks[depth][suit] |= + bitMapRank[tpos.secondBest[suit].rank]; qt++; if (qt >= cutoff) return qt; @@ -724,15 +724,15 @@ int QtricksLeadHandTrump( } } } - else if ((posPoint->secondBest[suit].hand == partner[hand]) + else if ((tpos.secondBest[suit].hand == partner[hand]) && (countOwn > 1) && (countPart > 1)) { /* Second best at partner and suit length of own hand and partner > 1 */ if ((lhoTrumpRanks == 0) && (rhoTrumpRanks == 0)) { - posPoint->winRanks[depth][suit] |= - bitMapRank[posPoint->secondBest[suit].rank]; + tpos.winRanks[depth][suit] |= + bitMapRank[tpos.secondBest[suit].rank]; qt++; if (qt >= cutoff) return qt; @@ -754,7 +754,7 @@ int QtricksLeadHandTrump( int QtricksLeadHandNT( const int hand, - pos * posPoint, + pos& tpos, const int cutoff, const int depth, const int countLho, @@ -776,8 +776,8 @@ int QtricksLeadHandNT( res = 1; int qt = qtricks; - posPoint->winRanks[depth][suit] |= - bitMapRank[posPoint->winner[suit].rank]; + tpos.winRanks[depth][suit] |= + bitMapRank[tpos.winner[suit].rank]; qt++; if (qt >= cutoff) @@ -797,10 +797,10 @@ int QtricksLeadHandNT( return qt; } - if (posPoint->secondBest[suit].hand == hand) + if (tpos.secondBest[suit].hand == hand) { - posPoint->winRanks[depth][suit] |= - bitMapRank[posPoint->secondBest[suit].rank]; + tpos.winRanks[depth][suit] |= + bitMapRank[tpos.secondBest[suit].rank]; qt++; if (qt >= cutoff) return qt; @@ -818,13 +818,13 @@ int QtricksLeadHandNT( return qt; } } - else if ((posPoint->secondBest[suit].hand == partner[hand]) + else if ((tpos.secondBest[suit].hand == partner[hand]) && (countOwn > 1) && (countPart > 1)) { /* Second best at partner and suit length of own hand and partner > 1 */ - posPoint->winRanks[depth][suit] |= - bitMapRank[posPoint->secondBest[suit].rank]; + tpos.winRanks[depth][suit] |= + bitMapRank[tpos.secondBest[suit].rank]; qt++; if (qt >= cutoff) return qt; @@ -852,7 +852,7 @@ int QtricksLeadHandNT( int QuickTricksPartnerHandTrump( const int hand, - pos * posPoint, + pos& tpos, const int cutoff, const int depth, const int countLho, @@ -866,7 +866,7 @@ int QuickTricksPartnerHandTrump( const int commSuit, const int commRank, int& res, - ThreadData const * thrp) + const ThreadData& thrd) { /* res=0 Continue with same suit. res=1 Cutoff. @@ -877,10 +877,10 @@ int QuickTricksPartnerHandTrump( if (((countLho != 0) || (lhoTrumpRanks == 0)) && ((countRho != 0) || (rhoTrumpRanks == 0))) { - posPoint->winRanks[depth][suit] |= - bitMapRank[posPoint->winner[suit].rank]; + tpos.winRanks[depth][suit] |= + bitMapRank[tpos.winner[suit].rank]; - posPoint->winRanks[depth][commSuit] |= bitMapRank[commRank]; + tpos.winRanks[depth][commSuit] |= bitMapRank[commRank]; qt++; /* A trick can be taken */ if (qt >= cutoff) @@ -899,16 +899,16 @@ int QuickTricksPartnerHandTrump( } } - if (posPoint->secondBest[suit].hand == partner[hand]) + if (tpos.secondBest[suit].hand == partner[hand]) { /* Second best found in partners hand */ if ((lhoTrumpRanks == 0) && (rhoTrumpRanks == 0)) { /* Opponents have no trump */ - posPoint->winRanks[depth][suit] |= - bitMapRank[posPoint->secondBest[suit].rank]; + tpos.winRanks[depth][suit] |= + bitMapRank[tpos.secondBest[suit].rank]; - posPoint->winRanks[depth][commSuit] |= bitMapRank[commRank]; + tpos.winRanks[depth][commSuit] |= bitMapRank[commRank]; qt++; if (qt >= cutoff) return qt; @@ -922,7 +922,7 @@ int QuickTricksPartnerHandTrump( } } } - else if ((posPoint->secondBest[suit].hand == hand) && + else if ((tpos.secondBest[suit].hand == hand) && (countPart > 1) && (countOwn > 1)) { @@ -932,10 +932,10 @@ int QuickTricksPartnerHandTrump( if ((lhoTrumpRanks == 0) && (rhoTrumpRanks == 0)) { /* Opponents have no trump */ - posPoint->winRanks[depth][suit] |= - bitMapRank[posPoint->secondBest[suit].rank]; + tpos.winRanks[depth][suit] |= + bitMapRank[tpos.secondBest[suit].rank]; - posPoint->winRanks[depth][commSuit] |= bitMapRank[commRank]; + tpos.winRanks[depth][commSuit] |= bitMapRank[commRank]; qt++; if (qt >= cutoff) @@ -953,20 +953,20 @@ int QuickTricksPartnerHandTrump( } } else if ((suit == commSuit) && - (posPoint->secondBest[suit].hand == lho[hand]) && + (tpos.secondBest[suit].hand == lho[hand]) && ((countLho >= 2) || (lhoTrumpRanks == 0)) && ((countRho >= 2) || (rhoTrumpRanks == 0))) { unsigned short ranks = 0; for (int h = 0; h < DDS_HANDS; h++) - ranks |= posPoint->rankInSuit[h][suit]; + ranks |= tpos.rankInSuit[h][suit]; - if (thrp->rel[ranks].absRank[3][suit].hand == partner[hand]) + if (thrd.rel[ranks].absRank[3][suit].hand == partner[hand]) { - posPoint->winRanks[depth][suit] |= bitMapRank[ - static_cast(thrp->rel[ranks].absRank[3][suit].rank) ]; + tpos.winRanks[depth][suit] |= bitMapRank[ + static_cast(thrd.rel[ranks].absRank[3][suit].rank) ]; - posPoint->winRanks[depth][commSuit] |= bitMapRank[commRank]; + tpos.winRanks[depth][commSuit] |= bitMapRank[commRank]; qt++; if (qt >= cutoff) @@ -990,7 +990,7 @@ int QuickTricksPartnerHandTrump( int QuickTricksPartnerHandNT( const int hand, - pos * posPoint, + pos& tpos, const int cutoff, const int depth, const int countLho, @@ -1002,15 +1002,15 @@ int QuickTricksPartnerHandNT( const int commSuit, const int commRank, int& res, - ThreadData const * thrp) + const ThreadData& thrd) { res = 1; int qt = qtricks; - posPoint->winRanks[depth][suit] |= - bitMapRank[posPoint->winner[suit].rank]; + tpos.winRanks[depth][suit] |= + bitMapRank[tpos.winner[suit].rank]; - posPoint->winRanks[depth][commSuit] |= bitMapRank[commRank]; + tpos.winRanks[depth][commSuit] |= bitMapRank[commRank]; qt++; if (qt >= cutoff) @@ -1024,11 +1024,11 @@ int QuickTricksPartnerHandNT( return qt; } - if (posPoint->secondBest[suit].hand == partner[hand]) + if (tpos.secondBest[suit].hand == partner[hand]) { /* Second best found in partners hand */ - posPoint->winRanks[depth][suit] |= - bitMapRank[posPoint->secondBest[suit].rank]; + tpos.winRanks[depth][suit] |= + bitMapRank[tpos.secondBest[suit].rank]; qt++; if (qt >= cutoff) @@ -1042,13 +1042,13 @@ int QuickTricksPartnerHandNT( return qt; } } - else if ((posPoint->secondBest[suit].hand == hand) + else if ((tpos.secondBest[suit].hand == hand) && (countPart > 1) && (countOwn > 1)) { /* Second best found in own hand and own and partner's suit length > 1 */ - posPoint->winRanks[depth][suit] |= - bitMapRank[posPoint->secondBest[suit].rank]; + tpos.winRanks[depth][suit] |= + bitMapRank[tpos.secondBest[suit].rank]; qt++; if (qt >= cutoff) @@ -1065,16 +1065,16 @@ int QuickTricksPartnerHandNT( } } else if ((suit == commSuit) && - (posPoint->secondBest[suit].hand == lho[hand])) + (tpos.secondBest[suit].hand == lho[hand])) { unsigned short ranks = 0; for (int h = 0; h < DDS_HANDS; h++) - ranks |= posPoint->rankInSuit[h][suit]; + ranks |= tpos.rankInSuit[h][suit]; - if (thrp->rel[ranks].absRank[3][suit].hand == partner[hand]) + if (thrd.rel[ranks].absRank[3][suit].hand == partner[hand]) { - posPoint->winRanks[depth][suit] |= bitMapRank[ - static_cast(thrp->rel[ranks].absRank[3][suit].rank) ]; + tpos.winRanks[depth][suit] |= bitMapRank[ + static_cast(thrd.rel[ranks].absRank[3][suit].rank) ]; qt++; if (qt >= cutoff) return qt; @@ -1094,23 +1094,23 @@ int QuickTricksPartnerHandNT( bool QuickTricksSecondHand( - pos * posPoint, + pos& tpos, const int hand, const int depth, const int target, const int trump, - ThreadData const * thrp) + const ThreadData& thrd) { - if (depth == thrp->iniDepth) + if (depth == thrd.iniDepth) return false; - int ss = posPoint->move[depth + 1].suit; - unsigned short (*ris)[DDS_SUITS] = posPoint->rankInSuit; + int ss = tpos.move[depth + 1].suit; + unsigned short (*ris)[DDS_SUITS] = tpos.rankInSuit; unsigned short ranks = static_cast (ris[hand][ss] | ris[partner[hand]][ss]); for (int s = 0; s < DDS_SUITS; s++) - posPoint->winRanks[depth][s] = 0; + tpos.winRanks[depth][s] = 0; if ((trump != DDS_NOTRUMP) && (ss != trump) && (((ris[hand][ss] == 0) && (ris[hand][trump] != 0)) || @@ -1124,7 +1124,7 @@ bool QuickTricksSecondHand( /* Own side can ruff, their side can't. */ } - else if (ranks > (bitMapRank[posPoint->move[depth + 1].rank] | + else if (ranks > (bitMapRank[tpos.move[depth + 1].rank] | ris[lho[hand]][ss])) { if ((trump != DDS_NOTRUMP) && (ss != trump) && @@ -1135,7 +1135,7 @@ bool QuickTricksSecondHand( /* Own side has highest card in suit, which LHO can't ruff. */ int rr = highestRank[ranks]; - posPoint->winRanks[depth][ss] = bitMapRank[rr]; + tpos.winRanks[depth][ss] = bitMapRank[rr]; } else { @@ -1146,10 +1146,10 @@ bool QuickTricksSecondHand( int qtricks = 1; int cutoff; - if (thrp->nodeTypeStore[hand] == MAXNODE) - cutoff = target - posPoint->tricksMAX; + if (thrd.nodeTypeStore[hand] == MAXNODE) + cutoff = target - tpos.tricksMAX; else - cutoff = posPoint->tricksMAX - target + (depth >> 2) + 3; + cutoff = tpos.tricksMAX - target + (depth >> 2) + 3; if (qtricks >= cutoff) return true; @@ -1165,13 +1165,13 @@ bool QuickTricksSecondHand( else hh = partner[hand]; - if ((posPoint->winner[ss].hand == hh) && - (posPoint->secondBest[ss].rank != 0) && - (posPoint->secondBest[ss].hand == hh)) + if ((tpos.winner[ss].hand == hh) && + (tpos.secondBest[ss].rank != 0) && + (tpos.secondBest[ss].hand == hh)) { qtricks++; - posPoint->winRanks[depth][ss] |= - bitMapRank[posPoint->secondBest[ss].rank]; + tpos.winRanks[depth][ss] |= + bitMapRank[tpos.secondBest[ss].rank]; if (qtricks >= cutoff) return true; @@ -1179,25 +1179,25 @@ bool QuickTricksSecondHand( for (int s = 0; s < DDS_SUITS; s++) { - if ((s == ss) || (posPoint->length[hh][s] == 0)) + if ((s == ss) || (tpos.length[hh][s] == 0)) continue; - if ((posPoint->length[lho[hh]][s] == 0) && - (posPoint->length[rho[hh]][s] == 0) && - (posPoint->length[partner[hh]][s] == 0)) + if ((tpos.length[lho[hh]][s] == 0) && + (tpos.length[rho[hh]][s] == 0) && + (tpos.length[partner[hh]][s] == 0)) { /* Long other suit which nobody else holds. */ qtricks += counttable[ris[hh][s]]; if (qtricks >= cutoff) return true; } - else if ((posPoint->winner[s].rank != 0) && - (posPoint->winner[s].hand == hh)) + else if ((tpos.winner[s].rank != 0) && + (tpos.winner[s].hand == hh)) { /* Top winners in other suits. */ qtricks++; - posPoint->winRanks[depth][s] |= - bitMapRank[posPoint->winner[s].rank]; + tpos.winRanks[depth][s] |= + bitMapRank[tpos.winner[s].rank]; if (qtricks >= cutoff) return true; diff --git a/src/QuickTricks.h b/src/QuickTricks.h index d3e7b828..4aac0022 100644 --- a/src/QuickTricks.h +++ b/src/QuickTricks.h @@ -15,20 +15,20 @@ int QuickTricks( - pos * posPoint, + pos& tpos, const int hand, const int depth, const int target, const int trump, bool& result, - ThreadData const * thrp); + const ThreadData& thrd); bool QuickTricksSecondHand( - pos * posPoint, + pos& tpos, const int hand, const int depth, const int target, const int trump, - ThreadData const * thrp); + const ThreadData& thrd); #endif diff --git a/src/TransTable.h b/src/TransTable.h index 005580f3..f5b10857 100644 --- a/src/TransTable.h +++ b/src/TransTable.h @@ -82,18 +82,18 @@ class TransTable { int orderSet; int winMask; - struct nodeCardsType * first; - struct winCardType * prevWin; - struct winCardType * nextWin; - struct winCardType * next; + nodeCardsType * first; + winCardType * prevWin; + winCardType * nextWin; + winCardType * next; }; struct posSearchTypeSmall { - struct winCardType * posSearchPoint; + winCardType * posSearchPoint; long long suitLengths; - struct posSearchTypeSmall * left; - struct posSearchTypeSmall * right; + posSearchTypeSmall * left; + posSearchTypeSmall * right; }; struct ttAggrType @@ -183,9 +183,9 @@ class TransTable // Private data for the small memory version. long long aggrLenSets[14]; - struct statsResetsType statsResets; + statsResetsType statsResets; - struct winCardType temp_win[5]; + winCardType temp_win[5]; int nodeSetSizeLimit; int winSetSizeLimit; unsigned long long maxmem; @@ -198,15 +198,15 @@ class TransTable int ncount; bool clearTTflag; int windex; - struct ttAggrType * aggp; - - struct posSearchTypeSmall * rootnp[14][DDS_HANDS]; - struct winCardType ** pw; - struct nodeCardsType ** pn; - struct posSearchTypeSmall ** pl[14][DDS_HANDS]; - struct nodeCardsType * nodeCards; - struct winCardType * winCards; - struct posSearchTypeSmall * posSearch[14][DDS_HANDS]; + ttAggrType * aggp; + + posSearchTypeSmall * rootnp[14][DDS_HANDS]; + winCardType ** pw; + nodeCardsType ** pn; + posSearchTypeSmall ** pl[14][DDS_HANDS]; + nodeCardsType * nodeCards; + winCardType * winCards; + posSearchTypeSmall * posSearch[14][DDS_HANDS]; int nodeSetSize; /* Index with range 0 to nodeSetSizeLimit */ int winSetSize; /* Index with range 0 to winSetSizeLimit */ int lenSetInd[14][DDS_HANDS]; @@ -277,11 +277,11 @@ class TransTable int lbound, char bestMoveSuit, char bestMoveRank, - struct posSearchTypeSmall * nodep, + posSearchTypeSmall * nodep, bool * result); struct posSearchTypeSmall * SearchLenAndInsert( - struct posSearchTypeSmall * rootp, + posSearchTypeSmall * rootp, long long key, bool insertNode, int trick, @@ -293,12 +293,12 @@ class TransTable int lbound, char bestMoveSuit, char bestMoveRank, - struct nodeCardsType * nodep); + nodeCardsType * nodep); struct nodeCardsType * FindSOP( int orderSet[], int limit, - struct winCardType * nodeP, + winCardType * nodeP, int firstHand, bool * lowerFlag); diff --git a/src/dds.h b/src/dds.h index dd9ef973..ee81e7e2 100644 --- a/src/dds.h +++ b/src/dds.h @@ -92,7 +92,7 @@ struct moveType struct movePlyType { - struct moveType move[14]; + moveType move[14]; int current; int last; }; @@ -115,15 +115,15 @@ struct pos /* Cards that win by rank, firstindex is depth. */ int first[50]; /* Hand that leads the trick for each ply */ - struct moveType move[50]; + moveType move[50]; /* Presently winning move */ int handRelFirst; /* The current hand, relative first hand */ int tricksMAX; /* Aggregated tricks won by MAX */ - struct highCardType winner[DDS_SUITS]; + highCardType winner[DDS_SUITS]; /* Winning rank of trick. */ - struct highCardType secondBest[DDS_SUITS]; + highCardType secondBest[DDS_SUITS]; /* Second best rank. */ }; @@ -155,7 +155,7 @@ struct absRankType // 2 bytes struct relRanksType // 120 bytes { - struct absRankType absRank[15][DDS_SUITS]; + absRankType absRank[15][DDS_SUITS]; }; struct paramType From e6b4284982375173beb2ed846b0e75131ed2d519 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Fri, 30 Mar 2018 13:19:26 +0200 Subject: [PATCH 095/132] Worked on Moves debug output --- src/ABsearch.cpp | 4 +- src/CalcTables.cpp | 5 +- src/Init.cpp | 6 +- src/LaterTricks.cpp | 213 ++++++++------- src/LaterTricks.h | 8 +- src/Memory.h | 8 +- src/Moves.cpp | 629 +++++++++++++++++++++---------------------- src/Moves.h | 79 +++--- src/PlayAnalyser.cpp | 4 +- src/Scheduler.cpp | 45 ++-- src/Scheduler.h | 15 +- src/SolveBoard.cpp | 57 ++-- src/SolveBoard.h | 4 - src/SolverIF.cpp | 18 +- src/System.cpp | 4 +- src/System.h | 4 +- 16 files changed, 534 insertions(+), 569 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index 28e5309e..f630e6f7 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -260,7 +260,7 @@ bool ABsearch0( } TIMER_START(TIMER_NO_LT, depth); - res = LaterTricksMIN(posPoint, hand, depth, target, trump, thrp); + res = LaterTricksMIN(* posPoint, hand, depth, target, trump, * thrp); TIMER_END(TIMER_NO_LT, depth); if (! res) @@ -279,7 +279,7 @@ bool ABsearch0( } TIMER_START(TIMER_NO_LT, depth); - res = LaterTricksMAX(posPoint, hand, depth, target, trump, thrp); + res = LaterTricksMAX(* posPoint, hand, depth, target, trump, * thrp); TIMER_END(TIMER_NO_LT, depth); if (res) diff --git a/src/CalcTables.cpp b/src/CalcTables.cpp index 26b1e9f5..6a514430 100644 --- a/src/CalcTables.cpp +++ b/src/CalcTables.cpp @@ -8,7 +8,6 @@ */ -#include "dds.h" #include "SolverIF.h" #include "SolveBoard.h" #include "System.h" @@ -132,8 +131,8 @@ int CalcAllBoardsN( cparam.solvedp = solvedp; cparam.noOfBoards = bop->noOfBoards; - scheduler.RegisterRun(DDS_RUN_CALC, bop); - sysdep.RegisterRun(DDS_RUN_CALC, bop); + scheduler.RegisterRun(DDS_RUN_CALC, * bop); + sysdep.RegisterRun(DDS_RUN_CALC, * bop); for (int k = 0; k < MAXNOOFBOARDS; k++) solvedp->solvedBoard[k].cards = 0; diff --git a/src/Init.cpp b/src/Init.cpp index 1464197c..b441dbd9 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -378,7 +378,7 @@ void InitDebugFiles() #endif #ifdef DDS_MOVES - thrp->moves.SetFile(DDS_MOVES_PREFIX + send); + thrp->fileMoves.SetName(DDS_MOVES_PREFIX + send); #endif } @@ -403,6 +403,10 @@ void CloseDebugFiles() thrp->fileTopLevel.Close(); #endif +#ifdef DDS_MOVES + thrp->fileMoves.Close(); +#endif + #ifdef DDS_AB_STATS thrp->fileABstats.Close(); #endif diff --git a/src/LaterTricks.cpp b/src/LaterTricks.cpp index 12bb8824..4bd0239d 100644 --- a/src/LaterTricks.cpp +++ b/src/LaterTricks.cpp @@ -11,91 +11,90 @@ bool LaterTricksMIN( - pos * posPoint, + pos& tpos, const int hand, const int depth, const int target, const int trump, - ThreadData const * thrp) + const ThreadData& thrd) { - if ((trump == DDS_NOTRUMP) || (posPoint->winner[trump].rank == 0)) + if ((trump == DDS_NOTRUMP) || (tpos.winner[trump].rank == 0)) { int sum = 0; for (int ss = 0; ss < DDS_SUITS; ss++) { - int hh = posPoint->winner[ss].hand; + int hh = tpos.winner[ss].hand; if (hh != -1) { - if (thrp->nodeTypeStore[hh] == MAXNODE) - sum += Max(posPoint->length[hh][ss], - posPoint->length[partner[hh]][ss]); + if (thrd.nodeTypeStore[hh] == MAXNODE) + sum += Max(tpos.length[hh][ss], + tpos.length[partner[hh]][ss]); } } - if ((posPoint->tricksMAX + sum < target) && (sum > 0)) + if ((tpos.tricksMAX + sum < target) && (sum > 0)) { - if ((posPoint->tricksMAX + (depth >> 2) >= target)) + if ((tpos.tricksMAX + (depth >> 2) >= target)) return true; for (int ss = 0; ss < DDS_SUITS; ss++) { - int win_hand = posPoint->winner[ss].hand; + int win_hand = tpos.winner[ss].hand; if (win_hand == -1) - posPoint->winRanks[depth][ss] = 0; - else if (thrp->nodeTypeStore[win_hand] == MINNODE) + tpos.winRanks[depth][ss] = 0; + else if (thrd.nodeTypeStore[win_hand] == MINNODE) { - if ((posPoint->rankInSuit[partner[win_hand]][ss] == 0) && - (posPoint->rankInSuit[lho[win_hand]][ss] == 0) && - (posPoint->rankInSuit[rho[win_hand]][ss] == 0)) - posPoint->winRanks[depth][ss] = 0; + if ((tpos.rankInSuit[partner[win_hand]][ss] == 0) && + (tpos.rankInSuit[lho[win_hand]][ss] == 0) && + (tpos.rankInSuit[rho[win_hand]][ss] == 0)) + tpos.winRanks[depth][ss] = 0; else - posPoint->winRanks[depth][ss] = - bitMapRank[posPoint->winner[ss].rank]; + tpos.winRanks[depth][ss] = bitMapRank[tpos.winner[ss].rank]; } else - posPoint->winRanks[depth][ss] = 0; + tpos.winRanks[depth][ss] = 0; } return false; } } - else if (thrp->nodeTypeStore[posPoint->winner[trump].hand] == MINNODE) + else if (thrd.nodeTypeStore[tpos.winner[trump].hand] == MINNODE) { - if ((posPoint->length[hand][trump] == 0) && - (posPoint->length[partner[hand]][trump] == 0)) + if ((tpos.length[hand][trump] == 0) && + (tpos.length[partner[hand]][trump] == 0)) { - if (((posPoint->tricksMAX + (depth >> 2) + 1 - - Max(posPoint->length[lho[hand]][trump], - posPoint->length[rho[hand]][trump])) < target)) + if (((tpos.tricksMAX + (depth >> 2) + 1 - + Max(tpos.length[lho[hand]][trump], + tpos.length[rho[hand]][trump])) < target)) { for (int ss = 0; ss < DDS_SUITS; ss++) - posPoint->winRanks[depth][ss] = 0; + tpos.winRanks[depth][ss] = 0; return false; } } - else if ((posPoint->tricksMAX + (depth >> 2)) < target) + else if ((tpos.tricksMAX + (depth >> 2)) < target) { for (int ss = 0; ss < DDS_SUITS; ss++) - posPoint->winRanks[depth][ss] = 0; - posPoint->winRanks[depth][trump] = - bitMapRank[posPoint->winner[trump].rank]; + tpos.winRanks[depth][ss] = 0; + tpos.winRanks[depth][trump] = + bitMapRank[tpos.winner[trump].rank]; return false; } - else if (posPoint->tricksMAX + (depth >> 2) == target) + else if (tpos.tricksMAX + (depth >> 2) == target) { - int hh = posPoint->secondBest[trump].hand; + int hh = tpos.secondBest[trump].hand; if (hh == -1) return true; - int r2 = posPoint->secondBest[trump].rank; - if ((thrp->nodeTypeStore[hh] == MINNODE) && (r2 != 0)) + int r2 = tpos.secondBest[trump].rank; + if ((thrd.nodeTypeStore[hh] == MINNODE) && (r2 != 0)) { - if (posPoint->length[hh][trump] > 1 || - posPoint->length[partner[hh]][trump] > 1) + if (tpos.length[hh][trump] > 1 || + tpos.length[partner[hh]][trump] > 1) { for (int ss = 0; ss < DDS_SUITS; ss++) - posPoint->winRanks[depth][ss] = 0; - posPoint->winRanks[depth][trump] = bitMapRank[r2]; + tpos.winRanks[depth][ss] = 0; + tpos.winRanks[depth][trump] = bitMapRank[r2]; return false; } } @@ -103,39 +102,39 @@ bool LaterTricksMIN( } else // Not NT { - int hh = posPoint->secondBest[trump].hand; + int hh = tpos.secondBest[trump].hand; if (hh == -1) return true; - if ((thrp->nodeTypeStore[hh] != MINNODE) || - (posPoint->length[hh][trump] <= 1)) + if ((thrd.nodeTypeStore[hh] != MINNODE) || + (tpos.length[hh][trump] <= 1)) return true; - if (posPoint->winner[trump].hand == rho[hh]) + if (tpos.winner[trump].hand == rho[hh]) { - if (((posPoint->tricksMAX + (depth >> 2)) < target)) + if (((tpos.tricksMAX + (depth >> 2)) < target)) { for (int ss = 0; ss < DDS_SUITS; ss++) - posPoint->winRanks[depth][ss] = 0; - posPoint->winRanks[depth][trump] = - bitMapRank[posPoint->secondBest[trump].rank]; + tpos.winRanks[depth][ss] = 0; + tpos.winRanks[depth][trump] = + bitMapRank[tpos.secondBest[trump].rank]; return false; } } else { - unsigned short aggr = posPoint->aggr[trump]; - int h = thrp->rel[aggr].absRank[3][trump].hand; + unsigned short aggr = tpos.aggr[trump]; + int h = thrd.rel[aggr].absRank[3][trump].hand; if (h == -1) return true; - if ((thrp->nodeTypeStore[h] == MINNODE) && - ((posPoint->tricksMAX + (depth >> 2)) < target)) + if ((thrd.nodeTypeStore[h] == MINNODE) && + ((tpos.tricksMAX + (depth >> 2)) < target)) { for (int ss = 0; ss < DDS_SUITS; ss++) - posPoint->winRanks[depth][ss] = 0; - posPoint->winRanks[depth][trump] = bitMapRank[ - static_cast(thrp->rel[aggr].absRank[3][trump].rank) ]; + tpos.winRanks[depth][ss] = 0; + tpos.winRanks[depth][trump] = bitMapRank[ + static_cast(thrd.rel[aggr].absRank[3][trump].rank) ]; return false; } } @@ -145,94 +144,94 @@ bool LaterTricksMIN( bool LaterTricksMAX( - pos * posPoint, + pos& tpos, const int hand, const int depth, const int target, const int trump, - ThreadData const * thrp) + const ThreadData& thrd) { - if ((trump == DDS_NOTRUMP) || (posPoint->winner[trump].rank == 0)) + if ((trump == DDS_NOTRUMP) || (tpos.winner[trump].rank == 0)) { int sum = 0; for (int ss = 0; ss < DDS_SUITS; ss++) { - int hh = posPoint->winner[ss].hand; + int hh = tpos.winner[ss].hand; if (hh != -1) { - if (thrp->nodeTypeStore[hh] == MINNODE) - sum += Max(posPoint->length[hh][ss], - posPoint->length[partner[hh]][ss]); + if (thrd.nodeTypeStore[hh] == MINNODE) + sum += Max(tpos.length[hh][ss], + tpos.length[partner[hh]][ss]); } } - if ((posPoint->tricksMAX + (depth >> 2) + 1 - sum >= target) && + if ((tpos.tricksMAX + (depth >> 2) + 1 - sum >= target) && (sum > 0)) { - if ((posPoint->tricksMAX + 1 < target)) + if ((tpos.tricksMAX + 1 < target)) return false; for (int ss = 0; ss < DDS_SUITS; ss++) { - int win_hand = posPoint->winner[ss].hand; + int win_hand = tpos.winner[ss].hand; if (win_hand == -1) - posPoint->winRanks[depth][ss] = 0; - else if (thrp->nodeTypeStore[win_hand] == MAXNODE) + tpos.winRanks[depth][ss] = 0; + else if (thrd.nodeTypeStore[win_hand] == MAXNODE) { - if ((posPoint->rankInSuit[partner[win_hand]][ss] == 0) && - (posPoint->rankInSuit[lho[win_hand]][ss] == 0) && - (posPoint->rankInSuit[rho[win_hand]][ss] == 0)) - posPoint->winRanks[depth][ss] = 0; + if ((tpos.rankInSuit[partner[win_hand]][ss] == 0) && + (tpos.rankInSuit[lho[win_hand]][ss] == 0) && + (tpos.rankInSuit[rho[win_hand]][ss] == 0)) + tpos.winRanks[depth][ss] = 0; else - posPoint->winRanks[depth][ss] = - bitMapRank[posPoint->winner[ss].rank]; + tpos.winRanks[depth][ss] = + bitMapRank[tpos.winner[ss].rank]; } else - posPoint->winRanks[depth][ss] = 0; + tpos.winRanks[depth][ss] = 0; } return true; } } - else if (thrp->nodeTypeStore[posPoint->winner[trump].hand] == MAXNODE) + else if (thrd.nodeTypeStore[tpos.winner[trump].hand] == MAXNODE) { - if ((posPoint->length[hand][trump] == 0) && - (posPoint->length[partner[hand]][trump] == 0)) + if ((tpos.length[hand][trump] == 0) && + (tpos.length[partner[hand]][trump] == 0)) { - int maxlen = Max(posPoint->length[lho[hand]][trump], - posPoint->length[rho[hand]][trump]); + int maxlen = Max(tpos.length[lho[hand]][trump], + tpos.length[rho[hand]][trump]); - if ((posPoint->tricksMAX + maxlen) >= target) + if ((tpos.tricksMAX + maxlen) >= target) { for (int ss = 0; ss < DDS_SUITS; ss++) - posPoint->winRanks[depth][ss] = 0; + tpos.winRanks[depth][ss] = 0; return true; } } - else if ((posPoint->tricksMAX + 1) >= target) + else if ((tpos.tricksMAX + 1) >= target) { for (int ss = 0; ss < DDS_SUITS; ss++) - posPoint->winRanks[depth][ss] = 0; - posPoint->winRanks[depth][trump] = - bitMapRank[posPoint->winner[trump].rank]; + tpos.winRanks[depth][ss] = 0; + tpos.winRanks[depth][trump] = + bitMapRank[tpos.winner[trump].rank]; return true; } else { - int hh = posPoint->secondBest[trump].hand; + int hh = tpos.secondBest[trump].hand; if (hh == -1) return false; - if ((thrp->nodeTypeStore[hh] == MAXNODE) && - (posPoint->secondBest[trump].rank != 0)) + if ((thrd.nodeTypeStore[hh] == MAXNODE) && + (tpos.secondBest[trump].rank != 0)) { - if (((posPoint->length[hh][trump] > 1) || - (posPoint->length[partner[hh]][trump] > 1)) && - ((posPoint->tricksMAX + 2) >= target)) + if (((tpos.length[hh][trump] > 1) || + (tpos.length[partner[hh]][trump] > 1)) && + ((tpos.tricksMAX + 2) >= target)) { for (int ss = 0; ss < DDS_SUITS; ss++) - posPoint->winRanks[depth][ss] = 0; - posPoint->winRanks[depth][trump] = - bitMapRank[posPoint->secondBest[trump].rank]; + tpos.winRanks[depth][ss] = 0; + tpos.winRanks[depth][trump] = + bitMapRank[tpos.secondBest[trump].rank]; return true; } } @@ -241,39 +240,39 @@ bool LaterTricksMAX( else // trump != DDS_NOTRUMP) { - int hh = posPoint->secondBest[trump].hand; + int hh = tpos.secondBest[trump].hand; if (hh == -1) return false; - if ((thrp->nodeTypeStore[hh] != MAXNODE) || - (posPoint->length[hh][trump] <= 1)) + if ((thrd.nodeTypeStore[hh] != MAXNODE) || + (tpos.length[hh][trump] <= 1)) return false; - if (posPoint->winner[trump].hand == rho[hh]) + if (tpos.winner[trump].hand == rho[hh]) { - if ((posPoint->tricksMAX + 1) >= target) + if ((tpos.tricksMAX + 1) >= target) { for (int ss = 0; ss < DDS_SUITS; ss++) - posPoint->winRanks[depth][ss] = 0; - posPoint->winRanks[depth][trump] = - bitMapRank[posPoint->secondBest[trump].rank] ; + tpos.winRanks[depth][ss] = 0; + tpos.winRanks[depth][trump] = + bitMapRank[tpos.secondBest[trump].rank] ; return true; } } else { - unsigned short aggr = posPoint->aggr[trump]; - int h = thrp->rel[aggr].absRank[3][trump].hand; + unsigned short aggr = tpos.aggr[trump]; + int h = thrd.rel[aggr].absRank[3][trump].hand; if (h == -1) return false; - if ((thrp->nodeTypeStore[h] == MAXNODE) && - ((posPoint->tricksMAX + 1) >= target)) + if ((thrd.nodeTypeStore[h] == MAXNODE) && + ((tpos.tricksMAX + 1) >= target)) { for (int ss = 0; ss < DDS_SUITS; ss++) - posPoint->winRanks[depth][ss] = 0; - posPoint->winRanks[depth][trump] = bitMapRank[ - static_cast(thrp->rel[aggr].absRank[3][trump].rank) ]; + tpos.winRanks[depth][ss] = 0; + tpos.winRanks[depth][trump] = bitMapRank[ + static_cast(thrd.rel[aggr].absRank[3][trump].rank) ]; return true; } } diff --git a/src/LaterTricks.h b/src/LaterTricks.h index fea1fa57..04ef8d7b 100644 --- a/src/LaterTricks.h +++ b/src/LaterTricks.h @@ -15,19 +15,19 @@ bool LaterTricksMIN( - pos * posPoint, + pos& tpos, const int hand, const int depth, const int target, const int trump, - ThreadData const * thrp); + const ThreadData& thrd); bool LaterTricksMAX( - pos * posPoint, + pos& tpos, const int hand, const int depth, const int target, const int trump, - ThreadData const * thrp); + const ThreadData& thrd); #endif diff --git a/src/Memory.h b/src/Memory.h index 3565fe82..ec7fa4a2 100644 --- a/src/Memory.h +++ b/src/Memory.h @@ -75,6 +75,11 @@ struct ThreadData #ifdef DDS_AB_STATS ABstats ABStats; + File fileABstats; +#endif + +#ifdef DDS_MOVES + File fileMoves; #endif #ifdef DDS_TIMING @@ -91,9 +96,6 @@ struct ThreadData File fileStored; #endif -#ifdef DDS_AB_STATS - File fileABstats; -#endif }; diff --git a/src/Moves.cpp b/src/Moves.cpp index 5833ee35..a8e0aaf9 100644 --- a/src/Moves.cpp +++ b/src/Moves.cpp @@ -8,11 +8,9 @@ */ -#include #include #include -#include "dds.h" #include "Moves.h" #include "debug.h" @@ -23,10 +21,10 @@ #endif -const int RegisterList[16] = +const MGtype RegisterList[16] = { MG_NT0, MG_TRUMP0, - -1, -1, + MG_SIZE, MG_SIZE, // Unused MG_NT_NOTVOID1, MG_TRUMP_NOTVOID1, MG_NT_VOID1, MG_TRUMP_VOID1, @@ -55,20 +53,18 @@ Moves::Moves() funcName[MG_TRUMP_VOID3] = "Trump_Void3"; funcName[MG_COMB_NOTVOID3] = "Comb_Notvoid3"; - fname = ""; - for (int t = 0; t < 13; t++) { for (int h = 0; h < DDS_HANDS; h++) { - lastCall[t][h] = -1; + lastCall[t][h] = MG_SIZE; trickTable[t][h].count = 0; trickSuitTable[t][h].count = 0; trickDetailTable [t][h].nfuncs = 0; trickDetailSuitTable[t][h].nfuncs = 0; - for (int i = 0; i < MG_NUM_FUNCTIONS; i++) + for (int i = 0; i < MG_SIZE; i++) { trickDetailTable [t][h].list[i].count = 0; trickDetailSuitTable[t][h].list[i].count = 0; @@ -78,7 +74,7 @@ Moves::Moves() trickFuncTable.nfuncs = 0; trickFuncSuitTable.nfuncs = 0; - for (int i = 0; i < MG_NUM_FUNCTIONS; i++) + for (int i = 0; i < MG_SIZE; i++) { trickFuncTable .list[i].count = 0; trickFuncSuitTable.list[i].count = 0; @@ -101,13 +97,6 @@ Moves::Moves() } -void Moves::SetFile(const string& ourFname) -{ - fname = ourFname; - remove(fname.c_str()); // May fail -- that's OK -} - - Moves::~Moves() { } @@ -2016,6 +2005,9 @@ void Moves::Sort( } +#define CMP_SWAP(i, j) if (mply[i].weight < mply[j].weight) \ + { tmp = mply[i]; mply[i] = mply[j]; mply[j] = tmp; } + void Moves::MergeSort() { moveType tmp; @@ -2023,230 +2015,230 @@ void Moves::MergeSort() switch (numMoves) { case 12: - CMP_SWAP_NEW(0, 1); - CMP_SWAP_NEW(2, 3); - CMP_SWAP_NEW(4, 5); - CMP_SWAP_NEW(6, 7); - CMP_SWAP_NEW(8, 9); - CMP_SWAP_NEW(10, 11); - - CMP_SWAP_NEW(1, 3); - CMP_SWAP_NEW(5, 7); - CMP_SWAP_NEW(9, 11); - - CMP_SWAP_NEW(0, 2); - CMP_SWAP_NEW(4, 6); - CMP_SWAP_NEW(8, 10); - - CMP_SWAP_NEW(1, 2); - CMP_SWAP_NEW(5, 6); - CMP_SWAP_NEW(9, 10); - - CMP_SWAP_NEW(1, 5); - CMP_SWAP_NEW(6, 10); - CMP_SWAP_NEW(5, 9); - CMP_SWAP_NEW(2, 6); - CMP_SWAP_NEW(1, 5); - CMP_SWAP_NEW(6, 10); - CMP_SWAP_NEW(0, 4); - CMP_SWAP_NEW(7, 11); - CMP_SWAP_NEW(3, 7); - CMP_SWAP_NEW(4, 8); - CMP_SWAP_NEW(0, 4); - CMP_SWAP_NEW(7, 11); - CMP_SWAP_NEW(1, 4); - CMP_SWAP_NEW(7, 10); - CMP_SWAP_NEW(3, 8); - CMP_SWAP_NEW(2, 3); - CMP_SWAP_NEW(8, 9); - CMP_SWAP_NEW(2, 4); - CMP_SWAP_NEW(7, 9); - CMP_SWAP_NEW(3, 5); - CMP_SWAP_NEW(6, 8); - CMP_SWAP_NEW(3, 4); - CMP_SWAP_NEW(5, 6); - CMP_SWAP_NEW(7, 8); + CMP_SWAP(0, 1); + CMP_SWAP(2, 3); + CMP_SWAP(4, 5); + CMP_SWAP(6, 7); + CMP_SWAP(8, 9); + CMP_SWAP(10, 11); + + CMP_SWAP(1, 3); + CMP_SWAP(5, 7); + CMP_SWAP(9, 11); + + CMP_SWAP(0, 2); + CMP_SWAP(4, 6); + CMP_SWAP(8, 10); + + CMP_SWAP(1, 2); + CMP_SWAP(5, 6); + CMP_SWAP(9, 10); + + CMP_SWAP(1, 5); + CMP_SWAP(6, 10); + CMP_SWAP(5, 9); + CMP_SWAP(2, 6); + CMP_SWAP(1, 5); + CMP_SWAP(6, 10); + CMP_SWAP(0, 4); + CMP_SWAP(7, 11); + CMP_SWAP(3, 7); + CMP_SWAP(4, 8); + CMP_SWAP(0, 4); + CMP_SWAP(7, 11); + CMP_SWAP(1, 4); + CMP_SWAP(7, 10); + CMP_SWAP(3, 8); + CMP_SWAP(2, 3); + CMP_SWAP(8, 9); + CMP_SWAP(2, 4); + CMP_SWAP(7, 9); + CMP_SWAP(3, 5); + CMP_SWAP(6, 8); + CMP_SWAP(3, 4); + CMP_SWAP(5, 6); + CMP_SWAP(7, 8); break; case 11: - CMP_SWAP_NEW(0, 1); - CMP_SWAP_NEW(2, 3); - CMP_SWAP_NEW(4, 5); - CMP_SWAP_NEW(6, 7); - CMP_SWAP_NEW(8, 9); - - CMP_SWAP_NEW(1, 3); - CMP_SWAP_NEW(5, 7); - CMP_SWAP_NEW(0, 2); - CMP_SWAP_NEW(4, 6); - CMP_SWAP_NEW(8, 10); - CMP_SWAP_NEW(1, 2); - CMP_SWAP_NEW(5, 6); - CMP_SWAP_NEW(9, 10); - CMP_SWAP_NEW(1, 5); - CMP_SWAP_NEW(6, 10); - CMP_SWAP_NEW(5, 9); - CMP_SWAP_NEW(2, 6); - CMP_SWAP_NEW(1, 5); - CMP_SWAP_NEW(6, 10); - CMP_SWAP_NEW(0, 4); - CMP_SWAP_NEW(3, 7); - CMP_SWAP_NEW(4, 8); - CMP_SWAP_NEW(0, 4); - CMP_SWAP_NEW(1, 4); - CMP_SWAP_NEW(7, 10); - CMP_SWAP_NEW(3, 8); - CMP_SWAP_NEW(2, 3); - CMP_SWAP_NEW(8, 9); - CMP_SWAP_NEW(2, 4); - CMP_SWAP_NEW(7, 9); - CMP_SWAP_NEW(3, 5); - CMP_SWAP_NEW(6, 8); - CMP_SWAP_NEW(3, 4); - CMP_SWAP_NEW(5, 6); - CMP_SWAP_NEW(7, 8); + CMP_SWAP(0, 1); + CMP_SWAP(2, 3); + CMP_SWAP(4, 5); + CMP_SWAP(6, 7); + CMP_SWAP(8, 9); + + CMP_SWAP(1, 3); + CMP_SWAP(5, 7); + CMP_SWAP(0, 2); + CMP_SWAP(4, 6); + CMP_SWAP(8, 10); + CMP_SWAP(1, 2); + CMP_SWAP(5, 6); + CMP_SWAP(9, 10); + CMP_SWAP(1, 5); + CMP_SWAP(6, 10); + CMP_SWAP(5, 9); + CMP_SWAP(2, 6); + CMP_SWAP(1, 5); + CMP_SWAP(6, 10); + CMP_SWAP(0, 4); + CMP_SWAP(3, 7); + CMP_SWAP(4, 8); + CMP_SWAP(0, 4); + CMP_SWAP(1, 4); + CMP_SWAP(7, 10); + CMP_SWAP(3, 8); + CMP_SWAP(2, 3); + CMP_SWAP(8, 9); + CMP_SWAP(2, 4); + CMP_SWAP(7, 9); + CMP_SWAP(3, 5); + CMP_SWAP(6, 8); + CMP_SWAP(3, 4); + CMP_SWAP(5, 6); + CMP_SWAP(7, 8); break; case 10: - CMP_SWAP_NEW(1, 8); - CMP_SWAP_NEW(0, 4); - CMP_SWAP_NEW(5, 9); - CMP_SWAP_NEW(2, 6); - CMP_SWAP_NEW(3, 7); - CMP_SWAP_NEW(0, 3); - CMP_SWAP_NEW(6, 9); - CMP_SWAP_NEW(2, 5); - CMP_SWAP_NEW(0, 1); - CMP_SWAP_NEW(3, 6); - CMP_SWAP_NEW(8, 9); - CMP_SWAP_NEW(4, 7); - CMP_SWAP_NEW(0, 2); - CMP_SWAP_NEW(4, 8); - CMP_SWAP_NEW(1, 5); - CMP_SWAP_NEW(7, 9); - - CMP_SWAP_NEW(1, 2); - CMP_SWAP_NEW(3, 4); - CMP_SWAP_NEW(5, 6); - CMP_SWAP_NEW(7, 8); - - CMP_SWAP_NEW(1, 3); - CMP_SWAP_NEW(6, 8); - CMP_SWAP_NEW(2, 4); - CMP_SWAP_NEW(5, 7); - CMP_SWAP_NEW(2, 3); - CMP_SWAP_NEW(6, 7); - CMP_SWAP_NEW(3, 5); - CMP_SWAP_NEW(4, 6); - CMP_SWAP_NEW(4, 5); + CMP_SWAP(1, 8); + CMP_SWAP(0, 4); + CMP_SWAP(5, 9); + CMP_SWAP(2, 6); + CMP_SWAP(3, 7); + CMP_SWAP(0, 3); + CMP_SWAP(6, 9); + CMP_SWAP(2, 5); + CMP_SWAP(0, 1); + CMP_SWAP(3, 6); + CMP_SWAP(8, 9); + CMP_SWAP(4, 7); + CMP_SWAP(0, 2); + CMP_SWAP(4, 8); + CMP_SWAP(1, 5); + CMP_SWAP(7, 9); + + CMP_SWAP(1, 2); + CMP_SWAP(3, 4); + CMP_SWAP(5, 6); + CMP_SWAP(7, 8); + + CMP_SWAP(1, 3); + CMP_SWAP(6, 8); + CMP_SWAP(2, 4); + CMP_SWAP(5, 7); + CMP_SWAP(2, 3); + CMP_SWAP(6, 7); + CMP_SWAP(3, 5); + CMP_SWAP(4, 6); + CMP_SWAP(4, 5); break; case 9: - CMP_SWAP_NEW(0, 1); - CMP_SWAP_NEW(3, 4); - CMP_SWAP_NEW(6, 7); - CMP_SWAP_NEW(1, 2); - CMP_SWAP_NEW(4, 5); - CMP_SWAP_NEW(7, 8); - CMP_SWAP_NEW(0, 1); - CMP_SWAP_NEW(3, 4); - CMP_SWAP_NEW(6, 7); - CMP_SWAP_NEW(0, 3); - CMP_SWAP_NEW(3, 6); - CMP_SWAP_NEW(0, 3); - CMP_SWAP_NEW(1, 4); - CMP_SWAP_NEW(4, 7); - CMP_SWAP_NEW(1, 4); - CMP_SWAP_NEW(2, 5); - CMP_SWAP_NEW(5, 8); - CMP_SWAP_NEW(2, 5); - CMP_SWAP_NEW(1, 3); - CMP_SWAP_NEW(5, 7); - CMP_SWAP_NEW(2, 6); - CMP_SWAP_NEW(4, 6); - CMP_SWAP_NEW(2, 4); - CMP_SWAP_NEW(2, 3); - CMP_SWAP_NEW(5, 6); + CMP_SWAP(0, 1); + CMP_SWAP(3, 4); + CMP_SWAP(6, 7); + CMP_SWAP(1, 2); + CMP_SWAP(4, 5); + CMP_SWAP(7, 8); + CMP_SWAP(0, 1); + CMP_SWAP(3, 4); + CMP_SWAP(6, 7); + CMP_SWAP(0, 3); + CMP_SWAP(3, 6); + CMP_SWAP(0, 3); + CMP_SWAP(1, 4); + CMP_SWAP(4, 7); + CMP_SWAP(1, 4); + CMP_SWAP(2, 5); + CMP_SWAP(5, 8); + CMP_SWAP(2, 5); + CMP_SWAP(1, 3); + CMP_SWAP(5, 7); + CMP_SWAP(2, 6); + CMP_SWAP(4, 6); + CMP_SWAP(2, 4); + CMP_SWAP(2, 3); + CMP_SWAP(5, 6); break; case 8: - CMP_SWAP_NEW(0, 1); - CMP_SWAP_NEW(2, 3); - CMP_SWAP_NEW(4, 5); - CMP_SWAP_NEW(6, 7); - - CMP_SWAP_NEW(0, 2); - CMP_SWAP_NEW(4, 6); - CMP_SWAP_NEW(1, 3); - CMP_SWAP_NEW(5, 7); - - CMP_SWAP_NEW(1, 2); - CMP_SWAP_NEW(5, 6); - CMP_SWAP_NEW(0, 4); - CMP_SWAP_NEW(1, 5); - - CMP_SWAP_NEW(2, 6); - CMP_SWAP_NEW(3, 7); - CMP_SWAP_NEW(2, 4); - CMP_SWAP_NEW(3, 5); - - CMP_SWAP_NEW(1, 2); - CMP_SWAP_NEW(3, 4); - CMP_SWAP_NEW(5, 6); + CMP_SWAP(0, 1); + CMP_SWAP(2, 3); + CMP_SWAP(4, 5); + CMP_SWAP(6, 7); + + CMP_SWAP(0, 2); + CMP_SWAP(4, 6); + CMP_SWAP(1, 3); + CMP_SWAP(5, 7); + + CMP_SWAP(1, 2); + CMP_SWAP(5, 6); + CMP_SWAP(0, 4); + CMP_SWAP(1, 5); + + CMP_SWAP(2, 6); + CMP_SWAP(3, 7); + CMP_SWAP(2, 4); + CMP_SWAP(3, 5); + + CMP_SWAP(1, 2); + CMP_SWAP(3, 4); + CMP_SWAP(5, 6); break; case 7: - CMP_SWAP_NEW(0, 1); - CMP_SWAP_NEW(2, 3); - CMP_SWAP_NEW(4, 5); - CMP_SWAP_NEW(0, 2); - CMP_SWAP_NEW(4, 6); - CMP_SWAP_NEW(1, 3); - CMP_SWAP_NEW(1, 2); - CMP_SWAP_NEW(5, 6); - CMP_SWAP_NEW(0, 4); - CMP_SWAP_NEW(1, 5); - CMP_SWAP_NEW(2, 6); - CMP_SWAP_NEW(2, 4); - CMP_SWAP_NEW(3, 5); - CMP_SWAP_NEW(1, 2); - CMP_SWAP_NEW(3, 4); - CMP_SWAP_NEW(5, 6); + CMP_SWAP(0, 1); + CMP_SWAP(2, 3); + CMP_SWAP(4, 5); + CMP_SWAP(0, 2); + CMP_SWAP(4, 6); + CMP_SWAP(1, 3); + CMP_SWAP(1, 2); + CMP_SWAP(5, 6); + CMP_SWAP(0, 4); + CMP_SWAP(1, 5); + CMP_SWAP(2, 6); + CMP_SWAP(2, 4); + CMP_SWAP(3, 5); + CMP_SWAP(1, 2); + CMP_SWAP(3, 4); + CMP_SWAP(5, 6); break; case 6: - CMP_SWAP_NEW(0, 1); - CMP_SWAP_NEW(2, 3); - CMP_SWAP_NEW(4, 5); - CMP_SWAP_NEW(0, 2); - CMP_SWAP_NEW(1, 3); - CMP_SWAP_NEW(1, 2); - CMP_SWAP_NEW(0, 4); - CMP_SWAP_NEW(1, 5); - CMP_SWAP_NEW(2, 4); - CMP_SWAP_NEW(3, 5); - CMP_SWAP_NEW(1, 2); - CMP_SWAP_NEW(3, 4); + CMP_SWAP(0, 1); + CMP_SWAP(2, 3); + CMP_SWAP(4, 5); + CMP_SWAP(0, 2); + CMP_SWAP(1, 3); + CMP_SWAP(1, 2); + CMP_SWAP(0, 4); + CMP_SWAP(1, 5); + CMP_SWAP(2, 4); + CMP_SWAP(3, 5); + CMP_SWAP(1, 2); + CMP_SWAP(3, 4); break; case 5: - CMP_SWAP_NEW(0, 1); - CMP_SWAP_NEW(2, 3); - CMP_SWAP_NEW(0, 2); - CMP_SWAP_NEW(1, 3); - CMP_SWAP_NEW(1, 2); - CMP_SWAP_NEW(0, 4); - CMP_SWAP_NEW(2, 4); - CMP_SWAP_NEW(1, 2); - CMP_SWAP_NEW(3, 4); + CMP_SWAP(0, 1); + CMP_SWAP(2, 3); + CMP_SWAP(0, 2); + CMP_SWAP(1, 3); + CMP_SWAP(1, 2); + CMP_SWAP(0, 4); + CMP_SWAP(2, 4); + CMP_SWAP(1, 2); + CMP_SWAP(3, 4); break; case 4: - CMP_SWAP_NEW(0, 1); - CMP_SWAP_NEW(2, 3); - CMP_SWAP_NEW(0, 2); - CMP_SWAP_NEW(1, 3); - CMP_SWAP_NEW(1, 2); + CMP_SWAP(0, 1); + CMP_SWAP(2, 3); + CMP_SWAP(0, 2); + CMP_SWAP(1, 3); + CMP_SWAP(1, 2); break; case 3: - CMP_SWAP_NEW(0, 1); - CMP_SWAP_NEW(0, 2); - CMP_SWAP_NEW(1, 2); + CMP_SWAP(0, 1); + CMP_SWAP(0, 2); + CMP_SWAP(1, 2); break; case 2: - CMP_SWAP_NEW(0, 1); + CMP_SWAP(0, 1); break; default: for (int i = 1; i < numMoves; i++) @@ -2343,7 +2335,7 @@ void Moves::UpdateStatsEntry( } else { - if (statp->nfuncs >= MG_NUM_FUNCTIONS) + if (statp->nfuncs >= MG_SIZE) { printf("Shouldn't happen, %d\n", statp->nfuncs); for (int i = 0; i < statp->nfuncs; i++) @@ -2453,163 +2445,154 @@ void Moves::RegisterHit( } -char * Moves::AverageString( - moveStatType const * statp, - char str[]) const +string Moves::AverageString(const moveStatType& stat) const { - if (statp->count == 0) - sprintf(str, "%5s %4s", "--", "--"); + stringstream ss; + if (stat.count == 0) + ss << setw(5) << right << "--" << setw(5) << "--"; else - sprintf(str, "%5.2f %4.1f", - statp->sumHits / static_cast(statp->count), - 100. * statp->sumHits / static_cast(statp->sumLengths)); + { + ss << setw(5) << setprecision(2) << fixed << + stat.sumHits / static_cast(stat.count) << + setw(5) << setprecision(1) << fixed << + 100. * stat.sumHits / static_cast(stat.sumLengths); + } - return str; + return ss.str(); } -char * Moves::FullAverageString( - moveStatType const * statp, - char str[]) const +string Moves::FullAverageString(const moveStatType& stat) const { - if (statp->count == 0) - sprintf(str, "%5s %5s %4s %8s %8s", - "--", "--", "--", "--", "--"); + stringstream ss; + if (stat.count == 0) + { + ss << setw(6) << right << "--" << + setw(6) << "--" << + setw(5) << "--" << + setw(9) << "--" << + setw(5) << "--"; + } else { - double avg = statp->sumHits / static_cast(statp->count); + double avg = stat.sumHits / static_cast(stat.count); - sprintf(str, "%5.3f %5.2f %4.1f %8d %8.0f", - avg, - statp->sumLengths / static_cast(statp->count), - 100. * statp->sumHits / static_cast(statp->sumLengths), - statp->count, - (avg * avg * avg - 1) * statp->count); + ss << setw(5) << setprecision(3) << fixed << avg << + setw(6) << setprecision(2) << fixed << + stat.sumLengths / static_cast(stat.count) << + setw(5) << setprecision(1) << fixed << + 100. * stat.sumHits / static_cast(stat.sumLengths) << + setw(9) << stat.count << setprecision(0) << fixed << + (avg * avg * avg - 1) * stat.count; } - return str; + return ss.str(); } -void Moves::PrintTrickTable( - FILE * fp, +string Moves::PrintTrickTable( const moveStatType tablep[][DDS_HANDS]) const { - fprintf(fp, "%5s %11s %11s %11s %11s\n", - "Trick", - "Hand 0", - "Hand 1", - "Hand 2", - "Hand 3"); - - fprintf(fp, "%5s %5s %4s %5s %4s %5s %4s %5s %4s\n", - "", - "Avg", "%", - "Avg", "%", - "Avg", "%", - "Avg", "%"); - - char str[DDS_HANDS][16]; + stringstream ss; + + ss << setw(5) << "Trick" << + setw(12) << "Hand 0" << + setw(12) << "Hand 1" << + setw(12) << "Hand 2" << + setw(12) << "Hand 3" << "\n"; + + ss << setw(6) << "" << + setw(6) << "Avg" << setw(5) << "%" << + setw(6) << "Avg" << setw(5) << "%" << + setw(6) << "Avg" << setw(5) << "%" << + setw(6) << "Avg" << setw(5) << "%" << "\n"; + for (int t = 12; t >= 0; t--) { - fprintf(fp, "%5d %11s %11s %11s %11s\n", - t, - Moves::AverageString(&tablep[t][0], str[0]), - Moves::AverageString(&tablep[t][1], str[1]), - Moves::AverageString(&tablep[t][2], str[2]), - Moves::AverageString(&tablep[t][3], str[3])); + ss << setw(5) << right << t << + setw(12) << Moves::AverageString(tablep[t][0]) << + setw(12) << Moves::AverageString(tablep[t][1]) << + setw(12) << Moves::AverageString(tablep[t][2]) << + setw(12) << Moves::AverageString(tablep[t][3]) << "\n"; } + return ss.str(); } -void Moves::PrintTrickStats() const -{ - FILE * fp; - fp = fopen(fname.c_str(), "a"); - fprintf(fp, "Overall statistics\n\n"); - Moves::PrintTrickTable(fp, trickTable); - - fprintf(fp, "\n\nStatistics for winning suit\n\n"); - Moves::PrintTrickTable(fp, trickSuitTable); - fprintf(fp, "\n\n"); - fclose(fp); -} - - -void Moves::PrintFunctionTable( - FILE * fp, - moveStatsType const * statp) const +string Moves::PrintFunctionTable(const moveStatsType& stat) const { - char str[2][40]; + if (stat.nfuncs == 0) + return ""; - if (statp->nfuncs == 0) - return; - - fprintf(fp, "%-15s %5s %5s %4s %8s %8s\n", - "Function", "Avg", "Len", "%", "Count", "Imp"); + stringstream ss; + ss << setw(15) << left << "Function" << + setw(6) << "Avg" << + setw(6) << "Len" << + setw(5) << "%" << + setw(9) << "Count" << + setw(9) << "Imp" << "\n"; - for (int fr = 0; fr < MG_NUM_FUNCTIONS; fr++) + for (int fr = 0; fr < MG_SIZE; fr++) { - for (int f = 0; f < statp->nfuncs; f++) + for (int f = 0; f < stat.nfuncs; f++) { - if (statp->list[f].findex != fr) + if (stat.list[f].findex != fr) continue; - sprintf(str[0], "%-15s", funcName[fr].c_str()); - - fprintf(fp, "%s %34s\n", - str[0], - Moves::FullAverageString(&statp->list[f], str[1])); + ss << setw(15) << left << funcName[fr] << + Moves::FullAverageString(stat.list[f]) << "\n"; } } + return ss.str(); } -void Moves::PrintTrickDetails() const + +void Moves::PrintTrickStats(ofstream& fout) const { - FILE * fp; - fp = fopen(fname.c_str(), "a"); - fprintf(fp, "Trick detail statistics\n\n"); + fout << "Overall statistics\n\n"; + fout << Moves::PrintTrickTable(trickTable); + + fout << "\n\nStatistics for winning suit\n\n"; + fout << Moves::PrintTrickTable(trickSuitTable) << "\n\n"; +} + + +void Moves::PrintTrickDetails(ofstream& fout) const +{ + fout << "Trick detail statistics\n\n"; for (int t = 12; t >= 0; t--) { for (int h = 0; h < DDS_HANDS; h++) { - fprintf(fp, "Trick %d, relative hand %d\n", t, h); - Moves::PrintFunctionTable(fp, &trickDetailTable[t][h]); - fprintf(fp, "\n"); + fout << "Trick " << t << ", relative hand " << h << "\n"; + fout << Moves::PrintFunctionTable(trickDetailTable[t][h]) << "\n"; } } - fprintf(fp, "Suit detail statistics\n\n"); + fout << "Suit detail statistics\n\n"; for (int t = 12; t >= 0; t--) { for (int h = 0; h < DDS_HANDS; h++) { - fprintf(fp, "Trick %d, relative hand %d\n", t, h); - Moves::PrintFunctionTable(fp, &trickDetailSuitTable[t][h]); - fprintf(fp, "\n"); + fout << "Trick " << t << ", relative hand " << h << "\n"; + fout << Moves::PrintFunctionTable(trickDetailSuitTable[t][h]) << + "\n"; } } - fprintf(fp, "\n\n"); - fclose(fp); + fout << "\n\n"; } -void Moves::PrintFunctionStats() const +void Moves::PrintFunctionStats(ofstream& fout) const { - FILE * fp; - fp = fopen(fname.c_str(), "a"); - - fprintf(fp, "Function statistics\n\n"); - Moves::PrintFunctionTable(fp, &trickFuncTable); + fout << "Function statistics\n\n"; + fout << Moves::PrintFunctionTable(trickFuncTable); - fprintf(fp, "\n\nFunction statistics for winning suit\n\n"); - Moves::PrintFunctionTable(fp, &trickFuncSuitTable); - fprintf(fp, "\n\n"); - - fclose(fp); + fout << "\n\nFunction statistics for winning suit\n\n"; + fout << Moves::PrintFunctionTable(trickFuncSuitTable); + fout << "\n\n"; } - diff --git a/src/Moves.h b/src/Moves.h index 0981d4ac..eed90dcd 100644 --- a/src/Moves.h +++ b/src/Moves.h @@ -10,37 +10,33 @@ #ifndef DDS_MOVES_H #define DDS_MOVES_H +#include +#include #include -#include -#include -#include -#include + #include "dds.h" #include "../include/dll.h" using namespace std; -#define CMP_SWAP(i, j) if (a[i].weight < a[j].weight) \ - { moveType tmp = a[i]; a[i] = a[j]; a[j] = tmp; } - -#define CMP_SWAP_NEW(i, j) if (mply[i].weight < mply[j].weight) \ - { tmp = mply[i]; mply[i] = mply[j]; mply[j] = tmp; } - -#define MG_NT0 0 -#define MG_TRUMP0 1 -#define MG_NT_VOID1 2 -#define MG_TRUMP_VOID1 3 -#define MG_NT_NOTVOID1 4 -#define MG_TRUMP_NOTVOID1 5 -#define MG_NT_VOID2 6 -#define MG_TRUMP_VOID2 7 -#define MG_NT_NOTVOID2 8 -#define MG_TRUMP_NOTVOID2 9 -#define MG_NT_VOID3 10 -#define MG_TRUMP_VOID3 11 -#define MG_COMB_NOTVOID3 12 -#define MG_NUM_FUNCTIONS 13 +enum MGtype +{ + MG_NT0 = 0, + MG_TRUMP0 = 1, + MG_NT_VOID1 = 2, + MG_TRUMP_VOID1 = 3, + MG_NT_NOTVOID1 = 4, + MG_TRUMP_NOTVOID1 = 5, + MG_NT_VOID2 = 6, + MG_TRUMP_VOID2 = 7, + MG_NT_NOTVOID2 = 8, + MG_TRUMP_NOTVOID2 = 9, + MG_NT_VOID3 = 10, + MG_TRUMP_VOID3 = 11, + MG_COMB_NOTVOID3 = 12, + MG_SIZE = 13 +}; struct trickDataType @@ -88,9 +84,9 @@ class Moves moveType * mply; - int lastCall[13][DDS_HANDS]; + MGtype lastCall[13][DDS_HANDS]; - string funcName[MG_NUM_FUNCTIONS]; + string funcName[MG_SIZE]; struct moveStatType { @@ -103,7 +99,7 @@ class Moves struct moveStatsType { int nfuncs; - moveStatType list[MG_NUM_FUNCTIONS]; + moveStatType list[MG_SIZE]; }; moveStatType trickTable[13][DDS_HANDS]; @@ -118,8 +114,6 @@ class Moves moveStatsType trickFuncSuitTable; - string fname; - void WeightAllocTrump0( pos const * posPoint, @@ -174,29 +168,19 @@ class Moves const int hit, const int len) const; - char * AverageString( - const moveStatType * statp, - char str[]) const; + string AverageString(const moveStatType& statp) const; - char * FullAverageString( - const moveStatType * statp, - char str[]) const; + string FullAverageString(const moveStatType& statp) const; - void PrintTrickTable( - FILE * fp, - const moveStatType tablep[][DDS_HANDS]) const ; + string PrintTrickTable(const moveStatType tablep[][DDS_HANDS]) const; - void PrintFunctionTable( - FILE * fp, - moveStatsType const * tablep) const; + string PrintFunctionTable(const moveStatsType& tablep) const; public: Moves(); ~Moves(); - void SetFile(const string& fname); - void Init( const int tricks, const int relStartHand, @@ -234,7 +218,7 @@ class Moves moveType * MakeNext( const int trick, const int relHand, - const unsigned short int winRanks[DDS_SUITS]); + const unsigned short winRanks[DDS_SUITS]); moveType * MakeNextSimple( const int trick, @@ -274,12 +258,11 @@ class Moves string TrickToText(const int trick) const; - void PrintTrickStats() const; - - void PrintTrickDetails() const; + void PrintTrickStats(ofstream& fout) const; - void PrintFunctionStats() const; + void PrintTrickDetails(ofstream& fout) const; + void PrintFunctionStats(ofstream& fout) const; }; #endif diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index 67f2c56f..e9eb9e52 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -323,8 +323,8 @@ int STDCALL AnalyseAllPlaysBin( traceparam.noOfBoards = bop->noOfBoards; traceparam.solvedp = solvedp; - scheduler.RegisterRun(DDS_RUN_TRACE, bop, plp); - sysdep.RegisterRun(DDS_RUN_TRACE, bop); + scheduler.RegisterRun(DDS_RUN_TRACE, * bop, * plp); + sysdep.RegisterRun(DDS_RUN_TRACE, * bop); START_BLOCK_TIMER; int retRun = sysdep.RunThreads(); diff --git a/src/Scheduler.cpp b/src/Scheduler.cpp index dc9ba0ae..96154de2 100644 --- a/src/Scheduler.cpp +++ b/src/Scheduler.cpp @@ -132,28 +132,28 @@ void Scheduler::RegisterThreads( void Scheduler::RegisterRun( const enum RunMode mode, - boards const * bop, - playTracesBin const * plp) + const boards& bds, + const playTracesBin& pl) { - for (int b = 0; b < bop->noOfBoards; b++) - hands[b].depth = plp->plays[b].number; + for (int b = 0; b < bds.noOfBoards; b++) + hands[b].depth = pl.plays[b].number; - Scheduler::RegisterRun(mode, bop); + Scheduler::RegisterRun(mode, bds); } void Scheduler::RegisterRun( const enum RunMode mode, - boards const * bop) + const boards& bds) { Scheduler::Reset(); - numHands = bop->noOfBoards; + numHands = bds.noOfBoards; // First split the hands according to strain and hash key. // This will lead to a few random collisions as well. - Scheduler::MakeGroups(bop); + Scheduler::MakeGroups(bds); // Then check whether groups with at least two elements are // homogeneous or whether they need to be split. @@ -177,15 +177,14 @@ void Scheduler::SortHands(const enum RunMode mode) } -void Scheduler::MakeGroups( - boards const * bop) +void Scheduler::MakeGroups(const boards& bds) { deal const * dl; listType * lp; for (int b = 0; b < numHands; b++) { - dl = &bop->deals[b]; + dl = &bds.deals[b]; int strain = dl->trump; @@ -210,8 +209,8 @@ void Scheduler::MakeGroups( hands[b].NTflag = (strain == 4 ? 1 : 0); hands[b].first = dl->first; hands[b].strain = strain; - hands[b].fanout = Scheduler::Fanout(dl); - // hands[b].strength = Scheduler::Strength(dl); + hands[b].fanout = Scheduler::Fanout(* dl); + // hands[b].strength = Scheduler::Strength(* dl); lp = &list[strain][key]; @@ -662,16 +661,15 @@ void Scheduler::SortTrace() } -int Scheduler::Strength( - deal const * dl) const +int Scheduler::Strength(const deal& dl) const { // If the strength in all suits is evenly split, then the // "strength" returned is close to 0. Maximum is 49. - const unsigned sp = (dl->remainCards[0][0] | dl->remainCards[2][0]) >> 2; - const unsigned he = (dl->remainCards[0][1] | dl->remainCards[2][1]) >> 2; - const unsigned di = (dl->remainCards[0][2] | dl->remainCards[2][2]) >> 2; - const unsigned cl = (dl->remainCards[0][3] | dl->remainCards[2][3]) >> 2; + const unsigned sp = (dl.remainCards[0][0] | dl.remainCards[2][0]) >> 2; + const unsigned he = (dl.remainCards[0][1] | dl.remainCards[2][1]) >> 2; + const unsigned di = (dl.remainCards[0][2] | dl.remainCards[2][2]) >> 2; + const unsigned cl = (dl.remainCards[0][3] | dl.remainCards[2][3]) >> 2; const int hsp = highCards[sp]; const int hhe = highCards[he]; @@ -689,8 +687,7 @@ int Scheduler::Strength( } -int Scheduler::Fanout( - deal const * dl) const +int Scheduler::Fanout(const deal& dl) const { // The fanout for a given suit and a given player is the number // of bit groups, so KT982 has 3 groups. In a given suit the @@ -706,7 +703,7 @@ int Scheduler::Fanout( numVoids = 0; for (int s = 0; s < DDS_SUITS; s++) { - c = static_cast(dl->remainCards[h][s] >> 2); + c = static_cast(dl.remainCards[h][s] >> 2); fanoutSuit += groupData[c].lastGroup + 1; if (c == 0) numVoids++; @@ -946,10 +943,10 @@ void Scheduler::PrintTiming() const int Scheduler::PredictedTime( - deal * dl, + deal& dl, int number) const { - int trump = dl->trump; + int trump = dl.trump; int NT = (trump == 4 ? 100 : 0); int dev1 = Scheduler::Strength(dl); diff --git a/src/Scheduler.h b/src/Scheduler.h index 97a71291..606f9953 100644 --- a/src/Scheduler.h +++ b/src/Scheduler.h @@ -110,16 +110,15 @@ class Scheduler void SortHands(const enum RunMode mode); - int Strength(deal const * dl) const; - int Fanout(deal const * dl) const; + int Strength(const deal& dl) const; + int Fanout(const deal& dl) const; void Reset(); vector timersThread; Timer timerBlock; - void MakeGroups( - boards const * bop); + void MakeGroups(const boards& bds); void FinetuneGroups(); @@ -155,7 +154,7 @@ class Scheduler #endif int PredictedTime( - deal * dl, + deal& dl, int number) const; @@ -170,12 +169,12 @@ class Scheduler void RegisterRun( const enum RunMode mode, - boards const * bop, - playTracesBin const * plp); + const boards& bds, + const playTracesBin& pl); void RegisterRun( const enum RunMode mode, - boards const * bop); + const boards& bds); schedType GetNumber(const int thrId); diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 1ad8c780..7e2eb3cb 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -23,13 +23,16 @@ extern System sysdep; extern Memory memory; extern Scheduler scheduler; +int SolveAllBoardsN( + boards& bds, + solvedBoards& solved); + bool SameBoard( - boards const * bop, + const boards& bds, const unsigned index1, const unsigned index2); -#include void SolveSingleCommon( const int thrId, const int bno) @@ -105,23 +108,23 @@ void SolveChunkCommon( int SolveAllBoardsN( - boards * bop, - solvedBoards * solvedp) + boards& bds, + solvedBoards& solved) { param.error = 0; - if (bop->noOfBoards > MAXNOOFBOARDS) + if (bds.noOfBoards > MAXNOOFBOARDS) return RETURN_TOO_MANY_BOARDS; - param.bop = bop; - param.solvedp = solvedp; - param.noOfBoards = bop->noOfBoards; + param.bop = &bds; + param.solvedp = &solved; + param.noOfBoards = bds.noOfBoards; - scheduler.RegisterRun(DDS_RUN_SOLVE, bop); - sysdep.RegisterRun(DDS_RUN_SOLVE, bop); + scheduler.RegisterRun(DDS_RUN_SOLVE, bds); + sysdep.RegisterRun(DDS_RUN_SOLVE, bds); for (int k = 0; k < MAXNOOFBOARDS; k++) - solvedp->solvedBoard[k].cards = 0; + solved.solvedBoard[k].cards = 0; START_BLOCK_TIMER; int retRun = sysdep.RunThreads(); @@ -130,7 +133,7 @@ int SolveAllBoardsN( if (retRun != RETURN_NO_FAULT) return retRun; - solvedp->noOfBoards = param.noOfBoards; + solved.noOfBoards = param.noOfBoards; #ifdef DDS_SCHEDULER scheduler.PrintTiming(); @@ -196,7 +199,7 @@ int STDCALL SolveAllBoards( return RETURN_PBN_FAULT; } - int res = SolveAllBoardsN(&bo, solvedp); + int res = SolveAllBoardsN(bo, * solvedp); return res; } @@ -236,7 +239,7 @@ int STDCALL SolveAllChunksBin( if (chunkSize < 1) return RETURN_CHUNK_SIZE; - return SolveAllBoardsN(bop, solvedp); + return SolveAllBoardsN(* bop, * solvedp); } @@ -261,7 +264,7 @@ void DetectSolveDuplicates( for (unsigned index = i+1; index < nu; index++) { - if (SameBoard(&bds, i, index)) + if (SameBoard(bds, i, index)) crossrefs[index] = i; } } @@ -269,7 +272,7 @@ void DetectSolveDuplicates( bool SameBoard( - boards const * bop, + const boards& bds, const unsigned index1, const unsigned index2) { @@ -277,30 +280,30 @@ bool SameBoard( { for (int s = 0; s < DDS_SUITS; s++) { - if (bop->deals[index1].remainCards[h][s] != - bop->deals[index2].remainCards[h][s]) + if (bds.deals[index1].remainCards[h][s] != + bds.deals[index2].remainCards[h][s]) return false; } } - if (bop->mode[index1] != bop->mode[index2]) + if (bds.mode[index1] != bds.mode[index2]) return false; - if (bop->solutions[index1] != bop->solutions[index2]) + if (bds.solutions[index1] != bds.solutions[index2]) return false; - if (bop->target[index1] != bop->target[index2]) + if (bds.target[index1] != bds.target[index2]) return false; - if (bop->deals[index1].first != bop->deals[index2].first) + if (bds.deals[index1].first != bds.deals[index2].first) return false; - if (bop->deals[index1].trump != bop->deals[index2].trump) + if (bds.deals[index1].trump != bds.deals[index2].trump) return false; for (int k = 0; k < 3; k++) { - if (bop->deals[index1].currentTrickSuit[k] != - bop->deals[index2].currentTrickSuit[k]) + if (bds.deals[index1].currentTrickSuit[k] != + bds.deals[index2].currentTrickSuit[k]) return false; - if (bop->deals[index1].currentTrickRank[k] != - bop->deals[index2].currentTrickRank[k]) + if (bds.deals[index1].currentTrickRank[k] != + bds.deals[index2].currentTrickRank[k]) return false; } return true; diff --git a/src/SolveBoard.h b/src/SolveBoard.h index aeabc83b..c14a9809 100644 --- a/src/SolveBoard.h +++ b/src/SolveBoard.h @@ -27,10 +27,6 @@ void CopySolveSingle( void SolveChunkCommon( const int thrId); -int SolveAllBoardsN( - boards * bop, - solvedBoards * solvedp); - void DetectSolveDuplicates( const boards& bds, vector& uniques, diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 9e132499..5202044e 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -631,11 +631,11 @@ int SolveBoardInternal( #endif #ifdef DDS_MOVES - thrp->moves.PrintTrickStats(); + thrp->moves.PrintTrickStats(thrp->fileMoves.GetStream()); #ifdef DDS_MOVES_DETAILS - thrp->moves.PrintTrickDetails(); + thrp->moves.PrintTrickDetails(thrp->fileMoves.GetStream()); #endif - thrp->moves.PrintFunctionStats(); + thrp->moves.PrintFunctionStats(thrp->fileMoves.GetStream()); #endif SOLVER_DONE: @@ -742,11 +742,11 @@ int SolveSameBoard( #endif #ifdef DDS_MOVES - thrp->moves.PrintTrickStats(); + thrp->moves.PrintTrickStats(thrp->fileMoves.GetStream()); #ifdef DDS_MOVES_DETAILS - thrp->moves.PrintTrickDetails(); + thrp->moves.PrintTrickDetails(thrp->fileMoves.GetStream()); #endif - thrp->moves.PrintFunctionStats(); + thrp->moves.PrintFunctionStats(thrp->fileMoves.GetStream()); #endif futp->nodes = thrp->trickNodes; @@ -894,11 +894,11 @@ int AnalyseLaterBoard( #endif #ifdef DDS_MOVES - thrp->moves.PrintTrickStats(); + thrp->moves.PrintTrickStats(thrp->fileMoves.GetStream()); #ifdef DDS_MOVES_DETAILS - thrp->moves.PrintTrickDetails(); + thrp->moves.PrintTrickDetails(thrp->fileMoves.GetStream()); #endif - thrp->moves.PrintFunctionStats(); + thrp->moves.PrintFunctionStats(thrp->fileMoves.GetStream()); #endif #ifdef DDS_MEMORY_LEAKS_WIN32 diff --git a/src/System.cpp b/src/System.cpp index b9676145..0bd990da 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -253,13 +253,13 @@ int System::RegisterParams( int System::RegisterRun( const RunMode mode, - boards * const bopIn) + const boards& bdsIn) { if (mode >= DDS_RUN_SIZE) return RETURN_THREAD_MISSING; // Not quite right; runCat = mode; - bop = bopIn; + bop = &bdsIn; // TODO: The implicit thread models don't need the scheduler(?). // if (preferredSystem <= DDS_SYSTEM_THREAD_TBB) diff --git a/src/System.h b/src/System.h index 40aabcde..6e277f8e 100644 --- a/src/System.h +++ b/src/System.h @@ -53,7 +53,7 @@ class System fptrType fptr; - boards * bop; + boards const * bop; int RunThreadsBasic(); int RunThreadsBoost(); @@ -91,7 +91,7 @@ class System int RegisterRun( const RunMode r, - boards * const bop); + const boards& bop); bool ThreadOK(const int thrId) const; From 3782866a17360d5a36dbc4b2eaecbe3f4bd219d2 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Fri, 30 Mar 2018 14:56:15 +0200 Subject: [PATCH 096/132] Done with Moves --- src/ABsearch.cpp | 112 ++++---- src/Moves.cpp | 722 ++++++++++++++++++++++------------------------- src/Moves.h | 52 ++-- src/SolverIF.cpp | 36 +-- 4 files changed, 434 insertions(+), 488 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index f630e6f7..d653773a 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -34,28 +34,28 @@ void Make3Simple( void Undo0( pos * posPoint, int depth, - moveType * mply, + const moveType& mply, ThreadData * thrp); void Undo0Simple( pos * posPoint, int depth, - moveType * mply); + const moveType& mply); void Undo1( pos * posPoint, int depth, - moveType * mply); + const moveType& mply); void Undo2( pos * posPoint, int depth, - moveType * mply); + const moveType& mply); void Undo3( pos * posPoint, int depth, - moveType * mply); + const moveType& mply); const int handDelta[DDS_SUITS] = { 256, 16, 1, 0 }; @@ -88,7 +88,7 @@ bool ABsearch( thrp->moves.MoveGen0( tricks, - posPoint, + * posPoint, thrp->bestMove[depth], thrp->bestMoveTT[depth], thrp->rel); @@ -96,15 +96,14 @@ bool ABsearch( TIMER_END(TIMER_NO_MOVEGEN, depth); - moveType * mply; for (int ss = 0; ss < DDS_SUITS; ss++) posPoint->winRanks[depth][ss] = 0; while (1) { TIMER_START(TIMER_NO_MAKE, depth); - mply = thrp->moves.MakeNext(tricks, 0, - posPoint->winRanks[depth]); + moveType const * mply = thrp->moves.MakeNext(tricks, 0, + posPoint->winRanks[depth]); #ifdef DDS_AB_STATS thrp->ABStats.IncrNode(depth); #endif @@ -120,7 +119,7 @@ bool ABsearch( TIMER_END(TIMER_NO_AB, depth - 1); TIMER_START(TIMER_NO_UNDO, depth); - Undo1(posPoint, depth, mply); + Undo1(posPoint, depth, * mply); TIMER_END(TIMER_NO_UNDO, depth); if (value == success) /* A cut-off? */ @@ -341,7 +340,7 @@ bool ABsearch0( thrp->moves.MoveGen0( tricks, - posPoint, + * posPoint, thrp->bestMove[depth], thrp->bestMoveTT[depth], thrp->rel); @@ -351,12 +350,11 @@ bool ABsearch0( for (int ss = 0; ss < DDS_SUITS; ss++) posPoint->winRanks[depth][ss] = 0; - moveType * mply; while (1) { TIMER_START(TIMER_NO_MAKE, depth); - mply = thrp->moves.MakeNext(tricks, 0, - posPoint->winRanks[depth]); + moveType const * mply = thrp->moves.MakeNext(tricks, 0, + posPoint->winRanks[depth]); #ifdef DDS_AB_STATS thrp->ABStats.IncrNode(depth); #endif @@ -372,7 +370,7 @@ bool ABsearch0( TIMER_END(TIMER_NO_AB, depth - 1); TIMER_START(TIMER_NO_UNDO, depth); - Undo1(posPoint, depth, mply); + Undo1(posPoint, depth, * mply); TIMER_END(TIMER_NO_UNDO, depth); if (value == success) /* A cut-off? */ @@ -485,7 +483,7 @@ bool ABsearch1( for (int ss = 0; ss < DDS_SUITS; ss++) thrp->lowestWin[depth][ss] = 0; - thrp->moves.MoveGen123(tricks, 1, posPoint); + thrp->moves.MoveGen123(tricks, 1, * posPoint); if (depth == thrp->iniDepth) thrp->moves.Purge(tricks, 1, thrp->forbiddenMoves); @@ -494,12 +492,11 @@ bool ABsearch1( for (int ss = 0; ss < DDS_SUITS; ss++) posPoint->winRanks[depth][ss] = 0; - moveType * mply; while (1) { TIMER_START(TIMER_NO_MAKE, depth); - mply = thrp->moves.MakeNext(tricks, 1, - posPoint->winRanks[depth]); + moveType const * mply = thrp->moves.MakeNext(tricks, 1, + posPoint->winRanks[depth]); #ifdef DDS_AB_STATS thrp->ABStats.IncrNode(depth); #endif @@ -515,7 +512,7 @@ bool ABsearch1( TIMER_END(TIMER_NO_AB, depth - 1); TIMER_START(TIMER_NO_UNDO, depth); - Undo2(posPoint, depth, mply); + Undo2(posPoint, depth, * mply); TIMER_END(TIMER_NO_UNDO, depth); if (value == success) /* A cut-off? */ @@ -564,7 +561,7 @@ bool ABsearch2( for (int ss = 0; ss < DDS_SUITS; ss++) thrp->lowestWin[depth][ss] = 0; - thrp->moves.MoveGen123(tricks, 2, posPoint); + thrp->moves.MoveGen123(tricks, 2, * posPoint); if (depth == thrp->iniDepth) thrp->moves.Purge(tricks, 2, thrp->forbiddenMoves); @@ -573,12 +570,11 @@ bool ABsearch2( for (int ss = 0; ss < DDS_SUITS; ss++) posPoint->winRanks[depth][ss] = 0; - moveType * mply; while (1) { TIMER_START(TIMER_NO_MAKE, depth); - mply = thrp->moves.MakeNext(tricks, 2, - posPoint->winRanks[depth]); + moveType const * mply = thrp->moves.MakeNext(tricks, 2, + posPoint->winRanks[depth]); if (mply == NULL) break; @@ -595,7 +591,7 @@ bool ABsearch2( TIMER_END(TIMER_NO_AB, depth - 1); TIMER_START(TIMER_NO_UNDO, depth); - Undo3(posPoint, depth, mply); + Undo3(posPoint, depth, * mply); TIMER_END(TIMER_NO_UNDO, depth); @@ -649,22 +645,20 @@ bool ABsearch3( thrp->lowestWin[depth][ss] = 0; int tricks = (depth + 3) >> 2; - thrp->moves.MoveGen123(tricks, 3, posPoint); + thrp->moves.MoveGen123(tricks, 3, * posPoint); if (depth == thrp->iniDepth) thrp->moves.Purge(tricks, 3, thrp->forbiddenMoves); TIMER_END(TIMER_NO_MOVEGEN, depth); - moveType * mply; - for (int ss = 0; ss < DDS_SUITS; ss++) posPoint->winRanks[depth][ss] = 0; while (1) { TIMER_START(TIMER_NO_MAKE, depth); - mply = thrp->moves.MakeNext(tricks, 3, - posPoint->winRanks[depth]); + moveType const * mply = thrp->moves.MakeNext(tricks, 3, + posPoint->winRanks[depth]); #ifdef DDS_AB_STATS thrp->ABStats.IncrNode(depth); #endif @@ -685,7 +679,7 @@ bool ABsearch3( TIMER_END(TIMER_NO_AB, depth - 1); TIMER_START(TIMER_NO_UNDO, depth); - Undo0(posPoint, depth, mply, thrp); + Undo0(posPoint, depth, * mply, thrp); if (thrp->nodeTypeStore[posPoint->first[depth - 1]] == MAXNODE) posPoint->tricksMAX--; @@ -787,9 +781,9 @@ void Make3( { int firstHand = posPoint->first[depth]; - trickDataType * datap = thrp->moves.GetTrickData((depth + 3) >> 2); + const trickDataType& data = thrp->moves.GetTrickData((depth + 3) >> 2); - posPoint->first[depth - 1] = handId(firstHand, datap->relWinner); + posPoint->first[depth - 1] = handId(firstHand, data.relWinner); /* Defines who is first in the next move */ int h = handId(firstHand, 3); @@ -798,13 +792,13 @@ void Make3( for (int suit = 0; suit < DDS_SUITS; suit++) trickCards[suit] = 0; - int ss = datap->bestSuit; - if (datap->playCount[ss] >= 2) + int ss = data.bestSuit; + if (data.playCount[ss] >= 2) { // Win by rank when some else played that suit, too. - int rr = datap->bestRank; + int rr = data.bestRank; trickCards[ss] = static_cast - (bitMapRank[rr] | datap->bestSequence); + (bitMapRank[rr] | data.bestSequence); } int r = mply->rank; @@ -820,7 +814,7 @@ void Make3( for (int st = 0; st < 4; st++) { - if (datap->playCount[st]) + if (data.playCount[st]) { int n = wp->number; wp->winner[n].suit = st; @@ -849,23 +843,23 @@ void Make3Simple( moveType * mply, ThreadData * thrp) { - trickDataType * datap = thrp->moves.GetTrickData((depth + 3) >> 2); + const trickDataType& data = thrp->moves.GetTrickData((depth + 3) >> 2); int firstHand = posPoint->first[depth]; // Leader of next trick - posPoint->first[depth - 1] = handId(firstHand, datap->relWinner); + posPoint->first[depth - 1] = handId(firstHand, data.relWinner); for (int suit = 0; suit < DDS_SUITS; suit++) trickCards[suit] = 0; - int s = datap->bestSuit; - if (datap->playCount[s] >= 2) + int s = data.bestSuit; + if (data.playCount[s] >= 2) { // Win by rank when some else played that suit, too. - int r = datap->bestRank; + int r = data.bestRank; trickCards[s] = static_cast - (bitMapRank[r] | datap->bestSequence); + (bitMapRank[r] | data.bestSequence); } int h = handId(firstHand, 3); @@ -880,12 +874,12 @@ void Make3Simple( void Undo0( pos * posPoint, int depth, - moveType * mply, + const moveType& mply, ThreadData * thrp) { int h = handId(posPoint->first[depth], 3); - int s = mply->suit; - int r = mply->rank; + int s = mply.suit; + int r = mply.rank; posPoint->rankInSuit[h][s] |= bitMapRank[r]; posPoint->aggr[s] |= bitMapRank[r]; @@ -909,11 +903,11 @@ void Undo0( void Undo0Simple( pos * posPoint, int depth, - moveType * mply) + const moveType& mply) { int h = handId(posPoint->first[depth], 3); - int s = mply->suit; - int r = mply->rank; + int s = mply.suit; + int r = mply.rank; posPoint->aggr[s] |= bitMapRank[r]; posPoint->handDist[h] += handDelta[s]; @@ -923,11 +917,11 @@ void Undo0Simple( void Undo1( pos * posPoint, int depth, - moveType * mply) + const moveType& mply) { int h = posPoint->first[depth]; - int s = mply->suit; - int r = mply->rank; + int s = mply.suit; + int r = mply.rank; posPoint->rankInSuit[h][s] |= bitMapRank[r]; posPoint->aggr[s] |= bitMapRank[r]; @@ -939,11 +933,11 @@ void Undo1( void Undo2( pos * posPoint, int depth, - moveType * mply) + const moveType& mply) { int h = handId(posPoint->first[depth], 1); - int s = mply->suit; - int r = mply->rank; + int s = mply.suit; + int r = mply.rank; posPoint->rankInSuit[h][s] |= bitMapRank[r]; posPoint->aggr[s] |= bitMapRank[r]; @@ -955,11 +949,11 @@ void Undo2( void Undo3( pos * posPoint, int depth, - moveType * mply) + const moveType& mply) { int h = handId(posPoint->first[depth], 2); - int s = mply->suit; - int r = mply->rank; + int s = mply.suit; + int r = mply.rank; posPoint->rankInSuit[h][s] |= bitMapRank[r]; posPoint->aggr[s] |= bitMapRank[r]; diff --git a/src/Moves.cpp b/src/Moves.cpp index a8e0aaf9..c2e5e629 100644 --- a/src/Moves.cpp +++ b/src/Moves.cpp @@ -107,7 +107,7 @@ void Moves::Init( const int relStartHand, const int initialRanks[], const int initialSuits[], - const unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], + const unsigned short rankInSuit[DDS_HANDS][DDS_SUITS], const int ourTrump, const int ourLeadHand) { @@ -155,7 +155,7 @@ void Moves::Reinit( int Moves::MoveGen0( const int tricks, - pos const * posPoint, + const pos& tpos, const moveType& bestMove, const moveType& bestMoveTT, const relRanksType thrp_rel[]) @@ -168,18 +168,18 @@ int Moves::MoveGen0( moveGroupType * mp; int removed, g, rank, seq; - movePlyType * listp = &moveList[tricks][0]; - mply = listp->move; + movePlyType& list = moveList[tricks][0]; + mply = list.move; for (int s = 0; s < DDS_SUITS; s++) trackp->lowestWin[0][s] = 0; numMoves = 0; bool ftest = ((trump != DDS_NOTRUMP) && - (posPoint->winner[trump].rank != 0)); + (tpos.winner[trump].rank != 0)); for (suit = 0; suit < DDS_SUITS; suit++) { - unsigned short ris = posPoint->rankInSuit[leadHand][suit]; + unsigned short ris = tpos.rankInSuit[leadHand][suit]; if (ris == 0) continue; lastNumMoves = numMoves; @@ -204,11 +204,9 @@ int Moves::MoveGen0( } if (ftest) - Moves::WeightAllocTrump0(posPoint, - bestMove, bestMoveTT, thrp_rel); + Moves::WeightAllocTrump0(tpos, bestMove, bestMoveTT, thrp_rel); else - Moves::WeightAllocNT0(posPoint, - bestMove, bestMoveTT, thrp_rel); + Moves::WeightAllocNT0(tpos, bestMove, bestMoveTT, thrp_rel); } #ifdef DDS_MOVES @@ -218,8 +216,8 @@ int Moves::MoveGen0( MG_REGISTER(MG_NT0, 0); #endif - listp->current = 0; - listp->last = numMoves - 1; + list.current = 0; + list.last = numMoves - 1; if (numMoves != 1) Moves::MergeSort(); return numMoves; @@ -229,7 +227,7 @@ int Moves::MoveGen0( int Moves::MoveGen123( const int tricks, const int handRel, - pos const * posPoint) + const pos& tpos) { trackp = &track[tricks]; leadHand = trackp->leadHand; @@ -240,8 +238,8 @@ int Moves::MoveGen123( moveGroupType * mp; int removed, g, rank, seq; - movePlyType * listp = &moveList[tricks][handRel]; - mply = listp->move; + movePlyType& list = moveList[tricks][handRel]; + mply = list.move; for (int s = 0; s < DDS_SUITS; s++) trackp->lowestWin[handRel][s] = 0; @@ -250,9 +248,9 @@ int Moves::MoveGen123( WeightPtr WeightFnc; int findex; int ftest = ((trump != DDS_NOTRUMP) && - (posPoint->winner[trump].rank != 0) ? 1 : 0); + (tpos.winner[trump].rank != 0) ? 1 : 0); - unsigned short ris = posPoint->rankInSuit[currHand][leadSuit]; + unsigned short ris = tpos.rankInSuit[currHand][leadSuit]; if (ris != 0) { @@ -281,12 +279,12 @@ int Moves::MoveGen123( MG_REGISTER(RegisterList[findex], handRel); #endif - listp->current = 0; - listp->last = numMoves - 1; + list.current = 0; + list.last = numMoves - 1; if (numMoves == 1) return numMoves; - (this->*WeightList[findex])(posPoint); + (this->*WeightList[findex])(tpos); Moves::MergeSort(); return numMoves; @@ -301,7 +299,7 @@ int Moves::MoveGen123( for (suit = 0; suit < DDS_SUITS; suit++) { - ris = posPoint->rankInSuit[currHand][suit]; + ris = tpos.rankInSuit[currHand][suit]; if (ris == 0) continue; lastNumMoves = numMoves; @@ -325,11 +323,11 @@ int Moves::MoveGen123( g--; } - (this->*WeightFnc)(posPoint); + (this->*WeightFnc)(tpos); } - listp->current = 0; - listp->last = numMoves - 1; + list.current = 0; + list.last = numMoves - 1; if (numMoves != 1) Moves::MergeSort(); return numMoves; @@ -337,15 +335,15 @@ int Moves::MoveGen123( void Moves::WeightAllocTrump0( - pos const * posPoint, + const pos& tpos, const moveType& bestMove, const moveType& bestMoveTT, const relRanksType thrp_rel[]) { - const unsigned short suitCount = posPoint->length[leadHand][suit]; - const unsigned short suitCountLH = posPoint->length[lho[leadHand]][suit]; - const unsigned short suitCountRH = posPoint->length[rho[leadHand]][suit]; - const unsigned short aggr = posPoint->aggr[suit]; + const unsigned short suitCount = tpos.length[leadHand][suit]; + const unsigned short suitCountLH = tpos.length[lho[leadHand]][suit]; + const unsigned short suitCountRH = tpos.length[rho[leadHand]][suit]; + const unsigned short aggr = tpos.aggr[suit]; // Why? int countLH = (suitCountLH == 0 ? currTrick + 1 : suitCountLH) << 2; @@ -362,22 +360,22 @@ void Moves::WeightAllocTrump0( /* Discourage suit if LHO or RHO can ruff. */ if ((suit != trump) && - (((posPoint->rankInSuit[lho[leadHand]][suit] == 0) && - (posPoint->rankInSuit[lho[leadHand]][trump] != 0)) || - ((posPoint->rankInSuit[rho[leadHand]][suit] == 0) && - (posPoint->rankInSuit[rho[leadHand]][trump] != 0)))) + (((tpos.rankInSuit[lho[leadHand]][suit] == 0) && + (tpos.rankInSuit[lho[leadHand]][trump] != 0)) || + ((tpos.rankInSuit[rho[leadHand]][suit] == 0) && + (tpos.rankInSuit[rho[leadHand]][trump] != 0)))) suitBonus = -12; /* Encourage suit if partner can ruff. */ if ((suit != trump) && - (posPoint->length[partner[leadHand]][suit] == 0) && - (posPoint->length[partner[leadHand]][trump] > 0) && + (tpos.length[partner[leadHand]][suit] == 0) && + (tpos.length[partner[leadHand]][trump] > 0) && (suitCountRH > 0)) suitBonus += 17; /* Discourage suit if RHO has high card. */ - if ((posPoint->winner[suit].hand == rho[leadHand]) || - (posPoint->secondBest[suit].hand == rho[leadHand])) + if ((tpos.winner[suit].hand == rho[leadHand]) || + (tpos.secondBest[suit].hand == rho[leadHand])) { if (suitCountRH != 1) suitBonus += -12; @@ -386,20 +384,20 @@ void Moves::WeightAllocTrump0( /* Try suit if LHO has winning card and partner second best. Exception: partner has singleton. */ - else if ((posPoint->winner[suit].hand == lho[leadHand]) && - (posPoint->secondBest[suit].hand == partner[leadHand])) + else if ((tpos.winner[suit].hand == lho[leadHand]) && + (tpos.secondBest[suit].hand == partner[leadHand])) { /* This case was suggested by Joël Bradmetz. */ - if (posPoint->length[partner[leadHand]][suit] != 1) + if (tpos.length[partner[leadHand]][suit] != 1) suitBonus += 27; } /* Encourage play of suit where partner wins and returns the suit for a ruff. */ if ((suit != trump) && (suitCount == 1) && - (posPoint->length[leadHand][trump] > 0) && - (posPoint->length[partner[leadHand]][suit] > 1) && - (posPoint->winner[suit].hand == partner[leadHand])) + (tpos.length[leadHand][trump] > 0) && + (tpos.length[partner[leadHand]][suit] > 1) && + (tpos.winner[suit].hand == partner[leadHand])) suitBonus += 19; @@ -410,40 +408,40 @@ void Moves::WeightAllocTrump0( int suitWeightDelta = suitBonus + suitWeightD; - if (posPoint->winner[suit].rank == mply[k].rank) + if (tpos.winner[suit].rank == mply[k].rank) { if ((suit != trump)) { - if ((posPoint->length[partner[leadHand]][suit] != 0) || - (posPoint->length[partner[leadHand]][trump] == 0)) + if ((tpos.length[partner[leadHand]][suit] != 0) || + (tpos.length[partner[leadHand]][trump] == 0)) { - if (((posPoint->length[lho[leadHand]][suit] != 0) || - (posPoint->length[lho[leadHand]][trump] == 0)) && - ((posPoint->length[rho[leadHand]][suit] != 0) || - (posPoint->length[rho[leadHand]][trump] == 0))) + if (((tpos.length[lho[leadHand]][suit] != 0) || + (tpos.length[lho[leadHand]][trump] == 0)) && + ((tpos.length[rho[leadHand]][suit] != 0) || + (tpos.length[rho[leadHand]][trump] == 0))) winMove = true; } - else if (((posPoint->length[lho[leadHand]][suit] != 0) || - (posPoint->rankInSuit[partner[leadHand]][trump] > - posPoint->rankInSuit[lho[leadHand]][trump])) && - ((posPoint->length[rho[leadHand]][suit] != 0) || - (posPoint->rankInSuit[partner[leadHand]][trump] > - posPoint->rankInSuit[rho[leadHand]][trump]))) + else if (((tpos.length[lho[leadHand]][suit] != 0) || + (tpos.rankInSuit[partner[leadHand]][trump] > + tpos.rankInSuit[lho[leadHand]][trump])) && + ((tpos.length[rho[leadHand]][suit] != 0) || + (tpos.rankInSuit[partner[leadHand]][trump] > + tpos.rankInSuit[rho[leadHand]][trump]))) winMove = true; } else winMove = true; } - else if (posPoint->rankInSuit[partner[leadHand]][suit] > - (posPoint->rankInSuit[lho[leadHand]][suit] | - posPoint->rankInSuit[rho[leadHand]][suit])) + else if (tpos.rankInSuit[partner[leadHand]][suit] > + (tpos.rankInSuit[lho[leadHand]][suit] | + tpos.rankInSuit[rho[leadHand]][suit])) { if (suit != trump) { - if (((posPoint->length[lho[leadHand]][suit] != 0) || - (posPoint->length[lho[leadHand]][trump] == 0)) && - ((posPoint->length[rho[leadHand]][suit] != 0) || - (posPoint->length[rho[leadHand]][trump] == 0))) + if (((tpos.length[lho[leadHand]][suit] != 0) || + (tpos.length[lho[leadHand]][trump] == 0)) && + ((tpos.length[rho[leadHand]][suit] != 0) || + (tpos.length[rho[leadHand]][trump] == 0))) winMove = true; } else @@ -451,31 +449,31 @@ void Moves::WeightAllocTrump0( } else if (suit != trump) { - if ((posPoint->length[partner[leadHand]][suit] == 0) && - (posPoint->length[partner[leadHand]][trump] != 0)) + if ((tpos.length[partner[leadHand]][suit] == 0) && + (tpos.length[partner[leadHand]][trump] != 0)) { - if ((posPoint->length[lho[leadHand]][suit] == 0) && - (posPoint->length[lho[leadHand]][trump] != 0) && - (posPoint->length[rho[leadHand]][suit] == 0) && - (posPoint->length[rho[leadHand]][trump] != 0)) + if ((tpos.length[lho[leadHand]][suit] == 0) && + (tpos.length[lho[leadHand]][trump] != 0) && + (tpos.length[rho[leadHand]][suit] == 0) && + (tpos.length[rho[leadHand]][trump] != 0)) { - if (posPoint->rankInSuit[partner[leadHand]][trump] > - (posPoint->rankInSuit[lho[leadHand]][trump] | - posPoint->rankInSuit[rho[leadHand]][trump])) + if (tpos.rankInSuit[partner[leadHand]][trump] > + (tpos.rankInSuit[lho[leadHand]][trump] | + tpos.rankInSuit[rho[leadHand]][trump])) winMove = true; } - else if ((posPoint->length[lho[leadHand]][suit] == 0) && - (posPoint->length[lho[leadHand]][trump] != 0)) + else if ((tpos.length[lho[leadHand]][suit] == 0) && + (tpos.length[lho[leadHand]][trump] != 0)) { - if (posPoint->rankInSuit[partner[leadHand]][trump] - > posPoint->rankInSuit[lho[leadHand]][trump]) + if (tpos.rankInSuit[partner[leadHand]][trump] + > tpos.rankInSuit[lho[leadHand]][trump]) winMove = true; } - else if ((posPoint->length[rho[leadHand]][suit] == 0) && - (posPoint->length[rho[leadHand]][trump] != 0)) + else if ((tpos.length[rho[leadHand]][suit] == 0) && + (tpos.length[rho[leadHand]][trump] != 0)) { - if (posPoint->rankInSuit[partner[leadHand]][trump] - > posPoint->rankInSuit[rho[leadHand]][trump]) + if (tpos.rankInSuit[partner[leadHand]][trump] + > tpos.rankInSuit[rho[leadHand]][trump]) winMove = true; } else @@ -487,28 +485,28 @@ void Moves::WeightAllocTrump0( { /* Encourage ruffing LHO or RHO singleton, highest card. */ if (((suitCountLH == 1) && - (posPoint->winner[suit].hand == lho[leadHand])) + (tpos.winner[suit].hand == lho[leadHand])) || ((suitCountRH == 1) && - (posPoint->winner[suit].hand == rho[leadHand]))) + (tpos.winner[suit].hand == rho[leadHand]))) mply[k].weight = suitWeightDelta + 35 + rRank; /* Lead hand has the highest card. */ - else if (posPoint->winner[suit].hand == leadHand) + else if (tpos.winner[suit].hand == leadHand) { /* Also, partner has second highest card. */ - if (posPoint->secondBest[suit].hand == partner[leadHand]) + if (tpos.secondBest[suit].hand == partner[leadHand]) mply[k].weight = suitWeightDelta + 48 + rRank; - else if (posPoint->winner[suit].rank == mply[k].rank) + else if (tpos.winner[suit].rank == mply[k].rank) /* If the current card to play is the highest card. */ mply[k].weight = suitWeightDelta + 31; else mply[k].weight = suitWeightDelta - 3 + rRank; } - else if (posPoint->winner[suit].hand == partner[leadHand]) + else if (tpos.winner[suit].hand == partner[leadHand]) { /* If partner has highest card */ - if (posPoint->secondBest[suit].hand == leadHand) + if (tpos.secondBest[suit].hand == leadHand) mply[k].weight = suitWeightDelta + 42 + rRank; else mply[k].weight = suitWeightDelta + 28 + rRank; @@ -516,7 +514,7 @@ void Moves::WeightAllocTrump0( /* Encourage playing second highest rank if hand also has third highest rank. */ else if ((mply[k].sequence) && - (mply[k].rank == posPoint->secondBest[suit].rank)) + (mply[k].rank == tpos.secondBest[suit].rank)) mply[k].weight = suitWeightDelta + 40; else if (mply[k].sequence) mply[k].weight = suitWeightDelta + 22 + rRank; @@ -543,37 +541,37 @@ void Moves::WeightAllocTrump0( int thirdBestHand = thrp_rel[aggr].absRank[3][suit].hand; - if ((posPoint->secondBest[suit].hand == partner[leadHand]) && + if ((tpos.secondBest[suit].hand == partner[leadHand]) && (partner[leadHand] == thirdBestHand)) suitWeightDelta += 20; - else if (((posPoint->secondBest[suit].hand == leadHand) && + else if (((tpos.secondBest[suit].hand == leadHand) && (partner[leadHand] == thirdBestHand) && - (posPoint->length[partner[leadHand]][suit] > 1)) || - ((posPoint->secondBest[suit].hand == partner[leadHand]) && + (tpos.length[partner[leadHand]][suit] > 1)) || + ((tpos.secondBest[suit].hand == partner[leadHand]) && (leadHand == thirdBestHand) && - (posPoint->length[partner[leadHand]][suit] > 1))) + (tpos.length[partner[leadHand]][suit] > 1))) suitWeightDelta += 13; /* Higher weight if LHO or RHO has the highest (winning) card as a singleton. */ if (((suitCountLH == 1) && - (posPoint->winner[suit].hand == lho[leadHand])) + (tpos.winner[suit].hand == lho[leadHand])) || ((suitCountRH == 1) && - (posPoint->winner[suit].hand == rho[leadHand]))) + (tpos.winner[suit].hand == rho[leadHand]))) mply[k].weight = suitWeightDelta + rRank + 2; - else if (posPoint->winner[suit].hand == leadHand) + else if (tpos.winner[suit].hand == leadHand) { - if (posPoint->secondBest[suit].hand == partner[leadHand]) + if (tpos.secondBest[suit].hand == partner[leadHand]) /* Opponents win by ruffing */ mply[k].weight = suitWeightDelta + 33 + rRank; - else if (posPoint->winner[suit].rank == mply[k].rank) + else if (tpos.winner[suit].rank == mply[k].rank) /* Opponents win by ruffing */ mply[k].weight = suitWeightDelta + 38; else mply[k].weight = suitWeightDelta - 14 + rRank; } - else if (posPoint->winner[suit].hand == partner[leadHand]) + else if (tpos.winner[suit].hand == partner[leadHand]) { /* Opponents win by ruffing */ mply[k].weight = suitWeightDelta + 34 + rRank; @@ -581,7 +579,7 @@ void Moves::WeightAllocTrump0( /* Encourage playing second highest rank if hand also has third highest rank. */ else if ((mply[k].sequence) && - (mply[k].rank == posPoint->secondBest[suit].rank)) + (mply[k].rank == tpos.secondBest[suit].rank)) mply[k].weight = suitWeightDelta + 35; else mply[k].weight = suitWeightDelta + 17 - (mply[k].rank); @@ -599,27 +597,27 @@ void Moves::WeightAllocTrump0( void Moves::WeightAllocNT0( - pos const * posPoint, + const pos& tpos, const moveType& bestMove, const moveType& bestMoveTT, const relRanksType thrp_rel[]) { - int aggr = posPoint->aggr[suit]; + int aggr = tpos.aggr[suit]; /* Discourage a suit selection where the search tree appears larger than for the alternative suits: the search is estimated to be small when the added number of alternative cards to play for the opponents is small. */ - unsigned short suitCountLH = posPoint->length[lho[leadHand]][suit]; - unsigned short suitCountRH = posPoint->length[rho[leadHand]][suit]; + unsigned short suitCountLH = tpos.length[lho[leadHand]][suit]; + unsigned short suitCountRH = tpos.length[rho[leadHand]][suit]; // Why? int countLH = (suitCountLH == 0 ? currTrick + 1 : suitCountLH) << 2; int countRH = (suitCountRH == 0 ? currTrick + 1 : suitCountRH) << 2; int suitWeightD = - (((countLH + countRH) << 5) / 19); - if (posPoint->length[partner[leadHand]][suit] == 0) + if (tpos.length[partner[leadHand]][suit] == 0) suitWeightD += -9; for (int k = lastNumMoves; k < numMoves; k++) @@ -627,22 +625,22 @@ void Moves::WeightAllocNT0( int suitWeightDelta = suitWeightD; int rRank = relRank[aggr][mply[k].rank]; - if (posPoint->winner[suit].rank == mply[k].rank || - (posPoint->rankInSuit[partner[leadHand]][suit] > - (posPoint->rankInSuit[lho[leadHand]][suit] | - posPoint->rankInSuit[rho[leadHand]][suit]))) + if (tpos.winner[suit].rank == mply[k].rank || + (tpos.rankInSuit[partner[leadHand]][suit] > + (tpos.rankInSuit[lho[leadHand]][suit] | + tpos.rankInSuit[rho[leadHand]][suit]))) { // Can win trick, ourselves or partner. // FIX: No distinction? /* Discourage suit if RHO has second best card. Exception: RHO has singleton. */ - if (posPoint->secondBest[suit].hand == rho[leadHand]) + if (tpos.secondBest[suit].hand == rho[leadHand]) { if (suitCountRH != 1) suitWeightDelta += -1; } /* Encourage playing suit if LHO has second highest rank. */ - else if (posPoint->secondBest[suit].hand == lho[leadHand]) + else if (tpos.secondBest[suit].hand == lho[leadHand]) { if (suitCountLH != 1) suitWeightDelta += 22; @@ -654,9 +652,9 @@ void Moves::WeightAllocNT0( current side to play, or if second best is a singleton at LHO or RHO. */ - if (((posPoint->secondBest[suit].hand != lho[leadHand]) + if (((tpos.secondBest[suit].hand != lho[leadHand]) || (suitCountLH == 1)) && - ((posPoint->secondBest[suit].hand != rho[leadHand]) + ((tpos.secondBest[suit].hand != rho[leadHand]) || (suitCountRH == 1))) mply[k].weight = suitWeightDelta + 45 + rRank; else @@ -678,8 +676,8 @@ void Moves::WeightAllocNT0( /* Discourage suit if RHO has winning or second best card. Exception: RHO has singleton. */ - if ((posPoint->winner[suit].hand == rho[leadHand]) || - (posPoint->secondBest[suit].hand == rho[leadHand])) + if ((tpos.winner[suit].hand == rho[leadHand]) || + (tpos.secondBest[suit].hand == rho[leadHand])) { if (suitCountRH != 1) suitWeightDelta += -10; @@ -688,11 +686,11 @@ void Moves::WeightAllocNT0( /* Try suit if LHO has winning card and partner second best. Exception: partner has singleton. */ - else if ((posPoint->winner[suit].hand == lho[leadHand]) && - (posPoint->secondBest[suit].hand == partner[leadHand])) + else if ((tpos.winner[suit].hand == lho[leadHand]) && + (tpos.secondBest[suit].hand == partner[leadHand])) { /* This case was suggested by Joël Bradmetz. */ - if (posPoint->length[partner[leadHand]][suit] != 1) + if (tpos.length[partner[leadHand]][suit] != 1) suitWeightDelta += 31; } @@ -703,30 +701,30 @@ void Moves::WeightAllocNT0( int thirdBestHand = thrp_rel[aggr].absRank[3][suit].hand; - if ((posPoint->secondBest[suit].hand == partner[leadHand]) && + if ((tpos.secondBest[suit].hand == partner[leadHand]) && (partner[leadHand] == thirdBestHand)) suitWeightDelta += 35; - else if (((posPoint->secondBest[suit].hand == leadHand) && + else if (((tpos.secondBest[suit].hand == leadHand) && (partner[leadHand] == thirdBestHand) && - (posPoint->length[partner[leadHand]][suit] > 1)) || - ((posPoint->secondBest[suit].hand == partner[leadHand]) && + (tpos.length[partner[leadHand]][suit] > 1)) || + ((tpos.secondBest[suit].hand == partner[leadHand]) && (leadHand == thirdBestHand) && - (posPoint->length[partner[leadHand]][suit] > 1))) + (tpos.length[partner[leadHand]][suit] > 1))) suitWeightDelta += 25; /* Higher weight if LHO or RHO has the highest (winning) card as a singleton. */ if (((suitCountLH == 1) && - (posPoint->winner[suit].hand == lho[leadHand])) + (tpos.winner[suit].hand == lho[leadHand])) || ((suitCountRH == 1) && - (posPoint->winner[suit].hand == rho[leadHand]))) + (tpos.winner[suit].hand == rho[leadHand]))) mply[k].weight = suitWeightDelta + 28 + rRank; - else if (posPoint->winner[suit].hand == leadHand) + else if (tpos.winner[suit].hand == leadHand) mply[k].weight = suitWeightDelta - 17 + rRank; else if (! mply[k].sequence) mply[k].weight = suitWeightDelta + 12 + rRank; - else if (mply[k].rank == posPoint->secondBest[suit].rank) + else if (mply[k].rank == tpos.secondBest[suit].rank) mply[k].weight = suitWeightDelta + 48; else mply[k].weight = suitWeightDelta + 29 - rRank; @@ -745,22 +743,21 @@ void Moves::WeightAllocNT0( } -void Moves::WeightAllocTrumpNotvoid1( - pos const * posPoint) +void Moves::WeightAllocTrumpNotvoid1(const pos& tpos) { const int max3rd = highestRank[ - posPoint->rankInSuit[partner[leadHand]][leadSuit]]; + tpos.rankInSuit[partner[leadHand]][leadSuit]]; const int maxpd = highestRank[ - posPoint->rankInSuit[rho[leadHand] ][leadSuit]]; + tpos.rankInSuit[rho[leadHand] ][leadSuit]]; const int min3rd = lowestRank [ - posPoint->rankInSuit[partner[leadHand]][leadSuit]]; + tpos.rankInSuit[partner[leadHand]][leadSuit]]; const int minpd = lowestRank [ - posPoint->rankInSuit[rho[leadHand] ][leadSuit]]; + tpos.rankInSuit[rho[leadHand] ][leadSuit]]; for (int k = 0; k < numMoves; k++) { bool winMove = false; /* If true, current move can win trick. */ - int rRank = relRank[ posPoint->aggr[leadSuit] ][mply[k].rank]; + int rRank = relRank[ tpos.aggr[leadSuit] ][mply[k].rank]; if (leadSuit == trump) { @@ -775,35 +772,35 @@ void Moves::WeightAllocTrumpNotvoid1( if (mply[k].rank > trackp->move[0].rank && mply[k].rank > max3rd) { if ((max3rd != 0) || - (posPoint->length[partner[leadHand]][trump] == 0)) + (tpos.length[partner[leadHand]][trump] == 0)) winMove = true; else if ((maxpd == 0) - && (posPoint->length[rho[leadHand]][trump] != 0) - && (posPoint->rankInSuit[rho[leadHand]][trump] > - posPoint->rankInSuit[partner[leadHand]][trump])) + && (tpos.length[rho[leadHand]][trump] != 0) + && (tpos.rankInSuit[rho[leadHand]][trump] > + tpos.rankInSuit[partner[leadHand]][trump])) winMove = true; } else if (maxpd > trackp->move[0].rank && maxpd > max3rd) { if ((max3rd != 0) || - (posPoint->length[partner[leadHand]][trump] == 0)) + (tpos.length[partner[leadHand]][trump] == 0)) winMove = true; } else if (trackp->move[0].rank > maxpd && trackp->move[0].rank > max3rd && trackp->move[0].rank > mply[k].rank) { - if ((maxpd == 0) && (posPoint->length[rho[leadHand]][trump] != 0)) + if ((maxpd == 0) && (tpos.length[rho[leadHand]][trump] != 0)) { if ((max3rd != 0) || - (posPoint->length[partner[leadHand]][trump] == 0)) + (tpos.length[partner[leadHand]][trump] == 0)) winMove = true; - else if (posPoint->rankInSuit[rho[leadHand]][trump] - > posPoint->rankInSuit[partner[leadHand]][trump]) + else if (tpos.rankInSuit[rho[leadHand]][trump] + > tpos.rankInSuit[partner[leadHand]][trump]) winMove = true; } } - else if (maxpd == 0 && (posPoint->length[rho[leadHand]][trump] != 0)) + else if (maxpd == 0 && tpos.length[rho[leadHand]][trump] != 0) /* winnerHand is partner to first */ winMove = true; } @@ -814,8 +811,8 @@ void Moves::WeightAllocTrumpNotvoid1( // Partner must be winning -- we can't. mply[k].weight = 40 + rRank; else if ((maxpd > trackp->move[0].rank) && - (posPoint->rankInSuit[leadHand][leadSuit] > - posPoint->rankInSuit[rho[leadHand]][leadSuit])) + (tpos.rankInSuit[leadHand][leadSuit] > + tpos.rankInSuit[rho[leadHand]][leadSuit])) mply[k].weight = 41 + rRank; /* If rho has a card in the leading suit that @@ -861,8 +858,7 @@ void Moves::WeightAllocTrumpNotvoid1( } -void Moves::WeightAllocNTNotvoid1( - pos const * posPoint) +void Moves::WeightAllocNTNotvoid1(const pos& tpos) { // FIX: Second test should come first, and outside loop. // Why is better not to be able to beat later players than @@ -870,9 +866,9 @@ void Moves::WeightAllocNTNotvoid1( // Why rRank? const int max3rd = highestRank[ - posPoint->rankInSuit[partner[leadHand]][leadSuit]]; + tpos.rankInSuit[partner[leadHand]][leadSuit]]; const int maxpd = highestRank[ - posPoint->rankInSuit[rho[leadHand]][leadSuit] ]; + tpos.rankInSuit[rho[leadHand]][leadSuit] ]; if (maxpd > trackp->move[0].rank && maxpd > max3rd) { @@ -883,13 +879,13 @@ void Moves::WeightAllocNTNotvoid1( else { int min3rd = lowestRank [ - posPoint->rankInSuit[partner[leadHand]][leadSuit]]; + tpos.rankInSuit[partner[leadHand]][leadSuit]]; int minpd = lowestRank [ - posPoint->rankInSuit[rho[leadHand]][leadSuit] ]; + tpos.rankInSuit[rho[leadHand]][leadSuit] ]; for (int k = 0; k < numMoves; k++) { - int rRank = relRank[ posPoint->aggr[leadSuit] ][mply[k].rank]; + int rRank = relRank[ tpos.aggr[leadSuit] ][mply[k].rank]; if (mply[k].rank > trackp->move[0].rank && mply[k].rank > max3rd) // We can beat both opponents. @@ -914,21 +910,20 @@ void Moves::WeightAllocNTNotvoid1( } -void Moves::WeightAllocTrumpVoid1( - pos const * posPoint) +void Moves::WeightAllocTrumpVoid1(const pos& tpos) { // FIX: // leadSuit == trump: Why differentiate? // suit != trump: Same question. // Don't ruff ahead of partner? - const unsigned short suitCount = posPoint->length[currHand][suit]; + const unsigned short suitCount = tpos.length[currHand][suit]; int suitAdd; if (leadSuit == trump) // We pitch { - if (posPoint->rankInSuit[rho[leadHand]][leadSuit] > - (posPoint->rankInSuit[partner[leadHand]][leadSuit] | + if (tpos.rankInSuit[rho[leadHand]][leadSuit] > + (tpos.rankInSuit[partner[leadHand]][leadSuit] | bitMapRank[ trackp->move[0].rank ])) // Partner can win. suitAdd = (suitCount << 6) / 44; @@ -937,7 +932,7 @@ void Moves::WeightAllocTrumpVoid1( // Don't pitch from Kx. suitAdd = (suitCount << 6) / 36; if ((suitCount == 2) && - (posPoint->secondBest[suit].hand == currHand)) + (tpos.secondBest[suit].hand == currHand)) suitAdd += -4; } @@ -948,16 +943,16 @@ void Moves::WeightAllocTrumpVoid1( { // We discard on a side suit. - if (posPoint->length[partner[leadHand]][leadSuit] != 0) + if (tpos.length[partner[leadHand]][leadSuit] != 0) { // 3rd hand will follow. - if (posPoint->rankInSuit[rho[leadHand]][leadSuit] > - (posPoint->rankInSuit[partner[leadHand]][leadSuit] | + if (tpos.rankInSuit[rho[leadHand]][leadSuit] > + (tpos.rankInSuit[partner[leadHand]][leadSuit] | bitMapRank[ trackp->move[0].rank ])) // Partner has winning card. suitAdd = 60 + (suitCount << 6) / 44; - else if ((posPoint->length[rho[leadHand]][leadSuit] == 0) - && (posPoint->length[rho[leadHand]][trump] != 0)) + else if ((tpos.length[rho[leadHand]][leadSuit] == 0) + && (tpos.length[rho[leadHand]][trump] != 0)) // Partner can ruff. suitAdd = 60 + (suitCount << 6) / 44; else @@ -966,17 +961,17 @@ void Moves::WeightAllocTrumpVoid1( suitAdd = -2 + (suitCount << 6) / 36; // Don't pitch from Kx. if ((suitCount == 2) && - (posPoint->secondBest[suit].hand == currHand)) + (tpos.secondBest[suit].hand == currHand)) suitAdd += -4; } } - else if ((posPoint->length[rho[leadHand]][leadSuit] == 0) - && (posPoint->rankInSuit[rho[leadHand]][trump] > - posPoint->rankInSuit[partner[leadHand]][trump])) + else if ((tpos.length[rho[leadHand]][leadSuit] == 0) + && (tpos.rankInSuit[rho[leadHand]][trump] > + tpos.rankInSuit[partner[leadHand]][trump])) // Partner can overruff 3rd hand. suitAdd = 60 + (suitCount << 6) / 44; - else if ((posPoint->length[partner[leadHand]][trump] == 0) - && (posPoint->rankInSuit[rho[leadHand]][leadSuit] > + else if ((tpos.length[partner[leadHand]][trump] == 0) + && (tpos.rankInSuit[rho[leadHand]][leadSuit] > bitMapRank[ trackp->move[0].rank] )) // 3rd hand has no trumps, and partner has suit winner. suitAdd = 60 + (suitCount << 6) / 44; @@ -986,13 +981,13 @@ void Moves::WeightAllocTrumpVoid1( suitAdd = -2 + (suitCount << 6) / 36; // Don't pitch from Kx. if ((suitCount == 2) && - (posPoint->secondBest[suit].hand == currHand)) + (tpos.secondBest[suit].hand == currHand)) suitAdd += -4; } for (int k = lastNumMoves; k < numMoves; k++) mply[k].weight = -mply[k].rank + suitAdd; } - else if (posPoint->length[partner[leadHand]][leadSuit] != 0) + else if (tpos.length[partner[leadHand]][leadSuit] != 0) { // 3rd hand follows suit while we ruff. // Could be ruffing partner's winner! @@ -1000,10 +995,10 @@ void Moves::WeightAllocTrumpVoid1( for (int k = lastNumMoves; k < numMoves; k++) mply[k].weight = 24 - (mply[k].rank) + suitAdd; } - else if ((posPoint->length[rho[leadHand]][leadSuit] == 0) - && (posPoint->length[rho[leadHand]][trump] != 0) && - (posPoint->rankInSuit[rho[leadHand]][trump] > - posPoint->rankInSuit[partner[leadHand]][trump])) + else if ((tpos.length[rho[leadHand]][leadSuit] == 0) + && (tpos.length[rho[leadHand]][trump] != 0) && + (tpos.rankInSuit[rho[leadHand]][trump] > + tpos.rankInSuit[partner[leadHand]][trump])) { // Everybody is void, and partner can overruff. suitAdd = (suitCount << 6) / 44; @@ -1015,7 +1010,7 @@ void Moves::WeightAllocTrumpVoid1( for (int k = lastNumMoves; k < numMoves; k++) { if (bitMapRank[mply[k].rank] > - posPoint->rankInSuit[partner[leadHand]][trump]) + tpos.rankInSuit[partner[leadHand]][trump]) { // We can ruff, 3rd hand is void but can't overruff. suitAdd = (suitCount << 6) / 44; @@ -1027,7 +1022,7 @@ void Moves::WeightAllocTrumpVoid1( suitAdd = (suitCount << 6) / 36; // Don't ruff from Kx. if ((suitCount == 2) && - (posPoint->secondBest[suit].hand == currHand)) + (tpos.secondBest[suit].hand == currHand)) suitAdd += -4; mply[k].weight = 15 - (mply[k].rank) + suitAdd; } @@ -1036,24 +1031,22 @@ void Moves::WeightAllocTrumpVoid1( } -void Moves::WeightAllocNTVoid1( - pos const * posPoint) +void Moves::WeightAllocNTVoid1(const pos& tpos) { // FIX: // Why the different penalties depending on partner? - if (posPoint->rankInSuit[rho[leadHand] ][leadSuit] > - (posPoint->rankInSuit[partner[leadHand]][leadSuit] | + if (tpos.rankInSuit[rho[leadHand] ][leadSuit] > + (tpos.rankInSuit[partner[leadHand]][leadSuit] | bitMapRank[ trackp->move[0].rank ])) { // Partner can win. - unsigned short suitCount = posPoint->length[currHand][suit]; + unsigned short suitCount = tpos.length[currHand][suit]; int suitAdd = (suitCount << 6) / 23; // Discourage pitch from Kx or A stiff. - if (suitCount == 2 && posPoint->secondBest[suit].hand == currHand) + if (suitCount == 2 && tpos.secondBest[suit].hand == currHand) suitAdd += -2; - else if ((suitCount == 1) && - (posPoint->winner[suit].hand == currHand)) + else if (suitCount == 1 && tpos.winner[suit].hand == currHand) suitAdd += -3; for (int k = lastNumMoves; k < numMoves; k++) @@ -1061,17 +1054,17 @@ void Moves::WeightAllocNTVoid1( } else { - unsigned short suitCount = posPoint->length[currHand][suit]; + unsigned short suitCount = tpos.length[currHand][suit]; int suitAdd = (suitCount << 6) / 33; // Discourage pitch from Kx. if ((suitCount == 2) && - (posPoint->secondBest[suit].hand == currHand)) + (tpos.secondBest[suit].hand == currHand)) suitAdd += -6; /* Discourage suit discard of highest card. */ else if ((suitCount == 1) && - (posPoint->winner[suit].hand == currHand)) + (tpos.winner[suit].hand == currHand)) suitAdd += -8; for (int k = lastNumMoves; k < numMoves; k++) @@ -1080,10 +1073,9 @@ void Moves::WeightAllocNTVoid1( } -void Moves::WeightAllocTrumpNotvoid2( - pos const * posPoint) +void Moves::WeightAllocTrumpNotvoid2(const pos& tpos) { - const int cards4th = posPoint->rankInSuit[rho[leadHand]][leadSuit]; + const int cards4th = tpos.rankInSuit[rho[leadHand]][leadSuit]; const int max4th = highestRank[cards4th]; const int min4th = lowestRank [cards4th]; const int max3rd = mply[0].rank; @@ -1329,8 +1321,7 @@ void Moves::GetTopNumber( -void Moves::WeightAllocNTNotvoid2( - pos const * posPoint) +void Moves::WeightAllocNTNotvoid2(const pos& tpos) { // One of the main remaining issues here is cashing out long // suits. Examples: @@ -1338,7 +1329,7 @@ void Moves::WeightAllocNTNotvoid2( // KQx opposite Jxxxx, don't block on the ace. // KJTx opposite 9 with Qx in dummy, do win the T. - const int cards4th = posPoint->rankInSuit[rho[leadHand]][leadSuit]; + const int cards4th = tpos.rankInSuit[rho[leadHand]][leadSuit]; const int max4th = highestRank[cards4th]; const int min4th = lowestRank [cards4th]; const int max3rd = mply[0].rank; @@ -1352,19 +1343,19 @@ void Moves::WeightAllocNTNotvoid2( // This doesn't help much, not sure why. It does work. - // if (0 && posPoint->length[leadHand][leadSuit] == 0 && - if (posPoint->length[leadHand][leadSuit] == 0 && - posPoint->winner[leadSuit].hand == currHand) + // if (0 && tpos.length[leadHand][leadSuit] == 0 && + if (tpos.length[leadHand][leadSuit] == 0 && + tpos.winner[leadSuit].hand == currHand) { // Partner has a singleton, and we have the ace. // Maybe we should overtake to run the suit. - int oppLen = posPoint->length[rho[leadHand]][leadSuit] - 1; - int lhoLen = posPoint->length[lho[leadHand]][leadSuit]; + int oppLen = tpos.length[rho[leadHand]][leadSuit] - 1; + int lhoLen = tpos.length[lho[leadHand]][leadSuit]; if (lhoLen > oppLen) oppLen = lhoLen; int topNumber, mno; - GetTopNumber(posPoint->rankInSuit[partner[leadHand]][leadSuit], + GetTopNumber(tpos.rankInSuit[partner[leadHand]][leadSuit], trackp->move[0].rank, topNumber, mno); if (oppLen <= topNumber) @@ -1399,16 +1390,15 @@ void Moves::WeightAllocNTNotvoid2( } -void Moves::WeightAllocTrumpVoid2( - pos const * posPoint) +void Moves::WeightAllocTrumpVoid2(const pos& tpos) { // Compared to "v2.8": // Moved a test for partner's win out of the k loop. int suitAdd; - const unsigned short suitCount = posPoint->length[currHand][suit]; + const unsigned short suitCount = tpos.length[currHand][suit]; const int max4th = highestRank[ - posPoint->rankInSuit[rho[leadHand]][leadSuit] ]; + tpos.rankInSuit[rho[leadHand]][leadSuit] ]; if (leadSuit == trump || suit != trump) { @@ -1420,7 +1410,7 @@ void Moves::WeightAllocTrumpVoid2( } else if (trackp->high[1] == 0 && trackp->move[0].rank > max4th && - (max4th != 0 || posPoint->length[rho[leadHand]][trump] == 0)) + (max4th != 0 || tpos.length[rho[leadHand]][trump] == 0)) { // Partner already beat 2nd and 4th hands. // Don't overruff partner's sure winner. @@ -1437,7 +1427,7 @@ void Moves::WeightAllocTrumpVoid2( mply[k].rank < trackp->move[1].rank) { // Don't underruff. - int rRank = relRank[ posPoint->aggr[suit] ][mply[k].rank]; + int rRank = relRank[ tpos.aggr[suit] ][mply[k].rank]; suitAdd = (suitCount << 6) / 40; mply[k].weight = -32 + rRank + suitAdd; } @@ -1447,7 +1437,7 @@ void Moves::WeightAllocTrumpVoid2( // We ruff partner's winner over 2nd hand. if (max4th != 0) { - if (posPoint->secondBest[leadSuit].hand == leadHand) + if (tpos.secondBest[leadSuit].hand == leadHand) { // We'd like to know whether partner has KQ or just K, // but that information takes a bit of diggging. It's @@ -1462,7 +1452,7 @@ void Moves::WeightAllocTrumpVoid2( } } else if (bitMapRank[mply[k].rank] > - posPoint->rankInSuit[rho[leadHand]][trump]) + tpos.rankInSuit[rho[leadHand]][trump]) { // We ruff higher than 4th hand. suitAdd = (suitCount << 6) / 50; @@ -1485,7 +1475,7 @@ void Moves::WeightAllocTrumpVoid2( } else if (bitMapRank[mply[k].rank] > - posPoint->rankInSuit[rho[leadHand]][trump]) + tpos.rankInSuit[rho[leadHand]][trump]) { // Ruff higher than 4th hand can. suitAdd = (suitCount << 6) / 50; @@ -1502,8 +1492,7 @@ void Moves::WeightAllocTrumpVoid2( } -void Moves::WeightAllocNTVoid2( - pos const * posPoint) +void Moves::WeightAllocNTVoid2(const pos& tpos) { // Compared to "v2.8": // Took only the second branch. The first branch (partner @@ -1511,15 +1500,13 @@ void Moves::WeightAllocNTVoid2( // for no reason that I could see. This is the same or a tiny // bit better. - const unsigned short suitCount = posPoint->length[currHand][suit]; + const unsigned short suitCount = tpos.length[currHand][suit]; int suitAdd = (suitCount << 6) / 24; // Try not to pitch from Kx or stiff ace. - if ((suitCount == 2) && - (posPoint->secondBest[suit].hand == currHand)) + if (suitCount == 2 && tpos.secondBest[suit].hand == currHand) suitAdd -= 4; - else if ((suitCount == 1) && - (posPoint->winner[suit].hand == currHand)) + else if (suitCount == 1 && tpos.winner[suit].hand == currHand) suitAdd -= 4; for (int k = lastNumMoves; k < numMoves; k++) @@ -1527,8 +1514,7 @@ void Moves::WeightAllocNTVoid2( } -void Moves::WeightAllocCombinedNotvoid3( - pos const * posPoint) +void Moves::WeightAllocCombinedNotvoid3(const pos& tpos) { // We're always following suit. // This function is very good, but occasionally it is better @@ -1557,12 +1543,11 @@ void Moves::WeightAllocCombinedNotvoid3( mply[k].weight = -mply[k].rank; } } - UNUSED(posPoint); + UNUSED(tpos); } -void Moves::WeightAllocTrumpVoid3( - pos const * posPoint) +void Moves::WeightAllocTrumpVoid3(const pos& tpos) { // Compared to "v2.8": // val removed for trump plays (doesn't really matter, though). @@ -1571,13 +1556,10 @@ void Moves::WeightAllocTrumpVoid3( // rRank vs rank // Don't pitch from Kx or stiff ace. - const int mylen = posPoint->length[currHand][suit]; + const int mylen = tpos.length[currHand][suit]; int val = (mylen << 6) / 24; - if ((mylen == 2) && (posPoint->secondBest[suit].hand == currHand)) + if ((mylen == 2) && (tpos.secondBest[suit].hand == currHand)) val -= 2; - // else if ((mylen == 1) && - // (posPoint->winner[suit].hand == currHand)) - // val -= 4; if (leadSuit == trump) { @@ -1601,7 +1583,7 @@ void Moves::WeightAllocTrumpVoid3( { for (int k = lastNumMoves; k < numMoves; k++) { - int rRank = relRank[ posPoint->aggr[suit] ][mply[k].rank]; + int rRank = relRank[ tpos.aggr[suit] ][mply[k].rank]; if (mply[k].rank > trackp->move[2].rank) mply[k].weight = 33 + rRank; // Overruff else @@ -1616,7 +1598,7 @@ void Moves::WeightAllocTrumpVoid3( { for (int k = lastNumMoves; k < numMoves; k++) { - int rRank = relRank[ posPoint->aggr[suit] ][mply[k].rank]; + int rRank = relRank[ tpos.aggr[suit] ][mply[k].rank]; mply[k].weight = 33 + rRank; } } @@ -1628,15 +1610,14 @@ void Moves::WeightAllocTrumpVoid3( } -void Moves::WeightAllocNTVoid3( - pos const * posPoint) +void Moves::WeightAllocNTVoid3(const pos& tpos) { - int mylen = posPoint->length[currHand][suit]; + int mylen = tpos.length[currHand][suit]; int val = (mylen << 6) / 27; // Try not to pitch from Kx, or to pitch a singleton winner. - if ((mylen == 2) && (posPoint->secondBest[suit].hand == currHand)) + if ((mylen == 2) && (tpos.secondBest[suit].hand == currHand)) val -= 6; - else if ((mylen == 1) && (posPoint->winner[suit].hand == currHand)) + else if ((mylen == 1) && (tpos.winner[suit].hand == currHand)) val -= 8; for (int k = lastNumMoves; k < numMoves; k++) @@ -1675,7 +1656,7 @@ int Moves::GetLength( void Moves::MakeSpecific( - moveType const * ourMply, + const moveType& ourMply, const int trick, const int relHand) { @@ -1683,20 +1664,20 @@ void Moves::MakeSpecific( if (relHand == 0) { - trackp->move[0].suit = ourMply->suit; - trackp->move[0].rank = ourMply->rank; - trackp->move[0].sequence = ourMply->sequence; + trackp->move[0].suit = ourMply.suit; + trackp->move[0].rank = ourMply.rank; + trackp->move[0].sequence = ourMply.sequence; trackp->high[0] = 0; - trackp->leadSuit = ourMply->suit; + trackp->leadSuit = ourMply.suit; } - else if (ourMply->suit == trackp->move[relHand - 1].suit) + else if (ourMply.suit == trackp->move[relHand - 1].suit) { - if (ourMply->rank > trackp->move[relHand - 1].rank) + if (ourMply.rank > trackp->move[relHand - 1].rank) { - trackp->move[relHand].suit = ourMply->suit; - trackp->move[relHand].rank = ourMply->rank; - trackp->move[relHand].sequence = ourMply->sequence; + trackp->move[relHand].suit = ourMply.suit; + trackp->move[relHand].rank = ourMply.rank; + trackp->move[relHand].sequence = ourMply.sequence; trackp->high[relHand] = relHand; } else @@ -1705,11 +1686,11 @@ void Moves::MakeSpecific( trackp->high[relHand] = trackp->high[relHand - 1]; } } - else if (ourMply->suit == trump) + else if (ourMply.suit == trump) { - trackp->move[relHand].suit = ourMply->suit; - trackp->move[relHand].rank = ourMply->rank; - trackp->move[relHand].sequence = ourMply->sequence; + trackp->move[relHand].suit = ourMply.suit; + trackp->move[relHand].rank = ourMply.rank; + trackp->move[relHand].sequence = ourMply.sequence; trackp->high[relHand] = relHand; } else @@ -1718,8 +1699,8 @@ void Moves::MakeSpecific( trackp->high[relHand] = trackp->high[relHand - 1]; } - trackp->playSuits[relHand] = ourMply->suit; - trackp->playRanks[relHand] = ourMply->rank; + trackp->playSuits[relHand] = ourMply.suit; + trackp->playRanks[relHand] = ourMply.rank; if (relHand == 3) { @@ -1741,31 +1722,31 @@ void Moves::MakeSpecific( } -moveType * Moves::MakeNext( +moveType const * Moves::MakeNext( const int trick, const int relHand, - const unsigned short int ourWinRanks[DDS_SUITS]) + const unsigned short ourWinRanks[DDS_SUITS]) { // Find moves that are >= ourWinRanks[suit], but allow one // "small" move per suit. int * lwp = track[trick].lowestWin[relHand]; - movePlyType * listp = &moveList[trick][relHand]; + movePlyType& list = moveList[trick][relHand]; trackp = &track[trick]; moveType * currp = nullptr, * prevp; bool found = false; - if (listp->last == -1) + if (list.last == -1) return NULL; - else if (listp->current == 0) + else if (list.current == 0) { - currp = &listp->move[0]; + currp = &list.move[0]; found = true; } else { - prevp = &listp->move[ listp->current - 1 ]; + prevp = &list.move[ list.current - 1 ]; if (lwp[ prevp->suit ] == 0) { int low = lowestRank[ ourWinRanks[prevp->suit] ]; @@ -1775,13 +1756,13 @@ moveType * Moves::MakeNext( lwp[ prevp->suit ] = low; } - while (listp->current <= listp->last && ! found) + while (list.current <= list.last && ! found) { - currp = &listp->move[ listp->current ]; + currp = &list.move[ list.current ]; if (currp->rank >= lwp[ currp->suit ]) found = true; else - listp->current++; + list.current++; } if (! found) @@ -1830,89 +1811,88 @@ moveType * Moves::MakeNext( if (relHand == 3) { - trackType * newp = &track[trick - 1]; + trackType& newt = track[trick - 1]; - newp->leadHand = (trackp->leadHand + trackp->high[3]) % 4; + newt.leadHand = (trackp->leadHand + trackp->high[3]) % 4; int r, s; for (s = 0; s < DDS_SUITS; s++) - newp->removedRanks[s] = trackp->removedRanks[s]; + newt.removedRanks[s] = trackp->removedRanks[s]; for (int h = 0; h < DDS_HANDS; h++) { r = trackp->playRanks[h]; s = trackp->playSuits[h]; - newp->removedRanks[s] |= bitMapRank[r]; + newt.removedRanks[s] |= bitMapRank[r]; } } - listp->current++; + list.current++; return currp; } -moveType * Moves::MakeNextSimple( +moveType const * Moves::MakeNextSimple( const int trick, const int relHand) { // Don't worry about small moves. Why not, actually? - movePlyType * listp = &moveList[trick][relHand]; - if (listp->current > listp->last) + movePlyType& list = moveList[trick][relHand]; + if (list.current > list.last) return NULL; - moveType * currp = &listp->move[ listp->current ]; + const moveType& curr = list.move[list.current]; trackp = &track[trick]; if (relHand == 0) { - trackp->move[0].suit = currp->suit; - trackp->move[0].rank = currp->rank; - trackp->move[0].sequence = currp->sequence; + trackp->move[0].suit = curr.suit; + trackp->move[0].rank = curr.rank; + trackp->move[0].sequence = curr.sequence; trackp->high[0] = 0; - trackp->leadSuit = currp->suit; + trackp->leadSuit = curr.suit; } - else if (currp->suit == trackp->move[relHand - 1].suit) + else if (curr.suit == trackp->move[relHand-1].suit) { - if (currp->rank > trackp->move[relHand - 1].rank) + if (curr.rank > trackp->move[relHand-1].rank) { - trackp->move[relHand].suit = currp->suit; - trackp->move[relHand].rank = currp->rank; - trackp->move[relHand].sequence = currp->sequence; + trackp->move[relHand].suit = curr.suit; + trackp->move[relHand].rank = curr.rank; + trackp->move[relHand].sequence = curr.sequence; trackp->high[relHand] = relHand; } else { - trackp->move[relHand] = trackp->move[relHand - 1]; - trackp->high[relHand] = trackp->high[relHand - 1]; + trackp->move[relHand] = trackp->move[relHand-1]; + trackp->high[relHand] = trackp->high[relHand-1]; } } - else if (currp->suit == trump) + else if (curr.suit == trump) { - trackp->move[relHand].suit = currp->suit; - trackp->move[relHand].rank = currp->rank; - trackp->move[relHand].sequence = currp->sequence; + trackp->move[relHand].suit = curr.suit; + trackp->move[relHand].rank = curr.rank; + trackp->move[relHand].sequence = curr.sequence; trackp->high[relHand] = relHand; } else { - trackp->move[relHand] = trackp->move[relHand - 1]; - trackp->high[relHand] = trackp->high[relHand - 1]; + trackp->move[relHand] = trackp->move[relHand-1]; + trackp->high[relHand] = trackp->high[relHand-1]; } - trackp->playSuits[relHand] = currp->suit; - trackp->playRanks[relHand] = currp->rank; + trackp->playSuits[relHand] = curr.suit; + trackp->playRanks[relHand] = curr.rank; if (relHand == 3) { - trackType * newp = &track[trick - 1]; - newp->leadHand = (trackp->leadHand + trackp->high[3]) % 4; + track[trick-1].leadHand = (trackp->leadHand + trackp->high[3]) % 4; } - listp->current++; - return currp; + list.current++; + return &curr; } @@ -1937,7 +1917,7 @@ void Moves::Purge( const int ourLeadHand, const moveType forbiddenMoves[]) { - movePlyType * ourMply = &moveList[trick][ourLeadHand]; + movePlyType& ourMply = moveList[trick][ourLeadHand]; for (int k = 1; k <= 13; k++) { @@ -1945,15 +1925,15 @@ void Moves::Purge( int rank = forbiddenMoves[k].rank; if (rank == 0) continue; - for (int r = 0; r <= ourMply->last; r++) + for (int r = 0; r <= ourMply.last; r++) { - if (s == ourMply->move[r].suit && - rank == ourMply->move[r].rank) + if (s == ourMply.move[r].suit && + rank == ourMply.move[r].rank) { /* For the forbidden move r: */ - for (int n = r; n <= ourMply->last; n++) - ourMply->move[n] = ourMply->move[n + 1]; - ourMply->last--; + for (int n = r; n <= ourMply.last; n++) + ourMply.move[n] = ourMply.move[n + 1]; + ourMply.last--; } } } @@ -1969,29 +1949,29 @@ void Moves::Reward( } -trickDataType * Moves::GetTrickData( - const int tricks) +const trickDataType& Moves::GetTrickData(const int tricks) { - trickDataType * datap = &track[tricks].trickData; + trickDataType& data = track[tricks].trickData; for (int s = 0; s < DDS_SUITS; s++) - datap->playCount[s] = 0; + data.playCount[s] = 0; for (int relh = 0; relh < DDS_HANDS; relh++) - datap->playCount[ trackp->playSuits[relh] ]++; + data.playCount[ trackp->playSuits[relh] ]++; int sum = 0; for (int s = 0; s < DDS_SUITS; s++) - sum += datap->playCount[s]; + sum += data.playCount[s]; + if (sum != 4) { - printf("Sum %d is not four\n", sum); + cout << "Sum " << sum << " is not four" << endl; exit(1); } - datap->bestRank = trackp->move[3].rank; - datap->bestSuit = trackp->move[3].suit; - datap->bestSequence = trackp->move[3].sequence; - datap->relWinner = trackp->high[3]; - return datap; + data.bestRank = trackp->move[3].rank; + data.bestSuit = trackp->move[3].suit; + data.bestSequence = trackp->move[3].sequence; + data.relWinner = trackp->high[3]; + return data; } @@ -2255,31 +2235,36 @@ void Moves::MergeSort() } -void Moves::PrintMove( - movePlyType const * ourMply) const +string Moves::PrintMove(const movePlyType& ourMply) const { - printf("current %d, last %d\n", ourMply->current, ourMply->last); - printf(" i suit sequence rank wgt\n"); - for (int i = 0; i <= ourMply->last; i++) + stringstream ss; + + ss << "current " << ourMply.current << ", last " << ourMply.last << "\n"; + ss << " i suit sequence rank wgt\n"; + for (int i = 0; i <= ourMply.last; i++) { - printf("%2d %2c %08x %2c %2d\n", - i, - cardSuit[ ourMply->move[i].suit ], - ourMply->move[i].sequence, - cardRank[ ourMply->move[i].rank ], - ourMply->move[i].weight); + ss << setw(2) << right << i << + setw(3) << cardSuit[ ourMply.move[i].suit ] << + setw(9) << hex << ourMply.move[i].sequence << + setw(3) << cardRank[ ourMply.move[i].rank ] << + setw(3) << ourMply.move[i].weight << "\n"; } + return ss.str(); } -void Moves::PrintMoves( +string Moves::PrintMoves( const int trick, const int relHand) const { - movePlyType const * listp = &moveList[trick][relHand]; - printf("trick %d relHand %d last %d current %d\n", - trick, relHand, listp->last, listp->current); - Moves::PrintMove(listp); + const movePlyType& list = moveList[trick][relHand]; + + const string st = "trick " + to_string(trick) + + " relHand " + to_string(relHand) + + " last " + to_string(list.last) + + " current " + to_string(list.current) + "\n"; + + return st + Moves::PrintMove(list); } @@ -2308,16 +2293,16 @@ string Moves::TrickToText(const int trick) const void Moves::UpdateStatsEntry( - moveStatsType * statp, + moveStatsType& stat, const int findex, const int hit, const int len) const { bool found = false; int fno = 0; - for (int i = 0; i < statp->nfuncs; i++) + for (int i = 0; i < stat.nfuncs; i++) { - if (statp->list[i].findex == findex) + if (stat.list[i].findex == findex) { found = true; fno = i; @@ -2328,22 +2313,22 @@ void Moves::UpdateStatsEntry( moveStatType * funp; if (found) { - funp = &statp->list[fno]; + funp = &stat.list[fno]; funp->count++; funp->sumHits += hit; funp->sumLengths += len; } else { - if (statp->nfuncs >= MG_SIZE) + if (stat.nfuncs >= MG_SIZE) { - printf("Shouldn't happen, %d\n", statp->nfuncs); - for (int i = 0; i < statp->nfuncs; i++) - printf("%d %d\n", i, statp->list[i].findex); + cout << "Shouldn't happen, " << stat.nfuncs << endl; + for (int i = 0; i < stat.nfuncs; i++) + cout << i << " " << stat.list[i].findex << "\n"; exit(1); } - funp = &statp->list[ statp->nfuncs++ ]; + funp = &stat.list[stat.nfuncs++]; funp->count++; funp->findex = findex; @@ -2357,32 +2342,32 @@ void Moves::RegisterHit( const int trick, const int relHand) { - movePlyType * listp = &moveList[trick][relHand]; + const movePlyType& list = moveList[trick][relHand]; - int findex = lastCall[trick][relHand]; - int len = listp->last + 1; + const int findex = lastCall[trick][relHand]; + const int len = list.last + 1; if (findex == -1) { - printf("RegisterHit trick %d relHand %d: findex %d\n", - trick, relHand, -1); + cout << "RegisterHit trick " << trick << + " relHand " << relHand << " findex -1" << endl; exit(1); } - int curr = listp->current; + const int curr = list.current; if (curr < 1 || curr > len) { - printf("current out of bounds\n"); + cout << "current out of bounds" << endl; exit(1); } - int moveSuit = listp->move[curr - 1].suit; + const int moveSuit = list.move[curr-1].suit; int numSuit = 0; int numSeen = 0; for (int i = 0; i < len; i++) { - if (listp->move[i].suit == moveSuit) + if (list.move[i].suit == moveSuit) { numSuit++; if (i == curr - 1) @@ -2390,37 +2375,6 @@ void Moves::RegisterHit( } } -// Used for development -// PrintDeal below untested in this context. -#if 0 - if (findex == MG_COMB_NOTVOID3 && numSeen > 1 && trick >= 10) - // if (0 && findex == MG_TRUMP_VOID3 && numSeen == 1 && curr > 1) - { - char text[12][80]; - RankToText(posPoint->rankInSuit, text); - - cout << PrintDeal(posPoint->RankInsuit, 16); - - trackp = &track[trick]; - - printf("Trumps %c, Play %c: %c%c - %c%c - %c%c, best no. %d\n\n", - // printf("Trumps %c, Play %c: %c%c - %c%c, best no. %d\n\n", - // printf("Trumps %c, Play %c: %c%c, best no. %d\n\n", - cardSuit[trump], - cardHand[leadHand], - cardSuit[ trackp->playSuits[0] ], - cardRank[ trackp->playRanks[0] ], - cardSuit[ trackp->playSuits[1] ], - cardRank[ trackp->playRanks[1] ], - cardSuit[ trackp->playSuits[2] ], - cardRank[ trackp->playRanks[2] ], - curr - 1); - - Moves::PrintMoves(trick, relHand); - printf("\n---------------------------------------\n\n"); - } -#endif - // Now we know enough to update the statistics tables. trickTable[trick][relHand].count++; @@ -2431,17 +2385,17 @@ void Moves::RegisterHit( trickSuitTable[trick][relHand].sumHits += numSeen; trickSuitTable[trick][relHand].sumLengths += numSuit; - Moves::UpdateStatsEntry(&trickDetailTable[trick][relHand], - findex, curr, len); + Moves::UpdateStatsEntry(trickDetailTable[trick][relHand], + findex, curr, len); - Moves::UpdateStatsEntry(&trickDetailSuitTable[trick][relHand], - findex, numSeen, numSuit); + Moves::UpdateStatsEntry(trickDetailSuitTable[trick][relHand], + findex, numSeen, numSuit); - Moves::UpdateStatsEntry(&trickFuncTable, - findex, curr, len); + Moves::UpdateStatsEntry(trickFuncTable, + findex, curr, len); - Moves::UpdateStatsEntry(&trickFuncSuitTable, - findex, numSeen, numSuit); + Moves::UpdateStatsEntry(trickFuncSuitTable, + findex, numSeen, numSuit); } diff --git a/src/Moves.h b/src/Moves.h index eed90dcd..46ce2089 100644 --- a/src/Moves.h +++ b/src/Moves.h @@ -116,30 +116,28 @@ class Moves void WeightAllocTrump0( - pos const * posPoint, + const pos& tpos, const moveType& bestMove, const moveType& bestMoveTT, const relRanksType thrp_rel[]); void WeightAllocNT0( - pos const * posPoint, + const pos& tpos, const moveType& bestMove, const moveType& bestMoveTT, const relRanksType thrp_rel[]); - void WeightAllocTrumpNotvoid1( - pos const * posPoint); - - void WeightAllocNTNotvoid1(pos const * posPoint); - void WeightAllocTrumpVoid1(pos const * posPoint); - void WeightAllocNTVoid1(pos const * posPoint); - void WeightAllocTrumpNotvoid2(pos const * posPoint); - void WeightAllocNTNotvoid2(pos const * posPoint); - void WeightAllocTrumpVoid2(pos const * posPoint); - void WeightAllocNTVoid2(pos const * posPoint); - void WeightAllocCombinedNotvoid3(pos const * posPoint); - void WeightAllocTrumpVoid3(pos const * posPoint); - void WeightAllocNTVoid3(pos const * posPoint); + void WeightAllocTrumpNotvoid1( const pos& tpos); + void WeightAllocNTNotvoid1(const pos& tpos); + void WeightAllocTrumpVoid1(const pos& tpos); + void WeightAllocNTVoid1(const pos& tpos); + void WeightAllocTrumpNotvoid2(const pos& tpos); + void WeightAllocNTNotvoid2(const pos& tpos); + void WeightAllocTrumpVoid2(const pos& tpos); + void WeightAllocNTVoid2(const pos& tpos); + void WeightAllocCombinedNotvoid3(const pos& tpos); + void WeightAllocTrumpVoid3(const pos& tpos); + void WeightAllocNTVoid3(const pos& tpos); void GetTopNumber( const int ris, @@ -149,7 +147,7 @@ class Moves int RankForcesAce(int cards4th) const; - typedef void (Moves::*WeightPtr)(pos const * posPoint); + typedef void (Moves::*WeightPtr)(const pos& tpos); WeightPtr WeightList[16]; inline bool WinningMove( @@ -157,13 +155,12 @@ class Moves const extCard& mvp2, const int trump) const; - void PrintMove( - movePlyType const * mply) const; + string PrintMove(const movePlyType& mply) const; void MergeSort(); void UpdateStatsEntry( - moveStatsType * statp, + moveStatsType& stat, const int findex, const int hit, const int len) const; @@ -186,7 +183,7 @@ class Moves const int relStartHand, const int initialRanks[], const int initialSuits[], - const unsigned short int rankInSuit[DDS_HANDS][DDS_SUITS], + const unsigned short rankInSuit[DDS_HANDS][DDS_SUITS], const int trump, const int leadHand); @@ -196,7 +193,7 @@ class Moves int MoveGen0( const int tricks, - pos const * posPoint, + const pos& tpos, const moveType& bestMove, const moveType& bestMoveTT, const relRanksType thrp_rel[]); @@ -204,23 +201,23 @@ class Moves int MoveGen123( const int tricks, const int relHand, - pos const * posPoint); + const pos& tpos); int GetLength( const int trick, const int relHand) const; void MakeSpecific( - moveType const * mply, + const moveType& mply, const int trick, const int relHand); - moveType * MakeNext( + moveType const * MakeNext( const int trick, const int relHand, const unsigned short winRanks[DDS_SUITS]); - moveType * MakeNextSimple( + moveType const * MakeNextSimple( const int trick, const int relHand); @@ -241,14 +238,13 @@ class Moves const int trick, const int relHand); - trickDataType * GetTrickData( - const int tricks); + const trickDataType& GetTrickData(const int tricks); void Sort( const int tricks, const int relHand); - void PrintMoves( + string PrintMoves( const int trick, const int relHand) const; diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 5202044e..97d0fb56 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -272,7 +272,7 @@ int SolveBoardInternal( if (k == 0) thrp->moves.MoveGen0( trick, - &thrp->lookAheadPos, + thrp->lookAheadPos, thrp->bestMove[iniDepth], thrp->bestMoveTT[iniDepth], thrp->rel); @@ -280,10 +280,10 @@ int SolveBoardInternal( thrp->moves.MoveGen123( trick, k, - &thrp->lookAheadPos); + thrp->lookAheadPos); thrp->lookAheadPos.move[iniDepth + handRelFirst - k] = mv; - thrp->moves.MakeSpecific(&mv, trick, k); + thrp->moves.MakeSpecific(mv, trick, k); } InitWinners(dl, thrp->lookAheadPos, thrp); @@ -309,7 +309,7 @@ int SolveBoardInternal( if (handRelFirst == 0) thrp->moves.MoveGen0( trick, - &thrp->lookAheadPos, + thrp->lookAheadPos, thrp->bestMove[iniDepth], thrp->bestMoveTT[iniDepth], thrp->rel); @@ -317,7 +317,7 @@ int SolveBoardInternal( thrp->moves.MoveGen123( trick, handRelFirst, - &thrp->lookAheadPos); + thrp->lookAheadPos); noMoves = thrp->moves.GetLength(trick, handRelFirst); @@ -327,7 +327,7 @@ int SolveBoardInternal( if (mode == 0 && noMoves == 1) { - moveType * mp = thrp->moves.MakeNextSimple(trick, handRelFirst); + moveType const * mp = thrp->moves.MakeNextSimple(trick, handRelFirst); futp->nodes = 0; futp->cards = 1; @@ -401,10 +401,10 @@ int SolveBoardInternal( int noLeft = thrp->moves.GetLength(trick, handRelFirst); thrp->moves.Rewind(trick, handRelFirst); - moveType * mp; for (int j = 0; j < noLeft; j++) { - mp = thrp->moves.MakeNextSimple(trick, handRelFirst); + moveType const * mp = + thrp->moves.MakeNextSimple(trick, handRelFirst); futp->suit[mno + j] = mp->suit; futp->rank[mno + j] = mp->rank; @@ -429,7 +429,9 @@ int SolveBoardInternal( for (int mno = 0; mno < noMoves; mno++) { - moveType * mp = thrp->moves.MakeNextSimple(trick, handRelFirst); + moveType const * mp = + thrp->moves.MakeNextSimple(trick, handRelFirst); + futp->suit[mno] = mp->suit; futp->rank[mno] = mp->rank; futp->equals[mno] = mp->sequence << 2; @@ -486,11 +488,11 @@ int SolveBoardInternal( else // solutions == 2, so return all cards futp->cards = noMoves; - moveType * mp; thrp->moves.Rewind(trick, handRelFirst); for (int i = 0; i < noMoves; i++) { - mp = thrp->moves.MakeNextSimple(trick, handRelFirst); + moveType const * mp = + thrp->moves.MakeNextSimple(trick, handRelFirst); futp->score[i] = 0; futp->suit[i] = mp->suit; @@ -561,7 +563,6 @@ int SolveBoardInternal( // This applies both to target == -1 and target >= 1. // ---------------------------------------------------------- - moveType * mp; forb = 1; ind = 1; @@ -574,7 +575,8 @@ int SolveBoardInternal( for (int k = 0; k < num; k++) { - mp = thrp->moves.MakeNextSimple(trick, handRelFirst); + moveType const * mp = + thrp->moves.MakeNextSimple(trick, handRelFirst); thrp->forbiddenMoves[forb] = * mp; forb++; @@ -799,23 +801,23 @@ int AnalyseLaterBoard( if (handRelFirst == 0) { - thrp->moves.MakeSpecific(move, trick + 1, 3); + thrp->moves.MakeSpecific(* move, trick + 1, 3); unsigned short int ourWinRanks[DDS_SUITS]; // Unused here Make3(&thrp->lookAheadPos, ourWinRanks, iniDepth + 1, move, thrp); } else if (handRelFirst == 1) { - thrp->moves.MakeSpecific(move, trick, 0); + thrp->moves.MakeSpecific(* move, trick, 0); Make0(&thrp->lookAheadPos, iniDepth + 1, move); } else if (handRelFirst == 2) { - thrp->moves.MakeSpecific(move, trick, 1); + thrp->moves.MakeSpecific(* move, trick, 1); Make1(&thrp->lookAheadPos, iniDepth + 1, move); } else { - thrp->moves.MakeSpecific(move, trick, 2); + thrp->moves.MakeSpecific(* move, trick, 2); Make2(&thrp->lookAheadPos, iniDepth + 1, move); } From 0a3ba6328cb05816b4dc61fee5597da6e3743a97 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Fri, 30 Mar 2018 15:06:42 +0200 Subject: [PATCH 097/132] Cleanup --- src/SolverIF.h | 1 + src/System.cpp | 26 -------------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/src/SolverIF.h b/src/SolverIF.h index 8dbae5a3..066076f5 100644 --- a/src/SolverIF.h +++ b/src/SolverIF.h @@ -10,6 +10,7 @@ #ifndef DDS_SOLVERIF_H #define DDS_SOLVERIF_H +#include "dds.h" #include "Memory.h" diff --git a/src/System.cpp b/src/System.cpp index 0bd990da..96629ad9 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -11,15 +11,12 @@ #include #include #include -#include #include "SolveBoard.h" #include "CalcTables.h" #include "PlayAnalyser.h" #include "parallel.h" #include "System.h" -#include "SolveBoard.h" -#include "PlayAnalyser.h" #include "Scheduler.h" extern Scheduler scheduler; @@ -260,11 +257,6 @@ int System::RegisterRun( runCat = mode; bop = &bdsIn; - - // TODO: The implicit thread models don't need the scheduler(?). - // if (preferredSystem <= DDS_SYSTEM_THREAD_TBB) - // scheduler.RegisterRun(mode, bopIn); - return RETURN_NO_FAULT; } @@ -463,13 +455,6 @@ int System::RunThreadsSTL() vector crossrefs; (* CallbackDuplList[runCat])(* bop, uniques, crossrefs); -// TODO Remove -// int numGroups = scheduler.NumGroups(); -// runSched += numGroups; -// runDetect += uniques.size(); -// cout << "scheduler groups " << runSched << ", uniques " << -// runDetect << endl; - const unsigned nu = static_cast(numThreads); threads.resize(nu); @@ -487,10 +472,6 @@ int System::RunThreadsSTL() } -// TODO Remove -// #include "Memory.h" -// extern Memory memory; - int System::RunThreadsSTLIMPL() { #ifdef DDS_THREADS_STLIMPL @@ -498,13 +479,6 @@ int System::RunThreadsSTLIMPL() vector crossrefs; (* CallbackDuplList[runCat])(* bop, uniques, crossrefs); -// TODO Remove -// int numGroups = scheduler.NumGroups(); -// runSched += numGroups; -// runDetect += uniques.size(); -// cout << "scheduler groups " << runSched << ", uniques " << - // runDetect << endl; - atomic thrIdNext = 0; thread_local int thrId = -1; bool err = false; From 78d3f028a0f8ae7a8285cdebbf3d9d7cf3f3083d Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Fri, 30 Mar 2018 16:23:18 +0200 Subject: [PATCH 098/132] TransTable small option was broken --- src/Memory.cpp | 5 ++++ src/TransTable.cpp | 62 ++++++++-------------------------------------- src/TransTable.h | 50 ++++++++++++++++++------------------- 3 files changed, 40 insertions(+), 77 deletions(-) diff --git a/src/Memory.cpp b/src/Memory.cpp index 0a2f2ba6..0cb13740 100644 --- a/src/Memory.cpp +++ b/src/Memory.cpp @@ -81,6 +81,11 @@ void Memory::Resize(const unsigned n) for (unsigned i = nThreads; i < n; i++) { memory[i] = new ThreadData; + + // TODO: Should come from the outside? + memory[i]->transTable.SetMemoryDefault(THREADMEM_DEF_MB); + memory[i]->transTable.SetMemoryMaximum(THREADMEM_MAX_MB); + memory[i]->transTable.MakeTT(); } } diff --git a/src/TransTable.cpp b/src/TransTable.cpp index 71142adf..5d29e6a1 100644 --- a/src/TransTable.cpp +++ b/src/TransTable.cpp @@ -103,6 +103,7 @@ int TTlowestRank[8192]; #endif +#include TransTable::TransTable() { if (! _constantsSet) @@ -226,7 +227,6 @@ void TransTable::Init(int handLookup[][15]) (aggp[ind].winMask[s] >> 2) | (3 << 24); } } - return; } @@ -347,12 +347,10 @@ void TransTable::MakeTT() if (pw == NULL) exit(1); - pn = static_cast(calloc(static_cast(maxIndex + 1), sizeof(struct nodeCardsType *))); if (pn == NULL) exit(1); - for (int k = 1; k <= 13; k++) for (int h = 0; h < DDS_HANDS; h++) { @@ -363,7 +361,6 @@ void TransTable::MakeTT() exit(1); } - for (i = 0; i <= maxIndex; i++) { if (pw[i]) @@ -1054,8 +1051,7 @@ nodeCardsType * TransTable::Lookup( cardsP = NULL; else { - cardsP = FindSOP(orderSet, limit, pp->posSearchPoint, - hand, lowerFlag); + cardsP = FindSOP(orderSet, limit, pp->posSearchPoint, lowerFlag); if (cardsP == NULL) return cardsP; @@ -1078,7 +1074,7 @@ void TransTable::Add( bool flag) { BuildSOP(ourWinRanks, aggrTarget, first, suitLengths[tricks], - tricks, hand, tricks, flag); + tricks, hand, flag); if (clearTTflag) { @@ -1116,7 +1112,7 @@ void TransTable::AddWinSet() wcount++; winSetSizeLimit = WSIZE; pw[wcount] = - static_cast(calloc((WSIZE + 1), sizeof(struct winCardType))); + static_cast(malloc((WSIZE + 1) * sizeof(struct winCardType))); if (pw[wcount] == NULL) { clearTTflag = true; @@ -1154,7 +1150,7 @@ void TransTable::AddNodeSet() ncount++; nodeSetSizeLimit = NSIZE; pn[ncount] = - static_cast(calloc((NSIZE + 1), sizeof(struct nodeCardsType))); + static_cast(malloc((NSIZE + 1) * sizeof(struct nodeCardsType))); if (pn[ncount] == NULL) { clearTTflag = true; @@ -1196,7 +1192,7 @@ void TransTable::AddLenSet(int trick, int firstHand) lcount[trick][firstHand]++; pl[trick][firstHand][lcount[trick][firstHand]] = - static_cast(calloc(LSIZE + 1, sizeof(struct posSearchTypeSmall))); + static_cast(malloc((LSIZE + 1) * sizeof(struct posSearchTypeSmall))); if (pl[trick][firstHand][lcount[trick][firstHand]] == NULL) @@ -1236,10 +1232,8 @@ void TransTable::BuildSOP( long long lengths, int tricks, int firstHand, - int depth, bool flag) { - UNUSED(depth); #ifndef SMALL_MEMORY_OPTION UNUSED(ourWinRanks); UNUSED(aggrArg); @@ -1337,8 +1331,7 @@ struct nodeCardsType * TransTable::BuildPath( return NULL; #else bool found; - struct winCardType * np, *p2, *nprev, *fnp, *pnp; - struct winCardType temp; + struct winCardType * np, *p2, *nprev; struct nodeCardsType * sopP = 0, *p; np = nodep->posSearchPoint; @@ -1363,7 +1356,7 @@ struct nodeCardsType * TransTable::BuildPath( p2->first = NULL; np = p2; /* Latest winning node */ suit++; - while (suit < 4) + while (suit < DDS_SUITS) { p2 = &(winCards[winSetSize]); AddWinSet(); @@ -1409,32 +1402,11 @@ struct nodeCardsType * TransTable::BuildPath( if (found) { suit++; - if (suit > 3) + if (suit >= DDS_SUITS) { sopP = UpdateSOP(ubound, lbound, bestMoveSuit, bestMoveRank, np->first); - if (np->prevWin != NULL) - { - pnp = np->prevWin; - fnp = pnp->nextWin; - } - else - fnp = nodep->posSearchPoint; - - temp.orderSet = np->orderSet; - temp.winMask = np->winMask; - temp.first = np->first; - temp.nextWin = np->nextWin; - np->orderSet = fnp->orderSet; - np->winMask = fnp->winMask; - np->first = fnp->first; - np->nextWin = fnp->nextWin; - fnp->orderSet = temp.orderSet; - fnp->winMask = temp.winMask; - fnp->first = temp.first; - fnp->nextWin = temp.nextWin; - *result = false; return sopP; } @@ -1601,11 +1573,9 @@ struct nodeCardsType * TransTable::UpdateSOP( UNUSED(nodep); return NULL; #else - if ((lbound > nodep->lbound) || - (nodep->lbound == -1)) + if (lbound > nodep->lbound) nodep->lbound = static_cast(lbound); - if ((ubound < nodep->ubound) || - (nodep->ubound == -1)) + if (ubound < nodep->ubound) nodep->ubound = static_cast(ubound); nodep->bestMoveSuit = bestMoveSuit; @@ -1620,11 +1590,9 @@ struct nodeCardsType * TransTable::FindSOP( int orderSet[], int limit, winCardType * nodeP, - int firstHand, bool * lowerFlag) { struct winCardType * np; - UNUSED(firstHand); np = nodeP; int s = 0; @@ -2821,8 +2789,6 @@ int TransTable::EffectOfBlockBound( } -// #define TT_MEMORY_SCENARIO - void TransTable::PrintSummaryEntryStats() { #ifndef SMALL_MEMORY_OPTION @@ -2832,9 +2798,7 @@ void TransTable::PrintSummaryEntryStats() int cumCount = 0; double cumProd = 0.; -#ifdef TT_MEMORY_SCENARIO int cumMemory = 0; -#endif suitWraps = 0; for (int i = 0; i <= BLOCKS_PER_ENTRY; i++) @@ -2862,9 +2826,7 @@ void TransTable::PrintSummaryEntryStats() cumCount += count; cumProd += prod_sum; -#ifdef TT_MEMORY_SCENARIO cumMemory += TransTable::EffectOfBlockBound(hist, 20); -#endif double mean = prod_sum / static_cast(count); double var = prod_sumsq / @@ -2894,11 +2856,9 @@ void TransTable::PrintSummaryEntryStats() fprintf(fp, "Blocks produced\t%8d\n", TransTable::BlocksInUse()); -#ifdef TT_MEMORY_SCENARIO fprintf(fp, "Mem scenario\t%7.2f%%\n", 100. * cumMemory / (static_cast(BLOCKS_PER_ENTRY * cumCount))); -#endif if (cumCount) fprintf(fp, "Fullness\t%7.2f%%\n", diff --git a/src/TransTable.h b/src/TransTable.h index f5b10857..f3c8f3b9 100644 --- a/src/TransTable.h +++ b/src/TransTable.h @@ -267,7 +267,6 @@ class TransTable long long suitLengths, int tricks, int firstHand, - int depth, bool flag); struct nodeCardsType * BuildPath( @@ -299,7 +298,6 @@ class TransTable int orderSet[], int limit, winCardType * nodeP, - int firstHand, bool * lowerFlag); @@ -346,16 +344,16 @@ class TransTable long long key, int handDist[]); - void DistToLengths( + void DistToLengths( // Both? int trick, int handDist[], unsigned char lengths[DDS_HANDS][DDS_SUITS]); - void LenToStr( + void LenToStr( // Both? unsigned char lengths[DDS_HANDS][DDS_SUITS], char * line); - void MakeHistStats( + void MakeHistStats( // Both? Or only LARGE? int hist[], int * count, int * prod_sum, @@ -363,32 +361,32 @@ class TransTable int * max_len, int last_index); - int CalcPercentile( + int CalcPercentile( // Both? Or only large? int hist[], double threshold, int last_index); - void PrintHist( + void PrintHist( // Both? Or only LARGE? int hist[], int num_wraps, int last_index); - void UpdateSuitHist( + void UpdateSuitHist( // Only LARGE int trick, int hand, int hist[], int * num_wraps); - winBlockType * FindMatchingDist( + winBlockType * FindMatchingDist( // Only LARGE int trick, int hand, int handDistSought[DDS_HANDS]); - void PrintEntriesBlock( + void PrintEntriesBlock( // Both, but probably only LARGE? winBlockType * bp, unsigned char lengths[DDS_HANDS][DDS_SUITS]); - void UpdateEntryHist( + void UpdateEntryHist( // Only LARGE int trick, int hand, int hist[], @@ -463,19 +461,19 @@ class TransTable void SetFile(const string& fname); - void PrintSuits( + void PrintSuits( // Only LARGE int trick, int hand); - void PrintAllSuits(); + void PrintAllSuits(); // Only LARGE - void PrintSuitStats( + void PrintSuitStats( // Only LARGE int trick, int hand); - void PrintAllSuitStats(); + void PrintAllSuitStats(); // Only LARGE - void PrintSummarySuitStats(); + void PrintSummarySuitStats(); // Only LARGE // Examples: // int hd[DDS_HANDS] = { 0x0342, 0x0334, 0x0232, 0x0531 }; @@ -484,36 +482,36 @@ class TransTable // { 0x1fff, 0x1fff, 0x0f75, 0x1fff }; // thrp->transTable.PrintEntriesDistAndCards(11, 1, ag, hd); - void PrintEntriesDist( + void PrintEntriesDist( // Only LARGE int trick, int hand, int handDist[DDS_HANDS]); - void PrintEntriesDistAndCards( + void PrintEntriesDistAndCards( // Only LARGE int trick, int hand, unsigned short * aggrTarget, int handDist[DDS_HANDS]); - void PrintEntries( + void PrintEntries( // Only LARGE int trick, int hand); - void PrintAllEntries(); + void PrintAllEntries(); // Only LARGE - void PrintEntryStats( + void PrintEntryStats( // Only LARGE int trick, int hand); - void PrintAllEntryStats(); + void PrintAllEntryStats(); // Only LARGE - void PrintSummaryEntryStats(); + void PrintSummaryEntryStats(); // Only LARGE - void PrintPageSummary(); + void PrintPageSummary(); // Only SMALL - void PrintNodeStats(); + void PrintNodeStats(); // Only SMALL - void PrintResetStats(); + void PrintResetStats(); // Only SMALL }; #endif From 70e2bdf332f5f6b786ad0af581fb05be69b97d7f Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 31 Mar 2018 15:31:49 +0200 Subject: [PATCH 099/132] TransTable S and L now separate --- src/ABsearch.cpp | 19 +- src/Init.cpp | 6 +- src/Makefiles/depends_obj.txt | 65 +- src/Makefiles/sources.txt | 3 +- src/Memory.cpp | 2 +- src/Memory.h | 17 +- src/SolverIF.cpp | 26 +- src/TransTable.cpp | 2921 --------------------------------- src/TransTable.h | 542 +----- src/TransTableL.cpp | 1829 +++++++++++++++++++++ src/TransTableL.h | 367 +++++ src/TransTableS.cpp | 943 +++++++++++ src/TransTableS.h | 198 +++ 13 files changed, 3511 insertions(+), 3427 deletions(-) delete mode 100644 src/TransTable.cpp create mode 100644 src/TransTableL.cpp create mode 100644 src/TransTableL.h create mode 100644 src/TransTableS.cpp create mode 100644 src/TransTableS.h diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index d653773a..4253cbcc 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -13,7 +13,12 @@ #include "dds.h" -#include "TransTable.h" +#ifdef SMALL_MEMORY_OPTION + #include "TransTableS.h" +#else + #include "TransTableL.h" +#endif + #include "Moves.h" #include "QuickTricks.h" #include "LaterTricks.h" @@ -187,17 +192,17 @@ bool ABsearch0( bool lowerFlag; TIMER_START(TIMER_NO_LOOKUP, depth); - nodeCardsType * cardsP = + nodeCardsType const * cardsP = thrp->transTable.Lookup( tricks, hand, posPoint->aggr, posPoint->handDist, - limit, &lowerFlag); + limit, lowerFlag); TIMER_END(TIMER_NO_LOOKUP, depth); if (cardsP) { #ifdef DDS_AB_HITS DumpRetrieved(thrp->fileRetrieved.GetStream(), - * posPoint, * cardsP, target, depth); + * posPoint, cardsP, target, depth); #endif for (int ss = 0; ss < DDS_SUITS; ss++) @@ -299,10 +304,10 @@ bool ABsearch0( bool lowerFlag; TIMER_START(TIMER_NO_LOOKUP, depth); - nodeCardsType * cardsP = + nodeCardsType const * cardsP = thrp->transTable.Lookup( tricks, hand, posPoint->aggr, posPoint->handDist, - limit, &lowerFlag); + limit, lowerFlag); TIMER_END(TIMER_NO_LOOKUP, depth); if (cardsP) @@ -439,7 +444,7 @@ bool ABsearch0( hand, posPoint->aggr, posPoint->winRanks[depth], - &first, + first, flag); TIMER_END(TIMER_NO_BUILD, depth); diff --git a/src/Init.cpp b/src/Init.cpp index b441dbd9..290f95dd 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -374,7 +374,7 @@ void InitDebugFiles() #endif #ifdef DDS_TT_STATS - thrp->transTable.SetFile(DDS_TT_STATS_PREFIX + send); + thrp->fileTTstats.SetName(DDS_TT_STATS_PREFIX + send); #endif #ifdef DDS_MOVES @@ -403,6 +403,10 @@ void CloseDebugFiles() thrp->fileTopLevel.Close(); #endif +#ifdef DDS_TT_STATS + thrp->fileTTstats.Close(); +#endif + #ifdef DDS_MOVES thrp->fileMoves.Close(); #endif diff --git a/src/Makefiles/depends_obj.txt b/src/Makefiles/depends_obj.txt index 98185f41..8e34439b 100644 --- a/src/Makefiles/depends_obj.txt +++ b/src/Makefiles/depends_obj.txt @@ -1,46 +1,53 @@ dds.obj: ../include/dll.h Init.h dds.h ../include/portab.h Memory.h -dds.obj: TransTable.h Moves.h debug.h -dump.obj: dds.h ../include/portab.h ../include/dll.h dump.h -ABsearch.obj: dds.h ../include/portab.h ../include/dll.h TransTable.h Moves.h -ABsearch.obj: QuickTricks.h Memory.h debug.h LaterTricks.h ABsearch.h -ABsearch.obj: ABstats.h TimerList.h TimerGroup.h Timer.h dump.h -ABstats.obj: dds.h ../include/portab.h ../include/dll.h ABstats.h debug.h -CalcTables.obj: dds.h ../include/portab.h ../include/dll.h SolverIF.h -CalcTables.obj: Memory.h TransTable.h Moves.h debug.h SolveBoard.h System.h -CalcTables.obj: Scheduler.h TimeStatList.h TimeStat.h Timer.h PBN.h +dds.obj: TransTable.h TransTableL.h Moves.h File.h debug.h +dump.obj: dump.h dds.h ../include/portab.h ../include/dll.h Moves.h Memory.h +dump.obj: TransTable.h TransTableL.h File.h debug.h +ABsearch.obj: dds.h ../include/portab.h ../include/dll.h TransTableL.h +ABsearch.obj: TransTable.h Moves.h QuickTricks.h Memory.h File.h debug.h +ABsearch.obj: LaterTricks.h ABsearch.h ABstats.h TimerList.h TimerGroup.h +ABsearch.obj: Timer.h dump.h +ABstats.obj: ABstats.h debug.h +CalcTables.obj: SolverIF.h dds.h ../include/portab.h ../include/dll.h +CalcTables.obj: Memory.h TransTable.h TransTableL.h Moves.h File.h debug.h +CalcTables.obj: SolveBoard.h System.h Scheduler.h TimeStatList.h TimeStat.h +CalcTables.obj: Timer.h PBN.h DealerPar.obj: dds.h ../include/portab.h ../include/dll.h +File.obj: File.h Init.obj: Init.h dds.h ../include/portab.h ../include/dll.h Memory.h -Init.obj: TransTable.h Moves.h debug.h System.h Scheduler.h TimeStatList.h -Init.obj: TimeStat.h Timer.h +Init.obj: TransTable.h TransTableL.h Moves.h File.h debug.h System.h +Init.obj: Scheduler.h TimeStatList.h TimeStat.h Timer.h LaterTricks.obj: LaterTricks.h dds.h ../include/portab.h ../include/dll.h -LaterTricks.obj: Memory.h TransTable.h Moves.h debug.h -Memory.obj: Memory.h TransTable.h ../include/dll.h dds.h ../include/portab.h -Memory.obj: Moves.h debug.h -Moves.obj: dds.h ../include/portab.h ../include/dll.h Moves.h debug.h +LaterTricks.obj: Memory.h TransTable.h TransTableL.h Moves.h File.h debug.h +Memory.obj: Memory.h TransTable.h dds.h ../include/portab.h ../include/dll.h +Memory.obj: TransTableL.h Moves.h File.h debug.h +Moves.obj: Moves.h dds.h ../include/portab.h ../include/dll.h debug.h Par.obj: dds.h ../include/portab.h ../include/dll.h PBN.h -PlayAnalyser.obj: dds.h ../include/portab.h ../include/dll.h SolverIF.h -PlayAnalyser.obj: Memory.h TransTable.h Moves.h debug.h System.h Scheduler.h -PlayAnalyser.obj: TimeStatList.h TimeStat.h Timer.h PBN.h +PlayAnalyser.obj: SolverIF.h dds.h ../include/portab.h ../include/dll.h +PlayAnalyser.obj: Memory.h TransTable.h TransTableL.h Moves.h File.h debug.h +PlayAnalyser.obj: System.h Scheduler.h TimeStatList.h TimeStat.h Timer.h +PlayAnalyser.obj: PBN.h PBN.obj: dds.h ../include/portab.h ../include/dll.h PBN.h QuickTricks.obj: QuickTricks.h dds.h ../include/portab.h ../include/dll.h -QuickTricks.obj: Memory.h TransTable.h Moves.h debug.h +QuickTricks.obj: Memory.h TransTable.h TransTableL.h Moves.h File.h debug.h Scheduler.obj: Scheduler.h dds.h ../include/portab.h ../include/dll.h Scheduler.obj: TimeStatList.h TimeStat.h Timer.h -SolveBoard.obj: SolverIF.h Memory.h TransTable.h ../include/dll.h dds.h -SolveBoard.obj: ../include/portab.h Moves.h debug.h SolveBoard.h System.h -SolveBoard.obj: Scheduler.h TimeStatList.h TimeStat.h Timer.h PBN.h +SolveBoard.obj: SolverIF.h dds.h ../include/portab.h ../include/dll.h +SolveBoard.obj: Memory.h TransTable.h TransTableL.h Moves.h File.h debug.h +SolveBoard.obj: SolveBoard.h System.h Scheduler.h TimeStatList.h TimeStat.h +SolveBoard.obj: Timer.h PBN.h SolverIF.obj: dds.h ../include/portab.h ../include/dll.h Init.h Memory.h -SolverIF.obj: TransTable.h Moves.h debug.h ABsearch.h SolverIF.h TimerList.h -SolverIF.obj: TimerGroup.h Timer.h System.h Scheduler.h TimeStatList.h -SolverIF.obj: TimeStat.h dump.h +SolverIF.obj: TransTable.h TransTableL.h Moves.h File.h debug.h ABsearch.h +SolverIF.obj: SolverIF.h TimerList.h TimerGroup.h Timer.h System.h +SolverIF.obj: Scheduler.h TimeStatList.h TimeStat.h dump.h System.obj: SolveBoard.h dds.h ../include/portab.h ../include/dll.h System.obj: CalcTables.h PlayAnalyser.h parallel.h System.h Scheduler.h System.obj: TimeStatList.h TimeStat.h Timer.h Timer.obj: Timer.h TimerGroup.obj: TimerGroup.h Timer.h -TimerList.obj: dds.h ../include/portab.h ../include/dll.h TimerList.h -TimerList.obj: TimerGroup.h Timer.h debug.h +TimerList.obj: TimerList.h TimerGroup.h Timer.h debug.h TimeStat.obj: TimeStat.h TimeStatList.obj: TimeStatList.h TimeStat.h -TransTable.obj: dds.h ../include/portab.h ../include/dll.h TransTable.h -TransTable.obj: debug.h +TransTableS.obj: TransTableS.h TransTable.h dds.h ../include/portab.h +TransTableS.obj: ../include/dll.h debug.h +TransTableL.obj: TransTableL.h ../include/dll.h dds.h ../include/portab.h +TransTableL.obj: TransTable.h debug.h diff --git a/src/Makefiles/sources.txt b/src/Makefiles/sources.txt index db84e319..575501a3 100644 --- a/src/Makefiles/sources.txt +++ b/src/Makefiles/sources.txt @@ -23,4 +23,5 @@ SOURCE_FILES = \ TimerList.cpp \ TimeStat.cpp \ TimeStatList.cpp \ - TransTable.cpp + TransTableS.cpp \ + TransTableL.cpp diff --git a/src/Memory.cpp b/src/Memory.cpp index 0cb13740..f44a8cf8 100644 --- a/src/Memory.cpp +++ b/src/Memory.cpp @@ -34,7 +34,7 @@ void Memory::Reset() void Memory::ResetThread(const unsigned thrId) { - memory[thrId]->transTable.ResetMemory(FREE_THREAD_MEM); + memory[thrId]->transTable.ResetMemory(TT_RESET_FREE_MEMORY); memory[thrId]->memUsed = Memory::MemoryInUseMB(thrId); } diff --git a/src/Memory.h b/src/Memory.h index ec7fa4a2..73aa9891 100644 --- a/src/Memory.h +++ b/src/Memory.h @@ -13,6 +13,13 @@ #include #include "TransTable.h" + +#ifdef SMALL_MEMORY_OPTION + #include "TransTableS.h" +#else + #include "TransTableL.h" +#endif + #include "Moves.h" #include "File.h" #include "debug.h" @@ -69,7 +76,11 @@ struct ThreadData // 960 KB relRanksType rel[8192]; - TransTable transTable; +#ifdef SMALL_MEMORY_OPTION + TransTableS transTable; +#else + TransTableL transTable; +#endif Moves moves; @@ -82,6 +93,10 @@ struct ThreadData File fileMoves; #endif +#ifdef DDS_TT_STATS + File fileTTstats; +#endif + #ifdef DDS_TIMING TimerList timerList; File fileTimerList; diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 97d0fb56..aa53511e 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -218,13 +218,13 @@ int SolveBoardInternal( newTrump || (thrp->nodes > SIMILARMAXWINNODES))) { - int reason = UNKNOWN_REASON; + TTresetReason reason = TT_RESET_UNKNOWN; if (thrp->nodes > SIMILARMAXWINNODES) - reason = TOO_MANY_NODES; + reason = TT_RESET_TOO_MANY_NODES; else if (newDeal && ! similarDeal) - reason = NEW_DEAL; + reason = TT_RESET_NEW_DEAL; else if (newTrump) - reason = NEW_TRUMP; + reason = TT_RESET_NEW_TRUMP; thrp->transTable.ResetMemory(reason); } @@ -625,11 +625,13 @@ int SolveBoardInternal( #endif #ifdef DDS_TT_STATS + #ifndef SMALL_MEMORY_OPTION // thrp->transTable.PrintAllSuits(); // thrp->transTable.PrintEntries(10, 0); - thrp->transTable.PrintSummarySuitStats(); - thrp->transTable.PrintSummaryEntryStats(); + thrp->transTable.PrintSummarySuitStats(thrp->fileTTstats.GetStream()); + thrp->transTable.PrintSummaryEntryStats(thrp->fileTTstats.GetStream()); // thrp->transTable.PrintPageSummary(); + #endif #endif #ifdef DDS_MOVES @@ -739,8 +741,10 @@ int SolveSameBoard( #endif #ifdef DDS_TT_STATS - thrp->transTable.PrintSummarySuitStats(); - thrp->transTable.PrintSummaryEntryStats(); + #ifndef SMALL_MEMORY_OPTION + thrp->transTable.PrintSummarySuitStats(thrp->fileTTstats.GetStream()); + thrp->transTable.PrintSummaryEntryStats(thrp->fileTTstats.GetStream()); + #endif #endif #ifdef DDS_MOVES @@ -891,8 +895,10 @@ int AnalyseLaterBoard( #endif #ifdef DDS_TT_STATS - thrp->transTable.PrintSummarySuitStats(); - thrp->transTable.PrintSummaryEntryStats(); + #ifndef SMALL_MEMORY_OPTION + thrp->transTable.PrintSummarySuitStats(thrp->fileTTstats.GetStream()); + thrp->transTable.PrintSummaryEntryStats(thrp->fileTTstats.GetStream()); + #endif #endif #ifdef DDS_MOVES diff --git a/src/TransTable.cpp b/src/TransTable.cpp deleted file mode 100644 index 5d29e6a1..00000000 --- a/src/TransTable.cpp +++ /dev/null @@ -1,2921 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2018 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - -#include "dds.h" -#include "TransTable.h" -#include "debug.h" - -extern unsigned char cardRank[16]; -extern char relRank[8192][15]; - -const char * players[DDS_HANDS] = -{ - "North", "East", "South", "West" -}; - - - -/* - This combines a small-memory and a full-memory version that - are implemented completely differently, but they share a common - interface. - - Explanation of full memory version: - - There are some constants that only need to be calculated - once. In fact they are the same for all instances of the - object. In order to save time and memory, they share a - single memory. - - Each 13-bit number, aggr, represents a possible set of cards - remaining in a suit. For example, 0x15a2 represents - A(1) QT(5) 97(a) 3(2). - - TTlowestRank[aggr] gives the lowest relative rank that is in - play in aggr. The ace is 14, the deuce is 2. A void counts as - rank 15 ("not even the ace"). It would go horribly wrong - if this rank were chosen to be 0, as might seem intuitive. - This is not the same as lowestRank, the lowest absolute rank. - - maskBytes[aggr][suit] is a set of 4 32-bit integers, - where suit is 0 ..3 (spades .. clubs). Each integer only - has 8 of its 32 bits set, but these 8 bits could be either - in the top byte (byte 0) or any of the others (bytes 1 ..3). - The bytes are abbreviated as B0 .. B3 below. - - int 0 int 1 int 2 int 3 - suit 0, spades B0 R0 B0 R1 B0 R2 B0 R3 - suit 1, hearts B1 R0 B1 R1 B1 R2 B1 R3 - suit 2, diamonds B2 R0 B2 R1 B2 R2 B2 - suit 3, clubs B3 R0 B3 R1 B3 R2 B3 - - R0 .. R3 are explained now. The purpose of maskBytes is - to generate 32-bit masks for later use with actual suits. - As a card can be with either of 4 players, 2 bits are needed - to encode the position of a card. Therefore the masks also - need 2 bits per card, even though the 2 bits are identical. - - In the table, R0 means the top byte (8 bits = 4 cards) of - a holding. - - R0 AKQJ - R1 T987 - R2 6543 - R3 2 - - For example, if the ace is held by North, the king by South, the - queen and jack by West, then the top byte for that SUIT would be - - 00(North) 10(South) 11(West) 11(West) - - The MASK for that holding would be 11 11 11 11, as all four - cards are in play. - - If the jack were missing, because it had already been played, - then the suit would be 00 10 11 00 (a missing card is also - encoded as 00), and the mask would be 11 11 11 00. - - Later on, when we have a specific set of spades .. clubs, - we want to check whether those cards are already in the - transposition table. As far as the necessary masks is - concerned, this is generated by an OR (|) of the four - 32-bit integers in a column of the table above. - - So the first column yields four bytes which are already - shifted in place, all corresponding to R0. The mask - corresponds to the AKQJ of the four suits in order. - - It's not really AKQJ, but the four highest cards still in - play in that suit. So missing cards are always at the end - of the list. -*/ - -bool _constantsSet = false; -int TTlowestRank[8192]; -#ifndef SMALL_MEMORY_OPTION - unsigned maskBytes[8192][DDS_SUITS][TT_BYTES]; -#endif - - -#include -TransTable::TransTable() -{ - if (! _constantsSet) - { - _constantsSet = true; - TransTable::SetConstants(); - } - -#ifndef SMALL_MEMORY_OPTION - poolp = nullptr; - pagesDefault = NUM_PAGES_DEFAULT; - pagesMaximum = NUM_PAGES_MAXIMUM; - pagesCurrent = 0; - - memState = FROM_POOL; - harvestTrick = FIRST_HARVEST_TRICK; - harvestHand = 0; - - harvested.nextBlockNo = 0; - - timestamp = 0; - - pageStats.numResets = 0; - pageStats.numCallocs = 0; - pageStats.numFrees = 0; - pageStats.numHarvests = 0; - pageStats.lastCurrent = 0; -#endif - - TTInUse = 0; - - fp = stdout; -} - - -TransTable::~TransTable() -{ - TransTable::ReturnAllMemory(); - - if (fp != stdout && fp != nullptr) - fclose(fp); -} - - -void TransTable::SetConstants() -{ - unsigned int topBitRank = 1; - TTlowestRank[0] = 15; // Void -#ifndef SMALL_MEMORY_OPTION - unsigned winMask[8192]; - winMask[0] = 0; -#endif - - for (unsigned ind = 1; ind < 8192; ind++) - { - if (ind >= (topBitRank + topBitRank)) /* Next top bit */ - topBitRank <<= 1; - -#ifndef SMALL_MEMORY_OPTION - // winMask is a growing list of 11's. In the end it will - // have 26 bits, so 13 groups of two bits. It always - // consists of all 11's, then all 00's. - - winMask[ind] = (winMask[ind ^ topBitRank] >> 2) | (3 << 24); - - maskBytes[ind][0][0] = (winMask[ind] << 6) & 0xff000000; - maskBytes[ind][0][1] = (winMask[ind] << 14) & 0xff000000; - maskBytes[ind][0][2] = (winMask[ind] << 22) & 0xff000000; - maskBytes[ind][0][3] = (winMask[ind] << 30) & 0xff000000; - - maskBytes[ind][1][0] = (winMask[ind] >> 2) & 0x00ff0000; - maskBytes[ind][1][1] = (winMask[ind] << 6) & 0x00ff0000; - maskBytes[ind][1][2] = (winMask[ind] << 14) & 0x00ff0000; - maskBytes[ind][1][3] = (winMask[ind] << 22) & 0x00ff0000; - - maskBytes[ind][2][0] = (winMask[ind] >> 10) & 0x0000ff00; - maskBytes[ind][2][1] = (winMask[ind] >> 2) & 0x0000ff00; - maskBytes[ind][2][2] = (winMask[ind] << 6) & 0x0000ff00; - maskBytes[ind][2][3] = (winMask[ind] << 14) & 0x0000ff00; - - maskBytes[ind][3][0] = (winMask[ind] >> 18) & 0x000000ff; - maskBytes[ind][3][1] = (winMask[ind] >> 10) & 0x000000ff; - maskBytes[ind][3][2] = (winMask[ind] >> 2) & 0x000000ff; - maskBytes[ind][3][3] = (winMask[ind] << 6) & 0x000000ff; -#endif - - TTlowestRank[ind] = TTlowestRank[ind ^ topBitRank] - 1; - } -} - - -#ifdef SMALL_MEMORY_OPTION -void TransTable::Init(int handLookup[][15]) -{ - unsigned int topBitRank = 1; - unsigned int topBitNo = 2; - - for (int s = 0; s < DDS_SUITS; s++) - { - aggp[0].aggrRanks[s] = 0; - aggp[0].winMask[s] = 0; - } - - for (unsigned int ind = 1; ind < 8192; ind++) - { - if (ind >= (topBitRank + topBitRank)) - { - /* Next top bit */ - topBitRank <<= 1; - topBitNo++; - } - aggp[ind] = aggp[ind ^ topBitRank]; - - for (int s = 0; s < 4; s++) - { - aggp[ind].aggrRanks[s] = - (aggp[ind].aggrRanks[s] >> 2) | - (handLookup[s][topBitNo] << 24); - - aggp[ind].winMask[s] = - (aggp[ind].winMask[s] >> 2) | (3 << 24); - } - } - return; -} - -#else -void TransTable::Init(int handLookup[][15]) -{ - // This is very similar to SetConstants, except that it - // happens with actual cards. It also makes sense to - // keep a record of aggrRanks for each suit. These are - // only used later for xorSet. - - unsigned int topBitRank = 1; - unsigned int topBitNo = 2; - aggrType * ap; - - for (int s = 0; s < DDS_SUITS; s++) - { - aggr[0].aggrRanks[s] = 0; - aggr[0].aggrBytes[s][0] = 0; - aggr[0].aggrBytes[s][1] = 0; - aggr[0].aggrBytes[s][2] = 0; - aggr[0].aggrBytes[s][3] = 0; - } - - for (unsigned ind = 1; ind < 8192; ind++) - { - if (ind >= (topBitRank << 1)) - { - /* Next top bit */ - topBitRank <<= 1; - topBitNo++; - } - - aggr[ind] = aggr[ind ^ topBitRank]; - ap = &aggr[ind]; - - for (int s = 0; s < DDS_SUITS; s++) - { - ap->aggrRanks[s] = ap->aggrRanks[s] >> 2 | - static_cast(handLookup[s][topBitNo] << 24); - } - - ap->aggrBytes[0][0] = (ap->aggrRanks[0] << 6) & 0xff000000; - ap->aggrBytes[0][1] = (ap->aggrRanks[0] << 14) & 0xff000000; - ap->aggrBytes[0][2] = (ap->aggrRanks[0] << 22) & 0xff000000; - ap->aggrBytes[0][3] = (ap->aggrRanks[0] << 30) & 0xff000000; - - ap->aggrBytes[1][0] = (ap->aggrRanks[1] >> 2) & 0x00ff0000; - ap->aggrBytes[1][1] = (ap->aggrRanks[1] << 6) & 0x00ff0000; - ap->aggrBytes[1][2] = (ap->aggrRanks[1] << 14) & 0x00ff0000; - ap->aggrBytes[1][3] = (ap->aggrRanks[1] << 22) & 0x00ff0000; - - ap->aggrBytes[2][0] = (ap->aggrRanks[2] >> 10) & 0x0000ff00; - ap->aggrBytes[2][1] = (ap->aggrRanks[2] >> 2) & 0x0000ff00; - ap->aggrBytes[2][2] = (ap->aggrRanks[2] << 6) & 0x0000ff00; - ap->aggrBytes[2][3] = (ap->aggrRanks[2] << 14) & 0x0000ff00; - - ap->aggrBytes[3][0] = (ap->aggrRanks[3] >> 18) & 0x000000ff; - ap->aggrBytes[3][1] = (ap->aggrRanks[3] >> 10) & 0x000000ff; - ap->aggrBytes[3][2] = (ap->aggrRanks[3] >> 2) & 0x000000ff; - ap->aggrBytes[3][3] = (ap->aggrRanks[3] << 6) & 0x000000ff; - } -} -#endif - - -void TransTable::SetMemoryDefault(int megabytes) -{ -#ifdef SMALL_MEMORY_OPTION - UNUSED(megabytes); -#else - double blockMem = BLOCKS_PER_PAGE * sizeof(winBlockType) / - static_cast(1024.); - - pagesDefault = static_cast((1024 * megabytes) / blockMem); -#endif -} - - -void TransTable::SetMemoryMaximum(int megabytes) -{ -#ifdef SMALL_MEMORY_OPTION - maxmem = static_cast(1000000 * megabytes); -#else - double blockMem = BLOCKS_PER_PAGE * sizeof(winBlockType) / - static_cast(1024.); - - pagesMaximum = static_cast((1024 * megabytes) / blockMem); -#endif -} - - -///////////////////////////////////////////////////////////// -// // -// Small memory TT functions. // -// // -///////////////////////////////////////////////////////////// - -#ifdef SMALL_MEMORY_OPTION -void TransTable::MakeTT() -{ - int i; - - if (!TTInUse) - { - TTInUse = 1; - - summem = (WINIT + 1) * sizeof(winCardType) + - (NINIT + 1) * sizeof(nodeCardsType) + - (LSIZE + 1) * 52 * sizeof(posSearchTypeSmall); - wmem = static_cast((WSIZE + 1) * sizeof(winCardType)); - nmem = static_cast((NSIZE + 1) * sizeof(nodeCardsType)); - - maxIndex = static_cast( - (maxmem - summem) / ((WSIZE + 1) * sizeof(winCardType))); - - pw = static_cast(calloc(static_cast(maxIndex + 1), sizeof(struct winCardType *))); - if (pw == NULL) - exit(1); - - pn = static_cast(calloc(static_cast(maxIndex + 1), sizeof(struct nodeCardsType *))); - if (pn == NULL) - exit(1); - - for (int k = 1; k <= 13; k++) - for (int h = 0; h < DDS_HANDS; h++) - { - pl[k][h] = static_cast - (calloc(static_cast(maxIndex + 1), - sizeof(posSearchTypeSmall *))); - if (pl[k][h] == NULL) - exit(1); - } - - for (i = 0; i <= maxIndex; i++) - { - if (pw[i]) - free(pw[i]); - pw[i] = NULL; - } - - for (i = 0; i <= maxIndex; i++) - { - if (pn[i]) - free(pn[i]); - pn[i] = NULL; - } - - for (int k = 1; k <= 13; k++) - { - for (int h = 0; h < DDS_HANDS; h++) - { - for (i = 0; i <= maxIndex; i++) - { - if (pl[k][h][i]) - free(pl[k][h][i]); - pl[k][h][i] = NULL; - } - } - } - - pw[0] = static_cast(calloc(WINIT + 1, sizeof(struct winCardType))); - if (pw[0] == NULL) - exit(1); - - pn[0] = static_cast(calloc(NINIT + 1, sizeof(struct nodeCardsType))); - if (pn[0] == NULL) - exit(1); - - for (int k = 1; k <= 13; k++) - for (int h = 0; h < DDS_HANDS; h++) - { - pl[k][h][0] = static_cast(calloc((LSIZE + 1), - sizeof(struct posSearchTypeSmall))); - if (pl[k][h][0] == NULL) - exit(1); - } - - aggp = static_cast(calloc(8192, sizeof(struct ttAggrType))); - if (aggp == NULL) - exit(1); - - InitTT(); - - for (int k = 1; k <= 13; k++) - aggrLenSets[k] = 0; -#if defined(DDS_TT_STATS) - fprintf(fp, "Report of generated PosSearch nodes per trick level.\n"); - fprintf(fp, "Trick level 13 is highest level with all 52 cards.\n"); - fprintf(fp, "---------------------------------------------------\n"); -#endif - statsResets.noOfResets = 0; - for (int k = 0; k <= 5; k++) - statsResets.aggrResets[k] = 0; - resetText[0] = "Unknown reason"; - resetText[1] = "Too many nodes"; - resetText[2] = "New deal"; - resetText[3] = "New trump"; - resetText[4] = "Memory exhausted"; - resetText[5] = "Free thread memory"; - } - - return; -} - - -void TransTable::Wipe() -{ - int m; - - for (m = 1; m <= wcount; m++) - { - if (pw[m]) - free(pw[m]); - pw[m] = NULL; - } - for (m = 1; m <= ncount; m++) - { - if (pn[m]) - free(pn[m]); - pn[m] = NULL; - } - - for (int k = 1; k <= 13; k++) - { - for (int h = 0; h < DDS_HANDS; h++) - { - for (m = 1; m <= lcount[k][h]; m++) - { - if (pl[k][h][m]) - free(pl[k][h][m]); - pl[k][h][m] = NULL; - } - } - } - - allocmem = summem; - - return; -} - - - -void TransTable::InitTT() -{ - winSetSizeLimit = WINIT; - nodeSetSizeLimit = NINIT; - allocmem = (WINIT + 1) * sizeof(struct winCardType); - allocmem += (NINIT + 1) * sizeof(struct nodeCardsType); - allocmem += (LSIZE + 1) * 52 * sizeof(struct posSearchTypeSmall); - winCards = pw[0]; - nodeCards = pn[0]; - wcount = 0; - ncount = 0; - - nodeSetSize = 0; - winSetSize = 0; - - clearTTflag = false; - windex = -1; - - for (int k = 1; k <= 13; k++) - for (int h = 0; h < DDS_HANDS; h++) - { - posSearch[k][h] = pl[k][h][0]; - lenSetInd[k][h] = 0; - lcount[k][h] = 0; - } -} - - -void TransTable::ResetMemory(int reason) -{ - Wipe(); - - InitTT(); - - for (int k = 1; k <= 13; k++) - { - for (int h = 0; h < DDS_HANDS; h++) - { - rootnp[k][h] = &(posSearch[k][h][0]); - posSearch[k][h][0].suitLengths = 0; - posSearch[k][h][0].posSearchPoint = NULL; - posSearch[k][h][0].left = NULL; - posSearch[k][h][0].right = NULL; - - lenSetInd[k][h] = 1; - } - } - -#if defined(DDS_TT_STATS) - statsResets.noOfResets++; - statsResets.aggrResets[reason]++; -#else - UNUSED(reason); -#endif - - return; -} - -void TransTable::ReturnAllMemory() -{ - - if (!TTInUse) - return; - TTInUse = 0; - -#if defined(DDS_TT_STATS) - PrintResetStats(); - PrintNodeStats(); -#endif - - - Wipe(); - - if (pw[0]) - free(pw[0]); - pw[0] = NULL; - - if (pn[0]) - free(pn[0]); - pn[0] = NULL; - - for (int k = 1; k <= 13; k++) - { - for (int h = 0; h < DDS_HANDS; h++) - { - if (pl[k][h][0]) - free(pl[k][h][0]); - pl[k][h][0] = NULL; - } - } - - if (pw) - free(pw); - pw = NULL; - - if (pn) - free(pn); - pn = NULL; - - if (aggp) - free(aggp); - aggp = NULL; - - return; -} -#endif - - - -///////////////////////////////////////////////////////////// -// // -// Full memory TT functions. // -// // -///////////////////////////////////////////////////////////// - -#ifndef SMALL_MEMORY_OPTION -void TransTable::MakeTT() -{ - if (! TTInUse) - { - TTInUse = 1; - - for (int t = 0; t < TT_TRICKS; t++) - { - for (int h = 0; h < DDS_HANDS; h++) - { - TTroot[t][h] = static_cast - (malloc(256 * sizeof(distHashType))); - - if (TTroot[t][h] == nullptr) - exit(1); - } - } - } - - TransTable::InitTT(); -} - - -void TransTable::InitTT() -{ - for (int c = 0; c < TT_TRICKS; c++) - { - for (int h = 0; h < DDS_HANDS; h++) - { - for (int i = 0; i < 256; i++) - { - TTroot[c][h][i].nextNo = 0; - TTroot[c][h][i].nextWriteNo = 0; - - } - lastBlockSeen[c][h] = nullptr; - } - } -} - - -void TransTable::ReleaseTT() -{ - if (! TTInUse) - return; - TTInUse = 0; - - for (int t = 0; t < TT_TRICKS; t++) - { - for (int h = 0; h < DDS_HANDS; h++) - { - if (TTroot[t][h] == nullptr) - continue; - - free(TTroot[t][h]); - } - } -} - - -void TransTable::ResetMemory(int reason) -{ - UNUSED(reason); - if (poolp == nullptr) - return; - - pageStats.numResets++; - pageStats.numCallocs += pagesCurrent - pageStats.lastCurrent; - pageStats.lastCurrent = pagesCurrent; - - while (pagesCurrent > pagesDefault) - { - free(poolp->list); - poolp = poolp->prev; - - free(poolp->next); - poolp->next = nullptr; - - pagesCurrent--; - } - - pageStats.numFrees += pageStats.lastCurrent - pagesCurrent; - pageStats.lastCurrent = pagesCurrent; - - while (poolp->prev) - poolp = poolp->prev; - - poolp->nextBlockNo = 0; - nextBlockp = poolp->list; - - TransTable::InitTT(); - - timestamp = 0; - - memState = FROM_POOL; - - return; -} - - -void TransTable::ReturnAllMemory() -{ - poolType * tmp; - - if (poolp) - { - while (poolp->next) - poolp = poolp->next; - - while (poolp) - { - free(poolp->list); - tmp = poolp; - poolp = poolp->prev; - free(tmp); - } - } - - pagesCurrent = 0; - - pageStats.numResets = 0; - pageStats.numCallocs = 0; - pageStats.numFrees = 0; - pageStats.numHarvests = 0; - pageStats.lastCurrent = 0; - - TransTable::ReleaseTT(); - - return; -} -#endif - - -int TransTable::BlocksInUse() -{ -#ifndef SMALL_MEMORY_OPTION - poolType * pp = poolp; - int count = 0; - - do - { - count += pp->nextBlockNo; - pp = pp->prev; - } - while (pp); - - return count; -#else - return 0; -#endif -} - - -double TransTable::MemoryInUse() -{ -#ifdef SMALL_MEMORY_OPTION - int ttMem = static_cast(allocmem); - int aggrMem = 8192 * static_cast(sizeof(ttAggrType)); - return (ttMem + aggrMem) / static_cast(1024.); -#else - int blockMem = BLOCKS_PER_PAGE * pagesCurrent * - static_cast(sizeof(winBlockType)); - int aggrMem = 8192 * static_cast(sizeof(aggrType)); - int rootMem = TT_TRICKS * DDS_HANDS * 256 * - static_cast(sizeof(distHashType)); - - return (blockMem + aggrMem + rootMem) / static_cast(1024.); -#endif - -} - - -TransTable::winBlockType * TransTable::GetNextCardBlock() -{ - /* - Spaghetti code. The basic idea is that there is a pool of - pages. When a page runs out, we get a next pool. But we're - only allowed a certain maximum number, and calloc might also - fail before then. We have a default number of pages that - we don't give back voluntarily once we have acquired them, - but we give back anything more than that at the end of each - hand. If this overall mechanism fails, then we try to harvest - old entries scattered throughout the TT memory. If we get - enough for a "page", then we use that single page, and if - that runs out later, we try to harvest some more, starting - where we left off harvesting last time. If the harvesting also - fails, then we reset whatever TT memory we do have, and we - continue with that. - */ - -#ifdef SMALL_MEMORY_OPTION - return NULL; -#else - if (poolp == nullptr) - { - // Have to be able to get at least one pool. - poolp = static_cast(calloc(1, sizeof(poolType))); - if (poolp == nullptr) - exit(1); - - poolp->list = static_cast - (malloc(BLOCKS_PER_PAGE * sizeof(winBlockType))); - - if (! poolp->list) - exit(1); - - poolp->next = nullptr; - poolp->prev = nullptr; - poolp->nextBlockNo = 1; - - nextBlockp = poolp->list; - - pagesCurrent++; - - return nextBlockp++; - } - else if (memState == FROM_HARVEST) - { - // Not allowed to get more memory, so reuse old one. - int n = harvested.nextBlockNo; - if (n == BLOCKS_PER_PAGE) - { - if (! TransTable::Harvest()) - { - TransTable::ResetMemory(UNKNOWN_REASON); - poolp->nextBlockNo++; - return nextBlockp++; - } - n = 0; - } - - harvested.nextBlockNo++; - return harvested.list[n]; - } - else if (poolp->nextBlockNo == BLOCKS_PER_PAGE) - { - if (poolp->next) - { - // Reuse a dormant block that has not been freed. - poolp = poolp->next; - poolp->nextBlockNo = 1; - nextBlockp = poolp->list; - - return nextBlockp++; - } - else if (pagesCurrent == pagesMaximum) - { - // Have to try to reclaim memory. - if (! TransTable::Harvest()) - { - TransTable::ResetMemory(UNKNOWN_REASON); - poolp->nextBlockNo++; - return nextBlockp++; - } - - memState = FROM_HARVEST; - harvested.nextBlockNo++; - return harvested.list[0]; - } - else - { - // Make a new pool. - poolType * newpoolp = static_cast - (calloc(1, sizeof(poolType))); - - if (newpoolp == nullptr) - { - // Unexpected, but try harvesting before we give up - // and start over. - if (! TransTable::Harvest()) - { - TransTable::ResetMemory(UNKNOWN_REASON); - poolp->nextBlockNo++; - return nextBlockp++; - } - - memState = FROM_HARVEST; - harvested.nextBlockNo++; - return harvested.list[0]; - } - - newpoolp->list = static_cast - (malloc(BLOCKS_PER_PAGE * sizeof(winBlockType))); - - if (! newpoolp->list) - { - if (! TransTable::Harvest()) - { - TransTable::ResetMemory(UNKNOWN_REASON); - poolp->nextBlockNo++; - return nextBlockp++; - } - - memState = FROM_HARVEST; - harvested.nextBlockNo++; - return harvested.list[0]; - } - - newpoolp->nextBlockNo = 1; - newpoolp->next = nullptr; - newpoolp->prev = poolp; - - poolp->next = newpoolp; - poolp = newpoolp; - - nextBlockp = newpoolp->list; - - pagesCurrent++; - - return nextBlockp++; - } - } - - poolp->nextBlockNo++; - return nextBlockp++; -#endif -} - - -bool TransTable::Harvest() -{ -#ifdef SMALL_MEMORY_OPTION - return false; -#else - distHashType * rootptr = TTroot[harvestTrick][harvestHand]; - distHashType * ptr; - winBlockType * bp; - - int trick = harvestTrick; - int hand = harvestHand; - int hash, suit, hno = 0; - - while (1) - { - for (hash = 0; hash < 256; hash++) - { - ptr = &rootptr[hash]; - for (suit = ptr->nextNo - 1; suit >= 0; suit--) - { - bp = ptr->list[suit].posBlock; - if (timestamp - bp->timestampRead > HARVEST_AGE) - { - bp->nextMatchNo = 0; - bp->nextWriteNo = 0; - bp->timestampRead = timestamp; - harvested.list[hno] = bp; - - // Swap the last element down. - if (suit != ptr->nextNo - 1) - ptr->list[suit] = ptr->list[ ptr->nextNo - 1 ]; - - ptr->nextNo--; - ptr->nextWriteNo = ptr->nextNo; - - if (++hno == BLOCKS_PER_PAGE) - { - if (++harvestHand >= DDS_HANDS) - { - // Skip rest of this [trick][hand] for simplicity. - harvestHand = 0; - if (--harvestTrick < 0) - harvestTrick = FIRST_HARVEST_TRICK; - } - - harvested.nextBlockNo = 0; - pageStats.numHarvests++; - return true; - } - } - } - } - - if (++harvestHand >= DDS_HANDS) - { - harvestHand = 0; - if (--harvestTrick < 0) - harvestTrick = FIRST_HARVEST_TRICK; - } - - if (harvestTrick == trick && harvestHand == hand) - return false; - - rootptr = TTroot[harvestTrick][harvestHand]; - } -#endif -} - - -int TransTable::hash8(int * handDist) -{ - /* - handDist is an array of hand distributions, North .. West. - Each entry is a 12-bit number with 3 groups of 4 bits. - Each group is the binary representation of the number of - cards held in that suit. The suits are in order spades, - hearts, diamonds. Clubs can be neglected, as the total - number of cards in a hand is given by the trick number. - - For example, if handDist[1] equals 0x0433, then East holds - 4 spades, 3 hearts, 3 diamonds and the rest in clubs. - If this is after the second trick, there are 11 cards, so - East must hold 1 club. - - The hash function turns all 4 hand distributions into a - single 8-bit number. The numbers should be spread as - evenly as possible across the 256 possibilities. I've not - done extensive research into finding the best hash function, - but this one seems OK. It uses a small prime, 5, and its - powers. The shift at the end is in order to get some use - out of the bits above the first 8 ones. - */ - - int h = - (handDist[0] ^ - ((handDist[1] * 5) ) ^ - ((handDist[2] * 25) ) ^ - ((handDist[3] * 125) ) ); - - return (h ^ (h >> 5)) & 0xff; -} - - -///////////////////////////////////////////////////////////// -// // -// Small memory TT functions. // -// // -///////////////////////////////////////////////////////////// - - -#ifdef SMALL_MEMORY_OPTION -nodeCardsType * TransTable::Lookup( - int trick, - int hand, - unsigned short * aggrTarget, - int * handDist, - int limit, - bool * lowerFlag) -{ - bool res; - struct posSearchTypeSmall * pp; - int orderSet[DDS_SUITS]; - struct nodeCardsType * cardsP; - - suitLengths[trick] = - (static_cast(handDist[0]) << 36) | - (static_cast(handDist[1]) << 24) | - (static_cast(handDist[2]) << 12) | - (static_cast(handDist[3])); - - pp = SearchLenAndInsert(rootnp[trick][hand], - suitLengths[trick], false, trick, hand, &res); - - /* Find node that fits the suit lengths */ - if ((pp != NULL) && res) - { - for (int ss = 0; ss < DDS_SUITS; ss++) - { - orderSet[ss] = - aggp[aggrTarget[ss]].aggrRanks[ss]; - } - - if (pp->posSearchPoint == NULL) - cardsP = NULL; - else - { - cardsP = FindSOP(orderSet, limit, pp->posSearchPoint, lowerFlag); - - if (cardsP == NULL) - return cardsP; - } - } - else - { - cardsP = NULL; - } - return cardsP; -} - - -void TransTable::Add( - int tricks, - int hand, - unsigned short * aggrTarget, - unsigned short * ourWinRanks, - nodeCardsType * first, - bool flag) -{ - BuildSOP(ourWinRanks, aggrTarget, first, suitLengths[tricks], - tricks, hand, flag); - - if (clearTTflag) - { - ResetMemory(MEMORY_EXHAUSTED); - } - - return; -} -#endif - - -void TransTable::AddWinSet() -{ -#ifdef SMALL_MEMORY_OPTION - if (clearTTflag) - { - windex++; - winSetSize = windex; - winCards = &(temp_win[windex]); - } - else if (winSetSize >= winSetSizeLimit) - { - /* The memory chunk for the winCards structure will be exceeded. */ - if (((allocmem + static_cast(wmem)) > maxmem) || (wcount >= maxIndex) || - (winSetSize > SIMILARMAXWINNODES)) - { - /* Already allocated memory plus needed allocation overshot maxmem */ - windex++; - winSetSize = windex; - clearTTflag = true; - winCards = &(temp_win[windex]); - } - else - { - wcount++; - winSetSizeLimit = WSIZE; - pw[wcount] = - static_cast(malloc((WSIZE + 1) * sizeof(struct winCardType))); - if (pw[wcount] == NULL) - { - clearTTflag = true; - windex++; - winSetSize = windex; - winCards = &(temp_win[windex]); - } - else - { - allocmem += (WSIZE + 1) * sizeof(struct winCardType); - winSetSize = 0; - winCards = pw[wcount]; - } - } - } - else - winSetSize++; - return; -#endif -} - -void TransTable::AddNodeSet() -{ -#ifdef SMALL_MEMORY_OPTION - if (nodeSetSize >= nodeSetSizeLimit) - { - /* The memory chunk for the nodeCards structure will be exceeded. */ - if (((allocmem + static_cast(nmem)) > maxmem) || (ncount >= maxIndex)) - { - /* Already allocated memory plus needed allocation overshot maxmem */ - clearTTflag = true; - } - else - { - ncount++; - nodeSetSizeLimit = NSIZE; - pn[ncount] = - static_cast(malloc((NSIZE + 1) * sizeof(struct nodeCardsType))); - if (pn[ncount] == NULL) - { - clearTTflag = true; - } - else - { - allocmem += (NSIZE + 1) * sizeof(struct nodeCardsType); - nodeSetSize = 0; - nodeCards = pn[ncount]; - } - } - } - else - nodeSetSize++; - return; -#endif -} - -void TransTable::AddLenSet(int trick, int firstHand) -{ -#ifndef SMALL_MEMORY_OPTION - UNUSED(trick); - UNUSED(firstHand); -#else - if (lenSetInd[trick][firstHand] >= LSIZE) - { - /* The memory chunk for the posSearchTypeSmall structure will be exceeded. */ - if (((allocmem + (LSIZE + 1) * sizeof(struct posSearchTypeSmall)) > maxmem) - || (lcount[trick][firstHand] >= maxIndex)) - { - /* Already allocated memory plus needed allocation overshot maxmem */ - clearTTflag = true; - - return; - } - - /* Obtain another memory chunk LSIZE.*/ - - lcount[trick][firstHand]++; - - pl[trick][firstHand][lcount[trick][firstHand]] = - static_cast(malloc((LSIZE + 1) * sizeof(struct posSearchTypeSmall))); - - if (pl[trick][firstHand][lcount[trick][firstHand]] == NULL) - - { - clearTTflag = true; - - return; - } - else - { - allocmem += (LSIZE + 1) * sizeof(struct posSearchTypeSmall); - lenSetInd[trick][firstHand] = 0; - posSearch[trick][firstHand] = - pl[trick][firstHand][lcount[trick][firstHand]]; - -#if defined(DDS_TT_STATS) - aggrLenSets[trick]++; -#endif - } - } - else - { - lenSetInd[trick][firstHand]++; -#if defined(DDS_TT_STATS) - aggrLenSets[trick]++; -#endif - } - return; -#endif -} - - -void TransTable::BuildSOP( - unsigned short ourWinRanks[DDS_SUITS], - unsigned short aggrArg[DDS_SUITS], - struct nodeCardsType * first, - long long lengths, - int tricks, - int firstHand, - bool flag) -{ -#ifndef SMALL_MEMORY_OPTION - UNUSED(ourWinRanks); - UNUSED(aggrArg); - UNUSED(first); - UNUSED(lengths); - UNUSED(tricks); - UNUSED(firstHand); - UNUSED(flag); -#else - bool res; - int w; - unsigned short int temp; - struct nodeCardsType * cardsP; - struct posSearchTypeSmall * np; - - int winMask[DDS_SUITS]; - int winOrderSet[DDS_SUITS]; - char low[DDS_SUITS]; - - for (int ss = 0; ss < DDS_SUITS; ss++) - { - w = ourWinRanks[ss]; - if (w == 0) - { - winMask[ss] = 0; - winOrderSet[ss] = 0; - low[ss] = 15; - } - else - { - w = w & (-w); /* Only lowest win */ - temp = static_cast(aggrArg[ss] & (-w)); - low[ss] = static_cast(TTlowestRank[temp]); - - winMask[ss] = aggp[temp].winMask[ss]; - winOrderSet[ss] = aggp[temp].aggrRanks[ss]; - } - } - - np = SearchLenAndInsert(rootnp[tricks][firstHand], - lengths, true, tricks, firstHand, &res); - - cardsP = BuildPath(winMask, winOrderSet, - static_cast(first->ubound), static_cast(first->lbound), - static_cast(first->bestMoveSuit), static_cast(first->bestMoveRank), - np, &res); - - - if (res) - { - cardsP->ubound = static_cast(first->ubound); - cardsP->lbound = static_cast(first->lbound); - - if (flag) - { - cardsP->bestMoveSuit = static_cast(first->bestMoveSuit); - cardsP->bestMoveRank = static_cast(first->bestMoveRank); - } - else - { - cardsP->bestMoveSuit = 0; - cardsP->bestMoveRank = 0; - } - - for (int k = 0; k < DDS_SUITS; k++) - cardsP->leastWin[k] = 15 - low[k]; - } -#endif -} - - -struct nodeCardsType * TransTable::BuildPath( - int * winMask, - int * winOrderSet, - int ubound, - int lbound, - char bestMoveSuit, - char bestMoveRank, - struct posSearchTypeSmall * nodep, - bool * result) -{ - /* If result is TRUE, a new SOP has been created and BuildPath returns a - pointer to it. If result is FALSE, an existing SOP is used and BuildPath - returns a pointer to the SOP */ - -#ifndef SMALL_MEMORY_OPTION - UNUSED(winMask); - UNUSED(winOrderSet); - UNUSED(ubound); - UNUSED(lbound); - UNUSED(bestMoveSuit); - UNUSED(bestMoveRank); - UNUSED(nodep); - UNUSED(result); - return NULL; -#else - bool found; - struct winCardType * np, *p2, *nprev; - struct nodeCardsType * sopP = 0, *p; - - np = nodep->posSearchPoint; - nprev = NULL; - int suit = 0; - - /* If winning node has a card that equals the next winning card deduced - from the position, then there already exists a (partial) path */ - - if (np == NULL) - { - /* There is no winning list created yet */ - /* Create winning nodes */ - p2 = &(winCards[winSetSize]); - AddWinSet(); - p2->next = NULL; - p2->nextWin = NULL; - p2->prevWin = NULL; - nodep->posSearchPoint = p2; - p2->winMask = winMask[suit]; - p2->orderSet = winOrderSet[suit]; - p2->first = NULL; - np = p2; /* Latest winning node */ - suit++; - while (suit < DDS_SUITS) - { - p2 = &(winCards[winSetSize]); - AddWinSet(); - np->nextWin = p2; - p2->prevWin = np; - p2->next = NULL; - p2->nextWin = NULL; - p2->winMask = winMask[suit]; - p2->orderSet = winOrderSet[suit]; - p2->first = NULL; - np = p2; /* Latest winning node */ - suit++; - } - p = &(nodeCards[nodeSetSize]); - AddNodeSet(); - np->first = p; - *result = true; - return p; - } - else - { - /* Winning list exists */ - while (1) - { - /* Find all winning nodes that correspond to current - position */ - found = false; - while (1) /* Find node amongst alternatives */ - { - if ((np->winMask == winMask[suit]) && - (np->orderSet == winOrderSet[suit])) - { - /* Part of path found */ - found = true; - nprev = np; - break; - } - if (np->next != NULL) - np = np->next; - else - break; - } - if (found) - { - suit++; - if (suit >= DDS_SUITS) - { - sopP = UpdateSOP(ubound, lbound, bestMoveSuit, bestMoveRank, - np->first); - - *result = false; - return sopP; - } - else - { - np = np->nextWin; /* Find next winning node */ - continue; - } - } - else - break; /* Node was not found */ - } /* End outer while */ - - /* Create additional node, coupled to existing node(s) */ - p2 = &(winCards[winSetSize]); - AddWinSet(); - p2->prevWin = nprev; - if (nprev != NULL) - { - p2->next = nprev->nextWin; - nprev->nextWin = p2; - } - else - { - p2->next = nodep->posSearchPoint; - nodep->posSearchPoint = p2; - } - p2->nextWin = NULL; - p2->winMask = winMask[suit]; - p2->orderSet = winOrderSet[suit]; - p2->first = NULL; - np = p2; /* Latest winning node */ - suit++; - - /* Rest of path must be created */ - while (suit < 4) - { - p2 = &(winCards[winSetSize]); - AddWinSet(); - np->nextWin = p2; - p2->prevWin = np; - p2->next = NULL; - p2->winMask = winMask[suit]; - p2->orderSet = winOrderSet[suit]; - p2->first = NULL; - p2->nextWin = NULL; - np = p2; /* Latest winning node */ - suit++; - } - - /* All winning nodes in SOP have been traversed and new nodes created */ - p = &(nodeCards[nodeSetSize]); - AddNodeSet(); - np->first = p; - *result = true; - return p; - } -#endif -} - -struct TransTable::posSearchTypeSmall * TransTable::SearchLenAndInsert( - struct posSearchTypeSmall * rootp, - long long key, - bool insertNode, - int trick, - int firstHand, - bool * result) -{ - /* Search for node which matches with the suit length combination - given by parameter key. If no such node is found, NULL is - returned if parameter insertNode is FALSE, otherwise a new - node is inserted with suitLengths set to key, the pointer to - this node is returned. - The algorithm used is defined in Knuth "The art of computer - programming", vol.3 "Sorting and searching", 6.2.2 Algorithm T, - page 424. */ - -#ifndef SMALL_MEMORY_OPTION - UNUSED(rootp); - UNUSED(key); - UNUSED(insertNode); - UNUSED(trick); - UNUSED(firstHand); - UNUSED(result); - return NULL; -#else - struct posSearchTypeSmall * np, *p, *sp; - - sp = NULL; - if (insertNode) - sp = &(posSearch[trick][firstHand][lenSetInd[trick][firstHand]]); - - np = rootp; - while (1) - { - if (key == np->suitLengths) - { - *result = true; - return np; - } - else if (key < np->suitLengths) - { - if (np->left != NULL) - np = np->left; - else if (insertNode) - { - p = sp; - AddLenSet(trick, firstHand); - np->left = p; - p->posSearchPoint = NULL; - p->suitLengths = key; - p->left = NULL; - p->right = NULL; - *result = true; - return p; - } - else - { - *result = false; - return NULL; - } - } - else /* key > suitLengths */ - { - if (np->right != NULL) - np = np->right; - else if (insertNode) - { - p = sp; - AddLenSet(trick, firstHand); - np->right = p; - p->posSearchPoint = NULL; - p->suitLengths = key; - p->left = NULL; - p->right = NULL; - *result = true; - return p; - } - else - { - *result = false; - return NULL; - } - } - } -#endif -} - - -struct nodeCardsType * TransTable::UpdateSOP( - int ubound, - int lbound, - char bestMoveSuit, - char bestMoveRank, - nodeCardsType * nodep) -{ - /* Update SOP node with new values for upper and lower - bounds. */ -#ifndef SMALL_MEMORY_OPTION - UNUSED(ubound); - UNUSED(lbound); - UNUSED(bestMoveSuit); - UNUSED(bestMoveRank); - UNUSED(nodep); - return NULL; -#else - if (lbound > nodep->lbound) - nodep->lbound = static_cast(lbound); - if (ubound < nodep->ubound) - nodep->ubound = static_cast(ubound); - - nodep->bestMoveSuit = bestMoveSuit; - nodep->bestMoveRank = bestMoveRank; - - return nodep; -#endif -} - - -struct nodeCardsType * TransTable::FindSOP( - int orderSet[], - int limit, - winCardType * nodeP, - bool * lowerFlag) -{ - struct winCardType * np; - - np = nodeP; - int s = 0; - - while (np) - { - if ((np->winMask & orderSet[s]) == np->orderSet) - { - /* Winning rank set fits position */ - if (s != 3) - { - np = np->nextWin; - s++; - continue; - } - - if (np->first->lbound > limit) - { - *lowerFlag = true; - return np->first; - } - else if (np->first->ubound <= limit) - { - *lowerFlag = false; - return np->first; - } - } - - while (np->next == NULL) - { - np = np->prevWin; - s--; - if (np == NULL) /* Previous node is header node? */ - return NULL; - } - np = np->next; - } - return NULL; -} - - - -///////////////////////////////////////////////////////////// -// // -// Full memory TT functions. // -// // -///////////////////////////////////////////////////////////// - -#ifndef SMALL_MEMORY_OPTION -nodeCardsType * TransTable::Lookup( - int tricks, - int hand, - unsigned short aggrTarget[], - int handDist[], - int limit, - bool * lowerFlag) -{ - // First look up distribution. - long long suitLengths = - (static_cast(handDist[0]) << 36) | - (static_cast(handDist[1]) << 24) | - (static_cast(handDist[2]) << 12) | - (static_cast(handDist[3]) ); - - int hashkey = hash8(handDist); - - bool empty; - lastBlockSeen[tricks][hand] = - LookupSuit(&TTroot[tricks][hand][hashkey], - suitLengths, &empty); - if (empty) - return nullptr; - - // If that worked, look up cards. - unsigned * ab0 = aggr[ aggrTarget[0] ].aggrBytes[0]; - unsigned * ab1 = aggr[ aggrTarget[1] ].aggrBytes[1]; - unsigned * ab2 = aggr[ aggrTarget[2] ].aggrBytes[2]; - unsigned * ab3 = aggr[ aggrTarget[3] ].aggrBytes[3]; - - winMatchType TTentry; - TTentry.topSet1 = ab0[0] | ab1[0] | ab2[0] | ab3[0]; - TTentry.topSet2 = ab0[1] | ab1[1] | ab2[1] | ab3[1]; - TTentry.topSet3 = ab0[2] | ab1[2] | ab2[2] | ab3[2]; - TTentry.topSet4 = ab0[3] | ab1[3] | ab2[3] | ab3[3]; - - return TransTable::LookupCards(&TTentry, - lastBlockSeen[tricks][hand], limit, lowerFlag); -} -#endif - - -TransTable::winBlockType * TransTable::LookupSuit( - distHashType * dp, - long long key, - bool * empty) -{ - /* - Always returns a valid winBlockType. - If empty == true, there was no match, so there is - no point in looking for a card match. - If empty == false, there were entries already. - */ - - int n = dp->nextNo; - for (int i = 0; i < n; i++) - { - if (dp->list[i].key == key) - { - *empty = false; - return dp->list[i].posBlock; - } - } - - *empty = true; - int m; - - if (n == DISTS_PER_ENTRY) - { - // No room for new exact suits at this hash position. - // Have to reuse an existing posBlock. - if (dp->nextWriteNo == DISTS_PER_ENTRY) - { - m = 0; - dp->nextWriteNo = 1; - } - else - m = dp->nextWriteNo++; - } - else - { - // Didn't find an exact match, but there is still room. - // The following looks a bit odd because it is possible that - // GetNextCardBlock wipes out the whole memory, so we - // have to use the up-to-date location, not m from above. - - winBlockType * bp = GetNextCardBlock(); - m = dp->nextWriteNo++; - dp->list[m].posBlock = bp; - dp->list[m].posBlock->timestampRead = timestamp; - dp->nextNo++; - } - - // As long as the secondary Lookup loop in ABsearch exists, - // it will cause spurious extra blocks to be created here - // which are not useful, because nothing is ever Add'ed. - // This is not a memory leak, as the memory is properly freed, - // but it is also a small waste of about 0.5%. I don't mind. - - dp->list[m].key = key; - dp->list[m].posBlock->nextMatchNo = 0; - dp->list[m].posBlock->nextWriteNo = 0; - - return dp->list[m].posBlock; -} - - -nodeCardsType * TransTable::LookupCards( - winMatchType * searchp, - winBlockType * bp, - int limit, - bool * lowerFlag) -{ - winMatchType * wp; - - int n = bp->nextWriteNo - 1; - wp = &bp->list[n]; - - // It may be a bit silly to duplicate the code like this. - // It could be combined to one loop with a slight overhead. - - for (int i = n; i >= 0; i--, wp--) - { - if ((wp->topSet1 ^ searchp->topSet1) & wp->topMask1) - continue; - - if (wp->lastMaskNo != 1) - { - if ((wp->topSet2 ^ searchp->topSet2) & wp->topMask2) - continue; - - if (wp->lastMaskNo != 2) - { - if ((wp->topSet3 ^ searchp->topSet3) & wp->topMask3) - continue; - } - } - - // Check bounds. - nodeCardsType * nodep = &wp->first; - if (nodep->lbound > limit) - { - bp->timestampRead = ++timestamp; - * lowerFlag = true; - return nodep; - } - else if (nodep->ubound <= limit) - { - bp->timestampRead = ++timestamp; - * lowerFlag = false; - return nodep; - } - } - - int n2 = bp->nextMatchNo - 1; - wp = &bp->list[n2]; - - for (int i = n2; i > n; i--, wp--) - { - if ((wp->topSet1 ^ searchp->topSet1) & wp->topMask1) - continue; - - if (wp->lastMaskNo != 1) - { - if ((wp->topSet2 ^ searchp->topSet2) & wp->topMask2) - continue; - - if (wp->lastMaskNo != 2) - { - if ((wp->topSet3 ^ searchp->topSet3) & wp->topMask3) - continue; - } - } - - nodeCardsType * nodep = &wp->first; - if (nodep->lbound > limit) - { - * lowerFlag = true; - bp->timestampRead = ++timestamp; - return nodep; - } - else if (nodep->ubound <= limit) - { - * lowerFlag = false; - bp->timestampRead = ++timestamp; - return nodep; - } - } - - return nullptr; -} - - -void TransTable::CreateOrUpdate( - winBlockType * bp, - winMatchType * searchp, - bool flag) -{ - // Either updates an existing SOP or creates a new one. - // A new one is created at the end of the bp list if this - // is not already full, or the oldest one in the list is - // overwritten. - - winMatchType * wp = bp->list; - int n = bp->nextMatchNo; - - for (int i = 0; i < n; i++, wp++) - { - if (wp->xorSet != searchp->xorSet ) continue; - if (wp->maskIndex != searchp->maskIndex) continue; - if (wp->topSet1 != searchp->topSet1 ) continue; - if (wp->topSet2 != searchp->topSet2 ) continue; - if (wp->topSet3 != searchp->topSet3 ) continue; - - nodeCardsType * nodep = &wp->first; - if (searchp->first.lbound > nodep->lbound) - nodep->lbound = searchp->first.lbound; - if (searchp->first.ubound < nodep->ubound) - nodep->ubound = searchp->first.ubound; - - nodep->bestMoveSuit = searchp->first.bestMoveSuit; - nodep->bestMoveRank = searchp->first.bestMoveRank; - return; - } - - if (n == BLOCKS_PER_ENTRY) - { - if (bp->nextWriteNo >= BLOCKS_PER_ENTRY) - bp->nextWriteNo = 0; - } - else - bp->nextMatchNo++; - - - wp = &bp->list[ bp->nextWriteNo++ ]; - *wp = *searchp; - - if (!flag) - { - wp->first.bestMoveSuit = 0; - wp->first.bestMoveRank = 0; - } -} - - -#ifndef SMALL_MEMORY_OPTION -void TransTable::Add( - int tricks, - int hand, - unsigned short * aggrTarget, - unsigned short * ourWinRanks, - nodeCardsType * first, - bool flag) -{ - if (lastBlockSeen[tricks][hand] == nullptr) - { - // We have recently reset the entire memory, and we were - // in the middle of a recursion. So we'll just have to - // drop this entry that we were supposed to be adding. - return; - } - - unsigned * ab[DDS_SUITS]; - unsigned * mb[DDS_SUITS]; - char low[DDS_SUITS]; - unsigned short int ag; - int w; - winMatchType TTentry; - - // Inefficient, as it also copies leastWin. - // In fact I'm not quite happy with the treatment of - // leastWin in general. - - TTentry.first = *first; - - TTentry.xorSet = 0; - - for (int ss = 0; ss < DDS_SUITS; ss++) - { - w = static_cast(ourWinRanks[ss]); - if (w == 0) - { - ab[ss] = aggr[0].aggrBytes[ss]; - mb[ss] = maskBytes[0][ss]; - low[ss] = 15; - TTentry.first.leastWin[ss] = 0; - } - else - { - w = w & (-w); /* Only lowest win */ - ag = static_cast(aggrTarget[ss] & (-w)); - - ab[ss] = aggr[ag].aggrBytes[ss]; - mb[ss] = maskBytes[ag][ss]; - low[ss] = static_cast(TTlowestRank[ag]); - - TTentry.first.leastWin[ss] = 15 - low[ss]; - TTentry.xorSet ^= aggr[ag].aggrRanks[ss]; - } - } - - // It's a bit annoying that we may be regenerating these. - // But winRanks can cause them to change after lookup(). - - TTentry.topSet1 = ab[0][0] | ab[1][0] | ab[2][0] | ab[3][0]; - TTentry.topSet2 = ab[0][1] | ab[1][1] | ab[2][1] | ab[3][1]; - TTentry.topSet3 = ab[0][2] | ab[1][2] | ab[2][2] | ab[3][2]; - TTentry.topSet4 = ab[0][3] | ab[1][3] | ab[2][3] | ab[3][3]; - - TTentry.topMask1 = mb[0][0] | mb[1][0] | mb[2][0] | mb[3][0]; - TTentry.topMask2 = mb[0][1] | mb[1][1] | mb[2][1] | mb[3][1]; - TTentry.topMask3 = mb[0][2] | mb[1][2] | mb[2][2] | mb[3][2]; - TTentry.topMask4 = mb[0][3] | mb[1][3] | mb[2][3] | mb[3][3]; - - TTentry.maskIndex = - (low[0] << 12) | (low[1] << 8) | (low[2] << 4) | low[3]; - - if (TTentry.topMask2 == 0) - TTentry.lastMaskNo = 1; - else if (TTentry.topMask3 == 0) - TTentry.lastMaskNo = 2; - else if (TTentry.topMask4 == 0) - TTentry.lastMaskNo = 3; - else - TTentry.lastMaskNo = 4; - - TransTable::CreateOrUpdate(lastBlockSeen[tricks][hand], - &TTentry, flag); -} -#endif - - - -void TransTable::PrintMatch( - winMatchType * wp, - unsigned char lengths[DDS_HANDS][DDS_SUITS]) -{ - char hands[DDS_HANDS][DDS_SUITS][TT_LINE_LEN]; - int used[DDS_HANDS][DDS_SUITS]; - - for (int h = 0; h < DDS_HANDS; h++) - { - for (int s = 0; s < DDS_SUITS; s++) - { - used[h][s] = 0; - for (int c = 0; c < TT_LINE_LEN; c++) - hands[h][s][c] = 0; - } - } - - TransTable::SetToPartialHands( - wp->topSet1, wp->topMask1, 14, 4, hands, used); - TransTable::SetToPartialHands( - wp->topSet2, wp->topMask2, 10, 4, hands, used); - TransTable::SetToPartialHands( - wp->topSet3, wp->topMask3, 6, 4, hands, used); - TransTable::SetToPartialHands( - wp->topSet4, wp->topMask4, 2, 1, hands, used); - - TransTable::DumpHands(hands, lengths); - - TransTable::PrintNodeValues(&wp->first); -} - - -void TransTable::PrintNodeValues( - nodeCardsType * np) -{ - if (!np) - { - fprintf(fp, "np == nullptr\n"); - return; - } - - fprintf(fp, "Lowest used\t%c%c, %c%c, %c%c, %c%c\n", - cardSuit[0], cardRank[ 15 - static_cast(np->leastWin[0]) ], - cardSuit[1], cardRank[ 15 - static_cast(np->leastWin[1]) ], - cardSuit[2], cardRank[ 15 - static_cast(np->leastWin[2]) ], - cardSuit[3], cardRank[ 15 - static_cast(np->leastWin[3]) ]); - - fprintf(fp, "Bounds\t\t%d to %2d tricks\n", - static_cast(np->lbound), - static_cast(np->ubound)); - - fprintf(fp, "Best move\t%c%c\n", - cardSuit[ static_cast(np->bestMoveSuit) ], - cardRank[ static_cast(np->bestMoveRank) ]); - - fprintf(fp, "\n"); -} - - -void TransTable::MakeHolding( - char * high, - unsigned len, - char * res) -{ - unsigned l = strlen(high); - strcpy(res, high); - - if (len == 0 && (l == 0 || (l == 1 && high[0] == '\0'))) - { - res[0] = '-'; - res[1] = '\0'; - return; - } - - for (unsigned i = l; i < len; i++) - { - res[i] = 'x'; - } - res[len] = '\0'; -} - - -void TransTable::DumpHands( - char hands[DDS_HANDS][DDS_SUITS][TT_LINE_LEN], - unsigned char lengths[DDS_HANDS][DDS_SUITS]) -{ - char res_a[TT_LINE_LEN], res_b[TT_LINE_LEN]; - - for (int i = 0; i < DDS_SUITS; i++) - { - TransTable::MakeHolding(hands[0][i], - static_cast(lengths[0][i]), res_a); - fprintf(fp, "%16s%s\n", "", res_a); - } - - for (int i = 0; i < DDS_SUITS; i++) - { - TransTable::MakeHolding(hands[3][i], - static_cast(lengths[3][i]), res_a); - TransTable::MakeHolding(hands[1][i], - static_cast(lengths[1][i]), res_b); - fprintf(fp, "%-16s%16s%-16s\n", res_a, "", res_b); - } - - for (int i = 0; i < DDS_SUITS; i++) - { - char res[16]; - TransTable::MakeHolding(hands[2][i], - static_cast(lengths[2][i]), res); - fprintf(fp, "%16s%s\n", "", res); - } - fprintf(fp, "\n"); -} - - -void TransTable::SetToPartialHands( - unsigned set, - unsigned mask, - int maxRank, - int numRanks, - char hands[DDS_HANDS][DDS_SUITS][TT_LINE_LEN], - int used[DDS_HANDS][DDS_SUITS]) -{ - for (int s = 0; s < DDS_SUITS; s++) - { - for (int rank = maxRank; rank > maxRank - numRanks; rank--) - { - int shift = 8 * (3 - s) + 2 * (rank - maxRank + 3); - unsigned maskCard = mask >> shift; - - if (maskCard & 3) - { - unsigned player = (set >> shift) & 3; - hands[player][s][ used[player][s]++ ] = - static_cast(cardRank[rank]); - } - } - } -} - - -void TransTable::SetFile(const string& ourFname) -{ - if (fp != stdout) // Already set - return; - - fp = fopen(ourFname.c_str(), "w"); - if (! fp) - fp = stdout; -} - - -void TransTable::KeyToDist( - long long key, - int handDist[]) -{ - handDist[0] = static_cast((key >> 36) & 0x00000fff); - handDist[1] = static_cast((key >> 24) & 0x00000fff); - handDist[2] = static_cast((key >> 12) & 0x00000fff); - handDist[3] = static_cast((key ) & 0x00000fff); -} - - -void TransTable::DistToLengths( - int trick, - int handDist[], - unsigned char lengths[DDS_HANDS][DDS_SUITS]) -{ - for (int h = 0; h < DDS_HANDS; h++) - { - lengths[h][0] = static_cast((handDist[h] >> 8) & 0xf); - lengths[h][1] = static_cast((handDist[h] >> 4) & 0xf); - lengths[h][2] = static_cast((handDist[h] ) & 0xf); - lengths[h][3] = static_cast - (trick + 1 - - lengths[h][0] - - lengths[h][1] - - lengths[h][2]); - } -} - - -void TransTable::LenToStr( - unsigned char len[DDS_HANDS][DDS_SUITS], - char * line) -{ - sprintf(line, - "%d=%d=%d=%d \t%d=%d=%d=%d \t%d=%d=%d=%d \t%d=%d=%d=%d", - len[0][0], len[0][1], len[0][2], len[0][3], - len[1][0], len[1][1], len[1][2], len[1][3], - len[2][0], len[2][1], len[2][2], len[2][3], - len[3][0], len[3][1], len[3][2], len[3][3]); -} - - -void TransTable::PrintSuits( - int trick, - int hand) -{ -#ifdef SMALL_MEMORY_OPTION - UNUSED(trick); - UNUSED(hand); -#else - distHashType * dp; - int handDist[DDS_HANDS]; - unsigned char len[DDS_HANDS][DDS_SUITS]; - char line[40]; - - fprintf(fp, "%4s %2s %-8s\t%-8s\t%-8s\t%-8s\n", - "Key", - "No", - players[0], - players[1], - players[2], - players[3]); - - for (int hashkey = 0; hashkey < 256; hashkey++) - { - dp = &TTroot[trick][hand][hashkey]; - if (dp->nextNo == 0) - continue; - - for (int i = 0; i < dp->nextNo; i++) - { - if (i == 0) - fprintf(fp, "0x%02x %2d ", hashkey, dp->nextNo); - else - fprintf(fp, "%4s %2s " , "", ""); - - TransTable::KeyToDist(dp->list[i].key, handDist); - TransTable::DistToLengths(trick, handDist, len); - - TransTable::LenToStr(len, line); - fprintf(fp, "%s\n", line); - } - } - fprintf(fp, "\n"); -#endif -} - - -void TransTable::PrintAllSuits() -{ -#ifndef SMALL_MEMORY_OPTION - for (int trick = 11; trick >= 1; trick--) - { - for (int hand = 0; hand < DDS_HANDS; hand++) - { - fprintf(fp, "Trick %d, hand %s\n", trick, players[hand]); - fprintf(fp, "====================\n\n"); - - TransTable::PrintSuits(trick, hand); - } - } -#endif -} - - -void TransTable::MakeHistStats( - int hist[], - int * count, - int * prod_sum, - int * prod_sumsq, - int * max_len, - int last_index) -{ - *count = 0; - *prod_sum = 0; - *prod_sumsq = 0; - *max_len = 0; - - for (int i = 1; i <= last_index; i++) - { - if (hist[i]) - { - *prod_sum += i * hist[i]; - *prod_sumsq += i * i * hist[i]; - *count += hist[i]; - - if (i > *max_len) - *max_len = i; - } - } -} - - -int TransTable::CalcPercentile( - int hist[], - double threshold, - int last_index) -{ - int cum = 0; - - for (int i = 1; i <= last_index; i++) - { - cum += hist[i]; - if (cum >= threshold) - return i; - } - return -1; -} - - -void TransTable::PrintHist( - int hist[], - int num_wraps, - int last_index) -{ - int count, prod_sum, prod_sumsq, max_len; - - TransTable::MakeHistStats(hist, - &count, &prod_sum, &prod_sumsq, &max_len, last_index); - - for (int i = 1; i <= last_index; i++) - if (hist[i]) - fprintf(fp, "%7d\t%5d\n", i, hist[i]); - - fprintf(fp, "\n"); - fprintf(fp, "Entries\t%5d\n", count); - if (count) - { - fprintf(fp, "Full\t%5d\n", num_wraps); - - double mean = prod_sum / static_cast(count); - fprintf(fp, "Average\t%5.2f\n", mean); - - double var = prod_sumsq / - static_cast(count - mean * mean); - if (var >= 0.) - fprintf(fp, "Std.dev\t%5.2f\n", sqrt(var)); - - fprintf(fp, "Maximum\t%5d\n", max_len); - } - fprintf(fp, "\n"); -} - - -void TransTable::UpdateSuitHist( - int trick, - int hand, - int hist[], - int * num_wraps) -{ -#ifdef SMALL_MEMORY_OPTION - UNUSED(trick); - UNUSED(hand); - UNUSED(hist); - UNUSED(num_wraps); -#else - distHashType * dp; - - * num_wraps = 0; - for (int i = 0; i <= DISTS_PER_ENTRY; i++) - hist[i] = 0; - - for (int hashkey = 0; hashkey < 256; hashkey++) - { - dp = &TTroot[trick][hand][hashkey]; - hist [ dp->nextNo ]++; - suitHist[ dp->nextNo ]++; - - if (dp->nextNo != dp->nextWriteNo) - { - (*num_wraps)++; // Not entirely correct - suitWraps++; - } - } -#endif -} - - -void TransTable::PrintSuitStats( - int trick, - int hand) -{ -#ifdef SMALL_MEMORY_OPTION - UNUSED(trick); - UNUSED(hand); -#else - int hist[DISTS_PER_ENTRY + 1]; - int num_wraps; - - TransTable::UpdateSuitHist(trick, hand, hist, &num_wraps); - - fprintf(fp, "Suit histogram for trick %d, hand %s\n", - trick, players[hand]); - TransTable::PrintHist(hist, num_wraps, DISTS_PER_ENTRY); -#endif -} - - -void TransTable::PrintAllSuitStats() -{ -#ifndef SMALL_MEMORY_OPTION - suitWraps = 0; - for (int i = 0; i <= DISTS_PER_ENTRY; i++) - suitHist[i] = 0; - - for (int trick = 11; trick >= 1; trick--) - { - for (int hand = 0; hand < DDS_HANDS; hand++) - { - fprintf(fp, "Suit, Trick %d, hand %s\n", trick, players[hand]); - fprintf(fp, "==========================\n\n"); - TransTable::PrintSuitStats(trick, hand); - } - } - - fprintf(fp, "Overall suit histogram\n"); - TransTable::PrintHist(suitHist, suitWraps, DISTS_PER_ENTRY); -#endif -} - - -void TransTable::PrintSummarySuitStats() -{ -#ifndef SMALL_MEMORY_OPTION - int hist[DISTS_PER_ENTRY + 1]; - int count, prod_sum, prod_sumsq, - max_len, num_wraps; - - suitWraps = 0; - for (int i = 0; i <= DISTS_PER_ENTRY; i++) - suitHist[i] = 0; - - fprintf(fp, "Suit depth statistics\n\n"); - - fprintf(fp, "%5s %6s %7s %7s %7s %7s %7s P%-4.2f\n", - "Trick", - "Player", - "Entries", - "Full", - "Average", - "Std.dev", - "Maximum", - TT_PERCENTILE); - - for (int trick = 11; trick >= 1; trick--) - { - for (int hand = 0; hand < DDS_HANDS; hand++) - { - TransTable::UpdateSuitHist(trick, hand, hist, &num_wraps); - TransTable::MakeHistStats(hist, - &count, &prod_sum, &prod_sumsq, &max_len, DISTS_PER_ENTRY); - - double mean = 0., var = 0.; - if (count > 0) - { - mean = prod_sum / static_cast(count); - var = prod_sumsq / - static_cast(count - mean * mean); - if (var < 0.) - var = 0.; - } - - int percentile = - TransTable::CalcPercentile(hist, - TT_PERCENTILE * count, DISTS_PER_ENTRY); - - if (count > 0) - fprintf(fp, "%5d %-6s %7d %7d %7.2f %7.2f %7d %7d\n", - trick, - players[hand], - count, - num_wraps, - mean, - sqrt(var), - max_len, - percentile); - else - fprintf(fp, "%5d %-6s %7d %7d %7s %7s %7d %7d\n", - trick, - players[hand], - count, - num_wraps, - "-", - "-", - max_len, - percentile); - } - fprintf(fp, "\n"); - } - fprintf(fp, "\n"); -#endif -} - - -TransTable::winBlockType * TransTable::FindMatchingDist( - int trick, - int hand, - int handDistSought[DDS_HANDS]) -{ -#ifdef SMALL_MEMORY_OPTION - UNUSED(trick); - UNUSED(hand); - UNUSED(handDistSought); - return NULL; -#else - winBlockType * bp; - distHashType * dp; - int handDist[DDS_HANDS]; - - for (int hashkey = 0; hashkey < 256; hashkey++) - { - dp = &TTroot[trick][hand][hashkey]; - for (int i = 0; i < dp->nextNo; i++) - { - bp = dp->list[i].posBlock; - TransTable::KeyToDist(dp->list[i].key, handDist); - - bool same = true; - for (int h = 0; h < DDS_HANDS; h++) - { - if (handDist[h] != handDistSought[h]) - { - same = false; - break; - } - } - if (same) - return bp; - } - } - return nullptr; -#endif -} - - -void TransTable::PrintEntriesBlock( - winBlockType * bp, - unsigned char lengths[DDS_HANDS][DDS_SUITS]) -{ - char line[40]; - char lines[2][80]; - - TransTable::LenToStr(lengths, line); - - sprintf(lines[0], - "%d matches for %s\n", bp->nextMatchNo, line); - memset(lines[1], '=', 71); - lines[1][71] = '\0'; - - fprintf(fp, "%s%s\n\n", lines[0], lines[1]); - - for (int j = 0; j < bp->nextMatchNo; j++) - { - fprintf(fp, "Entry number %3d\n", j + 1); - fprintf(fp, "----------------\n\n"); - TransTable::PrintMatch(&bp->list[j], lengths); - } -} - - - -void TransTable::PrintEntriesDistAndCards( - int trick, - int hand, - unsigned short * aggrTarget, - int handDist[DDS_HANDS]) -{ -#ifdef SMALL_MEMORY_OPTION - UNUSED(trick); - UNUSED(hand); - UNUSED(aggrTarget); - UNUSED(handDist); -#else - char line[40]; - unsigned char len[DDS_HANDS][DDS_SUITS]; - - winBlockType * bp = - TransTable::FindMatchingDist(trick, hand, handDist); - - TransTable::DistToLengths(trick, handDist, len); - - fprintf(fp, "Looking up entry for trick %d, hand %d\n", - trick, hand); - TransTable::LenToStr(len, line); - fprintf(fp, "%s\n\n", line); - - if (! bp) - { - fprintf(fp, "Entry not found\n\n"); - return; - } - - unsigned * ab0 = aggr[ aggrTarget[0] ].aggrBytes[0]; - unsigned * ab1 = aggr[ aggrTarget[1] ].aggrBytes[1]; - unsigned * ab2 = aggr[ aggrTarget[2] ].aggrBytes[2]; - unsigned * ab3 = aggr[ aggrTarget[3] ].aggrBytes[3]; - - winMatchType TTentry; - TTentry.topSet1 = ab0[0] | ab1[0] | ab2[0] | ab3[0]; - TTentry.topSet2 = ab0[1] | ab1[1] | ab2[1] | ab3[1]; - TTentry.topSet3 = ab0[2] | ab1[2] | ab2[2] | ab3[2]; - TTentry.topSet4 = ab0[3] | ab1[3] | ab2[3] | ab3[3]; - - int matchNo = 1; - int n = bp->nextMatchNo - 1; - winMatchType * wp = &bp->list[n]; - - for (int i = n; i >= 0; i--, wp--) - { - if ((wp->topSet1 ^ TTentry.topSet1) & wp->topMask1) - continue; - - if (wp->lastMaskNo != 1) - { - if ((wp->topSet2 ^ TTentry.topSet2) & wp->topMask2) - continue; - - if (wp->lastMaskNo != 2) - { - if ((wp->topSet3 ^ TTentry.topSet3) & wp->topMask3) - continue; - } - } - - fprintf(fp, "Match number %d\n", matchNo++); - fprintf(fp, "---------------\n"); - TransTable::PrintMatch(&bp->list[i], len); - } - - if (matchNo == 1) - fprintf(fp, "%d matches for suit, none for cards\n\n", n); - else - fprintf(fp, "\n"); -#endif -} - - -void TransTable::PrintEntriesDist( - int trick, - int hand, - int handDist[DDS_HANDS]) -{ -#ifdef SMALL_MEMORY_OPTION - UNUSED(trick); - UNUSED(hand); - UNUSED(handDist); -#else - unsigned char len[DDS_HANDS][DDS_SUITS]; - - winBlockType * bp = - TransTable::FindMatchingDist(trick, hand, handDist); - - TransTable::DistToLengths(trick, handDist, len); - - if (! bp) - { - fprintf(fp, "Entry not found: Trick %d, hand %d\n", - trick, hand); - char line[80]; - TransTable::LenToStr(len, line); - fprintf(fp, "%s\n\n", line); - return; - } - - TransTable::PrintEntriesBlock(bp, len); -#endif -} - - -void TransTable::PrintEntries( - int trick, - int hand) -{ -#ifdef SMALL_MEMORY_OPTION - UNUSED(trick); - UNUSED(hand); -#else - winBlockType * bp; - distHashType * dp; - int handDist[DDS_HANDS]; - unsigned char lengths[DDS_HANDS][DDS_SUITS]; - - for (int hashkey = 0; hashkey < 256; hashkey++) - { - dp = &TTroot[trick][hand][hashkey]; - for (int i = 0; i < dp->nextNo; i++) - { - bp = dp->list[i].posBlock; - TransTable::KeyToDist(dp->list[i].key, handDist); - TransTable::DistToLengths(trick, handDist, lengths); - - TransTable::PrintEntriesBlock(bp, lengths); - } - } -#endif -} - - -void TransTable::PrintAllEntries() -{ -#ifndef SMALL_MEMORY_OPTION - for (int trick = 11; trick >= 1; trick--) - { - for (int hand = 0; hand < DDS_HANDS; hand++) - { - fprintf(fp, "Entries, trick %d, hand %s\n", trick, players[hand]); - fprintf(fp, "==============================\n\n"); - TransTable::PrintEntries(trick, hand); - } - } - fprintf(fp, "\n"); -#endif -} - - -void TransTable::UpdateEntryHist( - int trick, - int hand, - int hist[], - int * num_wraps) -{ -#ifdef SMALL_MEMORY_OPTION - UNUSED(trick); - UNUSED(hand); - UNUSED(hist); - UNUSED(num_wraps); -#else - distHashType * dp; - - * num_wraps = 0; - for (int i = 0; i <= BLOCKS_PER_ENTRY; i++) - hist[i] = 0; - - for (int hashkey = 0; hashkey < 256; hashkey++) - { - dp = &TTroot[trick][hand][hashkey]; - for (int i = 0; i < dp->nextNo; i++) - { - int c = dp->list[i].posBlock->nextMatchNo; - hist [c]++; - suitHist[c]++; - - if (c != dp->list[i].posBlock->nextWriteNo) - { - (*num_wraps)++; // Not entirely correct - suitWraps++; - } - } - } -#endif -} - - -void TransTable::PrintEntryStats( - int trick, - int hand) -{ -#ifdef SMALL_MEMORY_OPTION - UNUSED(trick); - UNUSED(hand); -#else - int hist[BLOCKS_PER_ENTRY + 1]; - int num_wraps; - - TransTable::UpdateEntryHist(trick, hand, hist, &num_wraps); - - fprintf(fp, "Entry histogram for trick %d, hand %s\n", - trick, players[hand]); - TransTable::PrintHist(hist, num_wraps, BLOCKS_PER_ENTRY); -#endif -} - - -void TransTable::PrintAllEntryStats() -{ -#ifndef SMALL_MEMORY_OPTION - suitWraps = 0; - for (int i = 0; i <= BLOCKS_PER_ENTRY; i++) - suitHist[i] = 0; - - for (int trick = 11; trick >= 1; trick--) - { - for (int hand = 0; hand < DDS_HANDS; hand++) - { - fprintf(fp, "Entry, trick %d, hand %s\n", trick, players[hand]); - fprintf(fp, "============================\n\n"); - TransTable::PrintEntryStats(trick, hand); - } - } - - fprintf(fp, "Overall entry histogram\n"); - TransTable::PrintHist(suitHist, suitWraps, BLOCKS_PER_ENTRY); -#endif -} - - -int TransTable::EffectOfBlockBound( - int hist[], - int size) -{ - // Calculates the number of blocks used if the blocks - // are divided up in units of size, rather than in units - // of BLOCKS_PER_ENTRY. Only makes sense if size is less - // than BLOCKS_PER_ENTRY, as we won't have statistics for - // how many blocks above BLOCKS_PER_ENTRY would be created - // if BLOCKS_PER_ENTRY were larger. - - int cum_memory = 0; - int unit_size = 0; - - for (int i = 1; i <= BLOCKS_PER_ENTRY; i++) - { - if ((i - 1) % size == 0) - unit_size += size; - - cum_memory += hist[i] * unit_size; - } - return cum_memory; -} - - -void TransTable::PrintSummaryEntryStats() -{ -#ifndef SMALL_MEMORY_OPTION - int hist[BLOCKS_PER_ENTRY + 1]; - int count, prod_sum, prod_sumsq, - max_len, num_wraps; - - int cumCount = 0; - double cumProd = 0.; - int cumMemory = 0; - - suitWraps = 0; - for (int i = 0; i <= BLOCKS_PER_ENTRY; i++) - suitHist[i] = 0; - - fprintf(fp, "Entry depth statistics\n\n"); - - fprintf(fp, "%5s %6s %7s %7s %7s %7s %7s P%-4.2f\n", - "Trick", - "Player", - "Entries", - "Full", - "Average", - "Std.dev", - "Maximum", - TT_PERCENTILE); - - for (int trick = 11; trick >= 1; trick--) - { - for (int hand = 0; hand < DDS_HANDS; hand++) - { - TransTable::UpdateEntryHist(trick, hand, hist, &num_wraps); - TransTable::MakeHistStats(hist, - &count, &prod_sum, &prod_sumsq, &max_len, BLOCKS_PER_ENTRY); - - cumCount += count; - cumProd += prod_sum; - cumMemory += TransTable::EffectOfBlockBound(hist, 20); - - double mean = prod_sum / static_cast(count); - double var = prod_sumsq / - static_cast(count - mean * mean); - if (var < 0.) - var = 0.; - - int percentile = - TransTable::CalcPercentile(hist, - TT_PERCENTILE * count, BLOCKS_PER_ENTRY); - - fprintf(fp, "%5d %-6s %7d %7d %7.2f %7.2f %7d %7d\n", - trick, - players[hand], - count, - num_wraps, - mean, - sqrt(var), - max_len, - percentile); - } - fprintf(fp, "\n"); - } - fprintf(fp, "\n"); - - fprintf(fp, "Blocks counted\t%8d\n", cumCount); - - fprintf(fp, "Blocks produced\t%8d\n", TransTable::BlocksInUse()); - - fprintf(fp, "Mem scenario\t%7.2f%%\n", - 100. * cumMemory / - (static_cast(BLOCKS_PER_ENTRY * cumCount))); - - if (cumCount) - fprintf(fp, "Fullness\t%7.2f%%\n", - 100. * cumProd / (BLOCKS_PER_ENTRY * cumCount)); - fprintf(fp, "\n"); -#endif -} - - -void TransTable::PrintPageSummary() -{ -#ifndef SMALL_MEMORY_OPTION - if (pageStats.numResets == 0) - return; - - fprintf(fp, "Page statistics\n\n"); - - fprintf(fp, "%-10s %6s %6s\n", - "Type", "Number", "Avg"); - - fprintf(fp, "%-10s %6d\n", - "Resets", - pageStats.numResets); - fprintf(fp, "%-10s %6d %6.2f\n", - "calloc", - pageStats.numCallocs, - pageStats.numCallocs / static_cast(pageStats.numResets)); - fprintf(fp, "%-10s %6d %6.2f\n", - "free", - pageStats.numFrees, - pageStats.numFrees / static_cast(pageStats.numResets)); - fprintf(fp, "%-10s %6d %6.2f\n\n", - "harvest", - pageStats.numHarvests, - pageStats.numHarvests / static_cast(pageStats.numResets)); -#endif -} - -void TransTable::PrintNodeStats() -{ -#ifdef SMALL_MEMORY_OPTION - for (int k = 13; k > 0; k--) - fprintf(fp, "Trick %d: Created nodes: %ld\n", k, - static_cast(aggrLenSets[k - 1])); - fprintf(fp, "\n"); -#endif -} - -void TransTable::PrintResetStats() -{ -#ifdef SMALL_MEMORY_OPTION - fprintf(fp, "Total no of Resets: %d\n", statsResets.noOfResets); - fprintf(fp, "\n"); - - for (int k = 0; k <= 5; k++) - fprintf(fp, "%s: %d\n", resetText[k], statsResets.aggrResets[k]); - fprintf(fp, "\n"); -#endif -} - diff --git a/src/TransTable.h b/src/TransTable.h index f3c8f3b9..e65cce96 100644 --- a/src/TransTable.h +++ b/src/TransTable.h @@ -7,60 +7,35 @@ See LICENSE and README. */ -#ifndef DDS_TRANSTABLES_H -#define DDS_TRANSTABLES_H - /* - This is an object for managing transposition tables and the - associated memory. + This is the parent class of TransTableS and TransTableL. + Those two are different implementations. The S version has a + much smaller memory and a somewhat slower execution time. */ +#ifndef DDS_TRANSTABLE_H +#define DDS_TRANSTABLE_H -#include -#include -#include +#include +#include #include -#include "../include/dll.h" + #include "dds.h" using namespace std; -// ResetMemory reasons -#define UNKNOWN_REASON 0 -#define TOO_MANY_NODES 1 -#define NEW_DEAL 2 -#define NEW_TRUMP 3 -#define MEMORY_EXHAUSTED 4 -#define FREE_THREAD_MEM 5 - - -// For SMALL_MEMORY_OPTION -#define NSIZE 50000 -#define WSIZE 50000 -#define NINIT 60000 -#define WINIT 170000 -#define LSIZE 200 // Per trick and first hand - -// For full memory option -#define NUM_PAGES_DEFAULT 15 -#define NUM_PAGES_MAXIMUM 25 -#define BLOCKS_PER_PAGE 1000 -#define DISTS_PER_ENTRY 32 -#define BLOCKS_PER_ENTRY 125 -#define FIRST_HARVEST_TRICK 8 -#define HARVEST_AGE 10000 - -#define TT_BYTES 4 -#define TT_TRICKS 12 - -#define TT_LINE_LEN 20 - -#define TT_PERCENTILE 0.9 - -#define HISTSIZE 100000 +enum TTresetReason +{ + TT_RESET_UNKNOWN = 0, + TT_RESET_TOO_MANY_NODES = 1, + TT_RESET_NEW_DEAL = 2, + TT_RESET_NEW_TRUMP = 3, + TT_RESET_MEMORY_EXHAUSTED = 4, + TT_RESET_FREE_MEMORY = 5, + TT_RESET_SIZE = 6 +}; -// Also used in ABSearch struct nodeCardsType // 8 bytes { char ubound; // For N-S @@ -70,448 +45,103 @@ struct nodeCardsType // 8 bytes char leastWin[DDS_SUITS]; }; - +#ifdef _MSC_VER + // Disable warning for unused arguments. + #pragma warning(push) + #pragma warning(disable: 4100) +#endif class TransTable { - private: - - // Structures for the small memory option. - - struct winCardType - { - int orderSet; - int winMask; - nodeCardsType * first; - winCardType * prevWin; - winCardType * nextWin; - winCardType * next; - }; - - struct posSearchTypeSmall - { - winCardType * posSearchPoint; - long long suitLengths; - posSearchTypeSmall * left; - posSearchTypeSmall * right; - }; - - struct ttAggrType - { - int aggrRanks[DDS_SUITS]; - int winMask[DDS_SUITS]; - }; - - struct statsResetsType - { - int noOfResets; - int aggrResets[6]; - }; - - - // Structures for the full memory option. - - struct winMatchType // 52 bytes - { - unsigned xorSet; - unsigned topSet1 , topSet2 , topSet3 , topSet4 ; - unsigned topMask1, topMask2, topMask3, topMask4; - int maskIndex; - int lastMaskNo; - nodeCardsType first; - }; - - struct winBlockType // 6508 bytes when BLOCKS_PER_ENTRY == 125 - { - int nextMatchNo; - int nextWriteNo; - // int timestampWrite; - int timestampRead; - winMatchType list[BLOCKS_PER_ENTRY]; - }; - - struct posSearchType // 16 bytes (inefficiency, 12 bytes enough) - { - winBlockType * posBlock; - long long key; - }; - - struct distHashType // 520 bytes when DISTS_PER_ENTRY == 32 - { - int nextNo; - int nextWriteNo; - posSearchType list[DISTS_PER_ENTRY]; - }; - - struct aggrType // 80 bytes - { - unsigned aggrRanks[DDS_SUITS]; - unsigned aggrBytes[DDS_SUITS][TT_BYTES]; - }; - - struct poolType // 16 bytes - { - poolType * next; - poolType * prev; - int nextBlockNo; - winBlockType * list; - }; - - struct pageStatsType - { - int numResets, - numCallocs, - numFrees, - numHarvests, - lastCurrent; - }; - - struct harvestedType // 16 bytes - { - int nextBlockNo; - winBlockType * list [BLOCKS_PER_PAGE]; - }; - - enum memStateType - { - FROM_POOL, - FROM_HARVEST - }; - - -#ifdef SMALL_MEMORY_OPTION - // Private data for the small memory version. - - long long aggrLenSets[14]; - statsResetsType statsResets; - - winCardType temp_win[5]; - int nodeSetSizeLimit; - int winSetSizeLimit; - unsigned long long maxmem; - unsigned long long allocmem; - unsigned long long summem; - int wmem; - int nmem; - int maxIndex; - int wcount; - int ncount; - bool clearTTflag; - int windex; - ttAggrType * aggp; - - posSearchTypeSmall * rootnp[14][DDS_HANDS]; - winCardType ** pw; - nodeCardsType ** pn; - posSearchTypeSmall ** pl[14][DDS_HANDS]; - nodeCardsType * nodeCards; - winCardType * winCards; - posSearchTypeSmall * posSearch[14][DDS_HANDS]; - int nodeSetSize; /* Index with range 0 to nodeSetSizeLimit */ - int winSetSize; /* Index with range 0 to winSetSizeLimit */ - int lenSetInd[14][DDS_HANDS]; - int lcount[14][DDS_HANDS]; - - const char * resetText[6]; - - long long suitLengths[14]; -#else - // Private data for the full memory version. - memStateType memState; - - int pagesDefault, - pagesCurrent, - pagesMaximum; - - int harvestTrick, - harvestHand; - - pageStatsType pageStats; - - - // aggr is constant for a given hand. - aggrType aggr[8192]; // 64 KB - - // This is the real transposition table. - // The last index is the hash. - // 6240 KB with above assumptions - // distHashType TTroot[TT_TRICKS][DDS_HANDS][256]; - distHashType * TTroot[TT_TRICKS][DDS_HANDS]; - - // It is useful to remember the last block we looked at. - winBlockType * lastBlockSeen[TT_TRICKS][DDS_HANDS]; - - // The pool of card entries for a given suit distribution. - poolType * poolp; - winBlockType * nextBlockp; - harvestedType harvested; -#endif - - int timestamp; - int TTInUse; - - // Private functions for small memory option. - - void Wipe(); - - void AddWinSet(); - - void AddNodeSet(); - - void AddLenSet(int trick, int firstHand); - - void BuildSOP( - unsigned short ourWinRanks[DDS_SUITS], - unsigned short aggr[DDS_SUITS], - nodeCardsType * first, - long long suitLengths, - int tricks, - int firstHand, - bool flag); - - struct nodeCardsType * BuildPath( - int * winMask, - int * winOrderSet, - int ubound, - int lbound, - char bestMoveSuit, - char bestMoveRank, - posSearchTypeSmall * nodep, - bool * result); - - struct posSearchTypeSmall * SearchLenAndInsert( - posSearchTypeSmall * rootp, - long long key, - bool insertNode, - int trick, - int firstHand, - bool * result); - - struct nodeCardsType * UpdateSOP( - int ubound, - int lbound, - char bestMoveSuit, - char bestMoveRank, - nodeCardsType * nodep); - - struct nodeCardsType * FindSOP( - int orderSet[], - int limit, - winCardType * nodeP, - bool * lowerFlag); - - - // Full memory private functions, and common functions. - - void InitTT(); - - void ReleaseTT(); - - void SetConstants(); - - int hash8(int * handDist); - - winBlockType * GetNextCardBlock(); - - winBlockType * LookupSuit( - distHashType * dp, - long long key, - bool * empty); - - - nodeCardsType * LookupCards( - winMatchType * searchp, - winBlockType * bp, - int limit, - bool * lowerFlag); - - void CreateOrUpdate( - winBlockType * bp, - winMatchType * searchp, - bool flag); - - bool Harvest(); - - // Debug - - FILE * fp; - - // Really the maximum of BLOCKS_PER_ENTRY and DISTS_PER_ENTRY - int suitHist[BLOCKS_PER_ENTRY + 1], - suitWraps; - - void KeyToDist( - long long key, - int handDist[]); - - void DistToLengths( // Both? - int trick, - int handDist[], - unsigned char lengths[DDS_HANDS][DDS_SUITS]); - - void LenToStr( // Both? - unsigned char lengths[DDS_HANDS][DDS_SUITS], - char * line); - - void MakeHistStats( // Both? Or only LARGE? - int hist[], - int * count, - int * prod_sum, - int * prod_sumsq, - int * max_len, - int last_index); - - int CalcPercentile( // Both? Or only large? - int hist[], - double threshold, - int last_index); - - void PrintHist( // Both? Or only LARGE? - int hist[], - int num_wraps, - int last_index); - - void UpdateSuitHist( // Only LARGE - int trick, - int hand, - int hist[], - int * num_wraps); - - winBlockType * FindMatchingDist( // Only LARGE - int trick, - int hand, - int handDistSought[DDS_HANDS]); - - void PrintEntriesBlock( // Both, but probably only LARGE? - winBlockType * bp, - unsigned char lengths[DDS_HANDS][DDS_SUITS]); - - void UpdateEntryHist( // Only LARGE - int trick, - int hand, - int hist[], - int * num_wraps); - - int EffectOfBlockBound( - int hist[], - int size); - - void PrintNodeValues( - nodeCardsType * np); - - void PrintMatch( - winMatchType * wp, - unsigned char lengths[DDS_HANDS][DDS_SUITS]); - - void MakeHolding( - char * high, - unsigned len, - char * res); - - void DumpHands( - char hands[DDS_SUITS][DDS_HANDS][TT_LINE_LEN], - unsigned char lengths[DDS_HANDS][DDS_SUITS]); - - void SetToPartialHands( - unsigned set, - unsigned mask, - int maxRank, - int numRanks, - char hands[DDS_SUITS][DDS_HANDS][TT_LINE_LEN], - int used[DDS_SUITS][DDS_HANDS]); - - int BlocksInUse(); - public: - TransTable(); - - ~TransTable(); - - void Init(int handLookup[][15]); + TransTable(){}; - void SetMemoryDefault(int megabytes); + virtual ~TransTable(){}; - void SetMemoryMaximum(int megabytes); + virtual void Init(const int handLookup[][15]){}; - void MakeTT(); + virtual void SetMemoryDefault(const int megabytes){}; - void ResetMemory(int reason); + virtual void SetMemoryMaximum(const int megabytes){}; - void ReturnAllMemory(); + virtual void MakeTT(){}; - double MemoryInUse(); + virtual void ResetMemory(const TTresetReason reason){}; - nodeCardsType * Lookup( - int trick, - int hand, - unsigned short * aggrTarget, - int * handDist, - int limit, - bool * lowerFlag); + virtual void ReturnAllMemory(){}; - void Add( - int trick, - int hand, - unsigned short * aggrTarget, - unsigned short * winRanks, - nodeCardsType * first, - bool flag); + virtual double MemoryInUse() const {return 0.;}; - // Debug functions + virtual nodeCardsType const * Lookup( + const int trick, + const int hand, + const unsigned short aggrTarget[], + const int handDist[], + const int limit, + bool& lowerFlag){return NULL;}; - void SetFile(const string& fname); + virtual void Add( + const int trick, + const int hand, + const unsigned short aggrTarget[], + const unsigned short winRanksArg[], + const nodeCardsType& first, + const bool flag){}; - void PrintSuits( // Only LARGE - int trick, - int hand); + virtual void PrintSuits( + ofstream& fout, + const int trick, + const int hand) const {}; - void PrintAllSuits(); // Only LARGE + virtual void PrintAllSuits(ofstream& fout) const {}; - void PrintSuitStats( // Only LARGE - int trick, - int hand); + virtual void PrintSuitStats( + ofstream& fout, + const int trick, + const int hand) const {}; - void PrintAllSuitStats(); // Only LARGE + virtual void PrintAllSuitStats(ofstream& fout) const {}; - void PrintSummarySuitStats(); // Only LARGE + virtual void PrintSummarySuitStats(ofstream& fout) const {}; - // Examples: - // int hd[DDS_HANDS] = { 0x0342, 0x0334, 0x0232, 0x0531 }; - // thrp->transTable.PrintEntriesDist(11, 1, hd); - // unsigned short ag[DDS_HANDS] = - // { 0x1fff, 0x1fff, 0x0f75, 0x1fff }; - // thrp->transTable.PrintEntriesDistAndCards(11, 1, ag, hd); + virtual void PrintEntriesDist( + ofstream& fout, + const int trick, + const int hand, + const int handDist[]) const {}; - void PrintEntriesDist( // Only LARGE - int trick, - int hand, - int handDist[DDS_HANDS]); + virtual void PrintEntriesDistAndCards( + ofstream& fout, + const int trick, + const int hand, + const unsigned short aggrTarget[], + const int handDist[]) const {}; - void PrintEntriesDistAndCards( // Only LARGE - int trick, - int hand, - unsigned short * aggrTarget, - int handDist[DDS_HANDS]); + virtual void PrintEntries( + ofstream& fout, + const int trick, + const int hand) const {}; - void PrintEntries( // Only LARGE - int trick, - int hand); + virtual void PrintAllEntries(ofstream& fout) const {}; - void PrintAllEntries(); // Only LARGE + virtual void PrintEntryStats( + ofstream& fout, + const int trick, + const int hand) const {}; - void PrintEntryStats( // Only LARGE - int trick, - int hand); + virtual void PrintAllEntryStats(ofstream& fout) const {}; - void PrintAllEntryStats(); // Only LARGE + virtual void PrintSummaryEntryStats(ofstream& fout) const {}; - void PrintSummaryEntryStats(); // Only LARGE + virtual void PrintPageSummary(ofstream& fout) const {}; - void PrintPageSummary(); // Only SMALL + virtual void PrintNodeStats(ofstream& fout) const {}; - void PrintNodeStats(); // Only SMALL - - void PrintResetStats(); // Only SMALL + virtual void PrintResetStats(ofstream& fout) const {}; }; +#ifdef _MSC_VER + #pragma warning(pop) +#endif + #endif diff --git a/src/TransTableL.cpp b/src/TransTableL.cpp new file mode 100644 index 00000000..b3e0466b --- /dev/null +++ b/src/TransTableL.cpp @@ -0,0 +1,1829 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +/* + Explanation of full memory version: + + There are some constants that only need to be calculated + once. In fact they are the same for all instances of the + object. In order to save time and memory, they share a + single memory. + + Each 13-bit number, aggr, represents a possible set of cards + remaining in a suit. For example, 0x15a2 represents + A(1) QT(5) 97(a) 3(2). + + TTlowestRank[aggr] gives the lowest relative rank that is in + play in aggr. The ace is 14, the deuce is 2. A void counts as + rank 15 ("not even the ace"). It would go horribly wrong + if this rank were chosen to be 0, as might seem intuitive. + This is not the same as lowestRank, the lowest absolute rank. + + maskBytes[aggr][suit] is a set of 4 32-bit integers, + where suit is 0 ..3 (spades .. clubs). Each integer only + has 8 of its 32 bits set, but these 8 bits could be either + in the top byte (byte 0) or any of the others (bytes 1 ..3). + The bytes are abbreviated as B0 .. B3 below. + + int 0 int 1 int 2 int 3 + suit 0, spades B0 R0 B0 R1 B0 R2 B0 R3 + suit 1, hearts B1 R0 B1 R1 B1 R2 B1 R3 + suit 2, diamonds B2 R0 B2 R1 B2 R2 B2 + suit 3, clubs B3 R0 B3 R1 B3 R2 B3 + + R0 .. R3 are explained now. The purpose of maskBytes is + to generate 32-bit masks for later use with actual suits. + As a card can be with either of 4 players, 2 bits are needed + to encode the position of a card. Therefore the masks also + need 2 bits per card, even though the 2 bits are identical. + + In the table, R0 means the top byte (8 bits = 4 cards) of + a holding. + + R0 AKQJ + R1 T987 + R2 6543 + R3 2 + + For example, if the ace is held by North, the king by South, the + queen and jack by West, then the top byte for that SUIT would be + + 00(North) 10(South) 11(West) 11(West) + + The MASK for that holding would be 11 11 11 11, as all four + cards are in play. + + If the jack were missing, because it had already been played, + then the suit would be 00 10 11 00 (a missing card is also + encoded as 00), and the mask would be 11 11 11 00. + + Later on, when we have a specific set of spades .. clubs, + we want to check whether those cards are already in the + transposition table. As far as the necessary masks is + concerned, this is generated by an OR (|) of the four + 32-bit integers in a column of the table above. + + So the first column yields four bytes which are already + shifted in place, all corresponding to R0. The mask + corresponds to the AKQJ of the four suits in order. + + It's not really AKQJ, but the four highest cards still in + play in that suit. So missing cards are always at the end + of the list. +*/ + + +#include +#include + +#include "TransTableL.h" +#include "debug.h" + + +extern unsigned char cardRank[16]; +extern char relRank[8192][15]; + +static bool _constantsSet = false; +static int TTlowestRank[8192]; +static unsigned maskBytes[8192][DDS_SUITS][TT_BYTES]; + +static vector players = +{ + "North", "East", "South", "West" +}; + + +TransTableL::TransTableL() +{ + if (! _constantsSet) + { + _constantsSet = true; + TransTableL::SetConstants(); + } + + poolp = nullptr; + pagesDefault = NUM_PAGES_DEFAULT; + pagesMaximum = NUM_PAGES_MAXIMUM; + pagesCurrent = 0; + + memState = FROM_POOL; + harvestTrick = FIRST_HARVEST_TRICK; + harvestHand = 0; + + harvested.nextBlockNo = 0; + + timestamp = 0; + + pageStats.numResets = 0; + pageStats.numCallocs = 0; + pageStats.numFrees = 0; + pageStats.numHarvests = 0; + pageStats.lastCurrent = 0; + + TTInUse = 0; +} + + +TransTableL::~TransTableL() +{ + TransTableL::ReturnAllMemory(); +} + + +void TransTableL::SetConstants() +{ + unsigned int topBitRank = 1; + TTlowestRank[0] = 15; // Void + unsigned winMask[8192]; + winMask[0] = 0; + + for (unsigned ind = 1; ind < 8192; ind++) + { + if (ind >= (topBitRank + topBitRank)) /* Next top bit */ + topBitRank <<= 1; + + // winMask is a growing list of 11's. In the end it will + // have 26 bits, so 13 groups of two bits. It always + // consists of all 11's, then all 00's. + + winMask[ind] = (winMask[ind ^ topBitRank] >> 2) | (3 << 24); + + maskBytes[ind][0][0] = (winMask[ind] << 6) & 0xff000000; + maskBytes[ind][0][1] = (winMask[ind] << 14) & 0xff000000; + maskBytes[ind][0][2] = (winMask[ind] << 22) & 0xff000000; + maskBytes[ind][0][3] = (winMask[ind] << 30) & 0xff000000; + + maskBytes[ind][1][0] = (winMask[ind] >> 2) & 0x00ff0000; + maskBytes[ind][1][1] = (winMask[ind] << 6) & 0x00ff0000; + maskBytes[ind][1][2] = (winMask[ind] << 14) & 0x00ff0000; + maskBytes[ind][1][3] = (winMask[ind] << 22) & 0x00ff0000; + + maskBytes[ind][2][0] = (winMask[ind] >> 10) & 0x0000ff00; + maskBytes[ind][2][1] = (winMask[ind] >> 2) & 0x0000ff00; + maskBytes[ind][2][2] = (winMask[ind] << 6) & 0x0000ff00; + maskBytes[ind][2][3] = (winMask[ind] << 14) & 0x0000ff00; + + maskBytes[ind][3][0] = (winMask[ind] >> 18) & 0x000000ff; + maskBytes[ind][3][1] = (winMask[ind] >> 10) & 0x000000ff; + maskBytes[ind][3][2] = (winMask[ind] >> 2) & 0x000000ff; + maskBytes[ind][3][3] = (winMask[ind] << 6) & 0x000000ff; + + TTlowestRank[ind] = TTlowestRank[ind ^ topBitRank] - 1; + } +} + + +void TransTableL::Init(const int handLookup[][15]) +{ + // This is very similar to SetConstants, except that it + // happens with actual cards. It also makes sense to + // keep a record of aggrRanks for each suit. These are + // only used later for xorSet. + + unsigned int topBitRank = 1; + unsigned int topBitNo = 2; + aggrType * ap; + + for (int s = 0; s < DDS_SUITS; s++) + { + aggr[0].aggrRanks[s] = 0; + aggr[0].aggrBytes[s][0] = 0; + aggr[0].aggrBytes[s][1] = 0; + aggr[0].aggrBytes[s][2] = 0; + aggr[0].aggrBytes[s][3] = 0; + } + + for (unsigned ind = 1; ind < 8192; ind++) + { + if (ind >= (topBitRank << 1)) + { + /* Next top bit */ + topBitRank <<= 1; + topBitNo++; + } + + aggr[ind] = aggr[ind ^ topBitRank]; + ap = &aggr[ind]; + + for (int s = 0; s < DDS_SUITS; s++) + { + ap->aggrRanks[s] = ap->aggrRanks[s] >> 2 | + static_cast(handLookup[s][topBitNo] << 24); + } + + ap->aggrBytes[0][0] = (ap->aggrRanks[0] << 6) & 0xff000000; + ap->aggrBytes[0][1] = (ap->aggrRanks[0] << 14) & 0xff000000; + ap->aggrBytes[0][2] = (ap->aggrRanks[0] << 22) & 0xff000000; + ap->aggrBytes[0][3] = (ap->aggrRanks[0] << 30) & 0xff000000; + + ap->aggrBytes[1][0] = (ap->aggrRanks[1] >> 2) & 0x00ff0000; + ap->aggrBytes[1][1] = (ap->aggrRanks[1] << 6) & 0x00ff0000; + ap->aggrBytes[1][2] = (ap->aggrRanks[1] << 14) & 0x00ff0000; + ap->aggrBytes[1][3] = (ap->aggrRanks[1] << 22) & 0x00ff0000; + + ap->aggrBytes[2][0] = (ap->aggrRanks[2] >> 10) & 0x0000ff00; + ap->aggrBytes[2][1] = (ap->aggrRanks[2] >> 2) & 0x0000ff00; + ap->aggrBytes[2][2] = (ap->aggrRanks[2] << 6) & 0x0000ff00; + ap->aggrBytes[2][3] = (ap->aggrRanks[2] << 14) & 0x0000ff00; + + ap->aggrBytes[3][0] = (ap->aggrRanks[3] >> 18) & 0x000000ff; + ap->aggrBytes[3][1] = (ap->aggrRanks[3] >> 10) & 0x000000ff; + ap->aggrBytes[3][2] = (ap->aggrRanks[3] >> 2) & 0x000000ff; + ap->aggrBytes[3][3] = (ap->aggrRanks[3] << 6) & 0x000000ff; + } +} + + +void TransTableL::SetMemoryDefault(int megabytes) +{ + double blockMem = BLOCKS_PER_PAGE * sizeof(winBlockType) / + static_cast(1024.); + + pagesDefault = static_cast((1024 * megabytes) / blockMem); +} + + +void TransTableL::SetMemoryMaximum(int megabytes) +{ + double blockMem = BLOCKS_PER_PAGE * sizeof(winBlockType) / + static_cast(1024.); + + pagesMaximum = static_cast((1024 * megabytes) / blockMem); +} + + +///////////////////////////////////////////////////////////// +// // +// Full memory TT functions. // +// // +///////////////////////////////////////////////////////////// + +void TransTableL::MakeTT() +{ + if (! TTInUse) + { + TTInUse = 1; + + for (int t = 0; t < TT_TRICKS; t++) + { + for (int h = 0; h < DDS_HANDS; h++) + { + TTroot[t][h] = static_cast + (malloc(256 * sizeof(distHashType))); + + if (TTroot[t][h] == nullptr) + exit(1); + } + } + } + + TransTableL::InitTT(); +} + + +void TransTableL::InitTT() +{ + for (int c = 0; c < TT_TRICKS; c++) + { + for (int h = 0; h < DDS_HANDS; h++) + { + for (int i = 0; i < 256; i++) + { + TTroot[c][h][i].nextNo = 0; + TTroot[c][h][i].nextWriteNo = 0; + + } + lastBlockSeen[c][h] = nullptr; + } + } +} + + +void TransTableL::ReleaseTT() +{ + if (! TTInUse) + return; + TTInUse = 0; + + for (int t = 0; t < TT_TRICKS; t++) + { + for (int h = 0; h < DDS_HANDS; h++) + { + if (TTroot[t][h] == nullptr) + continue; + + free(TTroot[t][h]); + } + } +} + + +void TransTableL::ResetMemory(const TTresetReason reason) +{ + UNUSED(reason); + if (poolp == nullptr) + return; + + pageStats.numResets++; + pageStats.numCallocs += pagesCurrent - pageStats.lastCurrent; + pageStats.lastCurrent = pagesCurrent; + + while (pagesCurrent > pagesDefault) + { + free(poolp->list); + poolp = poolp->prev; + + free(poolp->next); + poolp->next = nullptr; + + pagesCurrent--; + } + + pageStats.numFrees += pageStats.lastCurrent - pagesCurrent; + pageStats.lastCurrent = pagesCurrent; + + while (poolp->prev) + poolp = poolp->prev; + + poolp->nextBlockNo = 0; + nextBlockp = poolp->list; + + TransTableL::InitTT(); + + timestamp = 0; + + memState = FROM_POOL; + + return; +} + + +void TransTableL::ReturnAllMemory() +{ + poolType * tmp; + + if (poolp) + { + while (poolp->next) + poolp = poolp->next; + + while (poolp) + { + free(poolp->list); + tmp = poolp; + poolp = poolp->prev; + free(tmp); + } + } + + pagesCurrent = 0; + + pageStats.numResets = 0; + pageStats.numCallocs = 0; + pageStats.numFrees = 0; + pageStats.numHarvests = 0; + pageStats.lastCurrent = 0; + + TransTableL::ReleaseTT(); + + return; +} + + +int TransTableL::BlocksInUse() const +{ + poolType * pp = poolp; + int count = 0; + + do + { + count += pp->nextBlockNo; + pp = pp->prev; + } + while (pp); + + return count; +} + + +double TransTableL::MemoryInUse() const +{ + int blockMem = BLOCKS_PER_PAGE * pagesCurrent * + static_cast(sizeof(winBlockType)); + int aggrMem = 8192 * static_cast(sizeof(aggrType)); + int rootMem = TT_TRICKS * DDS_HANDS * 256 * + static_cast(sizeof(distHashType)); + + return (blockMem + aggrMem + rootMem) / static_cast(1024.); +} + + +TransTableL::winBlockType * TransTableL::GetNextCardBlock() +{ + /* + Spaghetti code. The basic idea is that there is a pool of + pages. When a page runs out, we get a next pool. But we're + only allowed a certain maximum number, and calloc might also + fail before then. We have a default number of pages that + we don't give back voluntarily once we have acquired them, + but we give back anything more than that at the end of each + hand. If this overall mechanism fails, then we try to harvest + old entries scattered throughout the TT memory. If we get + enough for a "page", then we use that single page, and if + that runs out later, we try to harvest some more, starting + where we left off harvesting last time. If the harvesting also + fails, then we reset whatever TT memory we do have, and we + continue with that. + */ + + if (poolp == nullptr) + { + // Have to be able to get at least one pool. + poolp = static_cast(calloc(1, sizeof(poolType))); + if (poolp == nullptr) + exit(1); + + poolp->list = static_cast + (malloc(BLOCKS_PER_PAGE * sizeof(winBlockType))); + + if (! poolp->list) + exit(1); + + poolp->next = nullptr; + poolp->prev = nullptr; + poolp->nextBlockNo = 1; + + nextBlockp = poolp->list; + + pagesCurrent++; + + return nextBlockp++; + } + else if (memState == FROM_HARVEST) + { + // Not allowed to get more memory, so reuse old one. + int n = harvested.nextBlockNo; + if (n == BLOCKS_PER_PAGE) + { + if (! TransTableL::Harvest()) + { + TransTableL::ResetMemory(TT_RESET_UNKNOWN); + poolp->nextBlockNo++; + return nextBlockp++; + } + n = 0; + } + + harvested.nextBlockNo++; + return harvested.list[n]; + } + else if (poolp->nextBlockNo == BLOCKS_PER_PAGE) + { + if (poolp->next) + { + // Reuse a dormant block that has not been freed. + poolp = poolp->next; + poolp->nextBlockNo = 1; + nextBlockp = poolp->list; + + return nextBlockp++; + } + else if (pagesCurrent == pagesMaximum) + { + // Have to try to reclaim memory. + if (! TransTableL::Harvest()) + { + TransTableL::ResetMemory(TT_RESET_UNKNOWN); + poolp->nextBlockNo++; + return nextBlockp++; + } + + memState = FROM_HARVEST; + harvested.nextBlockNo++; + return harvested.list[0]; + } + else + { + // Make a new pool. + poolType * newpoolp = static_cast + (calloc(1, sizeof(poolType))); + + if (newpoolp == nullptr) + { + // Unexpected, but try harvesting before we give up + // and start over. + if (! TransTableL::Harvest()) + { + TransTableL::ResetMemory(TT_RESET_UNKNOWN); + poolp->nextBlockNo++; + return nextBlockp++; + } + + memState = FROM_HARVEST; + harvested.nextBlockNo++; + return harvested.list[0]; + } + + newpoolp->list = static_cast + (malloc(BLOCKS_PER_PAGE * sizeof(winBlockType))); + + if (! newpoolp->list) + { + if (! TransTableL::Harvest()) + { + TransTableL::ResetMemory(TT_RESET_UNKNOWN); + poolp->nextBlockNo++; + return nextBlockp++; + } + + memState = FROM_HARVEST; + harvested.nextBlockNo++; + return harvested.list[0]; + } + + newpoolp->nextBlockNo = 1; + newpoolp->next = nullptr; + newpoolp->prev = poolp; + + poolp->next = newpoolp; + poolp = newpoolp; + + nextBlockp = newpoolp->list; + + pagesCurrent++; + + return nextBlockp++; + } + } + + poolp->nextBlockNo++; + return nextBlockp++; +} + + +bool TransTableL::Harvest() +{ + distHashType * rootptr = TTroot[harvestTrick][harvestHand]; + distHashType * ptr; + winBlockType * bp; + + int trick = harvestTrick; + int hand = harvestHand; + int hash, suit, hno = 0; + + while (1) + { + for (hash = 0; hash < 256; hash++) + { + ptr = &rootptr[hash]; + for (suit = ptr->nextNo - 1; suit >= 0; suit--) + { + bp = ptr->list[suit].posBlock; + if (timestamp - bp->timestampRead > HARVEST_AGE) + { + bp->nextMatchNo = 0; + bp->nextWriteNo = 0; + bp->timestampRead = timestamp; + harvested.list[hno] = bp; + + // Swap the last element down. + if (suit != ptr->nextNo - 1) + ptr->list[suit] = ptr->list[ ptr->nextNo - 1 ]; + + ptr->nextNo--; + ptr->nextWriteNo = ptr->nextNo; + + if (++hno == BLOCKS_PER_PAGE) + { + if (++harvestHand >= DDS_HANDS) + { + // Skip rest of this [trick][hand] for simplicity. + harvestHand = 0; + if (--harvestTrick < 0) + harvestTrick = FIRST_HARVEST_TRICK; + } + + harvested.nextBlockNo = 0; + pageStats.numHarvests++; + return true; + } + } + } + } + + if (++harvestHand >= DDS_HANDS) + { + harvestHand = 0; + if (--harvestTrick < 0) + harvestTrick = FIRST_HARVEST_TRICK; + } + + if (harvestTrick == trick && harvestHand == hand) + return false; + + rootptr = TTroot[harvestTrick][harvestHand]; + } +} + + +int TransTableL::hash8(const int handDist[]) const +{ + /* + handDist is an array of hand distributions, North .. West. + Each entry is a 12-bit number with 3 groups of 4 bits. + Each group is the binary representation of the number of + cards held in that suit. The suits are in order spades, + hearts, diamonds. Clubs can be neglected, as the total + number of cards in a hand is given by the trick number. + + For example, if handDist[1] equals 0x0433, then East holds + 4 spades, 3 hearts, 3 diamonds and the rest in clubs. + If this is after the second trick, there are 11 cards, so + East must hold 1 club. + + The hash function turns all 4 hand distributions into a + single 8-bit number. The numbers should be spread as + evenly as possible across the 256 possibilities. I've not + done extensive research into finding the best hash function, + but this one seems OK. It uses a small prime, 5, and its + powers. The shift at the end is in order to get some use + out of the bits above the first 8 ones. + */ + + int h = + (handDist[0] ^ + ((handDist[1] * 5) ) ^ + ((handDist[2] * 25) ) ^ + ((handDist[3] * 125) ) ); + + return (h ^ (h >> 5)) & 0xff; +} + + +nodeCardsType * TransTableL::Lookup( + const int tricks, + const int hand, + const unsigned short aggrTarget[], + const int handDist[], + const int limit, + bool& lowerFlag) +{ + // First look up distribution. + long long suitLengths = + (static_cast(handDist[0]) << 36) | + (static_cast(handDist[1]) << 24) | + (static_cast(handDist[2]) << 12) | + (static_cast(handDist[3]) ); + + int hashkey = hash8(handDist); + + bool empty; + lastBlockSeen[tricks][hand] = + LookupSuit(&TTroot[tricks][hand][hashkey], suitLengths, empty); + if (empty) + return nullptr; + + // If that worked, look up cards. + unsigned * ab0 = aggr[ aggrTarget[0] ].aggrBytes[0]; + unsigned * ab1 = aggr[ aggrTarget[1] ].aggrBytes[1]; + unsigned * ab2 = aggr[ aggrTarget[2] ].aggrBytes[2]; + unsigned * ab3 = aggr[ aggrTarget[3] ].aggrBytes[3]; + + winMatchType TTentry; + TTentry.topSet1 = ab0[0] | ab1[0] | ab2[0] | ab3[0]; + TTentry.topSet2 = ab0[1] | ab1[1] | ab2[1] | ab3[1]; + TTentry.topSet3 = ab0[2] | ab1[2] | ab2[2] | ab3[2]; + TTentry.topSet4 = ab0[3] | ab1[3] | ab2[3] | ab3[3]; + + return TransTableL::LookupCards(TTentry, + lastBlockSeen[tricks][hand], limit, lowerFlag); +} + + +TransTableL::winBlockType * TransTableL::LookupSuit( + distHashType * dp, + const long long key, + bool& empty) +{ + /* + Always returns a valid winBlockType. + If empty == true, there was no match, so there is + no point in looking for a card match. + If empty == false, there were entries already. + */ + + int n = dp->nextNo; + for (int i = 0; i < n; i++) + { + if (dp->list[i].key == key) + { + empty = false; + return dp->list[i].posBlock; + } + } + + empty = true; + int m; + + if (n == DISTS_PER_ENTRY) + { + // No room for new exact suits at this hash position. + // Have to reuse an existing posBlock. + if (dp->nextWriteNo == DISTS_PER_ENTRY) + { + m = 0; + dp->nextWriteNo = 1; + } + else + m = dp->nextWriteNo++; + } + else + { + // Didn't find an exact match, but there is still room. + // The following looks a bit odd because it is possible that + // GetNextCardBlock wipes out the whole memory, so we + // have to use the up-to-date location, not m from above. + + winBlockType * bp = GetNextCardBlock(); + m = dp->nextWriteNo++; + dp->list[m].posBlock = bp; + dp->list[m].posBlock->timestampRead = timestamp; + dp->nextNo++; + } + + // As long as the secondary Lookup loop in ABsearch exists, + // it will cause spurious extra blocks to be created here + // which are not useful, because nothing is ever Add'ed. + // This is not a memory leak, as the memory is properly freed, + // but it is also a small waste of about 0.5%. I don't mind. + + dp->list[m].key = key; + dp->list[m].posBlock->nextMatchNo = 0; + dp->list[m].posBlock->nextWriteNo = 0; + + return dp->list[m].posBlock; +} + + +nodeCardsType * TransTableL::LookupCards( + const winMatchType& search, + winBlockType * bp, + const int limit, + bool& lowerFlag) +{ + const int n = bp->nextWriteNo - 1; + winMatchType * wp = &bp->list[n]; + + // It may be a bit silly to duplicate the code like this. + // It could be combined to one loop with a slight overhead. + + for (int i = n; i >= 0; i--, wp--) + { + if ((wp->topSet1 ^ search.topSet1) & wp->topMask1) + continue; + + if (wp->lastMaskNo != 1) + { + if ((wp->topSet2 ^ search.topSet2) & wp->topMask2) + continue; + + if (wp->lastMaskNo != 2) + { + if ((wp->topSet3 ^ search.topSet3) & wp->topMask3) + continue; + } + } + + // Check bounds. + nodeCardsType * nodep = &wp->first; + if (nodep->lbound > limit) + { + bp->timestampRead = ++timestamp; + lowerFlag = true; + return nodep; + } + else if (nodep->ubound <= limit) + { + bp->timestampRead = ++timestamp; + lowerFlag = false; + return nodep; + } + } + + const int n2 = bp->nextMatchNo - 1; + wp = &bp->list[n2]; + + for (int i = n2; i > n; i--, wp--) + { + if ((wp->topSet1 ^ search.topSet1) & wp->topMask1) + continue; + + if (wp->lastMaskNo != 1) + { + if ((wp->topSet2 ^ search.topSet2) & wp->topMask2) + continue; + + if (wp->lastMaskNo != 2) + { + if ((wp->topSet3 ^ search.topSet3) & wp->topMask3) + continue; + } + } + + nodeCardsType * nodep = &wp->first; + if (nodep->lbound > limit) + { + lowerFlag = true; + bp->timestampRead = ++timestamp; + return nodep; + } + else if (nodep->ubound <= limit) + { + lowerFlag = false; + bp->timestampRead = ++timestamp; + return nodep; + } + } + + return nullptr; +} + + +void TransTableL::CreateOrUpdate( + winBlockType * bp, + const winMatchType& search, + const bool flag) +{ + // Either updates an existing SOP or creates a new one. + // A new one is created at the end of the bp list if this + // is not already full, or the oldest one in the list is + // overwritten. + + winMatchType * wp = bp->list; + int n = bp->nextMatchNo; + + for (int i = 0; i < n; i++, wp++) + { + if (wp->xorSet != search.xorSet ) continue; + if (wp->maskIndex != search.maskIndex) continue; + if (wp->topSet1 != search.topSet1 ) continue; + if (wp->topSet2 != search.topSet2 ) continue; + if (wp->topSet3 != search.topSet3 ) continue; + + nodeCardsType& node = wp->first; + if (search.first.lbound > node.lbound) + node.lbound = search.first.lbound; + if (search.first.ubound < node.ubound) + node.ubound = search.first.ubound; + + node.bestMoveSuit = search.first.bestMoveSuit; + node.bestMoveRank = search.first.bestMoveRank; + return; + } + + if (n == BLOCKS_PER_ENTRY) + { + if (bp->nextWriteNo >= BLOCKS_PER_ENTRY) + bp->nextWriteNo = 0; + } + else + bp->nextMatchNo++; + + + wp = &bp->list[ bp->nextWriteNo++ ]; + *wp = search; + + if (!flag) + { + wp->first.bestMoveSuit = 0; + wp->first.bestMoveRank = 0; + } +} + + +void TransTableL::Add( + const int tricks, + const int hand, + const unsigned short aggrTarget[], + const unsigned short ourWinRanks[], + const nodeCardsType& first, + const bool flag) +{ + if (lastBlockSeen[tricks][hand] == nullptr) + { + // We have recently reset the entire memory, and we were + // in the middle of a recursion. So we'll just have to + // drop this entry that we were supposed to be adding. + return; + } + + unsigned * ab[DDS_SUITS]; + unsigned * mb[DDS_SUITS]; + char low[DDS_SUITS]; + unsigned short int ag; + int w; + winMatchType TTentry; + + // Inefficient, as it also copies leastWin. + // In fact I'm not quite happy with the treatment of + // leastWin in general. + + TTentry.first = first; + + TTentry.xorSet = 0; + + for (int ss = 0; ss < DDS_SUITS; ss++) + { + w = static_cast(ourWinRanks[ss]); + if (w == 0) + { + ab[ss] = aggr[0].aggrBytes[ss]; + mb[ss] = maskBytes[0][ss]; + low[ss] = 15; + TTentry.first.leastWin[ss] = 0; + } + else + { + w = w & (-w); /* Only lowest win */ + ag = static_cast(aggrTarget[ss] & (-w)); + + ab[ss] = aggr[ag].aggrBytes[ss]; + mb[ss] = maskBytes[ag][ss]; + low[ss] = static_cast(TTlowestRank[ag]); + + TTentry.first.leastWin[ss] = 15 - low[ss]; + TTentry.xorSet ^= aggr[ag].aggrRanks[ss]; + } + } + + // It's a bit annoying that we may be regenerating these. + // But winRanks can cause them to change after lookup(). + + TTentry.topSet1 = ab[0][0] | ab[1][0] | ab[2][0] | ab[3][0]; + TTentry.topSet2 = ab[0][1] | ab[1][1] | ab[2][1] | ab[3][1]; + TTentry.topSet3 = ab[0][2] | ab[1][2] | ab[2][2] | ab[3][2]; + TTentry.topSet4 = ab[0][3] | ab[1][3] | ab[2][3] | ab[3][3]; + + TTentry.topMask1 = mb[0][0] | mb[1][0] | mb[2][0] | mb[3][0]; + TTentry.topMask2 = mb[0][1] | mb[1][1] | mb[2][1] | mb[3][1]; + TTentry.topMask3 = mb[0][2] | mb[1][2] | mb[2][2] | mb[3][2]; + TTentry.topMask4 = mb[0][3] | mb[1][3] | mb[2][3] | mb[3][3]; + + TTentry.maskIndex = + (low[0] << 12) | (low[1] << 8) | (low[2] << 4) | low[3]; + + if (TTentry.topMask2 == 0) + TTentry.lastMaskNo = 1; + else if (TTentry.topMask3 == 0) + TTentry.lastMaskNo = 2; + else if (TTentry.topMask4 == 0) + TTentry.lastMaskNo = 3; + else + TTentry.lastMaskNo = 4; + + TransTableL::CreateOrUpdate(lastBlockSeen[tricks][hand], + TTentry, flag); +} + + +void TransTableL::PrintMatch( + ofstream& fout, + const winMatchType& wp, + const unsigned char lengths[DDS_HANDS][DDS_SUITS]) const +{ + vector> hands; + hands.resize(DDS_HANDS); + for (int i = 0; i < DDS_HANDS; i++) + hands[i].resize(DDS_SUITS); + + TransTableL::SetToPartialHands(wp.topSet1, wp.topMask1, 14, 4, hands); + TransTableL::SetToPartialHands(wp.topSet2, wp.topMask2, 10, 4, hands); + TransTableL::SetToPartialHands(wp.topSet3, wp.topMask3, 6, 4, hands); + TransTableL::SetToPartialHands(wp.topSet4, wp.topMask4, 2, 1, hands); + + TransTableL::DumpHands(fout, hands, lengths); + + TransTableL::PrintNodeValues(fout, wp.first); +} + + +void TransTableL::PrintNodeValues( + ofstream& fout, + const nodeCardsType& np) const +{ + fout << setw(16) << left << "Lowest used" << + cardSuit[0] << cardRank[15-static_cast(np.leastWin[0])] << ", " << + cardSuit[1] << cardRank[15-static_cast(np.leastWin[1])] << ", " << + cardSuit[2] << cardRank[15-static_cast(np.leastWin[2])] << ", " << + cardSuit[3] << cardRank[15-static_cast(np.leastWin[3])] << "\n"; + + fout << setw(16) << left << "Bounds" << + np.lbound << " to " << + np.ubound << " tricks\n"; + + fout << setw(16) << left << "Best move" << + cardSuit[ static_cast(np.bestMoveSuit) ] << + cardRank[ static_cast(np.bestMoveRank) ] << "\n\n"; +} + + +string TransTableL::MakeHolding( + const string& high, + const unsigned len) const +{ + const unsigned l = high.size(); + if (l == 0) + return "-"; + else if (l == len) + return high; + else + return high.substr(0, l) + string(len-l, 'x'); +} + + +void TransTableL::DumpHands( + ofstream& fout, + const vector>& hands, + const unsigned char lengths[][DDS_SUITS]) const +{ + for (int i = 0; i < DDS_SUITS; i++) + { + fout << setw(16) << "" << + TransTableL::MakeHolding(hands[0][i], lengths[0][i]) << "\n"; + } + + for (int i = 0; i < DDS_SUITS; i++) + { + fout << setw(16) << left << + TransTableL::MakeHolding(hands[3][i], lengths[3][i]) << + setw(16) << "" << + setw(16) << + TransTableL::MakeHolding(hands[1][i], lengths[1][i]) << "\n"; + } + + for (int i = 0; i < DDS_SUITS; i++) + { + fout << setw(16) << "" << + TransTableL::MakeHolding(hands[2][i], lengths[2][i]) << "\n"; + } + fout << "\n"; +} + + +void TransTableL::SetToPartialHands( + const unsigned set, + const unsigned mask, + const int maxRank, + const int numRanks, + vector>& hands) const +{ + for (int s = 0; s < DDS_SUITS; s++) + { + for (int rank = maxRank; rank > maxRank - numRanks; rank--) + { + int shift = 8 * (3 - s) + 2 * (rank - maxRank + 3); + unsigned maskCard = mask >> shift; + + if (maskCard & 3) + { + unsigned player = (set >> shift) & 3; + hands[player][s] += static_cast(cardRank[rank]); + } + } + } +} + + +void TransTableL::KeyToDist( + const long long key, + int handDist[]) const +{ + handDist[0] = static_cast((key >> 36) & 0x00000fff); + handDist[1] = static_cast((key >> 24) & 0x00000fff); + handDist[2] = static_cast((key >> 12) & 0x00000fff); + handDist[3] = static_cast((key ) & 0x00000fff); +} + + +void TransTableL::DistToLengths( + const int trick, + const int handDist[], + unsigned char lengths[DDS_HANDS][DDS_SUITS]) const +{ + for (int h = 0; h < DDS_HANDS; h++) + { + lengths[h][0] = static_cast((handDist[h] >> 8) & 0xf); + lengths[h][1] = static_cast((handDist[h] >> 4) & 0xf); + lengths[h][2] = static_cast((handDist[h] ) & 0xf); + lengths[h][3] = static_cast + (trick + 1 - lengths[h][0] - lengths[h][1] - lengths[h][2]); + } +} + + +string TransTableL::LenToStr( + const unsigned char len[DDS_HANDS][DDS_SUITS]) const +{ + stringstream ss; + ss << len[0][0] << "=" << len[0][1] << "=" << + len[0][2] << "=" << len[0][3] << " " << + len[1][0] << "=" << len[1][1] << "=" << + len[1][2] << "=" << len[1][3] << " " << + len[2][0] << "=" << len[2][1] << "=" << + len[2][2] << "=" << len[2][3] << " " << + len[3][0] << "=" << len[3][1] << "=" << + len[3][2] << "=" << len[3][3]; + return ss.str(); +} + + +void TransTableL::PrintSuits( + ofstream& fout, + const int trick, + const int hand) const +{ + distHashType * dp; + int handDist[DDS_HANDS]; + unsigned char len[DDS_HANDS][DDS_SUITS]; + + fout << setw(4) << left << "Key" << + setw(3) << "No" << + setw(9) << right << players[0] << + setw(9) << players[1] << + setw(9) << players[2] << + setw(9) << players[3] << "\n"; + + for (int hashkey = 0; hashkey < 256; hashkey++) + { + dp = &TTroot[trick][hand][hashkey]; + if (dp->nextNo == 0) + continue; + + for (int i = 0; i < dp->nextNo; i++) + { + if (i == 0) + fout << "0x" << setw(2) << hex << hashkey << + setw(3) << right << dp->nextNo << " "; + else + fout << setw(8) << ""; + + TransTableL::KeyToDist(dp->list[i].key, handDist); + TransTableL::DistToLengths(trick, handDist, len); + + fout << TransTableL::LenToStr(len) << "\n"; + } + } + fout << "\n"; +} + + +void TransTableL::PrintAllSuits(ofstream& fout) const +{ + for (int trick = 11; trick >= 1; trick--) + { + for (int hand = 0; hand < DDS_HANDS; hand++) + { + fout << "Trick " << trick << ", hand " << players[hand] << "\n"; + fout << string(20, '=') << "\n\n"; + + TransTableL::PrintSuits(fout, trick, hand); + } + } +} + + +void TransTableL::MakeHistStats( + const int hist[], + int& count, + int& prod_sum, + int& prod_sumsq, + int& max_len, + const int last_index) const +{ + count = 0; + prod_sum = 0; + prod_sumsq = 0; + max_len = 0; + + for (int i = 1; i <= last_index; i++) + { + if (hist[i]) + { + prod_sum += i * hist[i]; + prod_sumsq += i * i * hist[i]; + count += hist[i]; + + if (i > max_len) + max_len = i; + } + } +} + + +int TransTableL::CalcPercentile( + const int hist[], + const double threshold, + const int last_index) const +{ + int cum = 0; + + for (int i = 1; i <= last_index; i++) + { + cum += hist[i]; + if (cum >= threshold) + return i; + } + return -1; +} + + +void TransTableL::PrintHist( + ofstream& fout, + const int hist[], + const int num_wraps, + const int last_index) const +{ + int count, prod_sum, prod_sumsq, max_len; + + TransTableL::MakeHistStats(hist, + count, prod_sum, prod_sumsq, max_len, last_index); + + for (int i = 1; i <= last_index; i++) + if (hist[i]) + fout << setw(7) << right << i << + setw(6) << right << hist[i] << "\n"; + + fout << "\n"; + fout << setw(7) << left << "Entries" << + setw(6) << right << count << "\n"; + + if (count) + { + fout << setw(7) << left << "Full" << + setw(6) << right << num_wraps << "\n"; + + double mean = prod_sum / static_cast(count); + fout << setw(7) << left << "Average" << + setw(6) << right << setprecision(2) << fixed << mean << "\n"; + + double var = prod_sumsq / + static_cast(count - mean * mean); + if (var >= 0.) + fout << setw(7) << left << "Std.dev" << + setw(6) << right << setprecision(2) << fixed << sqrt(var) << "\n"; + + fout << setw(7) << left << "Maximum" << + setw(6) << right << max_len << "\n"; + } + fout << "\n"; +} + + +void TransTableL::UpdateSuitHist( + const int trick, + const int hand, + int hist[], + int& num_wraps) const +{ + distHashType * dp; + + num_wraps = 0; + for (int i = 0; i <= DISTS_PER_ENTRY; i++) + hist[i] = 0; + + for (int hashkey = 0; hashkey < 256; hashkey++) + { + dp = &TTroot[trick][hand][hashkey]; + hist [ dp->nextNo ]++; + + if (dp->nextNo != dp->nextWriteNo) + num_wraps++; // Not entirely correct + } +} + + +void TransTableL::UpdateSuitHist( + const int trick, + const int hand, + int hist[], + int suitHist[], + int& num_wraps, + int& suitWraps) const +{ + distHashType * dp; + + num_wraps = 0; + for (int i = 0; i <= DISTS_PER_ENTRY; i++) + hist[i] = 0; + + for (int hashkey = 0; hashkey < 256; hashkey++) + { + dp = &TTroot[trick][hand][hashkey]; + hist [ dp->nextNo ]++; + suitHist[ dp->nextNo ]++; + + if (dp->nextNo != dp->nextWriteNo) + { + num_wraps++; // Not entirely correct + suitWraps++; + } + } +} + + +void TransTableL::PrintSuitStats( + ofstream& fout, + const int trick, + const int hand) const +{ + int hist[DISTS_PER_ENTRY+1]; + int num_wraps; + + TransTableL::UpdateSuitHist(trick, hand, hist, num_wraps); + + fout << "Suit histogram for trick " << trick << ", hand " << + players[hand] << "\n"; + TransTableL::PrintHist(fout, hist, num_wraps, DISTS_PER_ENTRY); +} + + +void TransTableL::PrintAllSuitStats(ofstream& fout) const +{ + int num_wraps; + int suitWraps = 0; + + // Really the maximum of BLOCKS_PER_ENTRY and DISTS_PER_ENTRY. + int hist[DISTS_PER_ENTRY+1]; + int suitHist[DISTS_PER_ENTRY+1]; + + for (int i = 0; i <= DISTS_PER_ENTRY; i++) + suitHist[i] = 0; + + for (int trick = 11; trick >= 1; trick--) + { + for (int hand = 0; hand < DDS_HANDS; hand++) + { + TransTableL::UpdateSuitHist(trick, hand, hist, suitHist, + num_wraps, suitWraps); + + fout << "Suit histogram for trick " << trick << ", hand " << + players[hand] << "\n"; + TransTableL::PrintHist(fout, hist, num_wraps, DISTS_PER_ENTRY); + } + } + + fout << "Overall suit histogram\n"; + TransTableL::PrintHist(fout, suitHist, suitWraps, DISTS_PER_ENTRY); +} + + +void TransTableL::PrintSummarySuitStats(ofstream& fout) const +{ + int hist[DISTS_PER_ENTRY+1]; + int count, prod_sum, prod_sumsq, max_len, num_wraps; + + fout << "Suit depth statistics\n\n"; + + fout << setw(5) << right << "Trick" << + setw(7) << "Player" << + setw(8) << "Entries" << + setw(8) << "Full" << + setw(8) << "Average" << + setw(8) << "Std.dev" << + setw(8) << "Maximum" << + " P" << setw(4) << setprecision(2) << fixed << TT_PERCENTILE << "\n"; + + for (int trick = 11; trick >= 1; trick--) + { + for (int hand = 0; hand < DDS_HANDS; hand++) + { + TransTableL::UpdateSuitHist(trick, hand, hist, num_wraps); + TransTableL::MakeHistStats(hist, + count, prod_sum, prod_sumsq, max_len, DISTS_PER_ENTRY); + + double mean = 0., var = 0.; + if (count > 0) + { + mean = prod_sum / static_cast(count); + var = prod_sumsq / + static_cast(count - mean * mean); + if (var < 0.) + var = 0.; + } + + const int percentile = + TransTableL::CalcPercentile(hist, + TT_PERCENTILE * count, DISTS_PER_ENTRY); + + fout << setw(5) << right << trick << + setw(7) << players[hand] << + setw(8) << count << + setw(8) << num_wraps; + + if (count > 0) + fout << setw(8) << mean << + setw(8) << setprecision(2) << fixed << sqrt(var); + else + fout << setw(8) << '-' << setw(8) << '-'; + + fout << setw(8) << max_len << + setw(8) << setprecision(2) << fixed << percentile << "\n"; + } + fout << "\n"; + } + fout << "\n"; +} + + +TransTableL::winBlockType const * TransTableL::FindMatchingDist( + const int trick, + const int hand, + const int handDistSought[]) const +{ + winBlockType * bp; + distHashType * dp; + int handDist[DDS_HANDS]; + + for (int hashkey = 0; hashkey < 256; hashkey++) + { + dp = &TTroot[trick][hand][hashkey]; + for (int i = 0; i < dp->nextNo; i++) + { + bp = dp->list[i].posBlock; + TransTableL::KeyToDist(dp->list[i].key, handDist); + + bool same = true; + for (int h = 0; h < DDS_HANDS; h++) + { + if (handDist[h] != handDistSought[h]) + { + same = false; + break; + } + } + if (same) + return bp; + } + } + return nullptr; +} + + +void TransTableL::PrintEntriesBlock( + ofstream& fout, + winBlockType const * bp, + const unsigned char lengths[DDS_HANDS][DDS_SUITS]) const +{ + fout << bp->nextMatchNo << " matches for " << + TransTableL::LenToStr(lengths) << "\n"; + fout << string(71, '=') << "\n\n"; + + for (int j = 0; j < bp->nextMatchNo; j++) + { + fout << "Entry number " << j+1 << "\n"; + fout << string(16, '-') << "\n\n"; + TransTableL::PrintMatch(fout, bp->list[j], lengths); + } +} + + + +void TransTableL::PrintEntriesDistAndCards( + ofstream& fout, + const int trick, + const int hand, + const unsigned short aggrTarget[], + const int handDist[]) const +{ + unsigned char len[DDS_HANDS][DDS_SUITS]; + + winBlockType const * bp = + TransTableL::FindMatchingDist(trick, hand, handDist); + + TransTableL::DistToLengths(trick, handDist, len); + + fout << "Looking up entry for trick " << trick << ", hand " << + players[hand] << "\n"; + fout << TransTableL::LenToStr(len) << "\n\n"; + + if (! bp) + { + fout << "Entry not found\n\n"; + return; + } + + unsigned const * ab0 = aggr[ aggrTarget[0] ].aggrBytes[0]; + unsigned const * ab1 = aggr[ aggrTarget[1] ].aggrBytes[1]; + unsigned const * ab2 = aggr[ aggrTarget[2] ].aggrBytes[2]; + unsigned const * ab3 = aggr[ aggrTarget[3] ].aggrBytes[3]; + + winMatchType TTentry; + TTentry.topSet1 = ab0[0] | ab1[0] | ab2[0] | ab3[0]; + TTentry.topSet2 = ab0[1] | ab1[1] | ab2[1] | ab3[1]; + TTentry.topSet3 = ab0[2] | ab1[2] | ab2[2] | ab3[2]; + TTentry.topSet4 = ab0[3] | ab1[3] | ab2[3] | ab3[3]; + + int matchNo = 1; + int n = bp->nextMatchNo - 1; + winMatchType const * wp = &bp->list[n]; + + for (int i = n; i >= 0; i--, wp--) + { + if ((wp->topSet1 ^ TTentry.topSet1) & wp->topMask1) + continue; + + if (wp->lastMaskNo != 1) + { + if ((wp->topSet2 ^ TTentry.topSet2) & wp->topMask2) + continue; + + if (wp->lastMaskNo != 2) + { + if ((wp->topSet3 ^ TTentry.topSet3) & wp->topMask3) + continue; + } + } + + fout << "Match number " << matchNo++ << "\n"; + fout << string(15, '-') << "\n"; + TransTableL::PrintMatch(fout, bp->list[i], len); + } + + if (matchNo == 1) + fout << n << " matches for suit, none for cards\n\n"; + else + fout << "\n"; +} + + +void TransTableL::PrintEntriesDist( + ofstream& fout, + const int trick, + const int hand, + const int handDist[]) const +{ + unsigned char len[DDS_HANDS][DDS_SUITS]; + + winBlockType const * bp = + TransTableL::FindMatchingDist(trick, hand, handDist); + + TransTableL::DistToLengths(trick, handDist, len); + + if (! bp) + { + fout << "Entry not found: Trick " << trick << ", hand " << + players[hand] << "\n"; + fout << TransTableL::LenToStr(len) << "\n\n"; + return; + } + + TransTableL::PrintEntriesBlock(fout, bp, len); +} + + +void TransTableL::PrintEntries( + ofstream& fout, + const int trick, + const int hand) const +{ + winBlockType * bp; + distHashType * dp; + int handDist[DDS_HANDS]; + unsigned char lengths[DDS_HANDS][DDS_SUITS]; + + for (int hashkey = 0; hashkey < 256; hashkey++) + { + dp = &TTroot[trick][hand][hashkey]; + for (int i = 0; i < dp->nextNo; i++) + { + bp = dp->list[i].posBlock; + TransTableL::KeyToDist(dp->list[i].key, handDist); + TransTableL::DistToLengths(trick, handDist, lengths); + + TransTableL::PrintEntriesBlock(fout, bp, lengths); + } + } +} + + +void TransTableL::PrintAllEntries(ofstream& fout) const +{ + for (int trick = 11; trick >= 1; trick--) + { + for (int hand = 0; hand < DDS_HANDS; hand++) + { + fout << "Entries, trick " << trick << ", hand " << + players[hand] << "\n"; + fout << string(30, '=') << "\n\n"; + TransTableL::PrintEntries(fout, trick, hand); + } + } + fout << "\n"; +} + + +void TransTableL::UpdateEntryHist( + const int trick, + const int hand, + int hist[], + int& num_wraps) const +{ + distHashType * dp; + + num_wraps = 0; + for (int i = 0; i <= BLOCKS_PER_ENTRY; i++) + hist[i] = 0; + + for (int hashkey = 0; hashkey < 256; hashkey++) + { + dp = &TTroot[trick][hand][hashkey]; + for (int i = 0; i < dp->nextNo; i++) + { + int c = dp->list[i].posBlock->nextMatchNo; + hist [c]++; + + if (c != dp->list[i].posBlock->nextWriteNo) + num_wraps++; // Not entirely correct + } + } +} + + +void TransTableL::UpdateEntryHist( + const int trick, + const int hand, + int hist[], + int suitHist[], + int& num_wraps, + int& suitWraps) const +{ + distHashType * dp; + + num_wraps = 0; + for (int i = 0; i <= BLOCKS_PER_ENTRY; i++) + hist[i] = 0; + + for (int hashkey = 0; hashkey < 256; hashkey++) + { + dp = &TTroot[trick][hand][hashkey]; + for (int i = 0; i < dp->nextNo; i++) + { + int c = dp->list[i].posBlock->nextMatchNo; + hist [c]++; + suitHist[c]++; + + if (c != dp->list[i].posBlock->nextWriteNo) + { + num_wraps++; // Not entirely correct + suitWraps++; + } + } + } +} + + +void TransTableL::PrintEntryStats( + ofstream& fout, + const int trick, + const int hand) const +{ + int hist[BLOCKS_PER_ENTRY+1]; + int num_wraps; + + TransTableL::UpdateEntryHist(trick, hand, hist, num_wraps); + + fout << "Entry histogram for trick " << trick << ", hands " << + players[hand] << "\n"; + TransTableL::PrintHist(fout, hist, num_wraps, BLOCKS_PER_ENTRY); +} + + +void TransTableL::PrintAllEntryStats(ofstream& fout) const +{ + int hist[BLOCKS_PER_ENTRY+1]; + int num_wraps; + + int suitWraps = 0; + int suitHist[BLOCKS_PER_ENTRY+1]; + for (int i = 0; i <= BLOCKS_PER_ENTRY; i++) + suitHist[i] = 0; + + for (int trick = 11; trick >= 1; trick--) + { + for (int hand = 0; hand < DDS_HANDS; hand++) + { + TransTableL::UpdateEntryHist(trick, hand, hist, suitHist, + num_wraps, suitWraps); + + fout << "Entry histogram for trick " << trick << ", hands " << + players[hand] << "\n"; + TransTableL::PrintHist(fout, hist, num_wraps, BLOCKS_PER_ENTRY); + } + } + + fout << "Overall entry histogram\n"; + TransTableL::PrintHist(fout, suitHist, suitWraps, BLOCKS_PER_ENTRY); +} + + +int TransTableL::EffectOfBlockBound( + const int hist[], + const int size) const +{ + // Calculates the number of blocks used if the blocks + // are divided up in units of size, rather than in units + // of BLOCKS_PER_ENTRY. Only makes sense if size is less + // than BLOCKS_PER_ENTRY, as we won't have statistics for + // how many blocks above BLOCKS_PER_ENTRY would be created + // if BLOCKS_PER_ENTRY were larger. + + int cum_memory = 0; + int unit_size = 0; + + for (int i = 1; i <= BLOCKS_PER_ENTRY; i++) + { + if ((i - 1) % size == 0) + unit_size += size; + + cum_memory += hist[i] * unit_size; + } + return cum_memory; +} + + +void TransTableL::PrintSummaryEntryStats(ofstream& fout) const +{ + int hist[BLOCKS_PER_ENTRY + 1]; + int count, prod_sum, prod_sumsq, max_len, num_wraps; + + int cumCount = 0; + double cumProd = 0.; + int cumMemory = 0; + + fout << "Entry depth statistics\n\n"; + + fout << setw(5) << right << "Trick" << + setw(7) << "Player" << + setw(8) << "Entries" << + setw(8) << "Full" << + setw(8) << "Average" << + setw(8) << "Std.dev" << + setw(8) << "Maximum" << + " P" << setw(4) << setprecision(2) << fixed << TT_PERCENTILE << "\n"; + + for (int trick = 11; trick >= 1; trick--) + { + for (int hand = 0; hand < DDS_HANDS; hand++) + { + TransTableL::UpdateEntryHist(trick, hand, hist, num_wraps); + TransTableL::MakeHistStats(hist, + count, prod_sum, prod_sumsq, max_len, BLOCKS_PER_ENTRY); + + cumCount += count; + cumProd += prod_sum; + cumMemory += TransTableL::EffectOfBlockBound(hist, 20); + + double mean = prod_sum / static_cast(count); + double var = prod_sumsq / + static_cast(count - mean * mean); + if (var < 0.) + var = 0.; + + const int percentile = TransTableL::CalcPercentile(hist, + TT_PERCENTILE * count, BLOCKS_PER_ENTRY); + + fout << setw(5) << right << trick << + setw(7) << players[hand] << + setw(8) << count << + setw(8) << num_wraps << + setw(8) << mean << + setw(8) << sqrt(var) << + setw(8) << max_len << + setw(8) << setprecision(2) << fixed << percentile << "\n"; + } + fout << "\n"; + } + fout << "\n"; + + fout << setw(16) << left << "Blocks counted " << + setw(8) << right << cumCount << "\n"; + fout << setw(16) << left << "Blocks produced " << + setw(8) << right << TransTableL::BlocksInUse() << "\n"; + fout << setw(16) << left << "Mem scenario" << + setw(7) << right << setprecision(2) << fixed << + 100. * cumMemory / + (static_cast(BLOCKS_PER_ENTRY * cumCount)) << "%\n"; + + if (cumCount) + fout << setw(16) << left << "Fullness" << + setw(7) << right << setprecision(2) << fixed << + 100. * cumProd / (BLOCKS_PER_ENTRY * cumCount) << "&\n"; + fout << "\n"; +} + diff --git a/src/TransTableL.h b/src/TransTableL.h new file mode 100644 index 00000000..4f1bd379 --- /dev/null +++ b/src/TransTableL.h @@ -0,0 +1,367 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_TRANSTABLEL_H +#define DDS_TRANSTABLEL_H + +/* + This is an implementation of the transposition table that requires + a lot of memory and is somewhat faster than the small version. +*/ + + +#include +#include + +#include "../include/dll.h" +#include "dds.h" + +#include "TransTable.h" + +using namespace std; + + +#define NUM_PAGES_DEFAULT 15 +#define NUM_PAGES_MAXIMUM 25 +#define BLOCKS_PER_PAGE 1000 +#define DISTS_PER_ENTRY 32 +#define BLOCKS_PER_ENTRY 125 +#define FIRST_HARVEST_TRICK 8 +#define HARVEST_AGE 10000 + +#define TT_BYTES 4 +#define TT_TRICKS 12 + +#define TT_LINE_LEN 20 + +#define TT_PERCENTILE 0.9 + + +class TransTableL: public TransTable +{ + private: + + struct winMatchType // 52 bytes + { + unsigned xorSet; + unsigned topSet1 , topSet2 , topSet3 , topSet4 ; + unsigned topMask1, topMask2, topMask3, topMask4; + int maskIndex; + int lastMaskNo; + nodeCardsType first; + }; + + struct winBlockType // 6508 bytes when BLOCKS_PER_ENTRY == 125 + { + int nextMatchNo; + int nextWriteNo; + int timestampRead; + winMatchType list[BLOCKS_PER_ENTRY]; + }; + + struct posSearchType // 16 bytes (inefficiency, 12 bytes enough) + { + winBlockType * posBlock; + long long key; + }; + + struct distHashType // 520 bytes when DISTS_PER_ENTRY == 32 + { + int nextNo; + int nextWriteNo; + posSearchType list[DISTS_PER_ENTRY]; + }; + + struct aggrType // 80 bytes + { + unsigned aggrRanks[DDS_SUITS]; + unsigned aggrBytes[DDS_SUITS][TT_BYTES]; + }; + + struct poolType // 16 bytes + { + poolType * next; + poolType * prev; + int nextBlockNo; + winBlockType * list; + }; + + struct pageStatsType + { + int numResets; + int numCallocs; + int numFrees; + int numHarvests; + int lastCurrent; + }; + + struct harvestedType // 16 bytes + { + int nextBlockNo; + winBlockType * list [BLOCKS_PER_PAGE]; + }; + + enum memStateType + { + FROM_POOL, + FROM_HARVEST + }; + + // Private data for the full memory version. + memStateType memState; + + int pagesDefault; + int pagesCurrent; + int pagesMaximum; + + int harvestTrick; + int harvestHand; + + pageStatsType pageStats; + + // aggr is constant for a given hand. + aggrType aggr[8192]; // 64 KB + + // This is the real transposition table. + // The last index is the hash. + // 6240 KB with above assumptions + // distHashType TTroot[TT_TRICKS][DDS_HANDS][256]; + distHashType * TTroot[TT_TRICKS][DDS_HANDS]; + + // It is useful to remember the last block we looked at. + winBlockType * lastBlockSeen[TT_TRICKS][DDS_HANDS]; + + // The pool of card entries for a given suit distribution. + poolType * poolp; + winBlockType * nextBlockp; + harvestedType harvested; + + int timestamp; + int TTInUse; + + + void InitTT(); + + void ReleaseTT(); + + void SetConstants(); + + int hash8(const int handDist[]) const; + + winBlockType * GetNextCardBlock(); + + winBlockType * LookupSuit( + distHashType * dp, + const long long key, + bool& empty); + + nodeCardsType * LookupCards( + const winMatchType& search, + winBlockType * bp, + const int limit, + bool& lowerFlag); + + void CreateOrUpdate( + winBlockType * bp, + const winMatchType& search, + const bool flag); + + bool Harvest(); + + // Debug functions from here on. + + void KeyToDist( + const long long key, + int handDist[]) const; + + void DistToLengths( + const int trick, + const int handDist[], + unsigned char lengths[DDS_HANDS][DDS_SUITS]) const; + + string LenToStr( + const unsigned char lengths[DDS_HANDS][DDS_SUITS]) const; + + void MakeHistStats( + const int hist[], + int& count, + int& prod_sum, + int& prod_sumsq, + int& max_len, + const int last_index) const; + + int CalcPercentile( + const int hist[], + const double threshold, + const int last_index) const; + + void PrintHist( + ofstream& fout, + const int hist[], + const int num_wraps, + const int last_index) const; + + void UpdateSuitHist( + const int trick, + const int hand, + int hist[], + int& num_wraps) const; + + void UpdateSuitHist( + const int trick, + const int hand, + int hist[], + int suitHist[], + int& num_wraps, + int& suitWraps) const; + + winBlockType const * FindMatchingDist( + const int trick, + const int hand, + const int handDistSought[]) const; + + void PrintEntriesBlock( + ofstream& fout, + winBlockType const * bp, + const unsigned char lengths[DDS_HANDS][DDS_SUITS]) const; + + void UpdateEntryHist( + const int trick, + const int hand, + int hist[], + int& num_wraps) const; + + void UpdateEntryHist( + const int trick, + const int hand, + int hist[], + int suitHist[], + int& num_wraps, + int& suitWraps) const; + + int EffectOfBlockBound( + const int hist[], + const int size) const; + + void PrintNodeValues( + ofstream& fout, + const nodeCardsType& np) const; + + void PrintMatch( + ofstream& fout, + const winMatchType& wp, + const unsigned char lengths[DDS_HANDS][DDS_SUITS]) const; + + string MakeHolding( + const string& high, + const unsigned len) const; + + void DumpHands( + ofstream& fout, + const vector>& hands, + const unsigned char lengths[DDS_HANDS][DDS_SUITS]) const; + + void SetToPartialHands( + const unsigned set, + const unsigned mask, + const int maxRank, + const int numRanks, + vector>& hands) const; + + int BlocksInUse() const; + + public: + TransTableL(); + + ~TransTableL(); + + void Init(const int handLookup[][15]); + + void SetMemoryDefault(const int megabytes); + + void SetMemoryMaximum(const int megabytes); + + void MakeTT(); + + void ResetMemory(const TTresetReason reason); + + void ReturnAllMemory(); + + double MemoryInUse() const; + + nodeCardsType * Lookup( + const int trick, + const int hand, + const unsigned short aggrTarget[], + const int handDist[], + const int limit, + bool& lowerFlag); + + void Add( + const int trick, + const int hand, + const unsigned short aggrTarget[], + const unsigned short winRanksArg[], + const nodeCardsType& first, + const bool flag); + + void PrintSuits( + ofstream& fout, + const int trick, + const int hand) const; + + void PrintAllSuits(ofstream& fout) const; + + void PrintSuitStats( + ofstream& fout, + const int trick, + const int hand) const; + + void PrintAllSuitStats(ofstream& fout) const; + + void PrintSummarySuitStats(ofstream& fout) const; + + // Examples: + // int hd[DDS_HANDS] = { 0x0342, 0x0334, 0x0232, 0x0531 }; + // thrp->transTable.PrintEntriesDist(cout, 11, 1, hd); + // unsigned short ag[DDS_HANDS] = + // { 0x1fff, 0x1fff, 0x0f75, 0x1fff }; + // thrp->transTable.PrintEntriesDistAndCards(cout, 11, 1, ag, hd); + + void PrintEntriesDist( + ofstream& fout, + const int trick, + const int hand, + const int handDist[]) const; + + void PrintEntriesDistAndCards( + ofstream& fout, + const int trick, + const int hand, + const unsigned short aggrTarget[], + const int handDist[]) const; + + void PrintEntries( + ofstream& fout, + const int trick, + const int hand) const; + + void PrintAllEntries(ofstream& fout) const; + + void PrintEntryStats( + ofstream& fout, + const int trick, + const int hand) const; + + void PrintAllEntryStats(ofstream& fout) const; + + void PrintSummaryEntryStats(ofstream& fout) const; +}; + +#endif diff --git a/src/TransTableS.cpp b/src/TransTableS.cpp new file mode 100644 index 00000000..b2729cc6 --- /dev/null +++ b/src/TransTableS.cpp @@ -0,0 +1,943 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#include "TransTableS.h" +#include "debug.h" + + +#define NSIZE 50000 +#define WSIZE 50000 +#define NINIT 60000 +#define WINIT 170000 +#define LSIZE 200 // Per trick and first hand + + +static bool _constantsSet = false; +static int TTlowestRank[8192]; + + +TransTableS::TransTableS() +{ + if (! _constantsSet) + { + _constantsSet = true; + TransTableS::SetConstants(); + } + + TTInUse = 0; +} + + +TransTableS::~TransTableS() +{ + TransTableS::ReturnAllMemory(); +} + + +void TransTableS::SetConstants() +{ + unsigned int topBitRank = 1; + TTlowestRank[0] = 15; // Void + + for (unsigned ind = 1; ind < 8192; ind++) + { + if (ind >= (topBitRank + topBitRank)) /* Next top bit */ + topBitRank <<= 1; + + TTlowestRank[ind] = TTlowestRank[ind ^ topBitRank] - 1; + } + + resetText.resize(TT_RESET_SIZE); + resetText[TT_RESET_UNKNOWN] = "Unknown reason"; + resetText[TT_RESET_TOO_MANY_NODES] = "Too many nodes"; + resetText[TT_RESET_NEW_DEAL] = "New deal"; + resetText[TT_RESET_NEW_TRUMP] = "New trump"; + resetText[TT_RESET_MEMORY_EXHAUSTED] = "Memory exhausted"; + resetText[TT_RESET_FREE_MEMORY] = "Free thread memory"; +} + + +void TransTableS::Init(const int handLookup[][15]) +{ + unsigned int topBitRank = 1; + unsigned int topBitNo = 2; + + for (int s = 0; s < DDS_SUITS; s++) + { + aggp[0].aggrRanks[s] = 0; + aggp[0].winMask[s] = 0; + } + + for (unsigned int ind = 1; ind < 8192; ind++) + { + if (ind >= (topBitRank + topBitRank)) + { + /* Next top bit */ + topBitRank <<= 1; + topBitNo++; + } + aggp[ind] = aggp[ind ^ topBitRank]; + + for (int s = 0; s < 4; s++) + { + aggp[ind].aggrRanks[s] = + (aggp[ind].aggrRanks[s] >> 2) | + (handLookup[s][topBitNo] << 24); + + aggp[ind].winMask[s] = + (aggp[ind].winMask[s] >> 2) | (3 << 24); + } + } + return; +} + + +void TransTableS::SetMemoryDefault(const int megabytes) +{ + UNUSED(megabytes); +} + + +void TransTableS::SetMemoryMaximum(const int megabytes) +{ + maxmem = static_cast(1000000 * megabytes); +} + + +void TransTableS::MakeTT() +{ + int i; + + if (!TTInUse) + { + TTInUse = 1; + + summem = (WINIT + 1) * sizeof(winCardType) + + (NINIT + 1) * sizeof(nodeCardsType) + + (LSIZE + 1) * 52 * sizeof(posSearchTypeSmall); + wmem = static_cast((WSIZE + 1) * sizeof(winCardType)); + nmem = static_cast((NSIZE + 1) * sizeof(nodeCardsType)); + + maxIndex = static_cast( + (maxmem - summem) / ((WSIZE + 1) * sizeof(winCardType))); + + pw = static_cast(calloc(static_cast(maxIndex + 1), sizeof(winCardType *))); + if (pw == NULL) + exit(1); + + pn = static_cast(calloc(static_cast(maxIndex + 1), sizeof(nodeCardsType *))); + if (pn == NULL) + exit(1); + + for (int k = 1; k <= 13; k++) + for (int h = 0; h < DDS_HANDS; h++) + { + pl[k][h] = static_cast + (calloc(static_cast(maxIndex + 1), + sizeof(posSearchTypeSmall *))); + if (pl[k][h] == NULL) + exit(1); + } + + for (i = 0; i <= maxIndex; i++) + { + if (pw[i]) + free(pw[i]); + pw[i] = NULL; + } + + for (i = 0; i <= maxIndex; i++) + { + if (pn[i]) + free(pn[i]); + pn[i] = NULL; + } + + for (int k = 1; k <= 13; k++) + { + for (int h = 0; h < DDS_HANDS; h++) + { + for (i = 0; i <= maxIndex; i++) + { + if (pl[k][h][i]) + free(pl[k][h][i]); + pl[k][h][i] = NULL; + } + } + } + + pw[0] = static_cast(calloc(WINIT + 1, sizeof(winCardType))); + if (pw[0] == NULL) + exit(1); + + pn[0] = static_cast(calloc(NINIT + 1, sizeof(nodeCardsType))); + if (pn[0] == NULL) + exit(1); + + for (int k = 1; k <= 13; k++) + for (int h = 0; h < DDS_HANDS; h++) + { + pl[k][h][0] = static_cast(calloc((LSIZE + 1), + sizeof(posSearchTypeSmall))); + if (pl[k][h][0] == NULL) + exit(1); + } + + aggp = static_cast(calloc(8192, sizeof(ttAggrType))); + if (aggp == NULL) + exit(1); + + InitTT(); + + for (int k = 1; k <= 13; k++) + aggrLenSets[k] = 0; +#if defined(DDS_TT_STATS) + // TODO: Needs to end up in the right file. + // fprintf(fp, "Report of generated PosSearch nodes per trick level.\n"); + // fprintf(fp, "Trick level 13 is highest level with all 52 cards.\n"); + // fprintf(fp, "---------------------------------------------------\n"); +#endif + statsResets.noOfResets = 0; + for (int k = 0; k <= 5; k++) + statsResets.aggrResets[k] = 0; + + } + + return; +} + + +void TransTableS::Wipe() +{ + int m; + + for (m = 1; m <= wcount; m++) + { + if (pw[m]) + free(pw[m]); + pw[m] = NULL; + } + for (m = 1; m <= ncount; m++) + { + if (pn[m]) + free(pn[m]); + pn[m] = NULL; + } + + for (int k = 1; k <= 13; k++) + { + for (int h = 0; h < DDS_HANDS; h++) + { + for (m = 1; m <= lcount[k][h]; m++) + { + if (pl[k][h][m]) + free(pl[k][h][m]); + pl[k][h][m] = NULL; + } + } + } + + allocmem = summem; + + return; +} + + + +void TransTableS::InitTT() +{ + winSetSizeLimit = WINIT; + nodeSetSizeLimit = NINIT; + allocmem = (WINIT + 1) * sizeof(winCardType); + allocmem += (NINIT + 1) * sizeof(nodeCardsType); + allocmem += (LSIZE + 1) * 52 * sizeof(posSearchTypeSmall); + winCards = pw[0]; + nodeCards = pn[0]; + wcount = 0; + ncount = 0; + + nodeSetSize = 0; + winSetSize = 0; + + clearTTflag = false; + windex = -1; + + for (int k = 1; k <= 13; k++) + for (int h = 0; h < DDS_HANDS; h++) + { + posSearch[k][h] = pl[k][h][0]; + lenSetInd[k][h] = 0; + lcount[k][h] = 0; + } +} + + +void TransTableS::ResetMemory(const TTresetReason reason) +{ + Wipe(); + + InitTT(); + + for (int k = 1; k <= 13; k++) + { + for (int h = 0; h < DDS_HANDS; h++) + { + rootnp[k][h] = &(posSearch[k][h][0]); + posSearch[k][h][0].suitLengths = 0; + posSearch[k][h][0].posSearchPoint = NULL; + posSearch[k][h][0].left = NULL; + posSearch[k][h][0].right = NULL; + + lenSetInd[k][h] = 1; + } + } + +#if defined(DDS_TT_STATS) + statsResets.noOfResets++; + statsResets.aggrResets[reason]++; +#else + UNUSED(reason); +#endif + + return; +} + +void TransTableS::ReturnAllMemory() +{ + + if (!TTInUse) + return; + TTInUse = 0; + +#if defined(DDS_TT_STATS) + // TODO Reactivate: Move somewhere else, where fout is known? + // PrintResetStats(); + // PrintNodeStats(); +#endif + + + Wipe(); + + if (pw[0]) + free(pw[0]); + pw[0] = NULL; + + if (pn[0]) + free(pn[0]); + pn[0] = NULL; + + for (int k = 1; k <= 13; k++) + { + for (int h = 0; h < DDS_HANDS; h++) + { + if (pl[k][h][0]) + free(pl[k][h][0]); + pl[k][h][0] = NULL; + } + } + + if (pw) + free(pw); + pw = NULL; + + if (pn) + free(pn); + pn = NULL; + + if (aggp) + free(aggp); + aggp = NULL; + + return; +} + + +double TransTableS::MemoryInUse() const +{ + int ttMem = static_cast(allocmem); + int aggrMem = 8192 * static_cast(sizeof(ttAggrType)); + return (ttMem + aggrMem) / static_cast(1024.); +} + + +nodeCardsType const * TransTableS::Lookup( + const int trick, + const int hand, + const unsigned short aggrTarget[], + const int handDist[], + const int limit, + bool& lowerFlag) +{ + bool res; + posSearchTypeSmall * pp; + int orderSet[DDS_SUITS]; + nodeCardsType const * cardsP; + + suitLengths[trick] = + (static_cast(handDist[0]) << 36) | + (static_cast(handDist[1]) << 24) | + (static_cast(handDist[2]) << 12) | + (static_cast(handDist[3])); + + pp = SearchLenAndInsert(rootnp[trick][hand], + suitLengths[trick], false, trick, hand, res); + + /* Find node that fits the suit lengths */ + if ((pp != NULL) && res) + { + for (int ss = 0; ss < DDS_SUITS; ss++) + { + orderSet[ss] = + aggp[aggrTarget[ss]].aggrRanks[ss]; + } + + if (pp->posSearchPoint == NULL) + cardsP = NULL; + else + { + cardsP = FindSOP(orderSet, limit, pp->posSearchPoint, lowerFlag); + + if (cardsP == NULL) + return cardsP; + } + } + else + { + cardsP = NULL; + } + return cardsP; +} + + +void TransTableS::Add( + const int tricks, + const int hand, + const unsigned short aggrTarget[], + const unsigned short ourWinRanks[], + const nodeCardsType& first, + const bool flag) +{ + BuildSOP(ourWinRanks, aggrTarget, first, suitLengths[tricks], + tricks, hand, flag); + + if (clearTTflag) + ResetMemory(TT_RESET_MEMORY_EXHAUSTED); + + return; +} + + +void TransTableS::AddWinSet() +{ + if (clearTTflag) + { + windex++; + winSetSize = windex; + winCards = &(temp_win[windex]); + } + else if (winSetSize >= winSetSizeLimit) + { + /* The memory chunk for the winCards structure will be exceeded. */ + if (((allocmem + static_cast(wmem)) > maxmem) || (wcount >= maxIndex) || + (winSetSize > SIMILARMAXWINNODES)) + { + /* Already allocated memory plus needed allocation overshot maxmem */ + windex++; + winSetSize = windex; + clearTTflag = true; + winCards = &(temp_win[windex]); + } + else + { + wcount++; + winSetSizeLimit = WSIZE; + pw[wcount] = + static_cast(malloc((WSIZE + 1) * sizeof(winCardType))); + if (pw[wcount] == NULL) + { + clearTTflag = true; + windex++; + winSetSize = windex; + winCards = &(temp_win[windex]); + } + else + { + allocmem += (WSIZE + 1) * sizeof(winCardType); + winSetSize = 0; + winCards = pw[wcount]; + } + } + } + else + winSetSize++; + return; +} + +void TransTableS::AddNodeSet() +{ + if (nodeSetSize >= nodeSetSizeLimit) + { + /* The memory chunk for the nodeCards structure will be exceeded. */ + if (((allocmem + static_cast(nmem)) > maxmem) || (ncount >= maxIndex)) + { + /* Already allocated memory plus needed allocation overshot maxmem */ + clearTTflag = true; + } + else + { + ncount++; + nodeSetSizeLimit = NSIZE; + pn[ncount] = + static_cast(malloc((NSIZE + 1) * sizeof(nodeCardsType))); + if (pn[ncount] == NULL) + { + clearTTflag = true; + } + else + { + allocmem += (NSIZE + 1) * sizeof(nodeCardsType); + nodeSetSize = 0; + nodeCards = pn[ncount]; + } + } + } + else + nodeSetSize++; + return; +} + +void TransTableS::AddLenSet( + const int trick, + const int firstHand) +{ + if (lenSetInd[trick][firstHand] < LSIZE) + { + lenSetInd[trick][firstHand]++; +#if defined(DDS_TT_STATS) + aggrLenSets[trick]++; +#endif + return; + } + + // The memory chunk for the posSearchTypeSmall structure + // will be exceeded. + + const int incr = (LSIZE+1) * sizeof(posSearchTypeSmall); + + if ((allocmem + incr > maxmem) || (lcount[trick][firstHand] >= maxIndex)) + { + // Already allocated memory plus needed allocation overshot maxmem. + clearTTflag = true; + return; + } + + // Obtain another memory chunk LSIZE. + + lcount[trick][firstHand]++; + + pl[trick][firstHand][lcount[trick][firstHand]] = + static_cast(malloc(incr)); + + if (pl[trick][firstHand][lcount[trick][firstHand]] == NULL) + { + clearTTflag = true; + return; + } + + allocmem += incr; + lenSetInd[trick][firstHand] = 0; + posSearch[trick][firstHand] = + pl[trick][firstHand][lcount[trick][firstHand]]; +#if defined(DDS_TT_STATS) + aggrLenSets[trick]++; +#endif +} + + +void TransTableS::BuildSOP( + const unsigned short ourWinRanks[DDS_SUITS], + const unsigned short aggrArg[DDS_SUITS], + const nodeCardsType& first, + const long long lengths, + const int tricks, + const int firstHand, + const bool flag) +{ + int winMask[DDS_SUITS]; + int winOrderSet[DDS_SUITS]; + char low[DDS_SUITS]; + + for (int ss = 0; ss < DDS_SUITS; ss++) + { + int w = ourWinRanks[ss]; + if (w == 0) + { + winMask[ss] = 0; + winOrderSet[ss] = 0; + low[ss] = 15; + } + else + { + w = w & (-w); /* Only lowest win */ + const unsigned short temp = + static_cast(aggrArg[ss] & (-w)); + + winMask[ss] = aggp[temp].winMask[ss]; + winOrderSet[ss] = aggp[temp].aggrRanks[ss]; + low[ss] = static_cast(TTlowestRank[temp]); + } + } + + bool res; + posSearchTypeSmall * np = SearchLenAndInsert( + rootnp[tricks][firstHand], lengths, true, tricks, firstHand, res); + + nodeCardsType * cardsP = BuildPath( + winMask, + winOrderSet, + static_cast(first.ubound), + static_cast(first.lbound), + static_cast(first.bestMoveSuit), + static_cast(first.bestMoveRank), + np, + res); + + if (res) + { + cardsP->ubound = static_cast(first.ubound); + cardsP->lbound = static_cast(first.lbound); + + if (flag) + { + cardsP->bestMoveSuit = static_cast(first.bestMoveSuit); + cardsP->bestMoveRank = static_cast(first.bestMoveRank); + } + else + { + cardsP->bestMoveSuit = 0; + cardsP->bestMoveRank = 0; + } + + for (int k = 0; k < DDS_SUITS; k++) + cardsP->leastWin[k] = 15 - low[k]; + } +} + + +nodeCardsType * TransTableS::BuildPath( + const int winMask[], + const int winOrderSet[], + const int ubound, + const int lbound, + const char bestMoveSuit, + const char bestMoveRank, + posSearchTypeSmall * nodep, + bool& result) +{ + /* If result is TRUE, a new SOP has been created and BuildPath returns a + pointer to it. If result is FALSE, an existing SOP is used and BuildPath + returns a pointer to the SOP */ + + bool found; + winCardType * np, *p2, *nprev; + nodeCardsType *p; + + np = nodep->posSearchPoint; + nprev = NULL; + int suit = 0; + + /* If winning node has a card that equals the next winning card deduced + from the position, then there already exists a (partial) path */ + + if (np == NULL) + { + /* There is no winning list created yet */ + /* Create winning nodes */ + p2 = &(winCards[winSetSize]); + AddWinSet(); + p2->next = NULL; + p2->nextWin = NULL; + p2->prevWin = NULL; + nodep->posSearchPoint = p2; + p2->winMask = winMask[suit]; + p2->orderSet = winOrderSet[suit]; + p2->first = NULL; + np = p2; /* Latest winning node */ + suit++; + while (suit < DDS_SUITS) + { + p2 = &(winCards[winSetSize]); + AddWinSet(); + np->nextWin = p2; + p2->prevWin = np; + p2->next = NULL; + p2->nextWin = NULL; + p2->winMask = winMask[suit]; + p2->orderSet = winOrderSet[suit]; + p2->first = NULL; + np = p2; /* Latest winning node */ + suit++; + } + p = &(nodeCards[nodeSetSize]); + AddNodeSet(); + np->first = p; + result = true; + return p; + } + else + { + /* Winning list exists */ + while (1) + { + /* Find all winning nodes that correspond to current position */ + found = false; + while (1) /* Find node amongst alternatives */ + { + if ((np->winMask == winMask[suit]) && + (np->orderSet == winOrderSet[suit])) + { + /* Part of path found */ + found = true; + nprev = np; + break; + } + if (np->next != NULL) + np = np->next; + else + break; + } + if (found) + { + suit++; + if (suit >= DDS_SUITS) + { + result = false; + return UpdateSOP(ubound, lbound, bestMoveSuit, bestMoveRank, + np->first); + } + else + { + np = np->nextWin; /* Find next winning node */ + continue; + } + } + else + break; /* Node was not found */ + } /* End outer while */ + + /* Create additional node, coupled to existing node(s) */ + p2 = &(winCards[winSetSize]); + AddWinSet(); + p2->prevWin = nprev; + if (nprev != NULL) + { + p2->next = nprev->nextWin; + nprev->nextWin = p2; + } + else + { + p2->next = nodep->posSearchPoint; + nodep->posSearchPoint = p2; + } + p2->nextWin = NULL; + p2->winMask = winMask[suit]; + p2->orderSet = winOrderSet[suit]; + p2->first = NULL; + np = p2; /* Latest winning node */ + suit++; + + /* Rest of path must be created */ + while (suit < 4) + { + p2 = &(winCards[winSetSize]); + AddWinSet(); + np->nextWin = p2; + p2->prevWin = np; + p2->next = NULL; + p2->winMask = winMask[suit]; + p2->orderSet = winOrderSet[suit]; + p2->first = NULL; + p2->nextWin = NULL; + np = p2; /* Latest winning node */ + suit++; + } + + /* All winning nodes in SOP have been traversed and new nodes created */ + p = &(nodeCards[nodeSetSize]); + AddNodeSet(); + np->first = p; + result = true; + return p; + } +} + +TransTableS::posSearchTypeSmall * TransTableS::SearchLenAndInsert( + posSearchTypeSmall * rootp, + const long long key, + const bool insertNode, + const int trick, + const int firstHand, + bool& result) +{ + /* Search for node which matches with the suit length combination + given by parameter key. If no such node is found, NULL is + returned if parameter insertNode is FALSE, otherwise a new + node is inserted with suitLengths set to key, the pointer to + this node is returned. + The algorithm used is defined in Knuth "The art of computer + programming", vol.3 "Sorting and searching", 6.2.2 Algorithm T, + page 424. */ + + posSearchTypeSmall * np, *p, *sp; + + sp = NULL; + if (insertNode) + sp = &(posSearch[trick][firstHand][lenSetInd[trick][firstHand]]); + + np = rootp; + while (1) + { + if (key == np->suitLengths) + { + result = true; + return np; + } + else if (key < np->suitLengths) + { + if (np->left != NULL) + np = np->left; + else if (insertNode) + { + p = sp; + AddLenSet(trick, firstHand); + np->left = p; + p->posSearchPoint = NULL; + p->suitLengths = key; + p->left = NULL; + p->right = NULL; + result = true; + return p; + } + else + { + result = false; + return NULL; + } + } + else /* key > suitLengths */ + { + if (np->right != NULL) + np = np->right; + else if (insertNode) + { + p = sp; + AddLenSet(trick, firstHand); + np->right = p; + p->posSearchPoint = NULL; + p->suitLengths = key; + p->left = NULL; + p->right = NULL; + result = true; + return p; + } + else + { + result = false; + return NULL; + } + } + } +} + + +nodeCardsType * TransTableS::UpdateSOP( + int ubound, + int lbound, + char bestMoveSuit, + char bestMoveRank, + nodeCardsType * nodep) +{ + /* Update SOP node with new values for upper and lower + bounds. */ + if (lbound > nodep->lbound) + nodep->lbound = static_cast(lbound); + if (ubound < nodep->ubound) + nodep->ubound = static_cast(ubound); + + nodep->bestMoveSuit = bestMoveSuit; + nodep->bestMoveRank = bestMoveRank; + + return nodep; +} + + +nodeCardsType const * TransTableS::FindSOP( + const int orderSet[], + const int limit, + winCardType * nodeP, + bool& lowerFlag) +{ + winCardType * np; + + np = nodeP; + int s = 0; + + while (np) + { + if ((np->winMask & orderSet[s]) == np->orderSet) + { + /* Winning rank set fits position */ + if (s != 3) + { + np = np->nextWin; + s++; + continue; + } + + if (np->first->lbound > limit) + { + lowerFlag = true; + return np->first; + } + else if (np->first->ubound <= limit) + { + lowerFlag = false; + return np->first; + } + } + + while (np->next == NULL) + { + np = np->prevWin; + s--; + if (np == NULL) /* Previous node is header node? */ + return NULL; + } + np = np->next; + } + return NULL; +} + + +void TransTableS::PrintNodeStats(ofstream& fout) const +{ + for (int k = 13; k > 0; k--) + fout << "Trick " << k << ": Created nodes: " << + static_cast(aggrLenSets[k - 1]) << "\n\n"; +} + + +void TransTableS::PrintResetStats(ofstream& fout) const +{ + fout << "Total no of Resets: " << statsResets.noOfResets << "\n\n"; + + for (int k = 0; k <= 5; k++) + fout << resetText[k] << ": " << statsResets.aggrResets[k] << "\n\n"; +} + diff --git a/src/TransTableS.h b/src/TransTableS.h new file mode 100644 index 00000000..4bad10b9 --- /dev/null +++ b/src/TransTableS.h @@ -0,0 +1,198 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_TRANSTABLES_H +#define DDS_TRANSTABLES_H + +/* + This is an object for managing transposition tables and the + associated memory. Compared to TransTableL it uses a lot less + memory and takes somewhat longer time. +*/ + + +#include +#include + +#include "TransTable.h" + +using namespace std; + + +class TransTableS: public TransTable +{ + private: + + // Structures for the small memory option. + + struct winCardType + { + int orderSet; + int winMask; + nodeCardsType * first; + winCardType * prevWin; + winCardType * nextWin; + winCardType * next; + }; + + struct posSearchTypeSmall + { + winCardType * posSearchPoint; + long long suitLengths; + posSearchTypeSmall * left; + posSearchTypeSmall * right; + }; + + struct ttAggrType + { + int aggrRanks[DDS_SUITS]; + int winMask[DDS_SUITS]; + }; + + struct statsResetsType + { + int noOfResets; + int aggrResets[TT_RESET_SIZE]; + }; + + + long long aggrLenSets[14]; + statsResetsType statsResets; + + winCardType temp_win[5]; + int nodeSetSizeLimit; + int winSetSizeLimit; + unsigned long long maxmem; + unsigned long long allocmem; + unsigned long long summem; + int wmem; + int nmem; + int maxIndex; + int wcount; + int ncount; + bool clearTTflag; + int windex; + ttAggrType * aggp; + + posSearchTypeSmall * rootnp[14][DDS_HANDS]; + winCardType ** pw; + nodeCardsType ** pn; + posSearchTypeSmall ** pl[14][DDS_HANDS]; + nodeCardsType * nodeCards; + winCardType * winCards; + posSearchTypeSmall * posSearch[14][DDS_HANDS]; + int nodeSetSize; /* Index with range 0 to nodeSetSizeLimit */ + int winSetSize; /* Index with range 0 to winSetSizeLimit */ + int lenSetInd[14][DDS_HANDS]; + int lcount[14][DDS_HANDS]; + + vector resetText; + + long long suitLengths[14]; + + int TTInUse; + + void SetConstants(); + + void Wipe(); + + void InitTT(); + + void AddWinSet(); + + void AddNodeSet(); + + void AddLenSet( + const int trick, + const int firstHand); + + void BuildSOP( + const unsigned short ourWinRanks[DDS_SUITS], + const unsigned short aggr[DDS_SUITS], + const nodeCardsType& first, + const long long suitLengths, + const int tricks, + const int firstHand, + const bool flag); + + nodeCardsType * BuildPath( + const int winMask[], + const int winOrderSet[], + const int ubound, + const int lbound, + const char bestMoveSuit, + const char bestMoveRank, + posSearchTypeSmall * node, + bool& result); + + struct posSearchTypeSmall * SearchLenAndInsert( + posSearchTypeSmall * rootp, + const long long key, + const bool insertNode, + const int trick, + const int firstHand, + bool& result); + + nodeCardsType * UpdateSOP( + const int ubound, + const int lbound, + const char bestMoveSuit, + const char bestMoveRank, + nodeCardsType * nodep); + + nodeCardsType const * FindSOP( + const int orderSet[], + const int limit, + winCardType * nodeP, + bool& lowerFlag); + + public: + + TransTableS(); + + ~TransTableS(); + + void Init(const int handLookup[][15]); + + void SetMemoryDefault(const int megabytes); + + void SetMemoryMaximum(const int megabytes); + + void MakeTT(); + + void ResetMemory(const TTresetReason reason); + + void ReturnAllMemory(); + + double MemoryInUse() const; + + nodeCardsType const * Lookup( + const int trick, + const int hand, + const unsigned short aggrTarget[], + const int handDist[], + const int limit, + bool& lowerFlag); + + void Add( + const int trick, + const int hand, + const unsigned short aggrTarget[], + const unsigned short winRanksArg[], + const nodeCardsType& first, + const bool flag); + + // TODO: Fold up with L functions, same name? + + void PrintNodeStats(ofstream& fout) const; + + void PrintResetStats(ofstream& fout) const; +}; + +#endif From a6607a693203d4626c6ff5bdc924d90e2a9e844d Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 31 Mar 2018 16:00:21 +0200 Subject: [PATCH 100/132] memory.transTable is now a pointer to either table type --- src/ABsearch.cpp | 17 ++++++++-------- src/Init.cpp | 50 ++++++++++++++++++++++++++++++++---------------- src/Memory.cpp | 43 ++++++++++++++++------------------------- src/Memory.h | 28 ++++++++++++--------------- src/SolverIF.cpp | 35 ++++++++++++++++----------------- src/dds.h | 11 ++++------- 6 files changed, 90 insertions(+), 94 deletions(-) diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index 4253cbcc..03bbde54 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -13,11 +13,12 @@ #include "dds.h" -#ifdef SMALL_MEMORY_OPTION - #include "TransTableS.h" -#else - #include "TransTableL.h" -#endif +#include "TransTable.h" +// #ifdef SMALL_MEMORY_OPTION + // #include "TransTableS.h" +// #else + // #include "TransTableL.h" +// #endif #include "Moves.h" #include "QuickTricks.h" @@ -193,7 +194,7 @@ bool ABsearch0( bool lowerFlag; TIMER_START(TIMER_NO_LOOKUP, depth); nodeCardsType const * cardsP = - thrp->transTable.Lookup( + thrp->transTable->Lookup( tricks, hand, posPoint->aggr, posPoint->handDist, limit, lowerFlag); TIMER_END(TIMER_NO_LOOKUP, depth); @@ -305,7 +306,7 @@ bool ABsearch0( bool lowerFlag; TIMER_START(TIMER_NO_LOOKUP, depth); nodeCardsType const * cardsP = - thrp->transTable.Lookup( + thrp->transTable->Lookup( tricks, hand, posPoint->aggr, posPoint->handDist, limit, lowerFlag); TIMER_END(TIMER_NO_LOOKUP, depth); @@ -439,7 +440,7 @@ bool ABsearch0( ? true : false; TIMER_START(TIMER_NO_BUILD, depth); - thrp->transTable.Add( + thrp->transTable->Add( tricks, hand, posPoint->aggr, diff --git a/src/Init.cpp b/src/Init.cpp index 290f95dd..4006c0fe 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -10,6 +10,7 @@ #include "Init.h" #include "System.h" +#include "Memory.h" #include "Scheduler.h" #include "debug.h" @@ -29,6 +30,8 @@ void FreeThreadMem(); void CalcThreadMemory( const int oldNoOfThreads, const int kilobytesUsable, + const int memcst_def, + const int memcst_max, int& mem_def, int& mem_max); @@ -83,6 +86,8 @@ int _initialized = 0; void CalcThreadMemory( const int oldNoOfThreads, const int kilobytesUsable, + const int memcst_def, + const int memcst_max, int& mem_def, int& mem_max) { @@ -90,34 +95,34 @@ void CalcThreadMemory( if (deltaThreads <= 0) { // We already have the memory. - mem_def = THREADMEM_DEF_MB; - mem_max = THREADMEM_MAX_MB; + mem_def = memcst_def; + mem_max = memcst_max; } else if (kilobytesUsable == 0 || noOfThreads == 1) { // Take our chances with default values. - mem_def = THREADMEM_DEF_MB; - mem_max = THREADMEM_MAX_MB; + mem_def = memcst_def; + mem_max = memcst_max; } - else if (kilobytesUsable >= 1024 * THREADMEM_MAX_MB * deltaThreads) + else if (kilobytesUsable >= 1024 * memcst_max * deltaThreads) { // Comfortable. - mem_def = THREADMEM_DEF_MB; - mem_max = THREADMEM_MAX_MB; + mem_def = memcst_def; + mem_max = memcst_max; } - else if (kilobytesUsable >= 1024 * THREADMEM_DEF_MB * deltaThreads) + else if (kilobytesUsable >= 1024 * memcst_def * deltaThreads) { // Slightly less comfortable, cap the maximum, // but make the maximum number of threads. - mem_def = THREADMEM_DEF_MB; - mem_max = THREADMEM_DEF_MB; + mem_def = memcst_def; + mem_max = memcst_def; // Not max } else { // Even less comfortable. Thread number will be limited later. // Limit the number of threads to the available memory. - mem_def = THREADMEM_DEF_MB; - mem_max = THREADMEM_DEF_MB; + mem_def = memcst_def; + mem_max = memcst_def; // Not max } } @@ -148,8 +153,19 @@ void STDCALL SetMaxThreads( else noOfThreads = ncores; +#ifdef SMALL_MEMORY_OPTION + const TTmemory TTmem = DDS_TT_SMALL; + const int memcst_def = THREADMEM_SMALL_DEF_MB; + const int memcst_max = THREADMEM_SMALL_MAX_MB; +#else + const TTmemory TTmem = DDS_TT_LARGE; + const int memcst_def = THREADMEM_LARGE_DEF_MB; + const int memcst_max = THREADMEM_LARGE_MAX_MB; +#endif + int mem_def, mem_max; - CalcThreadMemory(oldNoOfThreads, kilobytesUsable, mem_def, mem_max); + CalcThreadMemory(oldNoOfThreads, kilobytesUsable, + memcst_def, memcst_max, mem_def, mem_max); if (kilobytesUsable > 0 && noOfThreads > 1) { @@ -166,8 +182,8 @@ void STDCALL SetMaxThreads( kilobytesUsable >> 10, mem_def, mem_max); scheduler.RegisterThreads(noOfThreads); - memory.Resize(static_cast(noOfThreads)); - memory.SetThreadSize(mem_def, mem_max); + memory.Resize(static_cast(noOfThreads), + TTmem, mem_def, mem_max); if (! _initialized) { @@ -502,7 +518,7 @@ void SetDealTables( } } - thrp->transTable.Init(handLookup); + thrp->transTable->Init(handLookup); relRanksType * relp; for (unsigned int aggr = 1; aggr < 8192; aggr++) @@ -580,7 +596,7 @@ void ResetBestMoves( thrp->bestMoveTT[d].rank = 0; } - thrp->memUsed = thrp->transTable.MemoryInUse() + + thrp->memUsed = thrp->transTable->MemoryInUse() + ThreadMemoryUsed(); #ifdef DDS_AB_STATS diff --git a/src/Memory.cpp b/src/Memory.cpp index f44a8cf8..9032ffe8 100644 --- a/src/Memory.cpp +++ b/src/Memory.cpp @@ -22,46 +22,31 @@ Memory::~Memory() } -#include void Memory::Reset() { nThreads = 0; - defThrMB = 0; - maxThrMB = 0; - Memory::Resize(1); } void Memory::ResetThread(const unsigned thrId) { - memory[thrId]->transTable.ResetMemory(TT_RESET_FREE_MEMORY); + memory[thrId]->transTable->ResetMemory(TT_RESET_FREE_MEMORY); memory[thrId]->memUsed = Memory::MemoryInUseMB(thrId); } void Memory::ReturnThread(const unsigned thrId) { - memory[thrId]->transTable.ReturnAllMemory(); + memory[thrId]->transTable->ReturnAllMemory(); memory[thrId]->memUsed = Memory::MemoryInUseMB(thrId); } -void Memory::SetThreadSize( +void Memory::Resize( + const unsigned n, + const TTmemory flag, const int memDefault_MB, const int memMaximum_MB) -{ - defThrMB = memDefault_MB; - maxThrMB = memMaximum_MB; - - for (unsigned i = 0; i < nThreads; i++) - { - memory[i]->transTable.SetMemoryDefault(defThrMB); - memory[i]->transTable.SetMemoryMaximum(maxThrMB); - } -} - - -void Memory::Resize(const unsigned n) { if (nThreads == n) return; @@ -70,7 +55,8 @@ void Memory::Resize(const unsigned n) { for (unsigned i = n; i < nThreads; i++) { - memory[i]->transTable.ReturnAllMemory(); + memory[i]->transTable->ReturnAllMemory(); + delete memory[i]->transTable; delete memory[i]; } memory.resize(static_cast(n)); @@ -81,12 +67,15 @@ void Memory::Resize(const unsigned n) for (unsigned i = nThreads; i < n; i++) { memory[i] = new ThreadData; + if (flag == DDS_TT_SMALL) + memory[i]->transTable = new TransTableS; + else + memory[i]->transTable = new TransTableL; - // TODO: Should come from the outside? - memory[i]->transTable.SetMemoryDefault(THREADMEM_DEF_MB); - memory[i]->transTable.SetMemoryMaximum(THREADMEM_MAX_MB); + memory[i]->transTable->SetMemoryDefault(memDefault_MB); + memory[i]->transTable->SetMemoryMaximum(memMaximum_MB); - memory[i]->transTable.MakeTT(); + memory[i]->transTable->MakeTT(); } } @@ -102,13 +91,13 @@ ThreadData * Memory::GetPtr(const unsigned thrId) double Memory::MemoryInUseMB(const unsigned thrId) const { - return memory[thrId]->transTable.MemoryInUse() + + return memory[thrId]->transTable->MemoryInUse() + 8192. * sizeof(relRanksType) / static_cast(1024.); } void Memory::ReturnAllMemory() { - Memory::Resize(0); + Memory::Resize(0, DDS_TT_SMALL, 0, 0); } diff --git a/src/Memory.h b/src/Memory.h index 73aa9891..5ceb0bcd 100644 --- a/src/Memory.h +++ b/src/Memory.h @@ -14,11 +14,8 @@ #include "TransTable.h" -#ifdef SMALL_MEMORY_OPTION - #include "TransTableS.h" -#else - #include "TransTableL.h" -#endif +#include "TransTableS.h" +#include "TransTableL.h" #include "Moves.h" #include "File.h" @@ -35,6 +32,12 @@ using namespace std; +enum TTmemory +{ + DDS_TT_SMALL = 0, + DDS_TT_LARGE = 1 +}; + struct WinnerEntryType { int suit; @@ -76,11 +79,7 @@ struct ThreadData // 960 KB relRanksType rel[8192]; -#ifdef SMALL_MEMORY_OPTION - TransTableS transTable; -#else - TransTableL transTable; -#endif + TransTable * transTable; Moves moves; @@ -118,9 +117,6 @@ class Memory { private: - int defThrMB; - int maxThrMB; - vector memory; unsigned nThreads; @@ -136,12 +132,12 @@ class Memory void ReturnThread(const unsigned thrId); - void SetThreadSize( + void Resize( + const unsigned n, + const TTmemory flag, const int memDefault_MB, const int memMaximum_MB); - void Resize(const unsigned n); - ThreadData * GetPtr(const unsigned thrId); double MemoryInUseMB(const unsigned thrId) const; diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index aa53511e..85924dde 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -225,7 +225,7 @@ int SolveBoardInternal( reason = TT_RESET_NEW_DEAL; else if (newTrump) reason = TT_RESET_NEW_TRUMP; - thrp->transTable.ResetMemory(reason); + thrp->transTable->ResetMemory(reason); } if (newDeal) @@ -625,13 +625,12 @@ int SolveBoardInternal( #endif #ifdef DDS_TT_STATS - #ifndef SMALL_MEMORY_OPTION - // thrp->transTable.PrintAllSuits(); - // thrp->transTable.PrintEntries(10, 0); - thrp->transTable.PrintSummarySuitStats(thrp->fileTTstats.GetStream()); - thrp->transTable.PrintSummaryEntryStats(thrp->fileTTstats.GetStream()); - // thrp->transTable.PrintPageSummary(); - #endif + // These are for the large TT -- empty if not. + // thrp->transTable->PrintAllSuits(); + // thrp->transTable->PrintEntries(10, 0); + thrp->transTable->PrintSummarySuitStats(thrp->fileTTstats.GetStream()); + thrp->transTable->PrintSummaryEntryStats(thrp->fileTTstats.GetStream()); + // thrp->transTable->PrintPageSummary(); #endif #ifdef DDS_MOVES @@ -644,7 +643,7 @@ int SolveBoardInternal( SOLVER_DONE: - thrp->memUsed = thrp->transTable.MemoryInUse() + + thrp->memUsed = thrp->transTable->MemoryInUse() + ThreadMemoryUsed(); futp->nodes = thrp->trickNodes; @@ -733,7 +732,7 @@ int SolveSameBoard( futp->cards = 1; futp->score[0] = lowerbound; - thrp->memUsed = thrp->transTable.MemoryInUse() + + thrp->memUsed = thrp->transTable->MemoryInUse() + ThreadMemoryUsed(); #ifdef DDS_TIMING @@ -741,10 +740,9 @@ int SolveSameBoard( #endif #ifdef DDS_TT_STATS - #ifndef SMALL_MEMORY_OPTION - thrp->transTable.PrintSummarySuitStats(thrp->fileTTstats.GetStream()); - thrp->transTable.PrintSummaryEntryStats(thrp->fileTTstats.GetStream()); - #endif + // These are for the large TT -- empty if not. + thrp->transTable->PrintSummarySuitStats(thrp->fileTTstats.GetStream()); + thrp->transTable->PrintSummaryEntryStats(thrp->fileTTstats.GetStream()); #endif #ifdef DDS_MOVES @@ -887,7 +885,7 @@ int AnalyseLaterBoard( futp->score[0] = lowerbound; futp->nodes = thrp->trickNodes; - thrp->memUsed = thrp->transTable.MemoryInUse() + + thrp->memUsed = thrp->transTable->MemoryInUse() + ThreadMemoryUsed(); #ifdef DDS_TIMING @@ -895,10 +893,9 @@ int AnalyseLaterBoard( #endif #ifdef DDS_TT_STATS - #ifndef SMALL_MEMORY_OPTION - thrp->transTable.PrintSummarySuitStats(thrp->fileTTstats.GetStream()); - thrp->transTable.PrintSummaryEntryStats(thrp->fileTTstats.GetStream()); - #endif + // These are for the large TT -- empty if not. + thrp->transTable->PrintSummarySuitStats(thrp->fileTTstats.GetStream()); + thrp->transTable->PrintSummaryEntryStats(thrp->fileTTstats.GetStream()); #endif #ifdef DDS_MOVES diff --git a/src/dds.h b/src/dds.h index ee81e7e2..9edff143 100644 --- a/src/dds.h +++ b/src/dds.h @@ -21,13 +21,10 @@ #endif -#if defined(SMALL_MEMORY_OPTION) - #define THREADMEM_MAX_MB 30 - #define THREADMEM_DEF_MB 20 -#else - #define THREADMEM_MAX_MB 160 - #define THREADMEM_DEF_MB 95 -#endif +#define THREADMEM_SMALL_MAX_MB 30 +#define THREADMEM_SMALL_DEF_MB 20 +#define THREADMEM_LARGE_MAX_MB 160 +#define THREADMEM_LARGE_DEF_MB 95 #define MAXNODE 1 #define MINNODE 0 From ab1dc235635d6368f374f44985bdbace4b4a75a8 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 31 Mar 2018 18:29:21 +0200 Subject: [PATCH 101/132] Added bit size and thread size to info output --- include/dll.h | 8 ++++++++ src/Memory.cpp | 16 ++++++++++++++++ src/Memory.h | 3 +++ src/System.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ src/System.h | 4 +++- 5 files changed, 70 insertions(+), 1 deletion(-) diff --git a/include/dll.h b/include/dll.h index 11cd6360..0b2968f9 100644 --- a/include/dll.h +++ b/include/dll.h @@ -348,6 +348,9 @@ struct DDSInfo // Currently 0 = unknown, 1 = Windows, 2 = Cygwin, 3 = Linux, 4 = Apple int system; + // We know 32 and 64-bit systems. + int numBits; + // Currently 0 = unknown, 1 = Microsoft Visual C++, 2 = mingw, // 3 = GNU g++, 4 = clang int compiler; @@ -372,6 +375,11 @@ struct DDSInfo // The actual number of threads configured int noOfThreads; + // This will break if there are > 128 threads... + // The string is of the form LLLSSS meaning 3 large TT memories + // and 3 small ones. + char threadSizes[128]; + char systemString[1024]; }; diff --git a/src/Memory.cpp b/src/Memory.cpp index 9032ffe8..dd6c38f0 100644 --- a/src/Memory.cpp +++ b/src/Memory.cpp @@ -53,6 +53,7 @@ void Memory::Resize( if (nThreads > n) { + // Downsize. for (unsigned i = n; i < nThreads; i++) { memory[i]->transTable->ReturnAllMemory(); @@ -60,17 +61,26 @@ void Memory::Resize( delete memory[i]; } memory.resize(static_cast(n)); + threadSizes.resize(static_cast(n)); } else { + // Upsize. memory.resize(n); + threadSizes.resize(n); for (unsigned i = nThreads; i < n; i++) { memory[i] = new ThreadData; if (flag == DDS_TT_SMALL) + { memory[i]->transTable = new TransTableS; + threadSizes[i] = "S"; + } else + { memory[i]->transTable = new TransTableL; + threadSizes[i] = "L"; + } memory[i]->transTable->SetMemoryDefault(memDefault_MB); memory[i]->transTable->SetMemoryMaximum(memMaximum_MB); @@ -101,3 +111,9 @@ void Memory::ReturnAllMemory() Memory::Resize(0, DDS_TT_SMALL, 0, 0); } + +string Memory::ThreadSize(const unsigned thrId) const +{ + return threadSizes[thrId]; +} + diff --git a/src/Memory.h b/src/Memory.h index 5ceb0bcd..cc4ddf36 100644 --- a/src/Memory.h +++ b/src/Memory.h @@ -120,6 +120,8 @@ class Memory vector memory; unsigned nThreads; + vector threadSizes; + public: Memory(); @@ -144,6 +146,7 @@ class Memory void ReturnAllMemory(); + string ThreadSize(const unsigned thrId) const; }; #endif diff --git a/src/System.cpp b/src/System.cpp index 96629ad9..7d66d983 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -17,9 +17,11 @@ #include "PlayAnalyser.h" #include "parallel.h" #include "System.h" +#include "Memory.h" #include "Scheduler.h" extern Scheduler scheduler; +extern Memory memory; const vector DDS_SYSTEM_PLATFORM = @@ -626,6 +628,26 @@ string System::GetSystem(int& sys) const } +string System::GetBits(int& bits) const +{ + if constexpr (sizeof(void *) == 4) + { + bits = 32; + return "32 bits"; + } + else if constexpr (sizeof(void *) == 8) + { + bits = 64; + return "64 bits"; + } + else + { + bits = 0; + return "unknown"; + } +} + + string System::GetCompiler(int& comp) const { #if defined(_MSC_VER) @@ -695,6 +717,16 @@ string System::GetThreading(int& thr) const } +string System::GetThreadSizes(char * sizes) const +{ + string st; + for (unsigned i = 0; i < static_cast(numThreads); i++) + st += memory.ThreadSize(i); + strcpy(sizes, st.c_str()); + return st; +} + + string System::str(DDSInfo * info) const { stringstream ss; @@ -704,6 +736,10 @@ string System::str(DDSInfo * info) const ss << left << setw(13) << "System" << setw(20) << right << strSystem << "\n"; + const string strBits = System::GetBits(info->numBits); + ss << left << setw(13) << "Word size" << + setw(20) << right << strBits << "\n"; + const string strCompiler = System::GetCompiler(info->compiler); ss << left << setw(13) << "Compiler" << setw(20) << right << strCompiler << "\n"; @@ -733,6 +769,10 @@ string System::str(DDSInfo * info) const ss << left << setw(17) << "Number of threads" << setw(16) << right << numThreads << "\n"; + const string strThrSizes = System::GetThreadSizes(info->threadSizes); + ss << left << setw(13) << "Thread sizes" << + setw(20) << right << strThrSizes << "\n"; + const string strThreading = System::GetThreading(info->threading); ss << left << setw(9) << "Threading" << setw(24) << right << strThreading << "\n"; diff --git a/src/System.h b/src/System.h index 6e277f8e..f802747d 100644 --- a/src/System.h +++ b/src/System.h @@ -70,10 +70,12 @@ class System int& minor, int& patch) const; string GetSystem(int& sys) const; + string GetBits(int& bits) const; string GetCompiler(int& comp) const; string GetCores(int& comp) const; string GetConstructor(int& cons) const; - string GetThreading(int &thr) const; + string GetThreading(int& thr) const; + string GetThreadSizes(char * c) const; public: From 309d8d7307b1089f399f9943e0b6554ea7cfcec1 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 31 Mar 2018 20:33:33 +0200 Subject: [PATCH 102/132] Dynamic selection of TT works --- include/dll.h | 4 + src/ABsearch.cpp | 8 -- src/Exports.def | 2 + src/Init.cpp | 215 +++++++++++++++++++++-------------------------- src/Memory.h | 19 ++--- src/System.cpp | 31 +++++-- src/System.h | 10 ++- test/dtest.cpp | 6 +- 8 files changed, 147 insertions(+), 148 deletions(-) diff --git a/include/dll.h b/include/dll.h index 0b2968f9..84efe02a 100644 --- a/include/dll.h +++ b/include/dll.h @@ -391,6 +391,10 @@ EXTERN_C DLLEXPORT void STDCALL SetMaxThreads( EXTERN_C DLLEXPORT int STDCALL SetThreading( int code); +EXTERN_C DLLEXPORT void STDCALL SetResources( + int maxMemoryMB, + int maxThreads); + EXTERN_C DLLEXPORT void STDCALL FreeMemory(); EXTERN_C DLLEXPORT int STDCALL SolveBoard( diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index 03bbde54..0f93b36c 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -11,15 +11,7 @@ #include #include -#include "dds.h" - #include "TransTable.h" -// #ifdef SMALL_MEMORY_OPTION - // #include "TransTableS.h" -// #else - // #include "TransTableL.h" -// #endif - #include "Moves.h" #include "QuickTricks.h" #include "LaterTricks.h" diff --git a/src/Exports.def b/src/Exports.def index 6ce2f452..8098e882 100644 --- a/src/Exports.def +++ b/src/Exports.def @@ -4,6 +4,8 @@ EXPORTS SetMaxThreads@4 = SetMaxThreads SetThreading SetThreading@4 = SetThreading + SetResources + SetResources@8 = SetResources FreeMemory FreeMemory@0 = FreeMemory ErrorMessage diff --git a/src/Init.cpp b/src/Init.cpp index 4006c0fe..d9602861 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -10,7 +10,6 @@ #include "Init.h" #include "System.h" -#include "Memory.h" #include "Scheduler.h" #include "debug.h" @@ -18,7 +17,6 @@ System sysdep; Memory memory; Scheduler scheduler; -int noOfThreads; void InitConstants(); @@ -27,14 +25,6 @@ void InitDebugFiles(); void FreeThreadMem(); -void CalcThreadMemory( - const int oldNoOfThreads, - const int kilobytesUsable, - const int memcst_def, - const int memcst_max, - int& mem_def, - int& mem_max); - int lho[DDS_HANDS] = { 1, 2, 3, 0 }; int rho[DDS_HANDS] = { 3, 0, 1, 2 }; @@ -83,107 +73,96 @@ moveGroupType groupData[8192]; int _initialized = 0; -void CalcThreadMemory( - const int oldNoOfThreads, - const int kilobytesUsable, - const int memcst_def, - const int memcst_max, - int& mem_def, - int& mem_max) -{ - const int deltaThreads = noOfThreads - oldNoOfThreads; - if (deltaThreads <= 0) - { - // We already have the memory. - mem_def = memcst_def; - mem_max = memcst_max; - } - else if (kilobytesUsable == 0 || noOfThreads == 1) - { - // Take our chances with default values. - mem_def = memcst_def; - mem_max = memcst_max; - } - else if (kilobytesUsable >= 1024 * memcst_max * deltaThreads) - { - // Comfortable. - mem_def = memcst_def; - mem_max = memcst_max; - } - else if (kilobytesUsable >= 1024 * memcst_def * deltaThreads) - { - // Slightly less comfortable, cap the maximum, - // but make the maximum number of threads. - mem_def = memcst_def; - mem_max = memcst_def; // Not max - } - else - { - // Even less comfortable. Thread number will be limited later. - // Limit the number of threads to the available memory. - mem_def = memcst_def; - mem_max = memcst_def; // Not max - } -} -#include -#include -#include void STDCALL SetMaxThreads( int userThreads) { - if (! _initialized) - noOfThreads = 0; + SetResources(0, userThreads); +} - // First figure out how much memory we have available - // and how many cores the system has. + +void STDCALL SetResources( + int maxMemoryMB, + int maxThreadsIn) +{ + // Figure out system resources. int ncores; unsigned long long kilobytesFree; sysdep.GetHardware(ncores, kilobytesFree); - // 70%, capped at 2 GB. - int kilobytesUsable = static_cast(0.70 * kilobytesFree); - if (kilobytesUsable > 2000000) - kilobytesUsable = 2000000; - - int oldNoOfThreads = noOfThreads; - if (userThreads) - noOfThreads = userThreads; - // noOfThreads = Min(ncores, userThreads); TODO Switch back? + // Memory usage will be limited to the lower of: + // - maxMemoryMB + 30% (if given; statistically this works out) + // - 70% of free memory + // - 1800 MB if we're on a 32-bit system. + + const int memMaxGivenMB = (maxMemoryMB == 0 ? 1000000 : + static_cast(1.3 * maxMemoryMB)); + const int memMaxFreeMB = static_cast(0.70 * kilobytesFree / 1024); + const int memMax32bMB = (sizeof(void *) == 4 ? 1800 : 1000000); + + int memMaxMB = Min(memMaxGivenMB, memMaxFreeMB); + memMaxMB = Min(memMaxMB, memMax32bMB); + + // The number of threads will be limited by: + // - If threading set as single-threaded or compiled only + // single-threaded: 1 + // - If threading set as one of the IMPL variants: 1.5 * ncores + // whatever the user says (as we currently don't have control) + // - Otherwise the lower of maxThreads and 1.5 * ncores (for test + // purpose, later one 1 * ncores) + + int thrMax; + if (sysdep.IsSingleThreaded()) + thrMax = 1; + else if (sysdep.IsIMPL() || maxThreadsIn <= 0) + thrMax = static_cast(1.51 * ncores); else - noOfThreads = ncores; - -#ifdef SMALL_MEMORY_OPTION - const TTmemory TTmem = DDS_TT_SMALL; - const int memcst_def = THREADMEM_SMALL_DEF_MB; - const int memcst_max = THREADMEM_SMALL_MAX_MB; -#else - const TTmemory TTmem = DDS_TT_LARGE; - const int memcst_def = THREADMEM_LARGE_DEF_MB; - const int memcst_max = THREADMEM_LARGE_MAX_MB; -#endif + thrMax = Min(maxThreadsIn, static_cast(1.51 * ncores)); - int mem_def, mem_max; - CalcThreadMemory(oldNoOfThreads, kilobytesUsable, - memcst_def, memcst_max, mem_def, mem_max); + // For simplicity we won't vary the amount of memory per thread + // in the small and large versions. - if (kilobytesUsable > 0 && noOfThreads > 1) + int noOfThreads, noOfLargeThreads, noOfSmallThreads; + if (thrMax * THREADMEM_LARGE_MAX_MB <= memMaxMB) { - if (kilobytesUsable < 1024 * mem_max * noOfThreads) - { - int fittingThreads = static_cast( kilobytesUsable / - ( static_cast(1024. * mem_max) ) ); - - noOfThreads = Max(fittingThreads, 1); - } + // We have enough memory for the maximum number of large threads. + noOfThreads = thrMax; + noOfLargeThreads = thrMax; + noOfSmallThreads = 0; + } + else if (thrMax * THREADMEM_SMALL_MAX_MB > memMaxMB) + { + // We don't even have enough memory for only small threads. + // We'll limit the number of threads. + noOfThreads = static_cast(memMaxMB / + static_cast(thrMax)); + noOfLargeThreads = 0; + noOfSmallThreads = noOfThreads; + } + else + { + // We'll have a mixture with as many large threads as possible. + const double d = static_cast( + THREADMEM_LARGE_MAX_MB - THREADMEM_SMALL_MAX_MB); + + noOfThreads = thrMax; + noOfLargeThreads = static_cast( + (memMaxMB - thrMax * THREADMEM_SMALL_MAX_MB) / d); + noOfSmallThreads = thrMax - noOfLargeThreads; } - sysdep.RegisterParams(noOfThreads, - kilobytesUsable >> 10, mem_def, mem_max); + sysdep.RegisterParams(noOfThreads, memMaxMB); + scheduler.RegisterThreads(noOfThreads); - memory.Resize(static_cast(noOfThreads), - TTmem, mem_def, mem_max); + // Clear the thread memory and fill it up again. + memory.Resize(0, DDS_TT_SMALL, 0, 0); + if (noOfLargeThreads > 0) + memory.Resize(static_cast(noOfLargeThreads), + DDS_TT_LARGE, THREADMEM_LARGE_DEF_MB, THREADMEM_LARGE_MAX_MB); + if (noOfSmallThreads > 0) + memory.Resize(static_cast(noOfThreads), + DDS_TT_SMALL, THREADMEM_SMALL_DEF_MB, THREADMEM_SMALL_MAX_MB); if (! _initialized) { @@ -366,9 +345,9 @@ void InitConstants() void InitDebugFiles() { - for (int thrId = 0; thrId < noOfThreads; thrId++) + for (unsigned thrId = 0; thrId < sysdep.NumThreads(); thrId++) { - ThreadData * thrp = memory.GetPtr(static_cast(thrId)); + ThreadData * thrp = memory.GetPtr(thrId); UNUSED(thrp); // To avoid compile errors const string send = to_string(thrId) + DDS_DEBUG_SUFFIX; @@ -385,14 +364,14 @@ void InitDebugFiles() thrp->fileStored.SetName(DDS_AB_HITS_STORED_PREFIX + send); #endif -#ifdef DDS_TIMING - thrp->fileTimerList.SetName(DDS_TIMING_PREFIX + send); -#endif - #ifdef DDS_TT_STATS thrp->fileTTstats.SetName(DDS_TT_STATS_PREFIX + send); #endif +#ifdef DDS_TIMING + thrp->fileTimerList.SetName(DDS_TIMING_PREFIX + send); +#endif + #ifdef DDS_MOVES thrp->fileMoves.SetName(DDS_MOVES_PREFIX + send); #endif @@ -406,27 +385,15 @@ void InitDebugFiles() void CloseDebugFiles() { - for (int thrId = 0; thrId < noOfThreads; thrId++) + for (unsigned thrId = 0; thrId < sysdep.NumThreads(); thrId++) { - ThreadData * thrp = memory.GetPtr(static_cast(thrId)); + ThreadData * thrp = memory.GetPtr(thrId); UNUSED(thrp); // To avoid compiler warning -#ifdef DDS_TIMING - thrp->fileTimerList.Close(); -#endif - #ifdef DDS_TOP_LEVEL thrp->fileTopLevel.Close(); #endif -#ifdef DDS_TT_STATS - thrp->fileTTstats.Close(); -#endif - -#ifdef DDS_MOVES - thrp->fileMoves.Close(); -#endif - #ifdef DDS_AB_STATS thrp->fileABstats.Close(); #endif @@ -435,6 +402,18 @@ void CloseDebugFiles() thrp->fileRetrieved.Close(); thrp->fileStored.Close(); #endif + +#ifdef DDS_TT_STATS + thrp->fileTTstats.Close(); +#endif + +#ifdef DDS_TIMING + thrp->fileTimerList.Close(); +#endif + +#ifdef DDS_MOVES + thrp->fileMoves.Close(); +#endif } } @@ -613,15 +592,15 @@ void STDCALL GetDDSInfo(DDSInfo * info) void FreeThreadMem() { - for (unsigned k = 0; k < static_cast(noOfThreads); k++) - memory.ResetThread(k); + for (unsigned thrId = 0; thrId < sysdep.NumThreads(); thrId++) + memory.ResetThread(thrId); } void STDCALL FreeMemory() { - for (unsigned k = 0; k < static_cast(noOfThreads); k++) - memory.ReturnThread(k); + for (unsigned thrId = 0; thrId < sysdep.NumThreads(); thrId++) + memory.ReturnThread(thrId); } diff --git a/src/Memory.h b/src/Memory.h index cc4ddf36..98a38284 100644 --- a/src/Memory.h +++ b/src/Memory.h @@ -13,7 +13,6 @@ #include #include "TransTable.h" - #include "TransTableS.h" #include "TransTableL.h" @@ -83,13 +82,18 @@ struct ThreadData Moves moves; +#ifdef DDS_TOP_LEVEL + File fileTopLevel; +#endif + #ifdef DDS_AB_STATS ABstats ABStats; File fileABstats; #endif -#ifdef DDS_MOVES - File fileMoves; +#ifdef DDS_AB_HITS + File fileRetrieved; + File fileStored; #endif #ifdef DDS_TT_STATS @@ -101,13 +105,8 @@ struct ThreadData File fileTimerList; #endif -#ifdef DDS_TOP_LEVEL - File fileTopLevel; -#endif - -#ifdef DDS_AB_HITS - File fileRetrieved; - File fileStored; +#ifdef DDS_MOVES + File fileMoves; #endif }; diff --git a/src/System.cpp b/src/System.cpp index 7d66d983..004f9c18 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -234,9 +234,7 @@ void System::GetHardware( int System::RegisterParams( const int nThreads, - const int mem_usable_MB, - const int mem_def_MB, - const int mem_max_MB) + const int mem_usable_MB) { // No upper limit -- caveat emptor. if (nThreads < 1) @@ -244,8 +242,6 @@ int System::RegisterParams( numThreads = nThreads; sysMem_MB = mem_usable_MB; - thrDef_MB = mem_def_MB; - thrMax_MB = mem_max_MB; return RETURN_NO_FAULT; } @@ -263,6 +259,24 @@ int System::RegisterRun( } +bool System::IsSingleThreaded() const +{ + return (preferredSystem == DDS_SYSTEM_THREAD_BASIC); +} + + +bool System::IsIMPL() const +{ + return (preferredSystem >= DDS_SYSTEM_THREAD_STLIMPL); +} + + +unsigned System::NumThreads() const +{ + return static_cast(numThreads); +} + + bool System::ThreadOK(const int thrId) const { return (thrId >= 0 && thrId < numThreads); @@ -757,8 +771,11 @@ string System::str(DDSInfo * info) const ss << left << setw(17) << "Memory max (MB)" << setw(16) << right << sysMem_MB << "\n"; - const string stm = to_string(thrDef_MB) + " to " + to_string(thrMax_MB); - ss << left << setw(17) << "Thread def (MB)" << + const string stm = to_string(THREADMEM_SMALL_DEF_MB) + "-" + + to_string(THREADMEM_SMALL_MAX_MB) + " / " + + to_string(THREADMEM_LARGE_DEF_MB) + "-" + + to_string(THREADMEM_LARGE_MAX_MB); + ss << left << setw(17) << "Threads (MB)" << setw(16) << right << stm << "\n"; System::GetCores(info->numCores); diff --git a/src/System.h b/src/System.h index f802747d..fd7e8fcc 100644 --- a/src/System.h +++ b/src/System.h @@ -87,14 +87,18 @@ class System int RegisterParams( const int nThreads, - const int mem_usable_MB, - const int mem_def_MB, - const int mem_max_MB); + const int mem_usable_MB); int RegisterRun( const RunMode r, const boards& bop); + bool IsSingleThreaded() const; + + bool IsIMPL() const; + + unsigned NumThreads() const; + bool ThreadOK(const int thrId) const; void GetHardware( diff --git a/test/dtest.cpp b/test/dtest.cpp index 45516ee2..e0ab94a8 100644 --- a/test/dtest.cpp +++ b/test/dtest.cpp @@ -20,13 +20,15 @@ using namespace std; int main(int argc, char * argv[]) { + if (argc >= 5) + SetThreading(threadingCode(argv[4])); + int nthreads = 0; if (argc >= 4) nthreads = atoi(argv[3]); SetMaxThreads(nthreads); - if (argc >= 5) - SetThreading(threadingCode(argv[4])); + SetResources(600, nthreads); DDSInfo info; GetDDSInfo(&info); From 672bff803200b79b9b971ffc504f991196429127 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 31 Mar 2018 20:53:20 +0200 Subject: [PATCH 103/132] Cleanup --- include/dll.h | 4 +-- include/portab.h | 10 +------- src/ABsearch.cpp | 46 +++++++++++++++++------------------ src/ABsearch.h | 8 +++--- src/Makefiles/Makefile_Visual | 22 +++++++---------- src/SolverIF.cpp | 7 +++--- 6 files changed, 42 insertions(+), 55 deletions(-) diff --git a/include/dll.h b/include/dll.h index 84efe02a..fb9394ff 100644 --- a/include/dll.h +++ b/include/dll.h @@ -368,8 +368,8 @@ struct DDSInfo // 4 = Boost, // 5 = STL, // 6 = TBB, - // 7 = STLIMPL (for_each), - // 8 = PPLIMPL (for_each), + // 7 = STLIMPL (for_each), experimental only + // 8 = PPLIMPL (for_each), experimental only int threading; // The actual number of threads configured diff --git a/include/portab.h b/include/portab.h index 40dad4bf..6507839d 100644 --- a/include/portab.h +++ b/include/portab.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2015 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -66,12 +66,4 @@ #define UNUSED(x) ((void)(true ? 0 : ((x), void(), 0))) #endif - -#if __cplusplus <= 199711L - #ifndef nullptr - // TODO - // #define nullptr NULL - #endif -#endif - #endif diff --git a/src/ABsearch.cpp b/src/ABsearch.cpp index 0f93b36c..f2c7c190 100644 --- a/src/ABsearch.cpp +++ b/src/ABsearch.cpp @@ -24,35 +24,35 @@ void Make3Simple( pos * posPoint, - unsigned short int trickCards[DDS_SUITS], - int depth, - moveType * mply, + unsigned short trickCards[DDS_SUITS], + const int depth, + moveType const * mply, ThreadData * thrp); void Undo0( pos * posPoint, - int depth, + const int depth, const moveType& mply, - ThreadData * thrp); + ThreadData const * thrp); void Undo0Simple( pos * posPoint, - int depth, + const int depth, const moveType& mply); void Undo1( pos * posPoint, - int depth, + const int depth, const moveType& mply); void Undo2( pos * posPoint, - int depth, + const int depth, const moveType& mply); void Undo3( pos * posPoint, - int depth, + const int depth, const moveType& mply); @@ -772,7 +772,7 @@ void Make2( void Make3( pos * posPoint, - unsigned short int trickCards[DDS_SUITS], + unsigned short trickCards[DDS_SUITS], const int depth, moveType const * mply, ThreadData * thrp) @@ -836,9 +836,9 @@ void Make3( void Make3Simple( pos * posPoint, - unsigned short int trickCards[DDS_SUITS], - int depth, - moveType * mply, + unsigned short trickCards[DDS_SUITS], + const int depth, + moveType const * mply, ThreadData * thrp) { const trickDataType& data = thrp->moves.GetTrickData((depth + 3) >> 2); @@ -871,9 +871,9 @@ void Make3Simple( void Undo0( pos * posPoint, - int depth, + const int depth, const moveType& mply, - ThreadData * thrp) + ThreadData const * thrp) { int h = handId(posPoint->first[depth], 3); int s = mply.suit; @@ -885,7 +885,7 @@ void Undo0( posPoint->length[h][s]++; // Changes that we now undo. - WinnersType * wp = &thrp->winners[ (depth + 3) >> 2]; + WinnersType const * wp = &thrp->winners[ (depth + 3) >> 2]; for (int n = 0; n < wp->number; n++) { @@ -900,7 +900,7 @@ void Undo0( void Undo0Simple( pos * posPoint, - int depth, + const int depth, const moveType& mply) { int h = handId(posPoint->first[depth], 3); @@ -914,7 +914,7 @@ void Undo0Simple( void Undo1( pos * posPoint, - int depth, + const int depth, const moveType& mply) { int h = posPoint->first[depth]; @@ -930,7 +930,7 @@ void Undo1( void Undo2( pos * posPoint, - int depth, + const int depth, const moveType& mply) { int h = handId(posPoint->first[depth], 1); @@ -946,7 +946,7 @@ void Undo2( void Undo3( pos * posPoint, - int depth, + const int depth, const moveType& mply) { int h = handId(posPoint->first[depth], 2); @@ -961,9 +961,9 @@ void Undo3( evalType Evaluate( - pos * posPoint, - int trump, - ThreadData * thrp) + pos const * posPoint, + const int trump, + ThreadData const * thrp) { int s, h, hmax = 0, count = 0, k = 0; unsigned short rmax = 0; diff --git a/src/ABsearch.h b/src/ABsearch.h index 08f41074..bf4e3515 100644 --- a/src/ABsearch.h +++ b/src/ABsearch.h @@ -61,14 +61,14 @@ void Make2( void Make3( pos * posPoint, - unsigned short int trickCards[DDS_SUITS], + unsigned short trickCards[DDS_SUITS], const int depth, moveType const * mply, ThreadData * thrp); evalType Evaluate( - pos * posPoint, - int trump, - ThreadData * thrp); + pos const * posPoint, + const int trump, + ThreadData const * thrp); #endif diff --git a/src/Makefiles/Makefile_Visual b/src/Makefiles/Makefile_Visual index 3318b559..41aced4a 100644 --- a/src/Makefiles/Makefile_Visual +++ b/src/Makefiles/Makefile_Visual @@ -17,8 +17,8 @@ # matters are CC_BOOST_INCL and CC_BOOST_LINK. # On my systems (there are two), they are here: -BOOST32_PATH1 = \User\sheins\boost_1_66_0_x32 -BOOST32_LIB1 = $(BOOST32_PATH1)\lib32-msvc-14.0 +BOOST32_PATH1 = \User\sheins\boost_1_66_0_x32_new +BOOST32_LIB1 = $(BOOST32_PATH1)\lib32-msvc-14.1 BOOST32_PATH2 = \Users\s.hein\Documents\Programs\boost_1_66_0_x32_14_1 BOOST32_LIB2 = $(BOOST32_PATH2)\lib32-msvc-14.1 @@ -33,11 +33,12 @@ CC_BOOST_LINK = /link /LIBPATH:$(BOOST32_LIB1) /LIBPATH:$(BOOST32_LIB2) # CC_THREADING. # GCD doesn't work on Windows. -THR_BOOST = /DDDS_THREADS_BOOST -THR_GCD = /DDDS_THREADS_GCD -THR_OPENMP = /DDDS_THREADS_OPENMP THR_WINAPI = /DDDS_THREADS_WINAPI +THR_OPENMP = /DDDS_THREADS_OPENMP +THR_GCD = /DDDS_THREADS_GCD +THR_BOOST = /DDDS_THREADS_BOOST THR_STL = /DDDS_THREADS_STL +THR_TBB = /DDDS_THREADS_TBB THR_STLIMPL = /DDDS_THREADS_STLIMPL THR_PPLIMPL = /DDDS_THREADS_PPLIMPL @@ -50,12 +51,7 @@ THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_WINAPI) \ THREAD_COMPILE = /openmp $(CC_BOOST_INCL) THREAD_LINK = $(CC_BOOST_LINK) -# 3. The small memory option, which causes DDS to consume a lot less -# memory and to run somewhat more slowly. - -SMALL_MEMORY = /DSMALL_MEMORY_OPTION - -# 4. Debugging options. (There are more granular options in debug.h.) +# 3. Debugging options. (There are more granular options in debug.h.) DEBUG_ALL = /DDDS_DEBUG_ALL TIMING = /DDDS_TIMING @@ -64,7 +60,7 @@ SCHEDULER = /DDDS_SCHEDULER # All that matters from no. 3 and no. 4 is the following. Here you # can add $(SMALL_MEMORY) etc. -DDS_BEHAVIOR = +DDS_BEHAVIOR = # ----------------------- OFTEN OK ------------------------------ @@ -103,7 +99,7 @@ WARN_FLAGS = \ # If you don't have /std:c++17, you won't get THR_STLIMPL. -COMPILE_FLAGS = /O2 /Oi /Ot /Oy /GL /EHs /std:c++17 \ +COMPILE_FLAGS = /O2 /Oi /Ot /Oy /Ox /GL /EHs /std:c++17 \ $(WARN_FLAGS) \ $(DDS_BEHAVIOR) $(THREAD_COMPILE) $(THREADING) diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 85924dde..6bd69933 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -11,10 +11,9 @@ #include #include -#include "dds.h" +#include "SolverIF.h" #include "Init.h" #include "ABsearch.h" -#include "SolverIF.h" #include "TimerList.h" #include "System.h" #include "Scheduler.h" @@ -93,7 +92,7 @@ int STDCALL SolveBoard( int SolveBoardInternal( - struct ThreadData * thrp, + ThreadData * thrp, const deal& dl, const int target, const int solutions, @@ -657,7 +656,7 @@ int SolveBoardInternal( int SolveSameBoard( - struct ThreadData * thrp, + ThreadData * thrp, const deal& dl, futureTricks * futp, const int hint) From daa0dcbd345f0364aaaccf3de52c94012a77c6f7 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 31 Mar 2018 21:41:29 +0200 Subject: [PATCH 104/132] TransTableL output fixed --- src/Init.cpp | 3 +- src/SolverIF.cpp | 22 +++++++++---- src/TransTableL.cpp | 78 +++++++++++++++++++++++++-------------------- src/TransTableL.h | 2 ++ 4 files changed, 63 insertions(+), 42 deletions(-) diff --git a/src/Init.cpp b/src/Init.cpp index d9602861..6c24ae8f 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -164,11 +164,12 @@ void STDCALL SetResources( memory.Resize(static_cast(noOfThreads), DDS_TT_SMALL, THREADMEM_SMALL_DEF_MB, THREADMEM_SMALL_MAX_MB); + InitDebugFiles(); + if (! _initialized) { _initialized = 1; InitConstants(); - InitDebugFiles(); } } diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 6bd69933..f70abc1d 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -625,11 +625,13 @@ int SolveBoardInternal( #ifdef DDS_TT_STATS // These are for the large TT -- empty if not. - // thrp->transTable->PrintAllSuits(); - // thrp->transTable->PrintEntries(10, 0); + // thrp->transTable->PrintAllSuits(thrp->fileTTstats.GetStream()); + // thrp->transTable->PrintAllSuitStats(thrp->fileTTstats.GetStream()); + // thrp->transTable->PrintAllEntries(thrp->fileTTstats.GetStream()); + // thrp->transTable->PrintAllEntryStats(thrp->fileTTstats.GetStream()); + thrp->transTable->PrintSummarySuitStats(thrp->fileTTstats.GetStream()); thrp->transTable->PrintSummaryEntryStats(thrp->fileTTstats.GetStream()); - // thrp->transTable->PrintPageSummary(); #endif #ifdef DDS_MOVES @@ -642,9 +644,7 @@ int SolveBoardInternal( SOLVER_DONE: - thrp->memUsed = thrp->transTable->MemoryInUse() + - ThreadMemoryUsed(); - + thrp->memUsed = thrp->transTable->MemoryInUse() + ThreadMemoryUsed(); futp->nodes = thrp->trickNodes; #ifdef DDS_MEMORY_LEAKS_WIN32 @@ -740,6 +740,11 @@ int SolveSameBoard( #ifdef DDS_TT_STATS // These are for the large TT -- empty if not. + // thrp->transTable->PrintAllSuits(thrp->fileTTstats.GetStream()); + // thrp->transTable->PrintAllSuitStats(thrp->fileTTstats.GetStream()); + // thrp->transTable->PrintAllEntries(thrp->fileTTstats.GetStream()); + // thrp->transTable->PrintAllEntryStats(thrp->fileTTstats.GetStream()); + thrp->transTable->PrintSummarySuitStats(thrp->fileTTstats.GetStream()); thrp->transTable->PrintSummaryEntryStats(thrp->fileTTstats.GetStream()); #endif @@ -893,6 +898,11 @@ int AnalyseLaterBoard( #ifdef DDS_TT_STATS // These are for the large TT -- empty if not. + // thrp->transTable->PrintAllSuits(thrp->fileTTstats.GetStream()); + // thrp->transTable->PrintAllSuitStats(thrp->fileTTstats.GetStream()); + // thrp->transTable->PrintAllEntries(thrp->fileTTstats.GetStream()); + // thrp->transTable->PrintAllEntryStats(thrp->fileTTstats.GetStream()); + thrp->transTable->PrintSummarySuitStats(thrp->fileTTstats.GetStream()); thrp->transTable->PrintSummaryEntryStats(thrp->fileTTstats.GetStream()); #endif diff --git a/src/TransTableL.cpp b/src/TransTableL.cpp index b3e0466b..9da61abf 100644 --- a/src/TransTableL.cpp +++ b/src/TransTableL.cpp @@ -1024,8 +1024,8 @@ void TransTableL::PrintNodeValues( cardSuit[3] << cardRank[15-static_cast(np.leastWin[3])] << "\n"; fout << setw(16) << left << "Bounds" << - np.lbound << " to " << - np.ubound << " tricks\n"; + to_string(np.lbound) << " to " << + to_string(np.ubound) << " tricks\n"; fout << setw(16) << left << "Best move" << cardSuit[ static_cast(np.bestMoveSuit) ] << @@ -1127,19 +1127,20 @@ void TransTableL::DistToLengths( } +string TransTableL::SingleLenToStr(const unsigned char len[]) const +{ + return to_string(len[0]) + "=" + to_string(len[1]) + "=" + + to_string(len[2]) + "=" + to_string(len[3]); +} + + string TransTableL::LenToStr( const unsigned char len[DDS_HANDS][DDS_SUITS]) const { - stringstream ss; - ss << len[0][0] << "=" << len[0][1] << "=" << - len[0][2] << "=" << len[0][3] << " " << - len[1][0] << "=" << len[1][1] << "=" << - len[1][2] << "=" << len[1][3] << " " << - len[2][0] << "=" << len[2][1] << "=" << - len[2][2] << "=" << len[2][3] << " " << - len[3][0] << "=" << len[3][1] << "=" << - len[3][2] << "=" << len[3][3]; - return ss.str(); + return TransTableL::SingleLenToStr(len[0]) + " " + + TransTableL::SingleLenToStr(len[1]) + " " + + TransTableL::SingleLenToStr(len[2]) + " " + + TransTableL::SingleLenToStr(len[3]); } @@ -1153,11 +1154,11 @@ void TransTableL::PrintSuits( unsigned char len[DDS_HANDS][DDS_SUITS]; fout << setw(4) << left << "Key" << - setw(3) << "No" << - setw(9) << right << players[0] << - setw(9) << players[1] << - setw(9) << players[2] << - setw(9) << players[3] << "\n"; + setw(3) << right << "No" << + setw(8) << right << players[0] << + setw(8) << players[1] << + setw(8) << players[2] << + setw(8) << players[3] << "\n"; for (int hashkey = 0; hashkey < 256; hashkey++) { @@ -1169,7 +1170,7 @@ void TransTableL::PrintSuits( { if (i == 0) fout << "0x" << setw(2) << hex << hashkey << - setw(3) << right << dp->nextNo << " "; + setw(3) << right << dec << dp->nextNo << " "; else fout << setw(8) << ""; @@ -1263,7 +1264,7 @@ void TransTableL::PrintHist( fout << setw(7) << left << "Entries" << setw(6) << right << count << "\n"; - if (count) + if (count > 1) { fout << setw(7) << left << "Full" << setw(6) << right << num_wraps << "\n"; @@ -1272,8 +1273,9 @@ void TransTableL::PrintHist( fout << setw(7) << left << "Average" << setw(6) << right << setprecision(2) << fixed << mean << "\n"; - double var = prod_sumsq / - static_cast(count - mean * mean); + double var = (prod_sumsq - count*mean*mean) / + static_cast(count-1); + if (var >= 0.) fout << setw(7) << left << "Std.dev" << setw(6) << right << setprecision(2) << fixed << sqrt(var) << "\n"; @@ -1408,11 +1410,12 @@ void TransTableL::PrintSummarySuitStats(ofstream& fout) const count, prod_sum, prod_sumsq, max_len, DISTS_PER_ENTRY); double mean = 0., var = 0.; - if (count > 0) + if (count > 1) { mean = prod_sum / static_cast(count); - var = prod_sumsq / - static_cast(count - mean * mean); + + var = (prod_sumsq - count*mean*mean) / + static_cast(count-1); if (var < 0.) var = 0.; } @@ -1480,14 +1483,16 @@ void TransTableL::PrintEntriesBlock( winBlockType const * bp, const unsigned char lengths[DDS_HANDS][DDS_SUITS]) const { - fout << bp->nextMatchNo << " matches for " << - TransTableL::LenToStr(lengths) << "\n"; - fout << string(71, '=') << "\n\n"; + string st = to_string(bp->nextMatchNo) + + " matches for " + TransTableL::LenToStr(lengths); + + fout << st << "\n" << string(st.size(), '=') << "\n\n"; for (int j = 0; j < bp->nextMatchNo; j++) { - fout << "Entry number " << j+1 << "\n"; - fout << string(16, '-') << "\n\n"; + st = "Entry number " + to_string(j+1); + fout << st << "\n"; + fout << string(st.size(), '-') << "\n\n"; TransTableL::PrintMatch(fout, bp->list[j], lengths); } } @@ -1618,9 +1623,10 @@ void TransTableL::PrintAllEntries(ofstream& fout) const { for (int hand = 0; hand < DDS_HANDS; hand++) { - fout << "Entries, trick " << trick << ", hand " << - players[hand] << "\n"; - fout << string(30, '=') << "\n\n"; + const string st = "Entries, trick " + to_string(trick) + + ", hand " + players[hand]; + fout << st << "\n"; + fout << string(st.size(), '=') << "\n\n"; TransTableL::PrintEntries(fout, trick, hand); } } @@ -1790,8 +1796,10 @@ void TransTableL::PrintSummaryEntryStats(ofstream& fout) const cumMemory += TransTableL::EffectOfBlockBound(hist, 20); double mean = prod_sum / static_cast(count); - double var = prod_sumsq / - static_cast(count - mean * mean); + double var = (count > 1 ? + (prod_sumsq - count*mean*mean) / + static_cast(count-1) : 0.); + if (var < 0.) var = 0.; @@ -1823,7 +1831,7 @@ void TransTableL::PrintSummaryEntryStats(ofstream& fout) const if (cumCount) fout << setw(16) << left << "Fullness" << setw(7) << right << setprecision(2) << fixed << - 100. * cumProd / (BLOCKS_PER_ENTRY * cumCount) << "&\n"; + 100. * cumProd / (BLOCKS_PER_ENTRY * cumCount) << "%\n"; fout << "\n"; } diff --git a/src/TransTableL.h b/src/TransTableL.h index 4f1bd379..7a460e10 100644 --- a/src/TransTableL.h +++ b/src/TransTableL.h @@ -185,6 +185,8 @@ class TransTableL: public TransTable const int handDist[], unsigned char lengths[DDS_HANDS][DDS_SUITS]) const; + string SingleLenToStr(const unsigned char length[]) const; + string LenToStr( const unsigned char lengths[DDS_HANDS][DDS_SUITS]) const; From a386cf91c9ce2eefa7b6a176c19ff712e8511367 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sat, 31 Mar 2018 22:05:45 +0200 Subject: [PATCH 105/132] Fixed debug output of TransTableS --- src/SolverIF.cpp | 12 ++++++++++++ src/TransTableS.cpp | 46 +++++++++++++++++++++++++++------------------ 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index f70abc1d..eee5b8cd 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -632,6 +632,10 @@ int SolveBoardInternal( thrp->transTable->PrintSummarySuitStats(thrp->fileTTstats.GetStream()); thrp->transTable->PrintSummaryEntryStats(thrp->fileTTstats.GetStream()); + + // These are for the small TT -- empty if not. + thrp->transTable->PrintNodeStats(thrp->fileTTstats.GetStream()); + thrp->transTable->PrintResetStats(thrp->fileTTstats.GetStream()); #endif #ifdef DDS_MOVES @@ -747,6 +751,10 @@ int SolveSameBoard( thrp->transTable->PrintSummarySuitStats(thrp->fileTTstats.GetStream()); thrp->transTable->PrintSummaryEntryStats(thrp->fileTTstats.GetStream()); + + // These are for the small TT -- empty if not. + thrp->transTable->PrintNodeStats(thrp->fileTTstats.GetStream()); + thrp->transTable->PrintResetStats(thrp->fileTTstats.GetStream()); #endif #ifdef DDS_MOVES @@ -905,6 +913,10 @@ int AnalyseLaterBoard( thrp->transTable->PrintSummarySuitStats(thrp->fileTTstats.GetStream()); thrp->transTable->PrintSummaryEntryStats(thrp->fileTTstats.GetStream()); + + // These are for the small TT -- empty if not. + thrp->transTable->PrintNodeStats(thrp->fileTTstats.GetStream()); + thrp->transTable->PrintResetStats(thrp->fileTTstats.GetStream()); #endif #ifdef DDS_MOVES diff --git a/src/TransTableS.cpp b/src/TransTableS.cpp index b2729cc6..6f17f4fe 100644 --- a/src/TransTableS.cpp +++ b/src/TransTableS.cpp @@ -7,6 +7,8 @@ See LICENSE and README. */ +#include + #include "TransTableS.h" #include "debug.h" @@ -53,13 +55,6 @@ void TransTableS::SetConstants() TTlowestRank[ind] = TTlowestRank[ind ^ topBitRank] - 1; } - resetText.resize(TT_RESET_SIZE); - resetText[TT_RESET_UNKNOWN] = "Unknown reason"; - resetText[TT_RESET_TOO_MANY_NODES] = "Too many nodes"; - resetText[TT_RESET_NEW_DEAL] = "New deal"; - resetText[TT_RESET_NEW_TRUMP] = "New trump"; - resetText[TT_RESET_MEMORY_EXHAUSTED] = "Memory exhausted"; - resetText[TT_RESET_FREE_MEMORY] = "Free thread memory"; } @@ -94,6 +89,15 @@ void TransTableS::Init(const int handLookup[][15]) (aggp[ind].winMask[s] >> 2) | (3 << 24); } } + + resetText.resize(TT_RESET_SIZE); + resetText[TT_RESET_UNKNOWN] = "Unknown reason"; + resetText[TT_RESET_TOO_MANY_NODES] = "Too many nodes"; + resetText[TT_RESET_NEW_DEAL] = "New deal"; + resetText[TT_RESET_NEW_TRUMP] = "New trump"; + resetText[TT_RESET_MEMORY_EXHAUSTED] = "Memory exhausted"; + resetText[TT_RESET_FREE_MEMORY] = "Free thread memory"; + return; } @@ -197,12 +201,6 @@ void TransTableS::MakeTT() for (int k = 1; k <= 13; k++) aggrLenSets[k] = 0; -#if defined(DDS_TT_STATS) - // TODO: Needs to end up in the right file. - // fprintf(fp, "Report of generated PosSearch nodes per trick level.\n"); - // fprintf(fp, "Trick level 13 is highest level with all 52 cards.\n"); - // fprintf(fp, "---------------------------------------------------\n"); -#endif statsResets.noOfResets = 0; for (int k = 0; k <= 5; k++) statsResets.aggrResets[k] = 0; @@ -927,17 +925,29 @@ nodeCardsType const * TransTableS::FindSOP( void TransTableS::PrintNodeStats(ofstream& fout) const { + fout << "Report of generated PosSearch nodes per trick level.\n"; + fout << "Trick level 13 is highest level with all 52 cards.\n"; + fout << string(51, '-') << "\n"; + + fout << setw(5) << "Trick" << + setw(14) << right << "Created nodes" << "\n"; + for (int k = 13; k > 0; k--) - fout << "Trick " << k << ": Created nodes: " << - static_cast(aggrLenSets[k - 1]) << "\n\n"; + fout << setw(5) << k << setw(14) << aggrLenSets[k-1] << "\n"; + + fout << endl; } void TransTableS::PrintResetStats(ofstream& fout) const { - fout << "Total no of Resets: " << statsResets.noOfResets << "\n\n"; + fout << "Total no. of resets: " << statsResets.noOfResets << "\n" << endl; + + fout << setw(18) << left << "Reason" << + setw(6) << right << "Count" << "\n"; - for (int k = 0; k <= 5; k++) - fout << resetText[k] << ": " << statsResets.aggrResets[k] << "\n\n"; + for (int k = 0; k < TT_RESET_SIZE; k++) + fout << setw(18) << left << resetText[k] << + setw(6) << right << statsResets.aggrResets[k] << "\n"; } From ad049eb445b9d887f93f76504de0fd97915375d0 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 1 Apr 2018 10:05:38 +0200 Subject: [PATCH 106/132] Worked on DealerPar --- src/DealerPar.cpp | 359 ++++++++++++++++++++++---------------------- src/Init.cpp | 2 +- test/dtest.cpp | 2 +- test/testcommon.cpp | 6 + 4 files changed, 189 insertions(+), 180 deletions(-) diff --git a/src/DealerPar.cpp b/src/DealerPar.cpp index b4343578..a2fded86 100644 --- a/src/DealerPar.cpp +++ b/src/DealerPar.cpp @@ -8,10 +8,14 @@ */ +#include +#include #include #include "dds.h" +using namespace std; + /* First index: 0 nonvul, 1 vul. Second index: tricks down */ int DOUBLED_SCORES[2][14] = @@ -65,7 +69,7 @@ int FLOOR_CONTRACT[36] = 31, 32, 33, 34, 35 }; -char NUMBER_TO_CONTRACT[36][3] = +const vector NUMBER_TO_CONTRACT = { "0", "1C", "1D", "1H", "1S", "1N", @@ -77,7 +81,7 @@ char NUMBER_TO_CONTRACT[36][3] = "7C", "7D", "7H", "7S", "7N" }; -char NUMBER_TO_PLAYER[4][2] = { "N", "E", "S", "W" }; +const vector NUMBER_TO_PLAYER = { "N", "E", "S", "W" }; /* First index is vul: none, both, NS, EW. Second index is vul (0, 1) for NS and then EW. */ @@ -114,53 +118,51 @@ struct list_type void survey_scores( - ddTableResults * tablep, - int dealer, - int vul_by_side[2], - data_type * data, - int * num_candidates, - list_type list[2][5]); + const ddTableResults& table, + const int dealer, + const int vul_by_side[2], + data_type& data, + int& num_candidates, + list_type list[2][DDS_STRAINS]); void best_sacrifice( - ddTableResults * tablep, - int side, - int no, - int dno, - int dealer, - list_type list[2][5], + const ddTableResults& table, + const int side, + const int no, + const int dno, + const int dealer, + const list_type list[2][5], int sacr[5][5], - int * best_down); + int& best_down); void sacrifices_as_text( - ddTableResults * tablep, - int side, - int dealer, - int best_down, - int no_decl, - int dno, - list_type list[2][5], - int sacr[5][5], + const ddTableResults& table, + const int side, + const int dealer, + const int best_down, + const int no_decl, + const int dno, + const list_type list[2][5], + const int sacr[5][5], char results[10][10], - int * res_no); + int& res_no); void reduce_contract( - int * no, - int down, - int * plus); + int& no, + const int down, + int& plus); -void contract_as_text( - ddTableResults * tablep, - int side, - int no, - int dno, - int down, - char str[10]); +string contract_as_text( + const ddTableResults& table, + const int side, + const int no, + const int dno, + const int down); -void sacrifice_as_text( - int no, - int pno, - int down, - char str[10]); +string sacrifice_as_text( + const int no, + const int pno, + const int down); @@ -173,9 +175,9 @@ int STDCALL DealerPar( /* dealer 0: North 1: East 2: South 3: West */ /* vulnerable 0: None 1: Both 2: NS 3: EW */ - int * vul_by_side = VUL_LOOKUP[vulnerable]; + int const * vul_by_side = VUL_LOOKUP[vulnerable]; data_type data; - list_type list[2][5]; + list_type list[2][DDS_STRAINS]; /* First we find the side entitled to a plus score (primacy) and some statistics for each constructively bid (undoubled) @@ -183,13 +185,13 @@ int STDCALL DealerPar( int num_cand; - survey_scores(tablep, dealer, vul_by_side, &data, &num_cand, list); + survey_scores(* tablep, dealer, vul_by_side, data, num_cand, list); int side = data.primacy; if (side == -1) { presp->number = 1; - sprintf(presp->contracts[0], "%s", "pass"); + strcpy(presp->contracts[0], "pass"); return RETURN_NO_FAULT; } @@ -200,10 +202,11 @@ int STDCALL DealerPar( int down = 0; int sac_found = 0; - int type[5], sac_gap[5]; + int type[DDS_STRAINS], sac_gap[DDS_STRAINS]; int best_down = 0; - int sacr[5][5] = { {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0} + int sacr[DDS_STRAINS][DDS_STRAINS] = + { {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0} }; for (int n = 0; n < num_cand; n++) @@ -212,7 +215,7 @@ int STDCALL DealerPar( int dno = lists[n].dno; int target = DOWN_TARGET[no][vul_no]; - best_sacrifice(tablep, side, no, dno, dealer, list, sacr, &down); + best_sacrifice(* tablep, side, no, dno, dealer, list, sacr, down); if (down <= target) { @@ -253,10 +256,10 @@ int STDCALL DealerPar( { if (type[n] != 1 || lists[n].score != best_plus) continue; int no = lists[n].no, plus; - reduce_contract(&no, sac_gap[n], &plus); + reduce_contract(no, sac_gap[n], plus); - contract_as_text(tablep, side, no, lists[n].dno, - plus, presp->contracts[res_no]); + strcpy(presp->contracts[res_no], + contract_as_text(* tablep, side, no, lists[n].dno, plus).c_str()); res_no++; } } @@ -270,9 +273,9 @@ int STDCALL DealerPar( for (int n = 0; n < num_cand; n++) { if (type[n] != 0 || lists[n].down != best_down) continue; - sacrifices_as_text(tablep, side, dealer, best_down, + sacrifices_as_text(* tablep, side, dealer, best_down, lists[n].no, lists[n].dno, list, sacr, - presp->contracts, &res_no); + presp->contracts, res_no); } } presp->number = res_no; @@ -281,12 +284,12 @@ int STDCALL DealerPar( void survey_scores( - ddTableResults * tablep, - int dealer, - int vul_by_side[2], - data_type * data, - int * num_candidates, - list_type list[2][5]) + const ddTableResults& table, + const int dealer, + const int vul_by_side[2], + data_type& data, + int& num_candidates, + list_type list[2][DDS_STRAINS]) { /* When this is done, data has added the following entries: @@ -315,15 +318,15 @@ void survey_scores( int dearest_making_no = 0; int dearest_score = 0; - for (int dno = 0; dno <= 4; dno++) + for (int dno = 0; dno < DDS_STRAINS; dno++) { list_type * slist = &list[side][dno]; - int * t = tablep->resTable[ DENOM_ORDER[dno] ]; - int a = t[side]; - int b = t[side + 2]; - int best = (a > b ? a : b); + int const * t = table.resTable[ DENOM_ORDER[dno] ]; + const int a = t[side]; + const int b = t[side + 2]; + const int best = (a > b ? a : b); - int no = 5 * (best - 7) + dno + 1; + const int no = 5 * (best - 7) + dno + 1; slist->no = no; /* May be negative! */ if (best < 7) @@ -332,7 +335,7 @@ void survey_scores( continue; } - int score = SCORES[no][ vul_by_side[side] ]; + const int score = SCORES[no][ vul_by_side[side] ]; slist->score = score; slist->dno = dno; slist->tricks = best; @@ -353,15 +356,15 @@ void survey_scores( highest_making_no = no; } } - data_type * sside = &stats[side]; - sside->highest_making_no = highest_making_no; - sside->dearest_making_no = dearest_making_no; - sside->dearest_score = dearest_score; + data_type& sside = stats[side]; + sside.highest_making_no = highest_making_no; + sside.dearest_making_no = dearest_making_no; + sside.dearest_score = dearest_score; } int primacy = 0; - int s0 = stats[0].highest_making_no; - int s1 = stats[1].highest_making_no; + const int s0 = stats[0].highest_making_no; + const int s1 = stats[1].highest_making_no; if (s0 > s1) { primacy = 0; @@ -372,19 +375,20 @@ void survey_scores( } else if (s0 == 0) { - data->primacy = -1; + data.primacy = -1; return; } else { /* Special case, depends who can bid it first. */ - int dno = (s0 - 1) % 5; - int t_max = list[0][dno].tricks; - int * t = tablep->resTable[ DENOM_ORDER[dno] ]; + const int dno = (s0 - 1) % 5; + const int t_max = list[0][dno].tricks; + int const * t = table.resTable[ DENOM_ORDER[dno] ]; for (int pno = dealer; pno <= dealer + 3; pno++) { - if (t[pno % 4] != t_max) continue; + if (t[pno % 4] != t_max) + continue; primacy = pno % 2; break; } @@ -392,26 +396,27 @@ void survey_scores( data_type * sside = &stats[primacy]; - int dm_no = sside->dearest_making_no; - data->primacy = primacy; - data->highest_making_no = sside->highest_making_no; - data->dearest_making_no = dm_no; - data->dearest_score = sside->dearest_score; + const int dm_no = sside->dearest_making_no; + data.primacy = primacy; + data.highest_making_no = sside->highest_making_no; + data.dearest_making_no = dm_no; + data.dearest_score = sside->dearest_score; - int vul_primacy = vul_by_side[primacy]; - int vul_other = vul_by_side[1 - primacy]; - data->vul_no = VUL_TO_NO[vul_primacy][vul_other]; + const int vul_primacy = vul_by_side[primacy]; + const int vul_other = vul_by_side[1 - primacy]; + data.vul_no = VUL_TO_NO[vul_primacy][vul_other]; /* Sort the scores in descending order of contract number, i.e. first by score and second by contract number in case the score is the same. Primitive bubble sort... */ - int n = 5; + int n = DDS_STRAINS; do { int new_n = 0; for (int i = 1; i < n; i++) { - if (list[primacy][i - 1].no > list[primacy][i].no) continue; + if (list[primacy][i - 1].no > list[primacy][i].no) + continue; list_type temp = list[primacy][i - 1]; list[primacy][i - 1] = list[primacy][i]; @@ -423,53 +428,57 @@ void survey_scores( } while (n > 0); - *num_candidates = 5; - for (n = 0; n <= 4; n++) + num_candidates = DDS_STRAINS; + for (n = 0; n < DDS_STRAINS; n++) { - if (list[primacy][n].no < dm_no) (*num_candidates)--; + if (list[primacy][n].no < dm_no) + num_candidates--; } } void best_sacrifice( - ddTableResults * tablep, - int side, - int no, - int dno, - int dealer, - list_type list[2][5], - int sacr_table[5][5], - int * best_down) + const ddTableResults& table, + const int side, + const int no, + const int dno, + const int dealer, + const list_type list[2][DDS_STRAINS], + int sacr_table[DDS_STRAINS][DDS_STRAINS], + int& best_down) { - int other = 1 - side; - list_type * sacr_list = list[other]; - *best_down = BIGNUM; + const int other = 1 - side; + list_type const * sacr_list = list[other]; + best_down = BIGNUM; for (int eno = 0; eno <= 4; eno++) { - list_type sacr = sacr_list[eno]; + const list_type sacr = sacr_list[eno]; int down = BIGNUM; if (eno == dno) { - int t_max = static_cast((no + 34) / 5); - int * t = tablep->resTable[ DENOM_ORDER[dno] ]; + const int t_max = static_cast((no + 34) / 5); + int const * t = table.resTable[ DENOM_ORDER[dno] ]; int incr_flag = 0; for (int pno = dealer; pno <= dealer + 3; pno++) { - int diff = t_max - t[pno % 4]; - int s = pno % 2; + const int diff = t_max - t[pno % 4]; + const int s = pno % 2; if (s == side) { - if (diff == 0) incr_flag = 1; + if (diff == 0) + incr_flag = 1; } else { - int local = diff + incr_flag; - if (local < down) down = local; + const int local = diff + incr_flag; + if (local < down) + down = local; } } - if (sacr.no + 5 * down > 35) down = BIGNUM; + if (sacr.no + 5 * down > 35) + down = BIGNUM; } else { @@ -477,25 +486,26 @@ void best_sacrifice( if (sacr.no + 5 * down > 35) down = BIGNUM; } sacr_table[dno][eno] = down; - if (down < *best_down) *best_down = down; + if (down < best_down) + best_down = down; } } void sacrifices_as_text( - ddTableResults * tablep, - int side, - int dealer, - int best_down, - int no_decl, - int dno, - list_type list[2][5], - int sacr[5][5], + const ddTableResults& table, + const int side, + const int dealer, + const int best_down, + const int no_decl, + const int dno, + const list_type list[2][DDS_STRAINS], + const int sacr[DDS_STRAINS][DDS_STRAINS], char results[10][10], - int * res_no) + int& res_no) { - int other = 1 - side; - list_type * sacr_list = list[other]; + const int other = 1 - side; + list_type const * sacr_list = list[other]; for (int eno = 0; eno <= 4; eno++) { @@ -504,15 +514,15 @@ void sacrifices_as_text( if (eno != dno) { - int no_sac = sacr_list[eno].no + 5 * best_down; - contract_as_text(tablep, other, no_sac, eno, -best_down, - results[*res_no]); - (*res_no)++; + const int no_sac = sacr_list[eno].no + 5 * best_down; + strcpy(results[res_no], + contract_as_text(table, other, no_sac, eno, -best_down).c_str()); + res_no++; continue; } - int t_max = static_cast((no_decl + 34) / 5); - int * t = tablep->resTable[ DENOM_ORDER[dno] ]; + const int t_max = static_cast((no_decl + 34) / 5); + int const * t = table.resTable[ DENOM_ORDER[dno] ]; int incr_flag = 0; int p_hit = 0; int pno_list[2], sac_list[2]; @@ -535,37 +545,37 @@ void sacrifices_as_text( } } - int ns0 = sac_list[0]; + const int ns0 = sac_list[0]; if (p_hit == 1) { - sacrifice_as_text(ns0, pno_list[0], best_down, - results[*res_no]); - (*res_no)++; + strcpy(results[res_no], + sacrifice_as_text(ns0, pno_list[0], best_down).c_str()); + res_no++; continue; } - int ns1 = sac_list[1]; + const int ns1 = sac_list[1]; if (ns0 == ns1) { /* Both players */ - contract_as_text(tablep, other, ns0, eno, -best_down, - results[*res_no]); - (*res_no)++; + strcpy(results[res_no], + contract_as_text(table, other, ns0, eno, -best_down).c_str()); + res_no++; continue; } - int p = (ns0 < ns1 ? 0 : 1); - sacrifice_as_text(sac_list[p], pno_list[p], best_down, - results[*res_no]); - (*res_no)++; + const int p = (ns0 < ns1 ? 0 : 1); + strcpy(results[res_no], + sacrifice_as_text(sac_list[p], pno_list[p], best_down).c_str()); + res_no++; } } void reduce_contract( - int * no, - int sac_gap, - int * plus) + int& no, + const int sac_gap, + int& plus) { /* Could be that we found 4C just making, but it would be enough to bid 2C +2. But we don't want to bid so low that @@ -574,12 +584,12 @@ void reduce_contract( if (sac_gap >= -1) { /* No scope to reduce. */ - *plus = 0; + plus = 0; return; } /* This is the lowest contract that we could reduce to. */ - int flr = FLOOR_CONTRACT[*no]; + int flr = FLOOR_CONTRACT[no]; /* As such, declarer could reduce the contract by down+1 levels (where down is negative) and still the opponent's sacrifice @@ -587,47 +597,40 @@ void reduce_contract( this can go wrong: 1M+1 and 2M= both pay +90, but 3m*-2 is a bad sacrifice against 2M=, while 2m*-1 would be a good sacrifice against 1M+1. */ - int no_sac_level = *no + 5 * (sac_gap + 1); + int no_sac_level = no + 5 * (sac_gap + 1); int new_no = (no_sac_level > flr ? no_sac_level : flr); - *plus = (*no - new_no) / 5; - *no = new_no; + plus = (no - new_no) / 5; + no = new_no; } -void contract_as_text( - ddTableResults * tablep, - int side, - int no, - int dno, - int delta, - char str[10]) +string contract_as_text( + const ddTableResults& table, + const int side, + const int no, + const int dno, + const int delta) { - int * t = tablep->resTable[ DENOM_ORDER[dno] ]; - int ta = t[side]; - int tb = t[side + 2]; - int t_max = (ta > tb ? ta : tb); - - char d[4] = ""; - if (delta != 0) - sprintf(d, "%+d", delta); - - sprintf(str, "%s%s%s%s%s", - NUMBER_TO_CONTRACT[no], - (delta < 0 ? "*-" : "-"), - (ta == t_max ? NUMBER_TO_PLAYER[side] : ""), - (tb == t_max ? NUMBER_TO_PLAYER[side + 2] : ""), - d); + int const * t = table.resTable[ DENOM_ORDER[dno] ]; + const int ta = t[side]; + const int tb = t[side + 2]; + const int t_max = (ta > tb ? ta : tb); + + return NUMBER_TO_CONTRACT[no] + + (delta < 0 ? "*-" : "-") + + (ta == t_max ? NUMBER_TO_PLAYER[side] : "") + + (tb == t_max ? NUMBER_TO_PLAYER[side + 2] : "") + + (delta > 0 ? "+" : "") + + (delta == 0 ? "" : to_string(delta)); } -void sacrifice_as_text( - int no, - int pno, - int down, - char str[10]) +string sacrifice_as_text( + const int no, + const int pno, + const int down) { - sprintf(str, "%s*-%s-%d", - NUMBER_TO_CONTRACT[no], - NUMBER_TO_PLAYER[pno], - down); + return NUMBER_TO_CONTRACT[no] + "-" + + NUMBER_TO_PLAYER[pno] + "-" + + to_string(down); } diff --git a/src/Init.cpp b/src/Init.cpp index 6c24ae8f..156063b7 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -135,7 +135,7 @@ void STDCALL SetResources( // We don't even have enough memory for only small threads. // We'll limit the number of threads. noOfThreads = static_cast(memMaxMB / - static_cast(thrMax)); + static_cast(THREADMEM_SMALL_MAX_MB)); noOfLargeThreads = 0; noOfSmallThreads = noOfThreads; } diff --git a/test/dtest.cpp b/test/dtest.cpp index e0ab94a8..63545b99 100644 --- a/test/dtest.cpp +++ b/test/dtest.cpp @@ -28,7 +28,7 @@ int main(int argc, char * argv[]) nthreads = atoi(argv[3]); SetMaxThreads(nthreads); - SetResources(600, nthreads); + SetResources(1800, nthreads); DDSInfo info; GetDDSInfo(&info); diff --git a/test/testcommon.cpp b/test/testcommon.cpp index a98c885f..39218b7e 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -1133,6 +1133,7 @@ bool loop_dealerpar( parResultsDealer presp; + timer.start(number); for (int i = 0; i < number; i++) { for (int j = 0; j < input_number; j++) @@ -1152,6 +1153,11 @@ bool loop_dealerpar( printf("loop_dealerpar i %d: Difference\n", i); } } + timer.end(); + +#ifdef BATCHTIMES + timer.printRunning(number, number); +#endif return true; } From d4d564b0ec0eca9585c1c4b40fdb70c85b9c277d Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 1 Apr 2018 10:38:52 +0200 Subject: [PATCH 107/132] Used C++ instead of own Min, Max macros --- hands/README | 6 ++++++ src/Init.cpp | 8 +++++--- src/LaterTricks.cpp | 10 ++++++---- src/Par.cpp | 8 ++++---- src/QuickTricks.cpp | 30 ++++++++++++++++-------------- src/dds.h | 3 --- test/testcommon.cpp | 35 ++++++++++++++++++++++++++++++----- 7 files changed, 67 insertions(+), 33 deletions(-) diff --git a/hands/README b/hands/README index 15329d40..61e18c9f 100644 --- a/hands/README +++ b/hands/README @@ -26,6 +26,7 @@ list1000.txt list300.txt list100.txt list10.txt +list2.txt list1.txt ------------- These are just excerpts from the larger masterDD.txt file. @@ -42,3 +43,8 @@ thomas2.txt These are artificially constructed hands that take a very long time to solve. +sol100000.txt +sol10.txt +------------- +These are hands with CalcTable solutions. I think they came from +an original DDS test program. diff --git a/src/Init.cpp b/src/Init.cpp index 156063b7..68d53aff 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -8,6 +8,8 @@ */ +#include + #include "Init.h" #include "System.h" #include "Scheduler.h" @@ -100,8 +102,8 @@ void STDCALL SetResources( const int memMaxFreeMB = static_cast(0.70 * kilobytesFree / 1024); const int memMax32bMB = (sizeof(void *) == 4 ? 1800 : 1000000); - int memMaxMB = Min(memMaxGivenMB, memMaxFreeMB); - memMaxMB = Min(memMaxMB, memMax32bMB); + int memMaxMB = min(memMaxGivenMB, memMaxFreeMB); + memMaxMB = min(memMaxMB, memMax32bMB); // The number of threads will be limited by: // - If threading set as single-threaded or compiled only @@ -117,7 +119,7 @@ void STDCALL SetResources( else if (sysdep.IsIMPL() || maxThreadsIn <= 0) thrMax = static_cast(1.51 * ncores); else - thrMax = Min(maxThreadsIn, static_cast(1.51 * ncores)); + thrMax = min(maxThreadsIn, static_cast(1.51 * ncores)); // For simplicity we won't vary the amount of memory per thread // in the small and large versions. diff --git a/src/LaterTricks.cpp b/src/LaterTricks.cpp index 4bd0239d..70d58157 100644 --- a/src/LaterTricks.cpp +++ b/src/LaterTricks.cpp @@ -7,6 +7,8 @@ See LICENSE and README. */ +#include + #include "LaterTricks.h" @@ -27,7 +29,7 @@ bool LaterTricksMIN( if (hh != -1) { if (thrd.nodeTypeStore[hh] == MAXNODE) - sum += Max(tpos.length[hh][ss], + sum += max(tpos.length[hh][ss], tpos.length[partner[hh]][ss]); } } @@ -64,7 +66,7 @@ bool LaterTricksMIN( (tpos.length[partner[hand]][trump] == 0)) { if (((tpos.tricksMAX + (depth >> 2) + 1 - - Max(tpos.length[lho[hand]][trump], + max(tpos.length[lho[hand]][trump], tpos.length[rho[hand]][trump])) < target)) { for (int ss = 0; ss < DDS_SUITS; ss++) @@ -160,7 +162,7 @@ bool LaterTricksMAX( if (hh != -1) { if (thrd.nodeTypeStore[hh] == MINNODE) - sum += Max(tpos.length[hh][ss], + sum += max(tpos.length[hh][ss], tpos.length[partner[hh]][ss]); } } @@ -197,7 +199,7 @@ bool LaterTricksMAX( if ((tpos.length[hand][trump] == 0) && (tpos.length[partner[hand]][trump] == 0)) { - int maxlen = Max(tpos.length[lho[hand]][trump], + int maxlen = max(tpos.length[lho[hand]][trump], tpos.length[rho[hand]][trump]); if ((tpos.tricksMAX + maxlen) >= target) diff --git a/src/Par.cpp b/src/Par.cpp index 5257784a..4b426130 100644 --- a/src/Par.cpp +++ b/src/Par.cpp @@ -9,6 +9,7 @@ #include +#include #include "dds.h" #include "PBN.h" @@ -283,7 +284,7 @@ int STDCALL SidesParBin( tablep->resTable[denom_conv[j]][0]; t2 = k ? tablep->resTable[denom_conv[j]][3] : tablep->resTable[denom_conv[j]][2]; - tt = Max(t1, t2); + tt = max(t1, t2); /* tt is the maximum number of tricks current side can take in denomination.*/ @@ -543,7 +544,7 @@ int STDCALL SidesParBin( since the cost for the sacrifice is too small. */ } - int opp_tricks = Max(t3[j], t4[j]); + int opp_tricks = max(t3[j], t4[j]); while (max_lower > 0) { @@ -580,7 +581,7 @@ int STDCALL SidesParBin( throw std::runtime_error("j not in [0..3] in Par"); } - max_lower = Min(max_low[k][best_par[m][i].par_tricks - 6], + max_lower = min(max_low[k][best_par[m][i].par_tricks - 6], max_lower); sidesRes[i].contracts[m].denom = j; @@ -1562,4 +1563,3 @@ int STDCALL ConvertToSidesTextFormat( return RETURN_NO_FAULT; } - diff --git a/src/QuickTricks.cpp b/src/QuickTricks.cpp index 04879e3e..4a9d1f71 100644 --- a/src/QuickTricks.cpp +++ b/src/QuickTricks.cpp @@ -8,6 +8,8 @@ */ +#include + #include "QuickTricks.h" @@ -274,7 +276,7 @@ int QuickTricks( /* The partner but not the opponents have cards in the trump suit. */ - int sum = Max(countOwn, countPart); + int sum = max(countOwn, countPart); for (int s = 0; s < DDS_SUITS; s++) { if ((sum > 0) && @@ -295,7 +297,7 @@ int QuickTricks( else if (!opps) { /* The partner but not the opponents have cards in the suit. */ - int sum = Min(countOwn, countPart); + int sum = min(countOwn, countPart); if (trump == DDS_NOTRUMP) { if (sum >= cutoff) @@ -367,7 +369,7 @@ int QuickTricks( { if (!opps && (trump != DDS_NOTRUMP) && (suit == trump)) { - int sum = Max(countOwn, countPart); + int sum = max(countOwn, countPart); for (int s = 0; s < DDS_SUITS; s++) { if ((sum > 0) && @@ -389,7 +391,7 @@ int QuickTricks( } else if (!opps) { - int sum = Min(countOwn, countPart); + int sum = min(countOwn, countPart); if (trump == DDS_NOTRUMP) { if (sum >= cutoff) @@ -740,7 +742,7 @@ int QtricksLeadHandTrump( (countRho <= 2) && ((countPart <= 2) || (countOwn <= 2))) { - qt += Max(countOwn - 2, countPart - 2); + qt += max(countOwn - 2, countPart - 2); if (qt >= cutoff) return qt; res = 2; @@ -784,8 +786,8 @@ int QtricksLeadHandNT( return qt; if ((trump == suit) && ((!commPartner) || (suit != commSuit))) { - lhoTrumpRanks = Max(0, lhoTrumpRanks - 1); - rhoTrumpRanks = Max(0, rhoTrumpRanks - 1); + lhoTrumpRanks = max(0, lhoTrumpRanks - 1); + rhoTrumpRanks = max(0, rhoTrumpRanks - 1); } if ((countLho <= 1) && (countRho <= 1) && (countPart <= 1)) @@ -806,8 +808,8 @@ int QtricksLeadHandNT( return qt; if ((trump == suit) && ((!commPartner) || (suit != commSuit))) { - lhoTrumpRanks = Max(0, lhoTrumpRanks - 1); - rhoTrumpRanks = Max(0, rhoTrumpRanks - 1); + lhoTrumpRanks = max(0, lhoTrumpRanks - 1); + rhoTrumpRanks = max(0, rhoTrumpRanks - 1); } if ((countLho <= 2) && (countRho <= 2) && (countPart <= 2)) { @@ -830,14 +832,14 @@ int QtricksLeadHandNT( return qt; if ((trump == suit) && ((!commPartner) || (suit != commSuit))) { - lhoTrumpRanks = Max(0, lhoTrumpRanks - 1); - rhoTrumpRanks = Max(0, rhoTrumpRanks - 1); + lhoTrumpRanks = max(0, lhoTrumpRanks - 1); + rhoTrumpRanks = max(0, rhoTrumpRanks - 1); } if ((countLho <= 2) && (countRho <= 2) && ((countPart <= 2) || (countOwn <= 2))) { - qt += Max(countOwn - 2, countPart - 2); + qt += max(countOwn - 2, countPart - 2); if (qt >= cutoff) return qt; res = 2; @@ -944,7 +946,7 @@ int QuickTricksPartnerHandTrump( (countRho <= 2) && ((countOwn <= 2) || (countPart <= 2))) { - qt += Max(countPart - 2, countOwn - 2); + qt += max(countPart - 2, countOwn - 2); if (qt >= cutoff) return qt; res = 2; @@ -1057,7 +1059,7 @@ int QuickTricksPartnerHandNT( (countRho <= 2) && ((countOwn <= 2) || (countPart <= 2))) { - qt += Max(countPart - 2, countOwn - 2); + qt += max(countPart - 2, countOwn - 2); if (qt >= cutoff) return qt; res = 2; diff --git a/src/dds.h b/src/dds.h index 9edff143..ae4b8fee 100644 --- a/src/dds.h +++ b/src/dds.h @@ -32,9 +32,6 @@ #define SIMILARDEALLIMIT 5 #define SIMILARMAXWINNODES 700000 -#define Max(x, y) (((x) >= (y)) ? (x) : (y)) -#define Min(x, y) (((x) <= (y)) ? (x) : (y)) - #define DDS_NOTRUMP 4 /* "hand" is leading hand, "relative" is hand relative leading diff --git a/test/testcommon.cpp b/test/testcommon.cpp index 39218b7e..cfcc3381 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -846,7 +846,7 @@ bool compare_TRACE( trace2->number > 0) { printf("number %d != %d\n", trace1->number, trace2->number); - return true; + return false; } // Once that was fixed, the input file had length 0, not 1. @@ -980,6 +980,34 @@ bool print_TRACE(solvedPlay * solvedp) } +bool print_double_TRACE(solvedPlay * solvedp, solvedPlay * refp) +{ + printf("Number solved vs ref : %d vs %d\n", + solvedp->number, refp->number); + + const int m = min(solvedp->number, refp->number); + for (int i = 0; i < m;i++) + { + printf("Trick %d: %d vs %d %s\n", + i, solvedp->tricks[i], refp->tricks[i], + (solvedp->tricks[i] == refp->tricks[i] ? "" : "ERROR")); + } + + if (solvedp->number > m) + { + for (int i = m; i < solvedp->number; i++) + printf("Solved %d: %d\n", i, solvedp->number); + } + else if (refp->number > m) + { + for (int i = m; i < solvedp->number; i++) + printf("Ref %d: %d\n", i, refp->number); + } + + return true; +} + + void loop_solve( boardsPBN * bop, solvedBoards * solvedbdp, @@ -1212,10 +1240,7 @@ bool loop_play( if (! compare_TRACE(&solvedplp->solved[j], &trace_list[i + j])) { printf("loop_play i %d, j %d: Difference\n", i, j); - // printf("trace_list[%d]: \n", i+j); - // print_TRACE(&trace_list[i+j]); - // printf("solvedplp[%d]: \n", j); - // print_TRACE(&solvedplp->solved[j]); + print_double_TRACE(&solvedplp->solved[j], &trace_list[i+j]); } } } From 60f2b7267b95f127688bc2d21a1cf4e44c0d5181 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 1 Apr 2018 11:37:44 +0200 Subject: [PATCH 108/132] Fixed some rare too-short plays in the reference data --- examples/hands.cpp | 4 +-- hands/list1000.txt | 2 +- hands/masterDD.txt | 74 ++++++++++++++++++++++----------------------- src/dds.h | 2 +- test/testcommon.cpp | 4 +-- 5 files changed, 43 insertions(+), 43 deletions(-) diff --git a/examples/hands.cpp b/examples/hands.cpp index 05dfe054..db05409b 100644 --- a/examples/hands.cpp +++ b/examples/hands.cpp @@ -85,11 +85,11 @@ char PBN[3][80] = { // third index is hand. unsigned int holdings[3][4][4] = { - { + { // North East South West { RQ|RJ|R6, R8|R7|R3, RK|R5, RA|RT|R9|R4|R2 } , // spades { RK|R6|R5|R2, RJ|R9|R7, RT|R8|R3, RA|RQ|R4 } , // hearts { RJ|R8|R5, RA|RT|R7|R6|R4, RK|RQ|R9, R3|R2 } , // diamonds - { RT|R9|R8, RQ|R4, RA|R7|R6|R5|R2, RK|RJ|R3 }}, // clubs, + { RT|R9|R8, RQ|R4, RA|R7|R6|R5|R2, RK|RJ|R3 }}, // clubs { { RA|RK|R9|R6, RQ|RJ|RT|R5|R4|R3|R2, 0, R8|R7}, { RK|RQ|R8, RT, RJ|R9|R7|R5|R4|R3, RA|R6|R2 }, diff --git a/hands/list1000.txt b/hands/list1000.txt index bc074b5f..a8c36a98 100644 --- a/hands/list1000.txt +++ b/hands/list1000.txt @@ -5360,7 +5360,7 @@ TABLE 6 7 6 7 11 2 11 2 5 7 5 7 10 2 10 2 6 6 6 6 PAR "NS 450" "EW -450" "NS:NS 45H" "EW:NS 45H" PAR2 "450" "4H-NS+1" PLAY 51 "DQDADTDJSKSAD8S5DKH2D5D2C2C9CKC4SQS2C5S3HJHAH3H6D9H5H8D4S6S4STH4HKH9H7D3HTHQS7D6S9S8SJC6D7C8CTC7C3CACJ" -TRACE 48 11 11 11 11 11 11 11 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 6 6 7 7 7 7 7 7 7 7 +TRACE 49 11 11 11 11 11 11 11 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 6 6 7 7 7 7 7 7 7 7 7 PBN 3 0 0 3 "W:AJT2.A.KT9763.43 .KT5432.J8.A8652 9653.Q986.Q5.JT9 KQ874.J7.A42.KQ7" FUT 9 2 2 2 2 1 3 0 0 0 3 7 10 13 14 4 2 11 14 0 64 512 0 0 8 0 1024 0 7 7 7 7 7 7 6 6 5 TABLE 6 7 6 7 11 2 11 2 5 7 5 7 10 2 10 2 6 6 6 6 diff --git a/hands/masterDD.txt b/hands/masterDD.txt index ace89d9d..d7ac3479 100644 --- a/hands/masterDD.txt +++ b/hands/masterDD.txt @@ -5360,7 +5360,7 @@ TABLE 6 7 6 7 11 2 11 2 5 7 5 7 10 2 10 2 6 6 6 6 PAR "NS 450" "EW -450" "NS:NS 45H" "EW:NS 45H" PAR2 "450" "4H-NS+1" PLAY 51 "DQDADTDJSKSAD8S5DKH2D5D2C2C9CKC4SQS2C5S3HJHAH3H6D9H5H8D4S6S4STH4HKH9H7D3HTHQS7D6S9S8SJC6D7C8CTC7C3CACJ" -TRACE 48 11 11 11 11 11 11 11 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 6 6 7 7 7 7 7 7 7 7 +TRACE 49 11 11 11 11 11 11 11 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 6 6 7 7 7 7 7 7 7 7 7 PBN 3 0 0 3 "W:AJT2.A.KT9763.43 .KT5432.J8.A8652 9653.Q986.Q5.JT9 KQ874.J7.A42.KQ7" FUT 9 2 2 2 2 1 3 0 0 0 3 7 10 13 14 4 2 11 14 0 64 512 0 0 8 0 1024 0 7 7 7 7 7 7 6 6 5 TABLE 6 7 6 7 11 2 11 2 5 7 5 7 10 2 10 2 6 6 6 6 @@ -8146,7 +8146,7 @@ TABLE 9 4 9 4 8 5 8 5 9 4 9 4 7 6 7 6 9 4 9 4 PAR "NS 600" "EW -600" "NS:NS 3N" "EW:NS 3N" PAR2 "600" "3N-NS" PLAY 49 "HQH3H5H4HJH6H8H2HAHKHTH9H7C2C8C5CTC3C4CASAS3S4S5SQS7S6S2S8S9SJC7SKCKC9STDKD7D2D3D6D9DAD5D4DQD8DJC6" -TRACE 46 9 9 9 9 9 9 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 +TRACE 49 9 9 9 9 9 9 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 PBN 1 2 4 3 "E:52.T85.J97.KQ874 AQ8.942.AT42.A95 T973.AQJ7.Q53.T6 KJ64.K63.K86.J32" FUT 11 3 3 1 0 0 2 2 0 1 1 2 6 10 14 3 10 3 5 7 7 12 12 0 0 0 0 512 0 0 0 0 2048 0 4 4 4 4 4 4 4 4 4 4 3 TABLE 9 4 9 4 8 5 8 5 9 4 9 4 7 6 7 6 9 4 9 4 @@ -8538,7 +8538,7 @@ TABLE 9 4 9 4 9 4 9 4 7 6 7 6 5 8 5 8 6 5 7 5 PAR "NS 140" "EW -140" "NS:NS 3S,NS 3H" "EW:NS 3S,NS 3H" PAR2 "140" "3S-NS" "3H-NS" PLAY 50 "DTDAD5D7S9S2S5STD4DKD9C4S7C3SAS4H2H9HQHADQS6D8D2C6C2CAC9HTH3H4SQSKS3CTS8DJD3H7SJHKC5H6H8HJC7C8CJH5CK" -TRACE 47 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 +TRACE 49 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 PBN 2 0 0 3 "S:AJ865.KJ542.7.64 KQT4.9.JT84.K752 973.QT6.AK632.A8 2.A873.Q95.QJT93" FUT 11 3 3 3 3 1 2 2 2 0 0 0 2 5 7 13 9 4 8 11 13 4 10 0 0 0 0 0 0 0 1024 4096 0 0 4 4 4 4 4 4 4 4 4 3 3 TABLE 9 4 9 4 9 4 9 4 7 6 7 6 5 8 5 8 6 5 7 5 @@ -9266,7 +9266,7 @@ TABLE 5 7 5 7 2 11 2 11 5 8 5 8 6 7 6 7 4 8 4 8 PAR "NS -650" "EW 650" "NS:EW 45H" "EW:EW 45H" PAR2 "-650" "4H-EW+1" PLAY 49 "DTD3DKD2H5HKH9H6S4S3SKS6S8STSJS2CTCKC4C5DAD4H3D5HQHTH4HAC3C2C9CAHJS9S5D7H8C6D6S7H7CQD9SQH2D8SAC7C8" -TRACE 46 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 +TRACE 49 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 PBN 2 3 4 2 "S:KQ87.T6.743.J974 T6.J875432.K.A85 J94.AK.J852.QT63 A532.Q9.AQT96.K2" FUT 10 0 3 3 3 3 0 1 1 2 2 13 4 7 9 11 8 6 10 7 4 4096 0 0 0 0 128 0 0 0 8 5 5 5 5 5 5 4 4 4 4 TABLE 5 7 5 7 2 11 2 11 5 8 5 8 6 7 6 7 4 8 4 8 @@ -9896,7 +9896,7 @@ TABLE 4 9 4 9 6 7 6 6 4 8 4 8 6 6 6 6 4 9 4 9 PAR "NS -400" "EW 400" "NS:EW 3N" "EW:EW 3N" PAR2 "-400" "3N-EW" PLAY 50 "HAH5HQH2HKH6H4H3H7HTHJH8C3CAC4C6S3S2SAS5SJS6S8S4D2D3DQD5SKS7C7C2SQSTD6C5S9H9C8C9D8DTDAD4DKDJCTCJD7D9" -TRACE 47 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 +TRACE 49 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 PBN 0 0 4 2 "N:65.QJ4.J943.9532 KQ983.832.Q8.AQT T742.AK97.T5.KJ4 AJ.T65.AK762.876" FUT 12 1 1 1 2 2 0 0 0 0 3 3 3 7 9 14 5 10 2 4 7 10 4 11 13 0 0 8192 0 0 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 4 3 3 3 TABLE 4 9 4 9 6 7 6 6 4 8 4 8 6 6 6 6 4 9 4 9 @@ -22181,7 +22181,7 @@ TABLE 7 6 7 6 4 9 4 9 9 4 9 4 3 9 3 9 4 8 4 8 PAR "NS -140" "EW 140" "NS:EW 3H" "EW:EW 3H" PAR2 "-140" "3H-EW" PLAY 49 "H2H4HAH6H3S4H8H7D3DQDAD4S7S2SJSQHKH9H5S8SAS3HTS5SKS6D5D7STS9D6C3D2C7DJDKHQD8C6D9HJDTC8C4C2C5CACJCT" -TRACE 46 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +TRACE 49 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 PBN 3 0 4 0 "W:KQ2.864.K3.AJ972 AT86.A97532.62.T 43.KQJT.QJT9.K86 J975..A8754.Q543" FUT 12 0 0 0 2 2 1 3 0 1 1 1 1 6 8 10 2 6 14 10 14 3 5 7 9 0 0 0 0 0 0 0 0 4 0 0 0 5 5 5 4 4 4 4 3 3 3 3 3 TABLE 6 5 6 5 6 6 6 6 6 7 6 7 4 9 4 8 4 8 4 8 @@ -22524,7 +22524,7 @@ TABLE 4 9 4 9 7 6 7 6 6 7 6 7 8 4 8 4 4 8 4 7 PAR "NS -140" "EW 140" "NS:EW 23S" "EW:EW 23S" PAR2 "-140" "2S-EW+1" PLAY 49 "D8D9DJDAH4H6HJHKDKD3C3D4D2S9C2D5H5HTHAH7S8SQSKS4C6C9CKCAD6SJC4D7S5S2STS7C7C5C8CQH9H3H2HQCTS6DTCJH8" -TRACE 46 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 +TRACE 49 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 PBN 0 2 4 3 "N:642.T986.8.Q9432 T83.AJ3.T9754.K7 Q7.K72.KQJ62.AJ5 AKJ95.Q54.A3.T86" FUT 11 0 1 1 2 2 0 3 0 3 3 0 14 5 12 14 3 5 6 9 8 10 11 8192 16 0 0 0 0 0 0 0 0 0 9 9 9 8 8 7 7 7 7 7 7 TABLE 4 9 4 9 7 6 7 6 6 7 6 7 8 4 8 4 4 8 4 7 @@ -25989,7 +25989,7 @@ TABLE 10 2 11 2 7 6 7 6 9 4 9 3 6 7 6 7 7 4 7 4 PAR "NS 450" "EW -450" "NS:S 45S" "EW:S 45S" PAR2 "450" "4S-S+1" PLAY 49 "H8HTHQS5S6S2SQSJHKHAS7H5S8S3SASTH2H6S9C3SKS4C2D4D2DAD9D6C6CAC5C4DQC9D3D7HJH7D5C8DKCTD8DTH3H9C7CKCJ" -TRACE 46 11 11 11 11 11 11 11 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 +TRACE 49 11 11 11 11 11 11 11 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 11 PBN 0 3 1 2 "N:KQJ94..J4.AQJ974 7.QJT85.Q7632.K3 652.43.KT98.T862 AT83.AK9762.A5.5" FUT 9 0 0 3 3 3 3 1 2 2 2 6 2 6 8 10 4 10 13 0 32 0 0 0 0 8 768 0 1 1 1 1 1 1 1 0 0 TABLE 8 5 8 5 1 12 1 11 4 8 4 9 9 3 9 3 4 8 4 9 @@ -30630,7 +30630,7 @@ TABLE 10 3 10 3 11 2 11 2 12 1 12 1 11 2 11 2 12 1 12 1 PAR "NS 1440" "EW -1440" "NS:NS 6N" "EW:NS 6N" PAR2 "1440" "6N-NS" PLAY 49 "D9D2D6DKS3S5SAS2HJHTHAH2SKS6C2C6CAC4C3C7CTC9C5CJH5H3H4HQD5DTDQD4D3D8DADJD7H6H8S7C8CKS4S8H7S9SJHKCQ" -TRACE 46 12 12 12 12 12 12 12 12 12 12 12 12 12 11 11 11 12 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 +TRACE 49 12 12 12 12 12 12 12 12 12 12 12 12 12 11 11 11 12 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 PBN 1 0 1 3 "E:AQ73.Q4.JT4.8763 K54.K7652.K5.KT9 T9862.A8.Q93.J42 J.JT93.A8762.AQ5" FUT 11 0 0 0 3 3 3 2 1 2 2 1 2 6 10 2 4 11 3 14 9 12 8 0 0 768 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 2 2 2 TABLE 8 5 8 5 11 2 11 2 10 3 10 3 9 4 9 4 8 3 8 3 @@ -32625,7 +32625,7 @@ TABLE 6 6 6 6 5 7 5 7 4 8 4 8 6 7 6 7 6 7 5 7 PAR "NS -90" "EW 90" "NS:EW 1N,EW 12D" "EW:EW 1N,EW 12D" PAR2 "-90" "1D-EW+1" "1N-EW" PLAY 51 "H2HAH4H3CQC6C5CAC3CKC9S2H5H7HKD9SAS3STS6C4C8H8S8SKSQH6S4DAD6D3DKD2D7DTS9HQC7H9HTD5CJC2D8DQD4S5S7HJDJSJ" -TRACE 48 8 9 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 +TRACE 49 8 9 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 PBN 0 2 0 2 "N:AJ65.T94.Q842.Q8 KQ973.53.AK73.T2 42.AJ87.T95.AKJ3 T8.KQ62.J6.97654" FUT 10 3 0 0 3 2 1 3 1 1 2 14 2 4 3 10 8 11 11 14 5 8192 0 0 0 512 128 0 0 0 0 6 6 6 6 6 6 6 6 5 5 TABLE 6 7 6 7 7 6 7 6 7 6 6 6 6 6 6 6 7 5 6 6 @@ -32849,7 +32849,7 @@ TABLE 9 4 9 4 5 8 5 8 7 6 7 6 6 7 6 7 6 6 6 6 PAR "NS 140" "EW -140" "NS:NS 23S" "EW:NS 23S" PAR2 "140" "2S-NS+1" PLAY 49 "SKS6S7S2CAC3CTC4C5C6HTC2SJSASQS9HAH4H3H7HKH8H9HQS5D2HJS3CKS4D3C7CJS8H2C8H5D6D7STD4D8DJDQD5DTDADKCQ" -TRACE 46 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 8 +TRACE 49 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 PBN 2 3 0 3 "S:JT8743.QT7.Q95.T A52.AK652.T43.42 KQ.84.A862.AQ875 96.J93.KJ7.KJ963" FUT 10 3 1 3 2 2 0 1 1 0 0 2 14 4 4 10 14 2 6 2 5 0 8192 0 8 0 0 0 32 0 0 4 4 4 4 4 4 4 4 4 4 TABLE 9 4 9 4 5 8 5 8 7 6 7 6 6 7 6 7 6 6 6 6 @@ -34543,7 +34543,7 @@ TABLE 9 4 9 4 8 4 8 4 7 6 7 6 7 6 7 6 8 4 8 4 PAR "NS 140" "EW -140" "NS:NS 123S" "EW:NS 123S" PAR2 "140" "1S-NS+2" PLAY 49 "C5C3CAC8C6CJCKC4CTD6S5CQSAS2S3S6SKS4S7S9DAD8D9D2H2H5HKH3STD7D3S8SJD4D5C2SQH6C7C9H4HJHAH8HTHQH9DTDQ" -TRACE 46 8 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 10 10 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 +TRACE 49 8 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 10 10 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 PBN 1 3 4 3 "E:965.J63.KT742.A6 AK.AT72.A53.QJ87 842.Q85.Q8.KT952 QJT73.K94.J96.43" FUT 12 2 2 3 3 3 0 0 0 1 3 1 1 8 12 2 5 10 2 4 8 12 13 5 8 0 0 0 0 512 0 0 0 0 0 0 0 5 5 4 4 4 4 4 4 4 3 3 3 TABLE 9 4 9 4 8 4 8 4 7 6 7 6 7 6 7 6 8 4 8 4 @@ -35649,7 +35649,7 @@ TABLE 5 7 5 8 0 12 0 12 3 9 2 9 5 8 5 8 3 9 3 10 PAR "NS -1430" "EW 1430" "NS:EW 6H" "EW:EW 6H" PAR2 "-1430" "6H-EW" PLAY 49 "SQS3S6SKC2C5H7C7SAS2D6S4D2D8H2D5C3C6H8C9D3D4H4DJCKCAHJCTHKH3H5HTS5S7HASTHQSJD7H9CQC8S9DTC4CJDQD9DA" -TRACE 46 12 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 +TRACE 49 12 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 PBN 1 1 4 2 "E:J9.K654.Q84.QJ96 Q3.A83.A632.KT82 AK74.J97.JT.A753 T8652.QT2.K975.4" FUT 12 0 2 2 2 0 3 1 3 3 1 1 3 12 3 6 14 3 2 14 8 10 3 8 13 0 4 0 0 0 0 0 0 0 0 0 0 7 6 6 6 6 6 6 6 6 6 6 5 TABLE 7 6 7 6 6 7 6 7 8 5 8 5 6 7 6 7 6 6 6 6 @@ -40682,7 +40682,7 @@ TABLE 9 4 9 4 11 2 11 2 7 5 8 5 8 4 9 4 10 2 11 2 PAR "NS 660" "EW -660" "NS:S 345N" "EW:S 345N" PAR2 "660" "3N-S+2" PLAY 49 "D7D9DTDAHAH7H5D2H3HJHKD6DJDQDKD5D3C2H6D4H9S3H4HQCTCAC3C4CKC7C5C9C6C8H8S2HTH2CJD8S6S5SAS4S7SKS8S9CQ" -TRACE 46 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 10 11 11 11 10 11 11 11 11 11 11 11 11 11 11 11 10 10 10 10 10 10 10 10 10 10 10 10 10 +TRACE 49 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 10 11 11 11 10 11 11 11 11 11 11 11 11 11 11 11 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 PBN 2 2 1 3 "S:AT7.K965.J9.AKJ6 K43..QT8642.Q873 J86.AT843.AK3.54 Q952.QJ72.75.T92" FUT 11 2 2 2 2 2 2 0 0 3 3 3 2 4 6 8 10 12 4 13 3 8 12 0 0 0 0 0 0 8 0 0 128 0 2 2 2 2 2 2 2 2 2 2 2 TABLE 9 4 9 4 11 2 11 2 7 5 8 5 8 4 9 4 10 2 11 2 @@ -46184,7 +46184,7 @@ TABLE 9 4 9 3 5 7 5 7 8 4 8 4 10 2 10 2 8 5 8 4 PAR "NS 140" "EW -140" "NS:NS 123S" "EW:NS 123S" PAR2 "140" "1S-NS+2" PLAY 51 "D6D7DQDKSKS7S2S3SJS5S4S8H2H6S6H3SAH4C4STCJCQCAC5CTC7C3C2C8D3C6CKD4D5DTD2HQD8H5HKDJDAD9H7HASQH8H9C9HTHJ" -TRACE 48 9 10 10 10 10 10 10 10 10 10 10 10 10 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 +TRACE 49 9 10 10 10 10 10 10 10 10 10 10 10 10 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 PBN 2 1 1 2 "S:AJ82.T.AT3.T9653 953.Q752.Q8.KJ87 KT6.A98.KJ654.Q2 Q74.KJ643.972.A4" FUT 11 2 2 0 2 0 3 3 3 1 0 0 3 10 2 14 8 3 6 10 10 11 14 0 0 0 0 0 0 32 512 0 0 0 6 6 6 6 6 6 6 6 6 5 5 TABLE 10 3 10 3 6 7 6 7 11 2 11 2 9 4 9 4 10 3 10 3 @@ -54094,7 +54094,7 @@ TABLE 5 7 5 7 9 4 9 4 3 10 3 10 9 4 9 4 5 8 5 8 PAR "NS -100" "EW 100" "NS:NS 4Hx" "EW:NS 4Hx" PAR2 "-100" "4H*-NS-1" PLAY 49 "DAD8DTD4DKDQD6H2H6H3HJHAC8C3CAC2C6C7C4CQH7H4HQD7H9D2HTH5S3S6SJS5CJD5CTC5C9D9CKD3S4S2SAS7S8S9SQSKDJ" -TRACE 46 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 +TRACE 49 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 PBN 1 2 0 0 "E:K872.KQ62.AJ8.T6 QT43.A874.QT763. AJ96.5.K2.KJ9432 5.JT93.954.AQ875" FUT 9 1 1 3 2 2 3 0 3 3 3 11 14 5 9 8 5 5 12 0 1536 0 16 0 128 0 0 0 4 4 4 4 4 4 4 3 3 TABLE 4 9 4 9 7 6 7 6 6 7 6 7 4 9 4 9 5 8 5 7 @@ -55256,7 +55256,7 @@ TABLE 6 7 6 7 4 9 4 9 7 6 7 6 5 8 5 8 6 7 6 7 PAR "NS -140" "EW 140" "NS:EW 123H" "EW:EW 123H" PAR2 "-140" "1H-EW+2" PLAY 49 "DKD6D2DAHJHQHKHADQDTD9D7D3H5DJD8HTH7H3H2C3C7C9CQS3S2S9SJS4S6SKS5SASTS8S7CKC8C2C4C5CTCAD4H8D5H4H9CJ" -TRACE 46 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 +TRACE 49 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 PBN 0 0 0 0 "N:K95.Q3.Q74.AJT65 7.J976.AT632.K43 Q4.T842.KJ95.872 AJT8632.AK5.8.Q9" FUT 11 2 2 2 3 3 3 0 1 0 0 1 4 7 12 14 6 11 5 3 9 13 12 0 0 0 0 32 1024 0 0 0 0 0 2 2 2 2 2 2 2 2 2 2 2 TABLE 2 11 2 11 5 8 5 8 5 7 5 7 5 6 5 6 3 8 5 8 @@ -63201,7 +63201,7 @@ TABLE 11 2 11 2 12 0 13 0 8 5 8 5 12 1 12 1 11 2 11 2 PAR "NS 1510" "EW -1510" "NS:S 7H" "EW:S 7H" PAR2 "1510" "7H-S" PLAY 49 "DAD6D2HTHKH8H3H2HQD7H4H5HJD3H6H7CJC6CQC4HAH9S2C8DKD4S6D5DQD9S7D8S4S5SAS3SKSTDTS9CASJC2C5CKDJC3C7S8" -TRACE 46 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 +TRACE 49 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 PBN 2 3 1 3 "S:AK8762.KQJT..AKJ QJT3.8.AJ8753.86 4.A643.KQT6.QT32 95.9752.942.9754" FUT 10 0 3 3 0 1 2 2 2 2 2 3 6 8 12 8 14 3 5 8 11 0 0 0 3072 0 0 0 0 128 0 0 0 0 0 0 0 0 0 0 0 TABLE 11 2 11 2 12 0 13 0 8 5 8 5 12 1 12 1 11 2 11 2 @@ -155510,7 +155510,7 @@ TABLE 6 7 6 7 7 6 7 6 5 8 5 8 6 7 6 7 5 8 5 8 PAR "NS -120" "EW 120" "NS:EW 12N" "EW:EW 12N" PAR2 "-120" "1N-EW+1" PLAY 49 "S2S5STSKDADJD2D3D6H3D4DTC6CJCQCKD7DQDKH4S6SJSAD5S7H2S8SQCTC3C4C7C9C2C5H7H5HAH9H8D8HJD9H6S9S3C8CAHQ" -TRACE 46 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 +TRACE 49 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 PBN 1 2 4 2 "E:K986.Q87.AK96.J7 QJ432.6543.J.QT9 A75.AT.8742.K832 T.KJ92.QT53.A654" FUT 6 1 3 0 0 2 3 6 12 12 4 11 10 56 0 2048 12 0 512 5 5 5 5 5 4 TABLE 6 7 6 7 7 6 7 6 5 8 5 8 6 7 6 7 5 8 5 8 @@ -232657,7 +232657,7 @@ TABLE 7 6 7 6 8 5 8 5 7 6 7 6 8 5 8 5 7 6 7 6 PAR "NS 110" "EW -110" "NS:NS 12H" "EW:NS 12H" PAR2 "110" "1H-NS+1" PLAY 49 "S5SKS3S6CKC4C2C6C7C5CJCQDQD2D5DKCAC8S2D6CTC9D3D8C3H2H3DTS9STD4SJHQHKHAH8SAD9S7S4H7H9HJH4SQS8D7DADJ" -TRACE 46 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 7 7 7 7 7 7 7 7 7 7 7 7 +TRACE 49 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 7 7 7 7 7 7 7 7 7 7 7 7 7 7 6 PBN 0 2 1 2 "N:543.T9.9632.AJ86 A2.QJ752.QT84.74 QJ87.A8.J7.KQT52 KT96.K643.AK5.93" FUT 10 3 3 3 3 1 2 2 1 0 0 2 5 10 13 14 7 11 8 8 12 0 0 0 4096 0 0 0 0 128 2048 3 3 3 3 3 3 3 3 2 2 TABLE 5 7 5 7 3 10 3 10 3 9 3 9 7 5 7 5 6 7 6 7 @@ -254700,7 +254700,7 @@ TABLE 6 7 6 7 6 6 6 6 3 10 3 10 4 8 4 9 5 7 6 7 PAR "NS -130" "EW 130" "NS:EW 1234D" "EW:EW 1234D" PAR2 "-130" "1D-EW+3" PLAY 49 "H5HAH8H4D3D6D7DJC3C2CTCADKD5D8D2DAH3DTDQD4H7C4HTD9S6S3S2C8CQC5C6CKC9C7H2HKS4H9HJH6CJS7HQS8STSKSAS9" -TRACE 46 7 7 7 7 7 7 7 7 7 8 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 +TRACE 49 7 7 7 7 7 7 7 7 7 8 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 PBN 0 2 1 1 "N:T62.KQ972.Q.QT85 Q73.A4.KJ963.AK9 KJ98.T863.AT.J62 A54.J5.87542.743" FUT 12 2 2 2 2 2 0 0 3 0 1 3 1 3 6 9 11 13 3 7 14 12 14 9 4 0 0 0 0 0 0 0 8192 0 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4 TABLE 8 5 8 5 9 4 9 4 5 8 5 8 7 6 7 6 5 8 5 8 @@ -268175,7 +268175,7 @@ TABLE 6 7 6 7 6 7 6 7 5 7 5 7 3 10 3 10 4 8 4 8 PAR "NS -130" "EW 130" "NS:EW 1234C" "EW:EW 1234C" PAR2 "-130" "1C-EW+3" PLAY 49 "C5C7CKC2CAC3C4CTC8CJCQS2C9D4D5H2C6S3D2H4SKSAS7S8DQDAD3D7S5SQS4S6DKD6D8D9DJH6H5H8DTH3S9STHAHJH9HTH7" -TRACE 46 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 +TRACE 49 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 PBN 2 1 0 1 "S:Q8.A742.KJT3.J32 KJ4.J63.76.Q9654 A9632.Q95.Q84.T7 T75.KT8.A952.AK8" FUT 12 3 2 3 0 2 0 2 2 1 1 1 0 14 14 8 5 2 7 5 9 8 10 13 10 8192 0 0 0 0 0 0 0 0 0 0 0 7 7 7 7 7 7 7 7 6 6 6 6 TABLE 6 7 6 7 6 7 6 7 5 7 5 7 3 10 3 10 4 8 4 8 @@ -268945,7 +268945,7 @@ TABLE 8 5 8 5 7 6 7 6 2 11 2 10 1 12 1 12 1 9 1 9 PAR "NS -920" "EW 920" "NS:EW 6C" "EW:EW 6C" PAR2 "-920" "6C-EW" PLAY 49 "S4S3SKSAD3D6DQDASTSJSQD2H7H4HKHAHQH2D5H3C2S2CAC6CKC4C8H5CQC5CJS6CTC7H9H6C9S5H8HTC3HJS8D4D8D7DKDJDT" -TRACE 46 9 9 9 9 9 8 8 8 8 8 8 8 8 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 11 11 +TRACE 49 9 9 9 9 9 8 8 8 8 8 8 8 8 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 PBN 1 2 4 2 "E:AJ8.AQ98.KT3.J82 Q9642.T7652.J64. 3.4.Q9852.AKQT93 KT75.KJ3.A7.7654" FUT 11 0 0 0 0 0 1 1 2 1 2 2 2 4 6 9 12 2 7 4 10 6 11 0 0 0 0 0 0 96 0 0 0 0 4 4 4 2 2 1 1 1 1 1 1 TABLE 8 5 8 5 7 6 7 6 2 11 2 10 1 12 1 12 1 9 1 9 @@ -272774,7 +272774,7 @@ TABLE 7 6 7 6 7 5 7 5 6 5 6 5 10 3 10 3 7 6 7 6 PAR "NS 130" "EW -130" "NS:NS 1234C" "EW:NS 1234C" PAR2 "130" "1C-NS+3" PLAY 49 "HTHAH5H4CACJC6C4CTCKC8CQD7D2D3DAC2S8C7H3D4D6DJD5SQS9S4SADTDQH6D8C3H9C5S6SKS2SJH7C9S7S3H2HKH8D9S5HJ" -TRACE 46 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 +TRACE 49 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 PBN 2 0 2 1 "S:A3.K43.QJ753.AQ8 842.Q765.AK6.972 JT975.J982..KT43 KQ6.AT.T9842.J65" FUT 9 1 1 2 2 2 0 0 3 3 14 10 2 4 10 13 6 6 11 0 0 0 0 768 4096 0 32 0 6 6 6 6 6 5 5 5 5 TABLE 10 3 10 3 8 4 8 4 7 6 7 5 9 3 9 4 7 6 7 6 @@ -283855,7 +283855,7 @@ TABLE 3 10 3 10 9 4 9 4 1 11 1 11 2 11 2 11 4 6 4 6 PAR "NS -420" "EW 420" "NS:EW 4S" "EW:EW 4S" PAR2 "-420" "4S-EW" PLAY 51 "H5H3HAH7H6S3HKH8S4S2SAS6SKS8S7S5C2C4CKC9C7C6CJS9HQSTHJD2SQD7D3SJC3C8CTH2CAH4D5CQC5H9D6D8DQD4DAD9DTDKDJ" -TRACE 48 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 +TRACE 49 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 PBN 1 3 4 2 "E:J62.AQ.AQT72.A32 KQ98.J962.5.J765 T74.KT87.J983.Q9 A53.543.K64.KT84" FUT 9 0 0 3 1 3 1 1 1 2 9 13 7 2 11 6 9 11 5 256 4096 96 0 0 0 0 0 0 5 5 5 5 5 5 5 4 4 TABLE 7 6 6 6 6 7 6 7 4 9 4 9 8 5 8 5 5 8 4 8 @@ -283869,7 +283869,7 @@ TABLE 7 6 6 6 6 7 6 7 4 9 4 9 8 5 8 5 5 8 4 8 PAR "NS -110" "EW 110" "NS:EW 3D" "EW:EW 3D" PAR2 "-110" "3D-EW" PLAY 51 "H6H7H5HQDAD5D3D4D2C7D8D6D9DKD7C5S5S6SQS4C6CQCKCADQS8DJH4DTH2S7S3HAH9H8H3C2CJC9C4SKSTSAS2CTC3S9HTC8SJHJ" -TRACE 48 8 8 8 8 8 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 7 7 7 7 7 7 7 7 7 7 7 +TRACE 49 8 8 8 8 8 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 7 7 7 7 7 7 7 7 7 7 7 7 PBN 2 1 1 2 "S:K76.T54.J6.JT852 9.AQ963.AQT432.9 AQJ853.2.K8.AK73 T42.KJ87.975.Q64" FUT 10 0 0 3 3 3 3 2 2 1 1 7 13 2 5 8 11 6 11 5 10 64 0 0 0 0 1024 0 0 16 0 3 3 3 3 3 3 3 3 3 3 TABLE 10 3 10 3 3 10 3 10 3 10 3 10 10 3 10 3 7 5 7 5 @@ -334283,7 +334283,7 @@ TABLE 3 8 3 9 3 9 3 10 6 5 6 7 6 4 6 7 3 8 3 10 PAR "NS -430" "EW 430" "NS:W 34N" "EW:W 34N" PAR2 "-430" "3N-W+1" PLAY 49 "DKD3C7D2DAD5C4D4DQD6C2DTD7DJH7H9H2HTHKH5H6H8HJHQD8C5C8H3SQS4S2S7HAC6C9CTS6S5SKSACAH4C3CQSJS9S3STS8" -TRACE 46 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 +TRACE 49 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 PBN 1 2 4 0 "E:Q983.KJ8.87.JT85 AK72.97632.JT.Q3 J54.QT5.AK952.A6 T6.A4.Q643.K9742" FUT 12 1 3 0 0 3 3 3 3 2 2 1 2 14 13 6 10 2 4 7 9 6 4 4 12 0 0 0 0 0 0 0 0 0 8 0 0 6 6 5 5 5 5 5 5 5 5 5 4 TABLE 5 8 5 8 6 7 6 7 6 7 6 7 7 6 7 6 5 7 5 7 @@ -341808,7 +341808,7 @@ TABLE 7 6 7 6 7 6 7 6 8 5 8 4 8 5 8 5 6 7 6 7 PAR "NS 90" "EW -90" "NS:NS 2D,NS 2C" "EW:NS 2D,NS 2C" PAR2 "90" "2D-NS" "2C-NS" PLAY 49 "S8SAS6H3S2S7C2STH4H7HQH2S3SJC3SKCAC4C7C6CKCJC8C9D4D3DKDTS4SQC5H5H8HAHJHTH6D2CTHKD9D5DAD7H9S5DQD8D6" -TRACE 46 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 +TRACE 49 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 PBN 2 2 1 0 "S:Q9862.52.J7.8763 J543.AKQ74.QT6.J AT.J6.K84.AQT952 K7.T983.A9532.K4" FUT 12 3 0 0 1 1 3 3 3 3 2 2 2 14 14 10 6 11 2 5 10 12 4 8 13 0 0 0 0 0 0 0 512 0 0 0 0 3 3 3 3 3 2 2 2 2 1 1 1 TABLE 6 7 6 7 3 10 3 10 3 10 3 10 8 5 8 5 3 8 3 8 @@ -378901,7 +378901,7 @@ TABLE 8 5 8 5 3 9 3 9 2 10 2 10 1 11 1 11 3 10 3 10 PAR "NS -500" "EW 500" "NS:NS 5Sx" "EW:NS 5Sx" PAR2 "-500" "5S*-NS-3" PLAY 49 "CKC2C6C8S4S3S6S9H4H8HKHAS2STSASQCAC4C7S5SKC3C5H3SJD5D3D7S8C9D4CQH5H7HJH6CTDTS7CJHQD2D6H9DQDAD8DKD9" -TRACE 46 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 +TRACE 49 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 9 9 PBN 1 1 3 1 "E:KQ982.J9.Q875.JT AT74..KJT962.A42 J65.KT7643.A4.63 3.AQ852.3.KQ9875" FUT 9 0 0 0 2 2 2 3 1 1 13 2 9 5 8 12 11 9 11 4096 0 256 0 128 0 1024 0 0 2 2 2 1 1 1 1 1 1 TABLE 7 5 7 5 8 5 8 5 9 3 9 3 11 1 11 1 9 4 9 4 @@ -452051,7 +452051,7 @@ TABLE 6 6 6 6 7 5 7 5 9 4 9 4 8 5 8 4 8 5 8 5 PAR "NS 120" "EW -120" "NS:NS 12N" "EW:NS 12N" PAR2 "120" "1N-NS+1" PLAY 49 "H4H9H5H7HAH3H6HJC5CQC4C7DKD2H2DADJD3D4H8D8DQD5HTS6D7S2S8SKSAC2S4S7C3STSQS3D6DTS5SJS9CTC8CJCACKHQC6" -TRACE 46 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 7 7 7 7 +TRACE 49 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 7 7 7 7 7 7 7 PBN 1 3 0 2 "E:J8652.A54.KJ73.K KT.962.T98542.43 Q943.KJ83.Q6.876 A7.QT7.A.AQJT952" FUT 9 3 2 2 2 1 1 1 0 0 4 2 5 10 2 6 9 10 13 8 0 16 768 0 0 0 0 0 5 5 5 5 5 5 5 4 4 TABLE 4 8 4 8 6 6 6 6 8 5 8 5 10 2 10 3 10 3 10 3 @@ -487884,7 +487884,7 @@ TABLE 11 2 11 2 9 3 9 3 13 0 13 0 7 5 7 5 11 2 11 2 PAR "NS 2140" "EW -2140" "NS:NS 7D" "EW:NS 7D" PAR2 "2140" "7D-NS" PLAY 49 "CTCACKS6H2H5H9HQC8C5CJD3S8S3SAS7H6H8HAH3H4HKDTH7D4D7DAD2DKD5D9C6DQD6C2C7DJD8C3C9HJS5C4HTS2S9STSQCQ" -TRACE 46 13 13 13 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 +TRACE 49 13 13 13 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 10 10 PBN 0 2 3 0 "N:J862.AJ94.AKQJ3. 9543.KQ3.8652.T8 AKT.62.T94.A5432 Q7.T875.7.KQJ976" FUT 10 0 2 0 0 2 0 1 1 1 1 2 14 6 8 3 11 14 4 9 11 0 14336 0 0 0 0 0 0 0 0 8 8 8 8 8 7 7 7 7 6 TABLE 11 2 11 2 9 3 9 3 13 0 13 0 7 5 7 5 11 2 11 2 @@ -488024,7 +488024,7 @@ TABLE 10 2 10 2 11 2 11 2 12 1 12 1 8 5 8 5 9 3 9 3 PAR "NS 1370" "EW -1370" "NS:NS 6D" "EW:NS 6D" PAR2 "1370" "6D-NS" PLAY 49 "S5STS8S7D3D2DQD9H2H6HQHACKCQC2C3C4H5C9C6C5CACJH8SJS3SKS2SAS4SQS6DJD7D6D5D4D8DKH7DAC8DTS9H4H3HKH9HT" -TRACE 46 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 +TRACE 49 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 9 9 PBN 2 2 2 3 "S:AK7.KT852.QJT4.Q 9542.96.987.T952 QJT.Q4.AK63.A763 863.AJ73.52.KJ84" FUT 9 3 3 3 1 1 0 0 0 2 2 5 10 6 9 2 5 9 9 0 0 512 0 0 0 16 0 384 1 1 1 1 1 1 1 1 1 TABLE 10 2 10 2 11 2 11 2 12 1 12 1 8 5 8 5 9 3 9 3 @@ -497159,7 +497159,7 @@ TABLE 7 6 7 6 6 7 6 7 9 4 9 4 7 6 7 5 8 5 8 5 PAR "NS 120" "EW -120" "NS:NS 2N" "EW:NS 2N" PAR2 "120" "2N-NS" PLAY 51 "SJS3S8SQC3C2CQC6D5D4DKD2CTCAC5C4SAD6H2S6C8CKC7H3DAD9D3DTDQDJD8S2D7H6S5S4C9CJH5S9H7H9HAH4HTHKHQS7H8HJSK" -TRACE 48 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 +TRACE 49 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 PBN 1 0 4 1 "E:AJT942.AT.T2.A82 3.K84.AQ765.KQ95 8.QJ762.J94.J764 KQ765.953.K83.T3" FUT 11 1 3 2 3 2 3 1 0 0 0 0 14 14 2 2 10 8 10 14 2 4 11 0 0 0 0 0 0 0 0 0 0 1536 5 5 5 5 5 5 5 4 4 4 4 TABLE 7 6 7 6 6 7 6 7 9 4 9 4 7 6 7 5 8 5 8 5 @@ -499133,7 +499133,7 @@ TABLE 10 3 10 3 10 2 10 2 6 7 6 7 11 2 11 2 10 2 10 2 PAR "NS 430" "EW -430" "NS:NS 34N" "EW:NS 34N" PAR2 "430" "3N-NS+1" PLAY 51 "H8HTHJHASQS6S9STC6C8CKC4C2C7CACTSKSAC3CJH3HKH6H2SJS2D5D2S3S5C5D3H5H4H7D4HQD8D9H9S4S8CQD6DTD7C9DJS7DADK" -TRACE 48 11 11 11 11 11 11 12 12 12 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 +TRACE 49 11 11 11 11 11 11 12 12 12 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 PBN 2 0 3 1 "S:9.T52.KT95.KQ532 T.J943.Q7632.J74 KQJ743.AKQ7..A96 A8652.86.AJ84.T8" FUT 12 0 1 1 3 0 3 0 2 2 2 2 0 14 6 8 10 2 8 6 14 4 8 11 8 0 0 0 0 0 0 32 0 0 0 0 0 2 2 2 2 1 1 1 1 1 1 1 0 TABLE 10 3 10 3 10 2 10 2 6 7 6 7 11 2 11 2 10 2 10 2 @@ -499175,7 +499175,7 @@ TABLE 3 10 3 10 8 5 8 5 4 9 4 9 5 8 5 8 4 8 4 9 PAR "NS -420" "EW 420" "NS:EW 4S" "EW:EW 4S" PAR2 "-420" "4S-EW" PLAY 50 "H5H2HAH3D3D4DQDKS3S2SAS7HJH6C2H4HQHKS6H9D5D2DAH7CKC4C6CJC3C7CAS4DJS5C8D6C5CTS8STDTSJH8D7SKHTS9SQC9CQ" -TRACE 47 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 +TRACE 49 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 PBN 1 0 0 0 "E:9863.2.K8765.A62 QT42.A94.JT932.J AKJ5.QJ3.A4.K953 7.KT8765.Q.QT874" FUT 9 1 1 1 3 3 3 3 2 0 8 10 13 4 8 10 12 12 7 224 0 0 0 128 0 0 0 0 3 3 3 3 3 3 3 3 3 TABLE 3 10 3 10 8 5 8 5 4 9 4 9 5 8 5 8 4 8 4 9 @@ -503144,7 +503144,7 @@ TABLE 10 3 10 3 8 4 8 5 10 3 10 3 5 8 5 8 6 7 6 7 PAR "NS 500" "EW -500" "NS:EW 4Nx,EW 5Cx" "EW:EW 4Nx,EW 5Cx" PAR2 "500" "5C*-EW-3" "4N*-EW-3" PLAY 49 "CJC9C7CAH4H7HKH2D2DTDAD6C5C3S3C2D3D5DKD8C8C4S7CQS8SAS2S6HTS4H9H6D4DQD7H3CTH8CKS9D9HADJS5STSJH5HJSK" -TRACE 46 10 10 10 10 10 9 10 10 10 10 10 10 10 10 10 10 10 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 +TRACE 49 10 10 10 10 10 9 10 10 10 10 10 10 10 10 10 10 10 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 PBN 3 2 0 1 "W:AQT5.T32.T5.KQ72 KJ942.4.AK94.A85 6.A975.Q86.JT643 873.KQJ86.J732.9" FUT 11 3 3 3 1 0 1 1 1 2 2 2 4 6 11 14 6 5 7 9 6 8 12 8 0 1024 0 0 0 0 0 0 0 0 3 3 3 3 3 3 3 3 3 3 3 TABLE 10 3 10 3 8 4 8 5 10 3 10 3 5 8 5 8 6 7 6 7 @@ -509920,7 +509920,7 @@ TABLE 3 10 3 10 4 9 4 9 7 6 7 6 7 6 7 6 6 7 6 6 PAR "NS -420" "EW 420" "NS:EW 4S" "EW:EW 4S" PAR2 "-420" "4S-EW" PLAY 49 "SQS2S4SADQDKDAD3DJD9S3D5D2D7H2DTCAC4C2C5C3C6H6C8D4D8HJHQS6S5STS9SKS8C7S7CQC9CKH9HTHAH3H7D6H5H8HKSJ" -TRACE 46 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 +TRACE 49 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 PBN 1 2 1 2 "E:A983.J532.Q.AT93 Q6.Q87.KT5.KJ764 J752.KT96.AJ42.2 KT4.A4.98763.Q85" FUT 11 3 2 3 2 3 1 3 2 1 0 0 4 5 7 10 11 8 13 13 12 6 12 0 0 64 0 0 128 0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 4 TABLE 3 10 3 10 4 9 4 9 7 6 7 6 7 6 7 6 6 7 6 6 diff --git a/src/dds.h b/src/dds.h index ae4b8fee..dddab1a8 100644 --- a/src/dds.h +++ b/src/dds.h @@ -144,7 +144,7 @@ struct extCard struct absRankType // 2 bytes { char rank; - char hand; + signed char hand; }; struct relRanksType // 120 bytes diff --git a/test/testcommon.cpp b/test/testcommon.cpp index cfcc3381..336a9d06 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -996,12 +996,12 @@ bool print_double_TRACE(solvedPlay * solvedp, solvedPlay * refp) if (solvedp->number > m) { for (int i = m; i < solvedp->number; i++) - printf("Solved %d: %d\n", i, solvedp->number); + printf("Solved %d: %d\n", i, solvedp->tricks[i]); } else if (refp->number > m) { for (int i = m; i < solvedp->number; i++) - printf("Ref %d: %d\n", i, refp->number); + printf("Ref %d: %d\n", i, refp->tricks[i]); } return true; From 3d9a5949dd044e1cf3b08bd0e78423a4d72b2427 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 1 Apr 2018 12:02:44 +0200 Subject: [PATCH 109/132] Fixed doc typo (CallAllTables) and signed/unsigned char reliance bug (Android) --- doc/DLL-dds_x.htm | 4 +- doc/DLL-dds_x.mht | 4 +- doc/DLL-dds_x.rtf | 616 ++++++++++++++++++++------------------- doc/dll-description.html | 4 +- doc/dll-description.md | 4 +- 5 files changed, 317 insertions(+), 315 deletions(-) diff --git a/doc/DLL-dds_x.htm b/doc/DLL-dds_x.htm index 99488dd7..fb3bc21f 100644 --- a/doc/DLL-dds_x.htm +++ b/doc/DLL-dds_x.htm @@ -7448,7 +7448,7 @@

 

CallAllTables calculates the +style='font-family:"Calibri",sans-serif;color:black'>CalcAllTables calculates the double dummy values of the denomination/declarer hand combinations in “*dealsp”The maximum number of DD -tables in a CallAllTables call depends on the number of strains required, see +tables in a CalcAllTables call depends on the number of strains required, see the following table:

color:black'> 

CallAllTables calcul= +style=3D'font-family:"Calibri",sans-serif;color:black'>CalcAllTables calcul= ates the double dummy values of the denomination/declarer hand combinations in  

The maximum number o= f DD -tables in a CallAllTables call depends on the number of strains required, s= +tables in a CalcAllTables call depends on the number of strains required, s= ee the following table:

diff --git a/doc/DLL-dds_x.rtf b/doc/DLL-dds_x.rtf index 90aeee7b..3efac9bb 100644 --- a/doc/DLL-dds_x.rtf +++ b/doc/DLL-dds_x.rtf @@ -1,30 +1,31 @@ {\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff1\deff0\stshfdbch0\stshfloch37\stshfhich37\stshfbi37\deflang1031\deflangfe1031\themelang1053\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} {\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f3\fbidi \froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f10\fbidi \fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;} -{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri{\*\falt Calibri};}{\f39\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;} -{\f115\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Tahoma;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} -{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;} +{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri{\*\falt Calibri};}{\f39\fbidi \froman\fcharset0\fprq2{\*\panose 00000000000000000000}Cambria;} +{\f40\fbidi \fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Tahoma;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 00000000000000000000}Cambria;} {\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} {\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri{\*\falt Calibri};} -{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f310\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f311\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\f313\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f314\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f315\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f316\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\f317\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f318\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f320\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f321\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;} -{\f323\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f324\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f325\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f326\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);} -{\f327\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f328\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f330\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f331\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;} -{\f333\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f334\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f335\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f336\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);} -{\f337\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f338\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f650\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f651\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;} -{\f653\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f654\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f657\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f658\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);} -{\f680\fbidi \fswiss\fcharset238\fprq2 Calibri CE{\*\falt Calibri};}{\f681\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr{\*\falt Calibri};}{\f683\fbidi \fswiss\fcharset161\fprq2 Calibri Greek{\*\falt Calibri};} -{\f684\fbidi \fswiss\fcharset162\fprq2 Calibri Tur{\*\falt Calibri};}{\f687\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic{\*\falt Calibri};}{\f688\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese){\*\falt Calibri};} -{\f700\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\f701\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\f703\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\f704\fbidi \froman\fcharset162\fprq2 Cambria Tur;} -{\f707\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\f708\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\f1460\fbidi \fswiss\fcharset238\fprq2 Tahoma CE;}{\f1461\fbidi \fswiss\fcharset204\fprq2 Tahoma Cyr;} -{\f1463\fbidi \fswiss\fcharset161\fprq2 Tahoma Greek;}{\f1464\fbidi \fswiss\fcharset162\fprq2 Tahoma Tur;}{\f1465\fbidi \fswiss\fcharset177\fprq2 Tahoma (Hebrew);}{\f1466\fbidi \fswiss\fcharset178\fprq2 Tahoma (Arabic);} -{\f1467\fbidi \fswiss\fcharset186\fprq2 Tahoma Baltic;}{\f1468\fbidi \fswiss\fcharset163\fprq2 Tahoma (Vietnamese);}{\f1469\fbidi \fswiss\fcharset222\fprq2 Tahoma (Thai);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} -{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} -{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} -{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} -{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} -{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;} +{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f41\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f42\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\f44\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f45\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f46\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f47\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\f48\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f49\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f51\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f52\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;} +{\f54\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f55\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f56\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f57\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);} +{\f58\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f59\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f61\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f62\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;} +{\f64\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f65\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f66\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f67\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);} +{\f68\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f69\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f381\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f382\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;} +{\f384\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f385\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f388\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f389\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);} +{\f411\fbidi \fswiss\fcharset238\fprq2 Calibri CE{\*\falt Calibri};}{\f412\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr{\*\falt Calibri};}{\f414\fbidi \fswiss\fcharset161\fprq2 Calibri Greek{\*\falt Calibri};} +{\f415\fbidi \fswiss\fcharset162\fprq2 Calibri Tur{\*\falt Calibri};}{\f416\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew){\*\falt Calibri};}{\f417\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic){\*\falt Calibri};} +{\f418\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic{\*\falt Calibri};}{\f419\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese){\*\falt Calibri};}{\f431\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\f432\fbidi \froman\fcharset204\fprq2 Cambria Cyr;} +{\f434\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\f435\fbidi \froman\fcharset162\fprq2 Cambria Tur;}{\f438\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\f439\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);} +{\f441\fbidi \fswiss\fcharset238\fprq2 Tahoma CE;}{\f442\fbidi \fswiss\fcharset204\fprq2 Tahoma Cyr;}{\f444\fbidi \fswiss\fcharset161\fprq2 Tahoma Greek;}{\f445\fbidi \fswiss\fcharset162\fprq2 Tahoma Tur;} +{\f446\fbidi \fswiss\fcharset177\fprq2 Tahoma (Hebrew);}{\f447\fbidi \fswiss\fcharset178\fprq2 Tahoma (Arabic);}{\f448\fbidi \fswiss\fcharset186\fprq2 Tahoma Baltic;}{\f449\fbidi \fswiss\fcharset163\fprq2 Tahoma (Vietnamese);} +{\f450\fbidi \fswiss\fcharset222\fprq2 Tahoma (Thai);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;} +{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;} {\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} {\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} {\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} @@ -35,25 +36,26 @@ {\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} {\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE{\*\falt Calibri};} {\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr{\*\falt Calibri};}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek{\*\falt Calibri};}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur{\*\falt Calibri};} -{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic{\*\falt Calibri};}{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese){\*\falt Calibri};}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} -{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} -{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} -{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0; -\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192; -\chyperlink\ctint255\cshade255\red0\green0\blue255;\cfollowedhyperlink\ctint255\cshade255\red128\green0\blue128;\red0\green112\blue192;}{\*\defchp \f37 }{\*\defpap \ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 } -\noqfpromote {\stylesheet{\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 \snext0 \sqformat \spriority0 \styrsid12400949 Normal;}{ -\s1\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 \sbasedon0 \snext0 \slink15 \sqformat heading 1;}{ -\s2\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 \sbasedon0 \snext0 \slink16 \sqformat heading 2;}{ -\s3\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 \sbasedon0 \snext0 \slink17 \sqformat heading 3;}{\*\cs10 \additive -\sunhideused \spriority1 Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +{\fhiminor\f31573\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew){\*\falt Calibri};}{\fhiminor\f31574\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic){\*\falt Calibri};}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic{\*\falt Calibri};} +{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese){\*\falt Calibri};}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0; +\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\chyperlink\ctint255\cshade255\red0\green0\blue255;\cfollowedhyperlink\ctint255\cshade255\red128\green0\blue128;\red0\green112\blue192;} +{\*\defchp \f37 }{\*\defpap \ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 +\f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 \snext0 \sqformat \spriority0 \styrsid12400949 Normal;}{\s1\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 +\f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 \sbasedon0 \snext0 \slink15 \sqformat heading 1;}{\s2\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 +\f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 \sbasedon0 \snext0 \slink16 \sqformat heading 2;}{\s3\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 +\f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 \sbasedon0 \snext0 \slink17 \sqformat heading 3;}{\*\cs10 \additive \sunhideused \spriority1 Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af37\afs20\alang1025 \ltrch\fcs0 \f37\fs20\lang1031\langfe1031\cgrid\langnp1031\langfenp1031 \snext11 \ssemihidden \sunhideused Normal Table;}{\*\cs15 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \b\f39\fs32\lang1033\langfe0\kerning32\langnp1033\langfenp0 \sbasedon10 \slink1 \slocked \spriority9 \'dcberschrift 1 Zchn;}{\*\cs16 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \b\i\f39\fs28\lang1033\langfe0\langnp1033\langfenp0 \sbasedon10 \slink2 \slocked \ssemihidden \spriority9 \'dcberschrift 2 Zchn;}{\*\cs17 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \b\f39\fs26\lang1033\langfe0\langnp1033\langfenp0 \sbasedon10 \slink3 \slocked \ssemihidden \spriority9 \'dcberschrift 3 Zchn;}{\*\ts18\tsrowd\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20\alang1025 \ltrch\fcs0 \f37\fs20\lang1031\langfe1031\cgrid\langnp1031\langfenp1031 \sbasedon11 \snext18 \spriority59 \styrsid1789909 Table Grid;}{ -\s19\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af115\afs16\alang1025 \ltrch\fcs0 \f115\fs16\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 \sbasedon0 \snext19 \slink20 \ssemihidden \sunhideused \styrsid5376200 -Balloon Text;}{\*\cs20 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \f115\fs16\lang1033\langfe1053\langnp1033\langfenp1053 \sbasedon10 \slink19 \slocked \ssemihidden \styrsid5376200 Sprechblasentext Zchn;}{\s21\ql \li0\ri0\nowidctlpar +\s19\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af40\afs16\alang1025 \ltrch\fcs0 \f40\fs16\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 \sbasedon0 \snext19 \slink20 \ssemihidden \sunhideused \styrsid5376200 Balloon Text;} +{\*\cs20 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \f40\fs16\lang1033\langfe1053\langnp1033\langfenp1053 \sbasedon10 \slink19 \slocked \ssemihidden \styrsid5376200 Sprechblasentext Zchn;}{\s21\ql \li0\ri0\nowidctlpar \tqc\tx4536\tqr\tx9072\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 \sbasedon0 \snext21 \slink22 \sunhideused \styrsid14119459 header;}{\*\cs22 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\langnp1033\langfenp1053 \sbasedon10 \slink21 \slocked \styrsid14119459 Kopfzeile Zchn;}{\s23\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \f37\fs22\lang1031\langfe1033\cgrid\langnp1031\langfenp1033 \snext23 \sqformat \spriority1 \styrsid2849436 No Spacing;}{\s24\ql \li0\ri0\nowidctlpar\tqc\tx4536\tqr\tx9072\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 @@ -141,38 +143,38 @@ Balloon Text;}{\*\cs20 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \f115\fs16\lang103 \rsid5525810\rsid5526679\rsid5532374\rsid5594575\rsid5638529\rsid5650157\rsid5653460\rsid5712409\rsid5712463\rsid5767474\rsid5779433\rsid5843075\rsid5862788\rsid5927621\rsid5928646\rsid5974982\rsid5979431\rsid6045873\rsid6047888\rsid6048783\rsid6054214 \rsid6058144\rsid6099241\rsid6115982\rsid6164997\rsid6170015\rsid6179193\rsid6228168\rsid6246771\rsid6247188\rsid6302457\rsid6309374\rsid6309794\rsid6313661\rsid6317456\rsid6362316\rsid6377474\rsid6384684\rsid6436444\rsid6499600\rsid6516102\rsid6557897 \rsid6557970\rsid6569652\rsid6570883\rsid6573516\rsid6578564\rsid6580905\rsid6629265\rsid6633554\rsid6641819\rsid6643870\rsid6650094\rsid6699576\rsid6701983\rsid6771888\rsid6845226\rsid6894851\rsid6895698\rsid6901705\rsid6910245\rsid6950962\rsid6957422 -\rsid6968528\rsid7041439\rsid7089377\rsid7167315\rsid7277737\rsid7285964\rsid7302518\rsid7305895\rsid7415269\rsid7421144\rsid7483127\rsid7542885\rsid7545453\rsid7616262\rsid7678768\rsid7683346\rsid7686926\rsid7697883\rsid7759131\rsid7763137\rsid7804526 -\rsid7807046\rsid7880574\rsid7931676\rsid7949161\rsid7952569\rsid7959800\rsid7998566\rsid8000484\rsid8001475\rsid8090374\rsid8129941\rsid8137115\rsid8154048\rsid8194765\rsid8261617\rsid8281290\rsid8290285\rsid8323199\rsid8395240\rsid8408337\rsid8522857 -\rsid8527940\rsid8538722\rsid8541195\rsid8549130\rsid8588264\rsid8592696\rsid8593145\rsid8610523\rsid8616569\rsid8655475\rsid8682482\rsid8799536\rsid8923128\rsid8939615\rsid8983788\rsid8984001\rsid8999377\rsid9000425\rsid9002512\rsid9047914\rsid9069276 -\rsid9125746\rsid9175287\rsid9176944\rsid9249735\rsid9306501\rsid9314635\rsid9315241\rsid9331762\rsid9389132\rsid9401184\rsid9450855\rsid9515364\rsid9515749\rsid9530285\rsid9534906\rsid9572146\rsid9586997\rsid9588289\rsid9589735\rsid9713208\rsid9716036 -\rsid9716705\rsid9731125\rsid9834330\rsid9838060\rsid9845272\rsid9851850\rsid9856546\rsid9898065\rsid9907738\rsid9911854\rsid9974881\rsid10056466\rsid10108539\rsid10122796\rsid10173450\rsid10174318\rsid10176355\rsid10239463\rsid10245607\rsid10290420 -\rsid10308289\rsid10310988\rsid10313626\rsid10376323\rsid10383915\rsid10423813\rsid10426263\rsid10452726\rsid10486826\rsid10487319\rsid10490777\rsid10496751\rsid10567623\rsid10576044\rsid10616963\rsid10631094\rsid10646944\rsid10698169\rsid10774562 -\rsid10813614\rsid10831092\rsid10838587\rsid10843677\rsid10967321\rsid11030455\rsid11078728\rsid11089766\rsid11099036\rsid11107656\rsid11149793\rsid11173409\rsid11276707\rsid11277669\rsid11279197\rsid11280091\rsid11294126\rsid11297517\rsid11344057 -\rsid11351616\rsid11367514\rsid11540483\rsid11562205\rsid11762622\rsid11801900\rsid11805493\rsid11868543\rsid11882119\rsid11930665\rsid11946565\rsid11952575\rsid11956256\rsid11958279\rsid12008966\rsid12014436\rsid12065713\rsid12068517\rsid12069216 -\rsid12071252\rsid12087407\rsid12128238\rsid12156867\rsid12210879\rsid12400949\rsid12408664\rsid12460046\rsid12520971\rsid12530193\rsid12595610\rsid12595779\rsid12615130\rsid12649012\rsid12657542\rsid12658578\rsid12658900\rsid12659025\rsid12720965 -\rsid12732549\rsid12739696\rsid12788235\rsid12797083\rsid12854747\rsid12874235\rsid12914880\rsid12915233\rsid12941889\rsid12982360\rsid12983768\rsid12986669\rsid12992185\rsid12998134\rsid13053124\rsid13071121\rsid13072585\rsid13174672\rsid13180120 -\rsid13200681\rsid13244366\rsid13250408\rsid13267252\rsid13316938\rsid13319718\rsid13321745\rsid13331862\rsid13336457\rsid13444065\rsid13452191\rsid13457490\rsid13530431\rsid13593709\rsid13641876\rsid13697230\rsid13701456\rsid13703926\rsid13714332 -\rsid13771084\rsid13780248\rsid13840817\rsid13857996\rsid13902528\rsid13902769\rsid13915886\rsid14090435\rsid14092583\rsid14095979\rsid14098709\rsid14102810\rsid14119459\rsid14169293\rsid14171083\rsid14292727\rsid14295269\rsid14307787\rsid14370947 -\rsid14429502\rsid14435334\rsid14436934\rsid14444034\rsid14498845\rsid14574742\rsid14634080\rsid14636249\rsid14814422\rsid14892228\rsid15031452\rsid15079468\rsid15084961\rsid15088206\rsid15150655\rsid15283250\rsid15291332\rsid15299259\rsid15413752 -\rsid15420320\rsid15490742\rsid15613967\rsid15620535\rsid15664614\rsid15668792\rsid15679176\rsid15744623\rsid15747980\rsid15755105\rsid15757396\rsid15800872\rsid15821976\rsid15824246\rsid15932640\rsid15937974\rsid15939092\rsid15941930\rsid15999168 -\rsid16002722\rsid16012515\rsid16021753\rsid16057925\rsid16132195\rsid16147558\rsid16151628\rsid16189992\rsid16206388\rsid16217378\rsid16276961\rsid16323149\rsid16348565\rsid16386593\rsid16401568\rsid16405367\rsid16456729\rsid16467273\rsid16470149 -\rsid16530750\rsid16534708\rsid16585076\rsid16599140\rsid16609230\rsid16610750\rsid16655487\rsid16662276\rsid16676162\rsid16715055\rsid16720464\rsid16724586\rsid16731528}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0 -\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Soren Hein}{\operator Soren Hein}{\creatim\yr2014\mo11\dy18\hr12\min16}{\revtim\yr2016\mo3\dy20\hr10\min12}{\printim\yr2016\mo1\dy1\hr23\min11}{\version22}{\edmins0}{\nofpages22}{\nofwords6014} -{\nofchars37891}{\*\company HP}{\nofcharsws43818}{\vern57439}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1417\margr1417\margt1417\margb1417\gutter0\ltrsect +\rsid6968528\rsid7019779\rsid7041439\rsid7089377\rsid7167315\rsid7277737\rsid7285964\rsid7302518\rsid7305895\rsid7415269\rsid7421144\rsid7483127\rsid7542885\rsid7545453\rsid7616262\rsid7678768\rsid7683346\rsid7686926\rsid7697883\rsid7759131\rsid7763137 +\rsid7804526\rsid7807046\rsid7880574\rsid7931676\rsid7949161\rsid7952569\rsid7959800\rsid7998566\rsid8000484\rsid8001475\rsid8090374\rsid8129941\rsid8137115\rsid8154048\rsid8194765\rsid8261617\rsid8281290\rsid8290285\rsid8323199\rsid8395240\rsid8408337 +\rsid8522857\rsid8527940\rsid8538722\rsid8541195\rsid8549130\rsid8588264\rsid8592696\rsid8593145\rsid8610523\rsid8616569\rsid8655475\rsid8682482\rsid8799536\rsid8923128\rsid8939615\rsid8983788\rsid8984001\rsid8999377\rsid9000425\rsid9002512\rsid9047914 +\rsid9069276\rsid9125746\rsid9175287\rsid9176944\rsid9249735\rsid9306501\rsid9314635\rsid9315241\rsid9331762\rsid9389132\rsid9401184\rsid9450855\rsid9515364\rsid9515749\rsid9530285\rsid9534906\rsid9572146\rsid9586997\rsid9588289\rsid9589735\rsid9713208 +\rsid9716036\rsid9716705\rsid9731125\rsid9834330\rsid9838060\rsid9845272\rsid9851850\rsid9856546\rsid9898065\rsid9907738\rsid9911854\rsid9974881\rsid10056466\rsid10108539\rsid10122796\rsid10173450\rsid10174318\rsid10176355\rsid10239463\rsid10245607 +\rsid10290420\rsid10308289\rsid10310988\rsid10313626\rsid10376323\rsid10383915\rsid10423813\rsid10426263\rsid10452726\rsid10486826\rsid10487319\rsid10490777\rsid10496751\rsid10567623\rsid10576044\rsid10616963\rsid10631094\rsid10646944\rsid10698169 +\rsid10774562\rsid10813614\rsid10831092\rsid10838587\rsid10843677\rsid10967321\rsid11030455\rsid11078728\rsid11089766\rsid11099036\rsid11107656\rsid11149793\rsid11173409\rsid11276707\rsid11277669\rsid11279197\rsid11280091\rsid11294126\rsid11297517 +\rsid11344057\rsid11351616\rsid11367514\rsid11540483\rsid11562205\rsid11762622\rsid11801900\rsid11805493\rsid11868543\rsid11882119\rsid11930665\rsid11946565\rsid11952575\rsid11956256\rsid11958279\rsid12008966\rsid12014436\rsid12065713\rsid12068517 +\rsid12069216\rsid12071252\rsid12087407\rsid12128238\rsid12156867\rsid12210879\rsid12400949\rsid12408664\rsid12460046\rsid12520971\rsid12530193\rsid12595610\rsid12595779\rsid12615130\rsid12649012\rsid12657542\rsid12658578\rsid12658900\rsid12659025 +\rsid12720965\rsid12732549\rsid12739696\rsid12788235\rsid12797083\rsid12854747\rsid12874235\rsid12914880\rsid12915233\rsid12941889\rsid12982360\rsid12983768\rsid12986669\rsid12992185\rsid12998134\rsid13053124\rsid13071121\rsid13072585\rsid13174672 +\rsid13180120\rsid13200681\rsid13244366\rsid13250408\rsid13267252\rsid13316938\rsid13319718\rsid13321745\rsid13331862\rsid13336457\rsid13444065\rsid13452191\rsid13457490\rsid13530431\rsid13593709\rsid13641876\rsid13697230\rsid13701456\rsid13703926 +\rsid13714332\rsid13771084\rsid13780248\rsid13840817\rsid13857996\rsid13902528\rsid13902769\rsid13915886\rsid14090435\rsid14092583\rsid14095979\rsid14098709\rsid14102810\rsid14119459\rsid14169293\rsid14171083\rsid14292727\rsid14295269\rsid14307787 +\rsid14370947\rsid14429502\rsid14435334\rsid14436934\rsid14444034\rsid14498845\rsid14574742\rsid14634080\rsid14636249\rsid14814422\rsid14892228\rsid15031452\rsid15079468\rsid15084961\rsid15088206\rsid15150655\rsid15283250\rsid15291332\rsid15299259 +\rsid15413752\rsid15420320\rsid15490742\rsid15613967\rsid15620535\rsid15664614\rsid15668792\rsid15679176\rsid15744623\rsid15747980\rsid15755105\rsid15757396\rsid15800872\rsid15821976\rsid15824246\rsid15932640\rsid15937974\rsid15939092\rsid15941930 +\rsid15999168\rsid16002722\rsid16012515\rsid16021753\rsid16057925\rsid16132195\rsid16147558\rsid16151628\rsid16189992\rsid16206388\rsid16217378\rsid16276961\rsid16323149\rsid16348565\rsid16386593\rsid16401568\rsid16405367\rsid16456729\rsid16467273 +\rsid16470149\rsid16530750\rsid16534708\rsid16585076\rsid16599140\rsid16609230\rsid16610750\rsid16655487\rsid16662276\rsid16676162\rsid16713324\rsid16715055\rsid16720464\rsid16724586\rsid16731528}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0 +\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Soren Hein}{\operator Soren Hein}{\creatim\yr2014\mo11\dy18\hr12\min16}{\revtim\yr2018\mo4\dy1\hr12\min1}{\printim\yr2016\mo1\dy1\hr23\min11}{\version23}{\edmins0} +{\nofpages22}{\nofwords6014}{\nofchars37891}{\*\company HP}{\nofcharsws43818}{\vern57445}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1417\margr1417\margt1417\margb1417\gutter0\ltrsect \widowctrl\ftnbj\aenddoc\hyphhotz425\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120 \dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\splytwnine\ftnlytwnine\htmautsp\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct\asianbrkrule\rsidroot4538894 \newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0{\*\wgrffmtfilter 2450} \nofeaturethrottle1\ilfomacatclnup0{\*\ftnsep \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14119459 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 { -\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3167271 \chftnsep +\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid7019779 \chftnsep \par }}{\*\ftnsepc \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14119459 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\insrsid3167271 \chftnsepc +\insrsid7019779 \chftnsepc \par }}{\*\aftnsep \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14119459 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\insrsid3167271 \chftnsep +\insrsid7019779 \chftnsep \par }}{\*\aftnsepc \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14119459 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\insrsid3167271 \chftnsepc +\insrsid7019779 \chftnsepc \par }}\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\footerr \ltrpar \pard\plain \ltrpar\s24\qc \li0\ri0\nowidctlpar\tqc\tx4536\tqr\tx9072\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7483127\charrsid14119459 PAGE \\* MERGEFORMAT}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\lang1024\langfe1024\noproof\langnp1031\insrsid11030455\charrsid11030455 18}}}\sectd \ltrsect\linex0\endnhere\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7483127\charrsid14119459 +\f37\lang1024\langfe1024\noproof\langnp1031\insrsid16713324\charrsid16713324 14}}}\sectd \ltrsect\linex0\endnhere\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7483127\charrsid14119459 \par }\pard \ltrpar\s24\ql \li0\ri0\nowidctlpar\tqc\tx4536\tqr\tx9072\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid7483127 \par }}{\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}} {\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8 @@ -183,7 +185,7 @@ Balloon Text;}{\*\cs20 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \f115\fs16\lang103 \par Latest DLL issue with this description is available at }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid15824246 HYPERLINK "http://www.bahnhof.se/wb758135/" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid15824246 {\*\datafield 00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b5800000068007400740070003a002f002f007700770077002e006200610068006e0068006f0066002e00730065002f00770062003700350038003100330035002f000000795881f43b1d7f48af2c825dc48527630000 -0000a5ab000000000011000000ff008c00507a490000}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid6650094\charrsid15824246 http://www.bahnhof.se/wb758135/}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 +0000a5ab000000000011000000ff008c00507a49000032}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid6650094\charrsid15824246 http://www.bahnhof.se/wb758135/}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid6650094\charrsid14119459 \par \par @@ -200,13 +202,13 @@ The callable functions are all preceded with }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs \f37\cf1\insrsid14119459 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13331862 \par \par }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid14119459\charrsid14119459 REF Return \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b020000000800000007000000520065007400750072006e00000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Return codes}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b020000000800000007000000520065007400750072006e0000000003}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Return codes}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14119459 are given at the end.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10576044 \par \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid13331862 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1789909 Not all functions are present in all versions of the DLL.}{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid8154048 For historical reasons, the function names are not entirely consistent with respect to the input form -at. Functions accepting binary deals will end on Bin, and those accepting PBN deals will end on PBN in the future. At some point existing function names may be changed as well, so use the new names!}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6650094 - +\f37\cf1\insrsid8154048 For historical reasons, the function names are not entirely consistent with respect to the input for +mat. Functions accepting binary deals will end on Bin, and those accepting PBN deals will end on PBN in the future. At some point existing function names may be changed as well, so use the new names!}{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid6650094 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8395240 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f37\cf1\insrsid8395240\charrsid1800033 The Basic Functions \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8395240 @@ -300,17 +302,17 @@ ConvertToSidesTextFormat}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2238558 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14119459\charrsid14119459 - REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f00610072006400000000}}}{\fldrslt -{\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar -\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789909 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 + REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000006}} +}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid14119459 \cell +}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789909 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5767474\charrsid14119459 REF deal \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 -\ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16530750 dl,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c0000000014}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +\af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16530750 dl,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 \par int target, \par int solutions, \par int mode, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12659025\charrsid14119459 REF futureTricks \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b00730000000014}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *futp, \par int threadIndex\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid13267252 Binary }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789909 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 @@ -321,17 +323,17 @@ The most basic function, solves a single hand from the beginning or from later p \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid13331862\charrsid13331862 REF SolveBoardPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid13331862 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000053006f006c007600650042006f00610072006400500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveBoardPBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000053006f006c007600650042006f00610072006400500042004e0000000030}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveBoardPBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid13331862 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789909 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6968528\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e00000077}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 -dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid4616356 dlPBN}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16530750 ,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\cf1\insrsid8154048\charrsid14119459 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e0000007748}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid4616356 dlPBN}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16530750 ,}{\rtlch\fcs1 +\af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 \par int target, \par int solutions, \par int mode, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12659025\charrsid14119459 REF futureTricks \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b0073000000bf}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b0073000000bf63}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *futp, \par int threadIndex}{\rtlch\fcs1 \af1\afs18 \ltrch\fcs0 \f37\fs18\cf1\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid13267252 PBN}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -342,15 +344,15 @@ dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \l \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid11107656\charrsid11107656 - REF CalcDDtable \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid11107656 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000430061006c006300440044007400610062006c006500000020}} + REF CalcDDtable \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid11107656 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000430061006c006300440044007400610062006c00650000002030}} }{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtable}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5974982 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid6901705 struct}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\insrsid8154048\charrsid6901705 } {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c00000022}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000226f}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid6901705 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid16456729\charrsid6901705 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 tableDeal, \line struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT } -{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000072}}}{\fldrslt {\rtlch\fcs1 +{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000007200}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 * tablep\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid13267252 Binary }{ @@ -362,15 +364,15 @@ dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \l \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid11107656\charrsid11107656 REF CalcDDtablePBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid11107656 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000430061006c006300440044007400610062006c006500500042004e00000067}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtablePBN}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 -\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e00000065}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000430061006c006300440044007400610062006c006500500042004e0000006769}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtablePBN}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst { +\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e0000006500}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 \line }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6968528\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 tableDealPBN, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5974982 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000030}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000003036}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 * tablep\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 PBN }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14307787\charrsid14119459 @@ -384,20 +386,20 @@ dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \l \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid11107656\charrsid11107656 REF CalcAllTables \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid11107656 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e000000430061006c00630041006c006c005400610062006c006500730000002e}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcAllTables}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e000000430061006c00630041006c006c005400610062006c006500730000002e03}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcAllTables}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableDeals \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d000000640064005400610062006c0065004400650061006c007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeals}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d000000640064005400610062006c0065004400650061006c00730000000012}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeals}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 dealsp, \par int mode, \par int trumpFilter[5], \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTablesRes \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065007300520065007300000013}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065007300520065007300000013eb}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *resp, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6701983 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6701983\charrsid14119459 REF allParResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c0074007300000013}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c0074007300000013a2}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 presp\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 Binary \cell }\pard \ltrpar @@ -409,21 +411,21 @@ dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \l \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid11107656\charrsid11107656 REF CalcAllTablesPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid11107656 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b020000000800000011000000430061006c00630041006c006c005400610062006c0065007300500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcAllTablesPBN}}} +08d0c9ea79f9bace118c8200aa004ba90b020000000800000011000000430061006c00630041006c006c005400610062006c0065007300500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcAllTablesPBN}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableDealsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000010000000640064005400610062006c0065004400650061006c007300500042004e00000014}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000010000000640064005400610062006c0065004400650061006c007300500042004e0000001400}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *dealsp, \par int mode, \par int trumpFilter[5], }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid70445\charrsid14119459 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTablesRes \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065007300520065007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c006500730052006500730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *resp, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6701983 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6701983\charrsid14119459 REF allParResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c00740073000000c5}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c00740073000000c569}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 presp\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 PBN }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -438,14 +440,14 @@ dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \l \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5320216\charrsid5320216 REF SolveAllBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5320216 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f00000053006f006c007600650041006c006c0042006f006100720064007300000022}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllBoards}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e00000091}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f00000053006f006c007600650041006c006c0042006f00610072006400730000002200}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllBoards}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af2\afs18 +\ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e0000009100}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *bop, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14429502 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14429502\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000016}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f00610072006400730000001600}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid7880574 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574 * }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid7880574 solvedp\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 PBN }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -459,14 +461,14 @@ dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \l \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5320216\charrsid5320216 REF SolveAllChunksBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5320216 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300420069006e00000000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunksBin}}} -\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af2\afs18 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300420069006e0000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunksBin} +}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f006100720064007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f0061007200640073000000006e}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *bop, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14429502 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14429502\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f00610072006400730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 int chunkSize\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -479,13 +481,13 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5320216\charrsid5320216 REF SolveAllChunks \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5320216 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f00000053006f006c007600650041006c006c004300680075006e006b007300000000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunks}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid16151628 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\cf1\insrsid16151628\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16151628\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f00000053006f006c007600650041006c006c004300680075006e006b00730000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunks}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid16151628 {\rtlch\fcs1 \af2\afs18 +\ltrch\fcs0 \f2\fs18\cf1\insrsid16151628\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16151628\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16151628\charrsid14119459 *bop, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16151628\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000b0}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16151628\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16151628\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16151628\charrsid14119459 solvedp, }{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 @@ -499,14 +501,14 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5320216\charrsid5320216 REF SolveAllChunksPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5320216 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunksPBN}}} -\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunksPBN} +}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *bop, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14429502 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14429502\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f00610072006400730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 solvedp, }{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 @@ -520,16 +522,16 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12520971 \page \par \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12658900\charrsid12658900 REF Par \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid12658900 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000004000000500061007200000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 Par}}} +\f2\fs18\ul\cf19\insrsid16386593\charrsid12658900 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000400000050006100720000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 Par}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid12658900 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000054}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 tablep, }{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6701983\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c0074007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c007400730000000003}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *presp, \par int vulnerable\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 No format }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14307787\charrsid14119459 @@ -543,11 +545,11 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3567911 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3567911 DealerPar}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3567911\charrsid12658900 \cell }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3567911\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000d7}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 tablep, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "parResultsDealer" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c0065007200000000d00000000000ff002e213120f50000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c0065007200000000d00000000000ff002e213120f5000072}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid13701456\charrsid16456729 parResultsDealer}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid13701456 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 presp, @@ -562,11 +564,11 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3567911 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430\charrsid3220430 DealerParBin }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3220430 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 struct } {\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "ddTableResults" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000011006c00000aff0021080020a70000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000011006c00000aff0021080020a700001e}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 * tablep, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000780000000000ff00e2007420850000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000780000000000ff00e200742085000012}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 * presp, @@ -582,7 +584,7 @@ ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\a \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3567911 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430\charrsid3220430 ConvertToDealerTextFormat}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3220430 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 -{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d006100730074006500720000000068008c0000006d008e002020530000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d006100730074006500720000000068008c0000006d008e00202053000076}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 pres, @@ -596,11 +598,11 @@ Text}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid3220430\charrsid14 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid348894 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid15939092 SidesPar}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid348894\charrsid8538722 \cell }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid348894\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000002e}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894\charrsid14119459 tablep, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "parResultsDealer" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c00650072000000000000000000000000de003c00960000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c00650072000000000000000000000000de003c0096000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3954019\charrsid16456729 parResultsDealer}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894\charrsid14119459 presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894 , @@ -614,11 +616,11 @@ Par results are given for sides with the DealerPar output format.}{\rtlch\fcs1 \ \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid348894 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430\charrsid3220430 SidesParBin}{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3220430 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 struct } {\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "ddTableResults" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000000000000000000002e3137001000f2}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000000000000000000002e3137001000f200}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \line }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 * tablep, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d00610073007400650072000000000004000000000000b5006923a700f1}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d00610073007400650072000000000004000000000000b5006923a700f100}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 sidesRes[2], @@ -634,12 +636,12 @@ ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\a \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid348894 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430\charrsid3220430 ConvertToSidesTextFormat}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid16057925 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid8682482 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid8682482 -{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000000f0000e5002c008e0d3a006a00f1}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000000f0000e5002c008e0d3a006a00f100}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16057925\charrsid8682482 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 pres, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid8682482 HYPERLINK \\l "parTextResults" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid8682482 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000700061007200540065007800740052006500730075006c007400730000000000000000f7000000d2003e00f700f1}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16057925\charrsid8682482 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000700061007200540065007800740052006500730075006c007400730000000000000000f7000000d2003e00f700f100}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16057925\charrsid8682482 parTextResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 resp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid348894 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8290285 Text}{\rtlch\fcs1 @@ -651,22 +653,22 @@ Example of text output from }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\i \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid8538722 - REF CalcPar \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid8538722 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000008000000430061006c006300500061007200000013}}}{\fldrslt {\rtlch\fcs1 + REF CalcPar \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid8538722 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000008000000430061006c00630050006100720000001337}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcPar}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid8538722 \cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid6557970 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c00000013}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c0000001300}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid6557970 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482\charrsid6557970 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 tableDeal, \par int vulnerable, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000f8}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15757396 \par * }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 tablep, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6701983 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6701983\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c0074007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c0074007300000000eb}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 presp\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14307787 Binary}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 @@ -677,21 +679,21 @@ Solves for both the DD result table and the par contracts}{\rtlch\fcs1 \af1\afs2 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid8538722 - REF CalcParPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid8538722 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000430061006c006300500061007200500042004e00000000}}}{\fldrslt { -\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcParPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid8538722 \cell }\pard \ltrpar -\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 + REF CalcParPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid8538722 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000430061006c006300500061007200500042004e000000004a}} +}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcParPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid8538722 \cell +}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e00000000ba}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid70445\charrsid14119459 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 tableDealPBN, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid8682482 HYPERLINK \\l "ddTableResults" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid8682482 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000000000307b0f00200004350000680000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid6578564\charrsid8682482 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000000000307b0f0020000435000068000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid6578564\charrsid8682482 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15757396 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 * tablep, \par int vulnerable, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6701983 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6701983\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c0074007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c007400730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 presp\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 PBN \cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid2769001 As CalcPar, but with PBN input format.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid3034548 }{\rtlch\fcs1 \af1\afs22 @@ -703,18 +705,18 @@ ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\a \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12520971 \page \par \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid2849436 REF TracePlayBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 -\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid2849436 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d0000005400720061006300650050006c0061007900420069006e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid2849436 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d0000005400720061006300650050006c0061007900420069006e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalysePlayBin}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid2849436 \cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6968528\charrsid14119459 REF deal \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 -\ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 dl, +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c0000000050}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +\af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 dl, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF playTraceBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTraceBin}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTraceBin}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6580905\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid14119459\charrsid14119459 play}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 ,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid14119459\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14119459\charrsid14119459 REF solvedPlay \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c0061007900000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c006100790000000001}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid14119459\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid14119459\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid14119459\charrsid14119459 solvedp,}{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 @@ -728,18 +730,18 @@ ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\a \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid2849436 - REF TracePlayPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid2849436 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d0000005400720061006300650050006c0061007900500042004e00000000}} + REF TracePlayPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid2849436 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d0000005400720061006300650050006c0061007900500042004e0000000000}} }{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalysePlayPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid2849436 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6968528\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e00000020}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e0000002000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 dlPBN, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF playTracePBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracePBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e0000000053}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracePBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 playPBN, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14119459\charrsid14119459 REF solvedPlay \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c0061007900000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c0061007900000000ec}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 solvedp, \par int thrId\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 PBN }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -754,16 +756,16 @@ ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\a \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid5979431 REF TraceAllPlaysBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5979431 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000110000005400720061006300650041006c006c0050006c00610079007300420069006e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalyseAllPlaysBin}}} +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000110000005400720061006300650041006c006c0050006c00610079007300420069006e0000000042}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalyseAllPlaysBin}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid5979431 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f0061007200640073000000a0}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f0061007200640073000000a069}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *bop, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF playTracesBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300420069006e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesBin}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300420069006e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesBin}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *plp, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF solvedPlays \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c00610079007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c0061007900730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 solvedp, \par int chunkSize\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 Binary }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -777,17 +779,17 @@ boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \lt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid5979431 REF TraceAllPlaysPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5979431 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000110000005400720061006300650041006c006c0050006c00610079007300500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalyseAllPlaysPBN}}} +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000110000005400720061006300650041006c006c0050006c00610079007300500042004e00000000e9}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalyseAllPlaysPBN}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid5979431 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *bopPBN, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF playTracesPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesPBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesPBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 plpPBN, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF solvedPlays \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c00610079007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c0061007900730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 solvedp, \par int chunkSize\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 PBN }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -801,7 +803,7 @@ boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \lt \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 REF SetMaxThreads \\h }{ -\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005300650074004d0061007800540068007200650061006400730000008f}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005300650074004d0061007800540068007200650061006400730000008f00}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SetMaxThreads}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1056208\charrsid5979431 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1056208 int }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1056208\charrsid1056208 userThreads}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1056208\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 @@ -813,7 +815,7 @@ Used at initial start and can also be called with a request for allocating memor \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 REF FreeMemory \\h }{ -\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000046007200650065004d0065006d006f00720079000000de}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000046007200650065004d0065006d006f00720079000000de36}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 FreeMemory}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1056208\charrsid5979431 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1056208 void}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1056208\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid1056208\charrsid14119459 \cell }\pard \ltrpar @@ -824,10 +826,10 @@ Used at initial start and can also be called with a request for allocating memor \brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 - REF GetDDSInfo \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000047006500740044004400530049006e0066006f00000011}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 + REF GetDDSInfo \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000047006500740044004400530049006e0066006f0000001100}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 GetDDSInfo}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7483127\charrsid9069276 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1921007\charrsid1921007 - REF DDSInfo \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid1921007 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000044004400530049006e0066006f000000c2}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 + REF DDSInfo \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid1921007 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000044004400530049006e0066006f000000c200}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1921007 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 DDSInfo}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7483127 * info\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid7483127\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8682482 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid7483127 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 { @@ -958,7 +960,7 @@ Holding\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1668\clshdrawnil \cellx1560\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3260\clshdrawnil \cellx4820\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4618\clshdrawnil \cellx9438\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid10576044\charrsid14119459 {\*\bkmkstart deal}deal{\*\bkmkend deal}\cell int trump;\cell }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid10239463\charrsid14119459 REF suit \\h \\ -* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000047}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000730075006900740000004702}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10239463\charrsid14119459 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10576044\charrsid14119459 \trowd \irow1\irowband1\ltrrow \ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -967,8 +969,8 @@ Holding\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4618\clshdrawnil \cellx9438\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid10576044\charrsid14119459 \cell int first;\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10239463\charrsid14119459 The hand leading to the trick. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF hand \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e006400000008}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 -\ltrch\fcs0 \f37\fs22\cf1\insrsid10239463\charrsid14119459 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 +08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e00640000000800}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10239463\charrsid14119459 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 \par \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10576044\charrsid14119459 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid14119459\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 @@ -976,7 +978,7 @@ Holding\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4618\clshdrawnil \cellx9438\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid10576044\charrsid14119459 \cell int currentTrickSuit[3];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12659025 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 Up to 3 cards may already have been played to the trick. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{ -\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000730075006900740000000072}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid163452 }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid163452\charrsid163452 Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10576044\charrsid14119459 \trowd \irow3\irowband3\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 @@ -993,13 +995,13 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4618\clshdrawnil \cellx9438\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid10576044\charrsid14119459 \cell unsigned int remainCards[4][4];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12659025 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5254237 1st}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 index is }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid15757396\charrsid14119459 REF hand \\h \\ -* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e006400000022}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e00640000002267}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5254237 , 2nd}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 index is }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid15757396\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 -\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000020}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}} +\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000201e}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid15757396\charrsid14119459 . }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12983768 remainCards use}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5254237 s }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid12983768 HYPERLINK \\l "holding" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid12983768 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000068006f006c00640069006e006700000016003e23000200a40030340f002f0090}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \cs26\f37\fs22\ul\cf19\insrsid5254237\charrsid12983768 Holding}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000068006f006c00640069006e006700000016003e23000200a40030340f002f00901c}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \cs26\f37\fs22\ul\cf19\insrsid5254237\charrsid12983768 Holding}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12983768 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5254237 .}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10576044\charrsid14119459 \trowd \irow5\irowband5\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1019,15 +1021,15 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 {\*\bkmkstart dealPBN}dealPBN{\*\bkmkend dealPBN}\cell int trump;\cell }{\field{\*\fldinst { \rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000020}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 -\ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 +08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000730075006900740000002002}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow1\irowband1\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb \brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1951\clshdrawnil \cellx1843\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2977\clshdrawnil \cellx4820 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 \cell int first;\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 The hand leading to the trick. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF hand \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 -\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e006400000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}} +\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e00640000000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid9713208 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1036,7 +1038,7 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 \cell int currentTrickSuit[3];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 Up to 3 cards may already have been played to the trick. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{ -\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000ff}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding.\cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow3\irowband3\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1053,7 +1055,7 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 \cell char remainCards[80];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 Remaining cards. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF PBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 -\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000004000000500042004e00000020}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 PBN}}} +\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000004000000500042004e0000002064}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 PBN}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 { \rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow5\irowband5\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv \brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl @@ -1068,11 +1070,11 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid10967321 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid10967321\charrsid14119459 {\*\bkmkstart ddTableDeal}ddTableDeal{\*\bkmkend ddTableDeal}\cell unsigned int cards[4][4]; \cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10967321 Encodes a deal. First index is hand. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid10967321\charrsid14119459 REF hand \\h \\* MERGEFORMAT }{ -\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e006400000017}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e00640000001761}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10967321 encoding. Second index is suit. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid10967321\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000020}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 -\ltrch\fcs0 \f37\fs22\cf1\insrsid10967321\charrsid14119459 encoding.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10967321\charrsid10967321 \cell }\pard \ltrpar +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000206f}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10967321\charrsid14119459 encoding.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10967321\charrsid10967321 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \b\f37\fs22\cf1\insrsid10967321\charrsid14119459 \trowd \irow1\irowband1\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid1852854\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1088,7 +1090,7 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12210879 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 {\*\bkmkstart ddTableDealPBN}ddTableDealPBN}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 {\*\bkmkend ddTableDealPBN} }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 \cell char cards[80];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12210879\charrsid14119459 Encodes a deal}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12658578\charrsid14119459 . }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12658578\charrsid14119459 REF PBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000004000000500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000004000000500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 PBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12658578\charrsid14119459 encoding.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12210879\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \b\f37\fs22\cf1\insrsid12210879\charrsid14119459 \trowd \irow1\irowband1\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1113,7 +1115,7 @@ Encodes a deal}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12658578 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid70445\charrsid14119459 \cell }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\lang1031\langfe1053\langnp1031\insrsid70445\charrsid7697883 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c00000000}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\ +\f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000009d}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\ * MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\lang1031\langfe1053\langnp1031\insrsid70445\charrsid7697883 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12210879 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\lang1031\langfe1053\langnp1031\insrsid12210879\charrsid7697883 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 @@ -1140,7 +1142,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12210879 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 \cell }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 s}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 truct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid12210879\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 -\ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e00000020}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e0000002000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 deals[}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 X}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 ];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12210879 X = }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid12210879 MAXNOOFTABLES * DDS_STRAINS}{ @@ -1164,8 +1166,8 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid6968528\charrsid14119459 REF deal \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c00000030}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 -\ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c0000003000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +\af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par [}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1175,7 +1177,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int target}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f00610072006400000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000054}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow3\irowband3\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1184,7 +1186,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int solutions}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f00610072006400000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000006f}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow4\irowband4\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1193,7 +1195,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int mode}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f00610072006400000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000003c}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow5\irowband5\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1214,7 +1216,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid6968528\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 [}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 @@ -1225,7 +1227,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int target}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f00610072006400000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000006}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow3\irowband3\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid12210879\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1234,7 +1236,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int solutions}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f00610072006400000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow4\irowband4\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid12210879\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1243,7 +1245,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int mode}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f00610072006400000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow5\irowband5\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid12210879\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1273,8 +1275,8 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12720965\charrsid14119459 \cell int suit[13];\cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12659025 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 Suit of the each returned card. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 -\ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12720965\charrsid14119459 \cell }\pard \ltrpar +08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000730075006900740000000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12720965\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12720965\charrsid14119459 \trowd \irow9\irowband9\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid12210879\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1290,7 +1292,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 \cell int equals[13];\cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid15283250 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 Lower-ranked equals}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid15283250 . } {\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid15283250\charrsid12983768 HYPERLINK \\l "holding" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid15283250\charrsid12983768 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000068006f006c00640069006e006700000016003e2300020018000000006198189d}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \cs26\f37\fs22\ul\cf19\insrsid15283250\charrsid12983768 Holding}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000068006f006c00640069006e006700000016003e2300020018000000006198189dff}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \cs26\f37\fs22\ul\cf19\insrsid15283250\charrsid12983768 Holding}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid15283250 encoding.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid15757396 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow11\irowband11\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1323,7 +1325,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4694\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14429502 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid14429502\charrsid14119459 REF futureTricks \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b00730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12065713\charrsid11099036 solvedBoard}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12065713\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 @@ -1349,9 +1351,9 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5974982 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid5974982\charrsid14119459 int resTable[5][4];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5974982\charrsid14119459 Encodes the solution of a deal for combinations of denomination and declarer. First index is denomination. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid5974982\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 -\ltrch\fcs0 \f37\fs22\cf1\insrsid5974982\charrsid14119459 encoding. Second index is declarer. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid5974982\charrsid14119459 REF hand \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e006400000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000ff}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5974982\charrsid14119459 encoding. Second index is declarer. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid5974982\charrsid14119459 REF hand \\h \\* MERGEFORMAT }{ +\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e006400000000c0}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5974982\charrsid14119459 encoding. Each entry is a number of tricks.\cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow1\irowband1\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl \brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1376,7 +1378,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4694\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12210879 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 \cell struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid12210879\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000040}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 results[}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 X}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 ];\cell }{ \rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12210879 X = }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid12210879 MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -1405,8 +1407,8 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 {\*\bkmkstart parResults}parResults{\*\bkmkend parResults}\cell char parScore[2][16];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14429502 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14429502\charrsid14119459 First index is NS/EW. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid14429502\charrsid14119459 REF side \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300690064006500000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Side}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 -\ltrch\fcs0 \f37\fs22\cf1\insrsid14429502\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 +08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000730069006400650000000003}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Side}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14429502\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow1\irowband1\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb \brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2235\clshdrawnil \cellx2127\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3543\clshdrawnil \cellx5670 @@ -1415,8 +1417,8 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 [2][128];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14429502\charrsid14119459 First index is NS/EW. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid14429502\charrsid14119459 REF side \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300690064006500000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Side}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 -\ltrch\fcs0 \f37\fs22\cf1\insrsid14429502\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 +08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000730069006400650000000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Side}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14429502\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow2\irowband2\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb \brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2235\clshdrawnil \cellx2127\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3543\clshdrawnil \cellx5670 @@ -1498,7 +1500,7 @@ There are up to 20 declarer/strain combinations per DD table}{\rtlch\fcs1 \af1\a \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3844\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid4330566 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12400949\charrsid14119459 \cell }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12400949 struct } {\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid11276707 HYPERLINK \\l "contractType" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid11276707 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000063006f006e00740072006100630074005400790070006500000000001171430000d500944500258e0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \cs26\f2\fs20\ul\cf19\insrsid12400949\charrsid11276707 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000063006f006e00740072006100630074005400790070006500000000001171430000d500944500258e000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \cs26\f2\fs20\ul\cf19\insrsid12400949\charrsid11276707 contractType}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf19\insrsid12400949\charrsid11276707 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf19\insrsid11276707 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12400949 contracts}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12400949\charrsid14119459 [10];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12400949\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12400949\charrsid14119459 \trowd \irow3\irowband3\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt @@ -1653,8 +1655,8 @@ contractType}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3844\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid750270\charrsid14119459 \cell int suit[52];\cell }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid750270\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 -\ltrch\fcs0 \f37\fs22\cf1\insrsid750270\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000002a}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid750270\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb \brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1809\clshdrawnil \cellx1701\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3969\clshdrawnil \cellx5670 @@ -1662,7 +1664,7 @@ contractType}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid750270\charrsid14119459 \cell int rank[52];\cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid750270 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid750270\charrsid14119459 Encoding 2 .. 14 (}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \i\f37\fs22\cf1\insrsid750270\charrsid14119459 not}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid750270\charrsid14119459 }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid750270\charrsid14119459 REF card \\h \\ -* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006300610072006400000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006300610072006400000000bc}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Card}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid750270\charrsid14119459 encoding).\cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow3\irowband3\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl \brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1714,7 +1716,7 @@ String of cards with no space in between, also not between tricks. Each card co \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3844\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 { \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6580905 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid6580905\charrsid14119459 REF playTraceBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 -\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e00000000b2}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 playTraceBin}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11276707 \par plays[MAXNOOFBOARDS}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 ];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -1739,7 +1741,7 @@ String of cards with no space in between, also not between tricks. Each card co \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3844\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 { \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6580905 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 Struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid6580905\charrsid14119459 REF playTracePBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 -\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e00000000b1}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 playTracePBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11276707 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 p}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11276707 lays[MAXNOOFBOARDS}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 ]; @@ -1787,7 +1789,7 @@ String of cards with no space in between, also not between tricks. Each card co \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3844\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 { \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6580905 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid6580905\charrsid14119459 REF solvedPlay \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 -\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c0061007900000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c006100790000000018}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11276707 \par solved[MAXNOOFBOARDS}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 ];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6580905\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow2\irowband2\lastrow \ltrrow @@ -1806,14 +1808,14 @@ String of cards with no space in between, also not between tricks. Each card co \b\f37\cf1\insrsid6099241\charrsid14119459 {\*\bkmkend SolveBoard} \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid8154048 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid5767474 REF deal \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid5767474 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}} +\f2\fs18\ul\cf19\insrsid16386593\charrsid5767474 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000000d}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid8154048 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241 dl,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid8154048 \par int target, \par int solutions, \par int mode, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid12659025 REF futureTricks \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid12659025 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b00730000000069}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid8154048 *futp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid8154048 \par int threadIndex}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241\charrsid14119459 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 \cell }\pard\plain \ltrpar @@ -1821,15 +1823,15 @@ String of cards with no space in between, also not between tricks. Each card co \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 {\*\bkmkstart SolveBoardPBN}SolveBoardPBN}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241\charrsid14119459 {\*\bkmkend SolveBoardPBN} \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 -dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16731528 d}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid15150655 l} -{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16731528 ,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\cf1\insrsid6099241\charrsid14119459 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16731528 d}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid15150655 l}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16731528 ,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par int target, \par int solutions, \par int mode, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF futureTricks \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b00730000000064}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *futp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel2\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 int threadIndex}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241\charrsid14119459 @@ -1876,7 +1878,7 @@ rols how many solutions should be returned; and mode }{\rtlch\fcs1 \af1 \ltrch\f \ltrch\fcs0 \f37\cf1\insrsid16530750 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11294126 \par For equivalent cards, only the highest is returned, and lower equivalent cards are encoded in the }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid11294126\charrsid11294126 REF futureTricks \\h }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\ul\cf19\insrsid11294126 \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid11294126 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b007300000000}} +\f37\ul\cf19\insrsid11294126 \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid11294126 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b007300000000bd}} }{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11294126 structure (see \'93equals\'94). \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16530750 \par @@ -2032,20 +2034,20 @@ is the responsibility of the programmer using the DLL to ensure that reusing the \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid6557970 {\*\bkmkstart CalcDDtable}CalcDDtable}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241\charrsid6557970 {\*\bkmkend CalcDDtable} \par }\pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid6901705 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c00000037}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\ +\f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c0000003700}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\ * MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid6901705 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 tableDeal, \line }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000016}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000001600}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 * tablep}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 {\*\bkmkstart CalcDDtablePBN}CalcDDtablePBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid6099241\charrsid14119459 {\*\bkmkend CalcDDtablePBN} \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e00000016}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e0000001608}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 tableDealPBN, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000016}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000164a}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 * tablep}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f37\cf1\insrsid6099241\charrsid6099241 \cell }\pard\plain \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6099241 \trowd \irow0\irowband0\lastrow \ltrrow\ts18\trgaph108\trleft-108\trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid6099241\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt @@ -2066,16 +2068,16 @@ which must be declared before calling }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\in \par \ltrrow}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 {\*\bkmkstart CalcAllTables}CalcAllTables}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241\charrsid14119459 {\*\bkmkend CalcAllTables} \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTableDeals \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d000000640064005400610062006c0065004400650061006c00730000000e}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d000000640064005400610062006c0065004400650061006c00730000000e02}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeals}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *dealsp,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par int mode, \par int trumpFilter[5], \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTablesRes \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065007300520065007300000073}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065007300520065007300000073ff}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *resp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF allParResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c0074007300000013}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c007400730000001300}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid1846101 \par }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel2\rin0\lin0\pararsid5594575\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 @@ -2083,17 +2085,17 @@ which must be declared before calling }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\in \rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 {\*\bkmkstart CalcAllTablesPBN}CalcAllTables}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241 PBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241\charrsid14119459 {\*\bkmkend CalcAllTablesPBN} \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTableDealsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000010000000640064005400610062006c0065004400650061006c007300500042004e00000013}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000010000000640064005400610062006c0065004400650061006c007300500042004e00000013ff}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *dealsp, }{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par int mode, \par int trumpFilter[5], \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTablesRes \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065007300520065007300000013}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c006500730052006500730000001306}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *resp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8323199\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF allParResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c0074007300000013}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c007400730000001300}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid1846101\charrsid5594575 \cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6099241 \trowd \irow0\irowband0\lastrow \ltrrow @@ -2102,20 +2104,20 @@ which must be declared before calling }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\in \s3\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0\pararsid11107656 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11107656 CalcAllTablesPBN is just like CalcAllTables, except for the input format. \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11107656 -\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid11107656 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393 CallAllTables}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 }{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\cf1\insrsid1770393 calculates }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 the double dummy values }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393 of the }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid9713208 denomination}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 /declarer hand combinations }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 in }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 -\b\f2\fs22\cf1\insrsid11762622\charrsid11762622 \'93*dealsp\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12068517 for }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 -a number of }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13319718 DD table}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 s in parallel}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12068517 . This increases}{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10631094 the speed}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 compared to }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid4602097 calculating}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 the}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12068517 se values}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 using a -}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12068517 CalcDDtable call }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 for each }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13319718 DD table}{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid1770393\charrsid1770393 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 The results are returned in }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid11762622\charrsid11762622 \'93*resp\'94}{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\cf1\insrsid11762622 which must be defined before CalcAllTables is called.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393 +\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid11107656 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16713324 Calc}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393 AllTables}{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid1770393\charrsid1770393 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393 calculates }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 the double dummy values }{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid1770393 of the }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9713208 denomination}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 /declarer hand combinations }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 +in }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid11762622\charrsid11762622 \'93*dealsp\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12068517 for }{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid1770393\charrsid1770393 a number of }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13319718 DD table}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 s in parallel}{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid12068517 . This increases}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10631094 the speed}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 + compared to }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4602097 calculating}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 the}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12068517 se values}{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid1770393\charrsid1770393 using a }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12068517 CalcDDtable call }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 for each }{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid13319718 DD table}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393\charrsid1770393 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 The results are returned in }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 +\b\f2\fs22\cf1\insrsid11762622\charrsid11762622 \'93*resp\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 which must be defined before CalcAllTables is called.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1770393 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9175287 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6099241 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 The }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid6099241\charrsid6099241 \'93mode\'94}{ \rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 parameter contains the vulnerability (}{\field{\*\fldinst {\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ul\cf19\insrsid6099241\charrsid6099241 REF vulnerable \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2 \ltrch\fcs0 -\f37\ul\cf19\insrsid16386593\charrsid6099241 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000760075006c006e0065007200610062006c006500000000}}}{\fldrslt {\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 +\f37\ul\cf19\insrsid16386593\charrsid6099241 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000760075006c006e0065007200610062006c006500000000eb}}}{\fldrslt {\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Vulnerable}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 encoding}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid5927621 ; not to be confused with the SolveBoard }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid5927621\charrsid5927621 mode}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 ) for use in the par calculation. It is set to -1 if no par calculation is to be performed. \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid11762622 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 @@ -2123,13 +2125,14 @@ Vulnerable}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrc \ltrch\fcs0 \f37\cf1\insrsid11762622 The parameter }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid11762622\charrsid11762622 \'93trumpFilter\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 describes which, if any, of the }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 5 possibilities}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 that will be }{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f37\cf1\insrsid11762622\charrsid6099241 excluded}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 from the calculations. They are defined}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 in }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid6099241\charrsid6099241 REF suit \\h \\* MERGEFORMAT }{ -\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid6099241 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 +\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid6099241 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000cd}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 encoding order, so}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 setting trumpFilter to \{ FALSE, FALSE, TRUE, TRUE, TRUE\} means that values will only be calculated for }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 the trump suits spades and h}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 earts.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13244366 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid13244366\charrsid9401184 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9713208 -\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6099241 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9175287 The maximum number of DD tables in a CallAllTables call depends on the number of }{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\cf1\insrsid6099241 strains required}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2101911 , see the following table:}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9175287 +\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6099241 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9175287 The maxim}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16713324 um number of DD tables in a Calc}{\rtlch\fcs1 +\af1 \ltrch\fcs0 \f37\cf1\insrsid9175287 AllTables call depends on the number of }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 strains required}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2101911 , see the following table:}{\rtlch\fcs1 \af1 +\ltrch\fcs0 \f37\cf1\insrsid9175287 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 \par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts18\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid14090435\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 @@ -2178,35 +2181,35 @@ Maximum number of DD tables\cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intb \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574 SolveAllBoards}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid7880574\charrsid5320216 \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid7880574\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f006100720064007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f006100720064007300000000f3}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *bop, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 \par struct}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574 }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f00610072006400730000000038}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574 \par * solvedp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid7880574 \cell }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel2\rin0\lin0\pararsid5320216\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid5320216 {\*\bkmkstart SolveAllChunksBin}SolveAllChunksBin}{ \rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid7880574\charrsid5320216 {\*\bkmkend SolveAllChunksBin} \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5320216\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f006100720064007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f00610072006400730000000013}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *bop, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5320216\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f00610072006400730000000077}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 int chunkSize}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid1846101 \cell }\pard\plain \ltrpar \s3\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel2\rin0\lin0\pararsid5320216\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid5320216 {\*\bkmkstart SolveAllChunksPBN}SolveAllChunksPBN}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid7880574\charrsid5320216 {\*\bkmkend SolveAllChunksPBN} \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5320216\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *bop, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5320216\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000c4}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 int chunkSize}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574 \par @@ -2236,9 +2239,9 @@ rd 5, and so on. This continued until all boards had}{\rtlch\fcs1 \af1 \ltrch\f \f37\cf1\insrsid15668792 be waiting for the las}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11030455 t thread to finish}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid15668792 . \par \par The transposition table in a given thread (see }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid15668792\charrsid15668792 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\ul\cf19\insrsid16386593\charrsid15668792 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f00610072006400000013}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 -\f37\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid15668792 ) is generally not reused between board -2, 4 and 5 in thread 2. This only happens if SolveBoard itself determines that the boards are suspiciously similar. +\f37\ul\cf19\insrsid16386593\charrsid15668792 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000137a}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 +\f37\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid15668792 +) is generally not reused between board 2, 4 and 5 in thread 2. This only happens if SolveBoard itself determines that the boards are suspiciously similar. \par \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11030455 If the chunk size wa}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid15668792 s 2, then initially thread 0 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11030455 got}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid15668792 boards 0 and 1, thread 1 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11030455 got}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid15668792 boards 2 and 3, thread 2 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11030455 got}{ @@ -2252,9 +2255,8 @@ sition table in a given thread wa}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid \ltrch\fcs0 \f37\cf1\insrsid15668792 that boards are gr}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11030455 ouped in chunks of 2 or 10, it wa}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid15668792 s possible to force the DD solver to use this knowledge. }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7880574 However, this is rather limiting on the user, as the alignment must remain perfect throughout the batch. \par -\par SolveAllBoards now detec -ts repetitions automatically within a batch, whether or not the hands are evenly arranged and whether or not the duplicates are next to each other. This is more flexible and transparent to the user, and the overhead is negligible. Therefore, use SolveAl -lBoards! +\par SolveAllBoards now detects repetitions automatically within a batch, whether or not the hands are evenly arranged and whether or not the duplicates are next to each other. This is more flexible and transparent to the user, and the overhead + is negligible. Therefore, use SolveAllBoards! \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 \page \par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts18\trgaph108\trleft-108\trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid12658900\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt \clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth4773\clshdrawnil \cellx4665\clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth4773\clshdrawnil @@ -2262,10 +2264,10 @@ lBoards! \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid12658900 {\*\bkmkstart Par}Par}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid12658900 {\*\bkmkend Par} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12658900\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12658900\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000074}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000007445}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12658900\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c0074007300000030}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c00740073000000300b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid14119459 *presp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12658900\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 int vulnerable}{\rtlch\fcs1 \af1 \ltrch\fcs0 @@ -2273,13 +2275,13 @@ lBoards! \rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid12658900\charrsid12658900 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12658900\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12658900\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000013}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000001376}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5843075 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsDealer" }{\rtlch\fcs1 \af1 -\ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c0065007200000000000065005600ff0568002a1800f388} -}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid5843075\charrsid7880574 parResultsDealer}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5843075 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid14119459 *presp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\cf1\insrsid12658900\charrsid14119459 +\ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c0065007200000000000065005600ff0568002a1800f38800}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\cs26\f2\fs18\ul\cf19\insrsid5843075\charrsid7880574 parResultsDealer}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5843075 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid14119459 *presp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 \par int dealer, \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12658900\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 int vulnerable}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256 @@ -2291,11 +2293,11 @@ lBoards! \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid11956256 Sides}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid11956256\charrsid12658900 Par}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid11956256 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12128238\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid11956256\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000006e}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000006e62}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid11956256\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256\charrsid14119459 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsDealer" }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c006500720000000000000000a400ffff79000020008558}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c006500720000000000000000a400ffff7900002000855812}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\lang1033\langfe1031\langfenp1031\insrsid5843075\charrsid7880574 parResultsDealer}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5843075 *sidesRes[2],}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid11956256\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256\charrsid14119459 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12128238\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256\charrsid14119459 int vulnerable}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 @@ -2310,22 +2312,22 @@ lBoards! \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450 Bin}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid10173450 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789515\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid10173450\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000078}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000007886}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16132195\charrsid16132195 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsMaster" }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d00610073007400650072000000000016000fd000bc091a00005400fa20}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d00610073007400650072000000000016000fd000bc091a00005400fa2000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16132195\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16132195\charrsid16132195 * presp,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789515\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 int vulnerable}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10173450\charrsid12658900 \cell }{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450 SidesParBin}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid10173450\charrsid12658900 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789515\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid10173450\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000072}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000007264}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16132195\charrsid16132195 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsMaster" }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000001e000ff200ffde0100443000f964}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000001e000ff200ffde0100443000f96412}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16132195\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16132195\charrsid16132195 * presp,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 \par int dealer, @@ -2339,19 +2341,19 @@ lBoards! \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid15800872\charrsid15800872 ConvertToDealerTextFormat}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid10173450 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789515\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16132195\charrsid15800872 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000c323000f5e0000c101003772005c00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000c323000f5e0000c101003772005c0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16132195\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16132195\charrsid15800872 *pres,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789515\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15800872 char *resp}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10173450\charrsid12658900 \cell }{ \rtlch\fcs1 \af2 \ltrch\fcs0 \b\f31506\cf1\insrsid15800872\charrsid15800872 ConvertToSidesTextFormat}{\rtlch\fcs1 \af2 \ltrch\fcs0 \b\f31506\cf1\insrsid15800872 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15800872\charrsid15800872 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsMaster" }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d006100730074006500720000000037290044140004966020453100ec00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d006100730074006500720000000037290044140004966020453100ec0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid15800872\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid15800872\charrsid15800872 *pres,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15800872 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15800872\charrsid15800872 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parTextResults" }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000700061007200540065007800740052006500730075006c0074007300000001492a0000fd00001c00006b6d00fe00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid15800872\charrsid7880574 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000700061007200540065007800740052006500730075006c0074007300000001492a0000fd00001c00006b6d00fe0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid15800872\charrsid7880574 parTextResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid15800872\charrsid15800872 *resp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15800872\charrsid15800872 \cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10173450\charrsid11956256 \trowd \irow3\irowband3\lastrow \ltrrow @@ -2362,7 +2364,7 @@ parTextResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\a \f37\cf1\insrsid13072585 Par, DealerPar, SidesPar, DealerParBin and SidesParBin }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 calculate the par score and par contracts of a given double-dummy solution matrix }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid12658900\charrsid12658900 \'93*tablep\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 which would often be the solution of a call to }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid12658900\charrsid12658900 REF CalcDDtable \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid12658900 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000430061006c006300440044007400610062006c006500000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtable}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000430061006c006300440044007400610062006c006500000000c2}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtable}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10290420 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid10290420 Since the input is a table, there is no PBN and non-PBN version}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid13840817 of these}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid10290420 function}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid13840817 s}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid10290420 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12854747 @@ -2374,15 +2376,15 @@ Since the input is a table, there is no PBN and non-PBN version}{\rtlch\fcs1 \af \par \par The }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid12658900\charrsid12658900 \'93vulnerable\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 parameter is given using }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid12658900\charrsid12658900 REF vulnerable \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid12658900 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000760075006c006e0065007200610062006c006500000000}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Vulnerable}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000760075006c006e0065007200610062006c00650000000094}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Vulnerable}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { \rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 encoding. \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14574742 -\par The Par() function uses knowledge of the vulnerability, but not of the dealer. It attempts to return results for both declaring sides. These results can be different in - some rare cases, for instance when both sides can make 1NT due to the opening lead. +\par The Par() function uses knowledge of the vulnerability, but + not of the dealer. It attempts to return results for both declaring sides. These results can be different in some rare cases, for instance when both sides can make 1NT due to the opening lead. \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2505631 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2838088 The DealerPar}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14574742 () function also uses knowledge of the }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid14574742\charrsid14574742 \'93 dealer\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14574742 using }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid14574742\charrsid14574742 REF hand \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\ul\cf19\insrsid16386593\charrsid14574742 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e006400000058}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect +\f37\ul\cf19\insrsid16386593\charrsid14574742 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e00640000005800}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14574742 encoding. The argument is that in all practical cases, the dealer is known when the vulnerability is known. Therefore all results returned will be for the same side. \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9716036 @@ -2408,8 +2410,9 @@ the par results are given in the same format as for DealerPar(). \f37\insrsid14574742\charrsid14574742 pades and }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 h}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid14574742 earts contracts, 2 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 spades and 2 h }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid14574742 earts with an overtrick.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid14574742 This is from the NS view}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 , shown by \'93NS:\'94 meaning that NS made the first bid}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid14574742 . }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 -Note that this information is actually not enough, as it may be that N and S can make a given contract and that either E or W can bid this same contract (for instance 1NT) before N but not before S. So -in the rare cases where the NS and EW sides are not the same, the results will take some manual inspection. +Note that this information is actually not enough +, as it may be that N and S can make a given contract and that either E or W can bid this same contract (for instance 1NT) before N but not before S. So in the rare cases where the NS and EW sides are not the same, the results will take some manual inspe +ction. \par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1 \ltrch\fcs0 \f3\lang1033\langfe1053\langnp1033\langfenp1053\insrsid14574742 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar \ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\ls3\rin0\lin360\itap0\pararsid14574742 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 \'93}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid9515749 NS:NS 23S,N 23H}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid14574742 \'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 : Only North makes 3 hearts. @@ -2430,11 +2433,10 @@ t have a profitable sacrifice against 4NT, so the par contract is shown in this \par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1 \ltrch\fcs0 \f3\lang1033\langfe1053\langnp1033\langfenp1053\insrsid2369496 \loch\af3\dbch\af0\hich\f3 \'b7\tab}SidesPar() give the par contract text strings as described above for each side. \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid3547548 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2369496 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid11099036 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid269493 DealerParBin and SidesParBin are similar to DealerPar }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9000425 -and}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid269493 SidesPar}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9000425 , respectively}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid269493 -, except that both functions give the output results in binary using the }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493\charrsid13703926 \'93}{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid7880574 - HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000bb3100000000000001000000c1fd68}}}{\fldrslt {\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 -\cs26\b\f2\fs22\ul\cf19\insrsid269493\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493\charrsid13703926 \'94}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 +and}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid269493 SidesPar}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9000425 , respectively}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid269493 , except that both functions give the output results in binary us +ing the }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493\charrsid13703926 \'93}{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 +\cf19\insrsid2101911\charrsid7880574 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000bb3100000000000001000000c1fd6800}}}{\fldrslt {\rtlch\fcs1 \af2\afs22 +\ltrch\fcs0 \cs26\b\f2\fs22\ul\cf19\insrsid269493\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493\charrsid13703926 \'94}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493 }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid269493\charrsid269493 structure}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493 .}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid9000425 }{ \rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid5186751 This simplifies the writing of a conversion program to }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid14092583 get }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid5186751 an own result output format.}{\rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid9000425 }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid4268479 Examples of such programs are }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\cf1\insrsid4268479\charrsid4268479 @@ -2461,30 +2463,30 @@ s in parResultsMaster are used when calling }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid7931676\charrsid6557970 {\*\bkmkstart CalcPar}CalcPar}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid7931676\charrsid6557970 {\*\bkmkend CalcPar} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8538722\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid6901705 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c00000058}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c0000005800}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722\charrsid6901705 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722 dl}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 \par int vulnerable, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000022}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000002200}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722 * t}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 p, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid4071901\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c0074007300000074}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c007400730000007400}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid4071901 *presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6058144\charrsid4071901 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid7931676\charrsid7931676 {\*\bkmkstart CalcParPBN}CalcParPBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid7931676 {\*\bkmkend CalcParPBN} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8538722\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e00000063}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e0000006300}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722 dl}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 , \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722 * t}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 p, \par int vulnerable, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c0074007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c007400730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722\charrsid14119459 *presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6058144 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid4071901\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid6058144\charrsid7931676 \cell }\pard \ltrpar @@ -2515,26 +2517,26 @@ s in parResultsMaster are used when calling }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid2849436 PlayBin}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid2849436 {\*\bkmkend TracePlayBin} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid2849436\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF deal \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 -\ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 dl, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +\af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 dl, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF playTraceBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTraceBin}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTraceBin}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 play,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF solvedPlay \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c0061007900000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c006100790000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par int thrId}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid2849436\charrsid2849436 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3347855\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid2449260 {\*\bkmkstart TracePlayPBN}Analyse}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid2849436 PlayPBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid2849436\charrsid2849436 {\*\bkmkend TracePlayPBN} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid2849436\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e00000014}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e0000001400}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 dlPBN, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF playTracePBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracePBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e000000004b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracePBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 playPBN, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF solvedPlay \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c0061007900000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c006100790000000094}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par int thrId}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid2849436\charrsid2849436 \cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid2849436 \trowd \irow0\irowband0\lastrow \ltrrow @@ -2547,8 +2549,8 @@ s in parResultsMaster are used when calling }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ \par }\pard\plain \ltrpar\s3\qj \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0\pararsid2849436 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436\charrsid2849436 The }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436 function returns a list of double-dummy values after each specific played card in a hand. Since the function uses }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid2849436\charrsid2849436 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid2849436 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f00610072006400000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { -\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436 , the same comments apply concerning the thread number \'93thrId\'94 and the transposition tables.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436\charrsid2849436 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000094}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj +{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436 , the same comments apply concerning the thread number \'93thrId\'94 and the transposition tables.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436\charrsid2849436 \par }\pard\plain \ltrpar\s23\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid2849436 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \f37\fs22\lang1031\langfe1033\cgrid\langnp1031\langfenp1033 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid2849436 \par }\pard\plain \ltrpar\s3\qj \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0\pararsid2849436 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 @@ -2572,26 +2574,26 @@ s viewpoint (he is the one to the right of the opening leader). There is one mo \b\f37\insrsid2849436 {\*\bkmkend TraceAllPlaysBin} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5979431\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f006100720064007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f00610072006400730000000095}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *bop, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF playTracesBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300420069006e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesBin}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300420069006e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesBin}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *plp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF solvedPlays \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c006100790073000000cb}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c006100790073000000cb00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par int chunkSize}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\insrsid5979431\charrsid2849436 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1190356\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\lang1033\langfe1031\langfenp1031\insrsid2449260 {\*\bkmkstart TraceAllPlaysPBN}Analyse}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid2849436 AllPlaysPBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\insrsid2849436\charrsid2849436 {\*\bkmkend TraceAllPlaysPBN} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5979431\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e000000af}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj -{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *bopPBN, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e000000af00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect +\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *bopPBN, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF playTracesPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300500042004e000000f0}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesPBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300500042004e000000f000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesPBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *plpPBN, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF solvedPlays \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c00610079007300000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c0061007900730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par int chunkSize}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid2849436 \cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid2849436 \trowd \irow0\irowband0\lastrow \ltrrow @@ -2607,7 +2609,7 @@ s viewpoint (he is the one to the right of the opening leader). There is one mo \f37\cf1\insrsid10376323 AllPlays* functions invoke SolveBoard several times in parallel in multiple threads, rather than sequentially in a single thread. This increases execution speed. Up to 20 boards are permitted per call. \par \par Concerning chunkSize, exactly the same remarks apply as with }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid10376323\charrsid10376323 REF SolveAllChunksBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\ul\cf19\insrsid16386593\charrsid10376323 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300420069006e00000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 +\f37\ul\cf19\insrsid16386593\charrsid10376323 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300420069006e0000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunksBin}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10376323 . \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7759131 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9000425 \page }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7759131 @@ -2641,14 +2643,14 @@ The user can suggest to DDS a number of threads by calling SetMaxThreads. DDS w ry, calculated as above. Calling SetMaxThreads is optional, not mandatory. DDS will always select a suitab}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid15088206 le number of threads on its own. \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid15088206 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid15088206 \par }\pard\plain \ltrpar\s1\qj \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid15088206 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\insrsid15088206\charrsid15088206 It may be possible, }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid15088206 -especially on non-Windows systems, to call SetMaxThreads() actively, even though the user does not want to influence the default values. In this case, use a 0 argument.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid15088206\charrsid15088206 +\f37\insrsid15088206\charrsid15088206 It may be possible, }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid15088206 especiall +y on non-Windows systems, to call SetMaxThreads() actively, even though the user does not want to influence the default values. In this case, use a 0 argument.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid15088206\charrsid15088206 \par }\pard \ltrpar\s1\qj \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid11099036 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7759131\charrsid7759131 \par SetMaxThreads can be called multiple times even within the same session. So it is theoretically possible to change the number of threads dynamically.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid3240706 \par \par }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\cf1\insrsid3240706\charrsid3240706 It is possible to ask DDS to give up its dynamically allocated memory by calling }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid3240706\charrsid3240706 FreeMemory}{\rtlch\fcs1 -\ab\af1 \ltrch\fcs0 \f37\cf1\insrsid3240706\charrsid3240706 . This could be useful for instance if there is a long pause where DDS is not used within a sess -ion. DDS will free its memory when the DLL detaches from the user program, so there is no need for the user to call this function before detaching.}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\cf1\insrsid7483127 +\ab\af1 \ltrch\fcs0 \f37\cf1\insrsid3240706\charrsid3240706 . This could be useful for instance if there is a long pause where DDS is not used within a session. DDS + will free its memory when the DLL detaches from the user program, so there is no need for the user to call this function before detaching.}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\cf1\insrsid7483127 \par \par \ltrrow}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid7483127\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\lang1033\langfe1031\langfenp1031\insrsid7483127 {\*\bkmkstart GetDDSInfo}GetDDSInfo}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7483127\charrsid14119459 {\*\bkmkend GetDDSInfo} }{\rtlch\fcs1 \af1 @@ -2856,8 +2858,8 @@ A played card is not held by the right player.}{\rtlch\fcs1 \ab\af1\afs22 \ltrch \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth5185\clshdrawnil \cellx9438\row \ltrrow}\pard\plain \ltrpar \s1\qc \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel0\rin0\lin0\pararsid14119459 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid3937665 -103\cell }\pard \ltrpar\s1\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel0\rin0\lin0\pararsid14119459 {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid3937665 RETURN_THREAD_WAIT\cell -}\pard \ltrpar\s1\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel0\rin0\lin0\pararsid5862788 {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5862788 Returned from multi-threading -functions when something went wrong while waiting for all threads to complete.}{\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5862788\charrsid5862788 \cell }\pard\plain \ltrpar +}\pard \ltrpar\s1\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel0\rin0\lin0\pararsid5862788 {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5862788 +Returned from multi-threading functions when something went wrong while waiting for all threads to complete.}{\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5862788\charrsid5862788 \cell }\pard\plain \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow23\irowband23\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid5054625\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 @@ -3072,18 +3074,18 @@ fffffffffffffffffdffffff04000000feffffff05000000fefffffffeffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff010000000c6ad98892f1d411a65f0040963251e500000000000000000000000010ba -4ba28882d1010300000080020000000000004d0073006f004400610074006100530074006f0072006500000000000000000000000000000000000000000000000000000000000000000000000000000000001a000101ffffffffffffffff02000000000000000000000000000000000000000000000000934ba28882d101 -10ba4ba28882d101000000000000000000000000310033004b004e00c00041004a004a0044004500ce004300c600d800cd0041004800c800c6003000df0041003d003d000000000000000000000000000000000032000101ffffffffffffffff03000000000000000000000000000000000000000000000000934ba28882 -d10110ba4ba28882d1010000000000000000000000004900740065006d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffff04000000ffffffff000000000000000000000000000000000000000000000000 +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff010000000c6ad98892f1d411a65f0040963251e500000000000000000000000010a8 +cd71a0c9d3010300000080020000000000004d0073006f004400610074006100530074006f0072006500000000000000000000000000000000000000000000000000000000000000000000000000000000001a000101ffffffffffffffff02000000000000000000000000000000000000000000000010a8cd71a0c9d301 +10a8cd71a0c9d301000000000000000000000000d80056004800300048005500d20057005500c4005300c6005500c2005a003500c50046004900d300580041003d003d000000000000000000000000000000000032000101ffffffffffffffff03000000000000000000000000000000000000000000000010a8cd71a0c9 +d30110a8cd71a0c9d3010000000000000000000000004900740065006d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffff04000000ffffffff000000000000000000000000000000000000000000000000 00000000000000000000000000000000fc00000000000000010000000200000003000000feffffff0500000006000000070000000800000009000000feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3c623a536f75726365732053656c65637465645374796c653d225c415041536978746845646974696f6e4f66666963654f6e6c696e652e78736c22205374796c654e616d653d22415041222056657273696f6e3d22362220786d6c6e733a 623d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f6269626c696f6772617068792220786d6c6e733d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e74 -2f323030362f6269626c696f677261706879223e3c2f623a536f75726365733e000000003c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d226e6f223f3e0d0a3c64733a6461746173746f72654974656d2064733a6974656d49443d227b38303844 -443236442d343930322d344230432d383239422d3842343031453839394146437d2220786d6c6e733a64733d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f637573746f6d586d6c223e3c64733a736368656d61526566733e3c +2f323030362f6269626c696f677261706879223e3c2f623a536f75726365733e000000003c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d226e6f223f3e0d0a3c64733a6461746173746f72654974656d2064733a6974656d49443d227b31444441 +353145312d393634432d343435322d413635322d3236354639343532333335437d2220786d6c6e733a64733d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f637573746f6d586d6c223e3c64733a736368656d61526566733e3c 64733a736368656d615265662064733a7572693d22687474703a2f2f736368656d61732e6f70656e500072006f007000650072007400690065007300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000200ffffffffffffffffffffffff000000000000 0000000000000000000000000000000000000000000000000000000000000400000055010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000 diff --git a/doc/dll-description.html b/doc/dll-description.html index 25b64059..7fb9ac01 100644 --- a/doc/dll-description.html +++ b/doc/dll-description.html @@ -878,10 +878,10 @@

Functions

CalcAllTablesPBN is just like CalcAllTables, except for the input format.

-

CallAllTables calculates the double dummy values of the denomination/declarer hand combinations in “*dealsp” for a number of DD tables in parallel. This increases the speed compared to calculating these values using a CalcDDtable call for each DD table. The results are returned in “*resp” which must be defined before CalcAllTables is called.

+

CalcAllTables calculates the double dummy values of the denomination/declarer hand combinations in “*dealsp” for a number of DD tables in parallel. This increases the speed compared to calculating these values using a CalcDDtable call for each DD table. The results are returned in “*resp” which must be defined before CalcAllTables is called.

The “mode” parameter contains the vulnerability (Vulnerable encoding; not to be confused with the SolveBoard mode) for use in the par calculation. It is set to -1 if no par calculation is to be performed.

There are 5 possible denominations or strains (the four trump suits and no trump). The parameter “trumpFilter” describes which, if any, of the 5 possibilities that will be excluded from the calculations. They are defined in Suit encoding order, so setting trumpFilter to {FALSE, FALSE, TRUE, TRUE, TRUE} means that values will only be calculated for the trump suits spades and hearts.

-

The maximum number of DD tables in a CallAllTables call depends on the number of strains required, see the following table:

+

The maximum number of DD tables in a CalcAllTables call depends on the number of strains required, see the following table:

diff --git a/doc/dll-description.md b/doc/dll-description.md index 1e5d01ad..9d532745 100644 --- a/doc/dll-description.md +++ b/doc/dll-description.md @@ -908,13 +908,13 @@ CalcDDtable solves a single deal “ tableDeal ” and returns the doubl CalcAllTablesPBN is just like CalcAllTables, except for the input format. -CallAllTables calculates the double dummy values of the denomination/declarer hand combinations in “\*dealsp” for a number of DD tables in parallel. This increases the speed compared to calculating these values using a CalcDDtable call for each DD table. The results are returned in “\*resp” which must be defined before CalcAllTables is called. +CalcAllTables calculates the double dummy values of the denomination/declarer hand combinations in “\*dealsp” for a number of DD tables in parallel. This increases the speed compared to calculating these values using a CalcDDtable call for each DD table. The results are returned in “\*resp” which must be defined before CalcAllTables is called. The “mode” parameter contains the vulnerability (Vulnerable encoding; not to be confused with the SolveBoard mode) for use in the par calculation. It is set to -1 if no par calculation is to be performed. There are 5 possible denominations or strains (the four trump suits and no trump). The parameter “trumpFilter” describes which, if any, of the 5 possibilities that will be excluded from the calculations. They are defined in Suit encoding order, so setting trumpFilter to {FALSE, FALSE, TRUE, TRUE, TRUE} means that values will only be calculated for the trump suits spades and hearts. -The maximum number of DD tables in a CallAllTables call depends on the number of strains required, see the following table: +The maximum number of DD tables in a CalcAllTables call depends on the number of strains required, see the following table:
From 110c0241696e055a6404dc4eca623c2f16d3d6d1 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 1 Apr 2018 12:07:08 +0200 Subject: [PATCH 110/132] Documentation weakness (score == -2) fixed --- doc/DLL-dds_x.rtf | 484 +++++++++++++++++++++++----------------------- 1 file changed, 246 insertions(+), 238 deletions(-) diff --git a/doc/DLL-dds_x.rtf b/doc/DLL-dds_x.rtf index 3efac9bb..e16233ed 100644 --- a/doc/DLL-dds_x.rtf +++ b/doc/DLL-dds_x.rtf @@ -139,42 +139,43 @@ \rsid2566533\rsid2568164\rsid2635362\rsid2637590\rsid2641133\rsid2647507\rsid2769001\rsid2833141\rsid2838088\rsid2849436\rsid2884635\rsid2894529\rsid2952804\rsid3023369\rsid3034397\rsid3034548\rsid3036029\rsid3095740\rsid3167271\rsid3220430\rsid3228943 \rsid3231049\rsid3240706\rsid3243212\rsid3301731\rsid3303530\rsid3308555\rsid3342996\rsid3347855\rsid3352595\rsid3547548\rsid3552042\rsid3567911\rsid3752772\rsid3819803\rsid3893966\rsid3937665\rsid3954019\rsid4000336\rsid4002451\rsid4071901\rsid4076363 \rsid4091367\rsid4155951\rsid4264099\rsid4268479\rsid4272774\rsid4288894\rsid4330566\rsid4350787\rsid4405244\rsid4460289\rsid4460640\rsid4475334\rsid4533879\rsid4538894\rsid4542728\rsid4545218\rsid4602097\rsid4616356\rsid4658062\rsid4675069\rsid4679222 -\rsid4679726\rsid4683401\rsid4738929\rsid4744549\rsid4877901\rsid4981561\rsid5054625\rsid5070438\rsid5113162\rsid5186751\rsid5191231\rsid5248313\rsid5254237\rsid5318615\rsid5320216\rsid5332441\rsid5376200\rsid5388872\rsid5462095\rsid5506187\rsid5519688 -\rsid5525810\rsid5526679\rsid5532374\rsid5594575\rsid5638529\rsid5650157\rsid5653460\rsid5712409\rsid5712463\rsid5767474\rsid5779433\rsid5843075\rsid5862788\rsid5927621\rsid5928646\rsid5974982\rsid5979431\rsid6045873\rsid6047888\rsid6048783\rsid6054214 -\rsid6058144\rsid6099241\rsid6115982\rsid6164997\rsid6170015\rsid6179193\rsid6228168\rsid6246771\rsid6247188\rsid6302457\rsid6309374\rsid6309794\rsid6313661\rsid6317456\rsid6362316\rsid6377474\rsid6384684\rsid6436444\rsid6499600\rsid6516102\rsid6557897 -\rsid6557970\rsid6569652\rsid6570883\rsid6573516\rsid6578564\rsid6580905\rsid6629265\rsid6633554\rsid6641819\rsid6643870\rsid6650094\rsid6699576\rsid6701983\rsid6771888\rsid6845226\rsid6894851\rsid6895698\rsid6901705\rsid6910245\rsid6950962\rsid6957422 -\rsid6968528\rsid7019779\rsid7041439\rsid7089377\rsid7167315\rsid7277737\rsid7285964\rsid7302518\rsid7305895\rsid7415269\rsid7421144\rsid7483127\rsid7542885\rsid7545453\rsid7616262\rsid7678768\rsid7683346\rsid7686926\rsid7697883\rsid7759131\rsid7763137 -\rsid7804526\rsid7807046\rsid7880574\rsid7931676\rsid7949161\rsid7952569\rsid7959800\rsid7998566\rsid8000484\rsid8001475\rsid8090374\rsid8129941\rsid8137115\rsid8154048\rsid8194765\rsid8261617\rsid8281290\rsid8290285\rsid8323199\rsid8395240\rsid8408337 -\rsid8522857\rsid8527940\rsid8538722\rsid8541195\rsid8549130\rsid8588264\rsid8592696\rsid8593145\rsid8610523\rsid8616569\rsid8655475\rsid8682482\rsid8799536\rsid8923128\rsid8939615\rsid8983788\rsid8984001\rsid8999377\rsid9000425\rsid9002512\rsid9047914 -\rsid9069276\rsid9125746\rsid9175287\rsid9176944\rsid9249735\rsid9306501\rsid9314635\rsid9315241\rsid9331762\rsid9389132\rsid9401184\rsid9450855\rsid9515364\rsid9515749\rsid9530285\rsid9534906\rsid9572146\rsid9586997\rsid9588289\rsid9589735\rsid9713208 -\rsid9716036\rsid9716705\rsid9731125\rsid9834330\rsid9838060\rsid9845272\rsid9851850\rsid9856546\rsid9898065\rsid9907738\rsid9911854\rsid9974881\rsid10056466\rsid10108539\rsid10122796\rsid10173450\rsid10174318\rsid10176355\rsid10239463\rsid10245607 -\rsid10290420\rsid10308289\rsid10310988\rsid10313626\rsid10376323\rsid10383915\rsid10423813\rsid10426263\rsid10452726\rsid10486826\rsid10487319\rsid10490777\rsid10496751\rsid10567623\rsid10576044\rsid10616963\rsid10631094\rsid10646944\rsid10698169 -\rsid10774562\rsid10813614\rsid10831092\rsid10838587\rsid10843677\rsid10967321\rsid11030455\rsid11078728\rsid11089766\rsid11099036\rsid11107656\rsid11149793\rsid11173409\rsid11276707\rsid11277669\rsid11279197\rsid11280091\rsid11294126\rsid11297517 -\rsid11344057\rsid11351616\rsid11367514\rsid11540483\rsid11562205\rsid11762622\rsid11801900\rsid11805493\rsid11868543\rsid11882119\rsid11930665\rsid11946565\rsid11952575\rsid11956256\rsid11958279\rsid12008966\rsid12014436\rsid12065713\rsid12068517 -\rsid12069216\rsid12071252\rsid12087407\rsid12128238\rsid12156867\rsid12210879\rsid12400949\rsid12408664\rsid12460046\rsid12520971\rsid12530193\rsid12595610\rsid12595779\rsid12615130\rsid12649012\rsid12657542\rsid12658578\rsid12658900\rsid12659025 -\rsid12720965\rsid12732549\rsid12739696\rsid12788235\rsid12797083\rsid12854747\rsid12874235\rsid12914880\rsid12915233\rsid12941889\rsid12982360\rsid12983768\rsid12986669\rsid12992185\rsid12998134\rsid13053124\rsid13071121\rsid13072585\rsid13174672 -\rsid13180120\rsid13200681\rsid13244366\rsid13250408\rsid13267252\rsid13316938\rsid13319718\rsid13321745\rsid13331862\rsid13336457\rsid13444065\rsid13452191\rsid13457490\rsid13530431\rsid13593709\rsid13641876\rsid13697230\rsid13701456\rsid13703926 -\rsid13714332\rsid13771084\rsid13780248\rsid13840817\rsid13857996\rsid13902528\rsid13902769\rsid13915886\rsid14090435\rsid14092583\rsid14095979\rsid14098709\rsid14102810\rsid14119459\rsid14169293\rsid14171083\rsid14292727\rsid14295269\rsid14307787 -\rsid14370947\rsid14429502\rsid14435334\rsid14436934\rsid14444034\rsid14498845\rsid14574742\rsid14634080\rsid14636249\rsid14814422\rsid14892228\rsid15031452\rsid15079468\rsid15084961\rsid15088206\rsid15150655\rsid15283250\rsid15291332\rsid15299259 -\rsid15413752\rsid15420320\rsid15490742\rsid15613967\rsid15620535\rsid15664614\rsid15668792\rsid15679176\rsid15744623\rsid15747980\rsid15755105\rsid15757396\rsid15800872\rsid15821976\rsid15824246\rsid15932640\rsid15937974\rsid15939092\rsid15941930 -\rsid15999168\rsid16002722\rsid16012515\rsid16021753\rsid16057925\rsid16132195\rsid16147558\rsid16151628\rsid16189992\rsid16206388\rsid16217378\rsid16276961\rsid16323149\rsid16348565\rsid16386593\rsid16401568\rsid16405367\rsid16456729\rsid16467273 -\rsid16470149\rsid16530750\rsid16534708\rsid16585076\rsid16599140\rsid16609230\rsid16610750\rsid16655487\rsid16662276\rsid16676162\rsid16713324\rsid16715055\rsid16720464\rsid16724586\rsid16731528}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0 -\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Soren Hein}{\operator Soren Hein}{\creatim\yr2014\mo11\dy18\hr12\min16}{\revtim\yr2018\mo4\dy1\hr12\min1}{\printim\yr2016\mo1\dy1\hr23\min11}{\version23}{\edmins0} -{\nofpages22}{\nofwords6014}{\nofchars37891}{\*\company HP}{\nofcharsws43818}{\vern57445}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1417\margr1417\margt1417\margb1417\gutter0\ltrsect +\rsid4679726\rsid4683401\rsid4738929\rsid4744549\rsid4877901\rsid4981561\rsid5054625\rsid5070438\rsid5113162\rsid5186751\rsid5191231\rsid5248313\rsid5254237\rsid5318615\rsid5320216\rsid5332441\rsid5376200\rsid5388872\rsid5399796\rsid5462095\rsid5506187 +\rsid5519688\rsid5525810\rsid5526679\rsid5532374\rsid5594575\rsid5638529\rsid5650157\rsid5653460\rsid5712409\rsid5712463\rsid5767474\rsid5779433\rsid5843075\rsid5862788\rsid5927621\rsid5928646\rsid5974982\rsid5979431\rsid6045873\rsid6047888\rsid6048783 +\rsid6054214\rsid6058144\rsid6099241\rsid6115982\rsid6164997\rsid6170015\rsid6179193\rsid6228168\rsid6246771\rsid6247188\rsid6302457\rsid6309374\rsid6309794\rsid6313661\rsid6317456\rsid6362316\rsid6377474\rsid6384684\rsid6436444\rsid6499600\rsid6516102 +\rsid6557897\rsid6557970\rsid6569652\rsid6570883\rsid6573516\rsid6578564\rsid6580905\rsid6629265\rsid6633554\rsid6641819\rsid6643870\rsid6650094\rsid6699576\rsid6701983\rsid6771888\rsid6845226\rsid6894851\rsid6895698\rsid6901705\rsid6910245\rsid6950962 +\rsid6957422\rsid6968528\rsid7019779\rsid7041439\rsid7089377\rsid7167315\rsid7277737\rsid7285964\rsid7302518\rsid7305895\rsid7415269\rsid7421144\rsid7472903\rsid7483127\rsid7542885\rsid7545453\rsid7616262\rsid7678768\rsid7683346\rsid7686926\rsid7697883 +\rsid7759131\rsid7763137\rsid7804526\rsid7807046\rsid7880574\rsid7931676\rsid7949161\rsid7952569\rsid7959800\rsid7998566\rsid8000484\rsid8001475\rsid8090374\rsid8129941\rsid8137115\rsid8154048\rsid8194765\rsid8261617\rsid8281290\rsid8290285\rsid8323199 +\rsid8395240\rsid8408337\rsid8522857\rsid8527940\rsid8538722\rsid8541195\rsid8549130\rsid8588264\rsid8592696\rsid8593145\rsid8610523\rsid8616569\rsid8655475\rsid8682482\rsid8799536\rsid8923128\rsid8939615\rsid8983788\rsid8984001\rsid8999377\rsid9000425 +\rsid9002512\rsid9047914\rsid9069276\rsid9125746\rsid9175287\rsid9176944\rsid9249735\rsid9306501\rsid9314635\rsid9315241\rsid9331762\rsid9389132\rsid9401184\rsid9450855\rsid9515364\rsid9515749\rsid9530285\rsid9534906\rsid9572146\rsid9586997\rsid9588289 +\rsid9589735\rsid9713208\rsid9716036\rsid9716705\rsid9731125\rsid9834330\rsid9838060\rsid9845272\rsid9851850\rsid9856546\rsid9898065\rsid9907738\rsid9911854\rsid9974881\rsid10056466\rsid10108539\rsid10122796\rsid10173450\rsid10174318\rsid10176355 +\rsid10239463\rsid10245607\rsid10290420\rsid10308289\rsid10310988\rsid10313626\rsid10376323\rsid10383915\rsid10423813\rsid10426263\rsid10452726\rsid10486826\rsid10487319\rsid10490777\rsid10496751\rsid10567623\rsid10576044\rsid10616963\rsid10631094 +\rsid10646944\rsid10698169\rsid10774562\rsid10813614\rsid10831092\rsid10838587\rsid10843677\rsid10967321\rsid11030455\rsid11078728\rsid11089766\rsid11099036\rsid11107656\rsid11149793\rsid11173409\rsid11276707\rsid11277669\rsid11279197\rsid11280091 +\rsid11294126\rsid11297517\rsid11344057\rsid11351616\rsid11367514\rsid11540483\rsid11562205\rsid11762622\rsid11801900\rsid11805493\rsid11868543\rsid11882119\rsid11930665\rsid11946565\rsid11952575\rsid11956256\rsid11958279\rsid12008966\rsid12014436 +\rsid12065713\rsid12068517\rsid12069216\rsid12071252\rsid12087407\rsid12128238\rsid12156867\rsid12198414\rsid12210879\rsid12400949\rsid12408664\rsid12460046\rsid12520971\rsid12530193\rsid12595610\rsid12595779\rsid12615130\rsid12649012\rsid12657542 +\rsid12658578\rsid12658900\rsid12659025\rsid12720965\rsid12732549\rsid12739696\rsid12788235\rsid12797083\rsid12854747\rsid12874235\rsid12914880\rsid12915233\rsid12941889\rsid12982360\rsid12983768\rsid12986669\rsid12992185\rsid12998134\rsid13053124 +\rsid13071121\rsid13072585\rsid13174672\rsid13180120\rsid13200681\rsid13244366\rsid13250408\rsid13267252\rsid13316938\rsid13319718\rsid13321745\rsid13331862\rsid13336457\rsid13444065\rsid13452191\rsid13457490\rsid13530431\rsid13593709\rsid13641876 +\rsid13697230\rsid13701456\rsid13703926\rsid13714332\rsid13771084\rsid13780248\rsid13840817\rsid13843369\rsid13857996\rsid13902528\rsid13902769\rsid13915886\rsid14090435\rsid14092583\rsid14095979\rsid14098709\rsid14102810\rsid14119459\rsid14169293 +\rsid14171083\rsid14292727\rsid14295269\rsid14307787\rsid14370947\rsid14429502\rsid14435334\rsid14436934\rsid14444034\rsid14498845\rsid14574742\rsid14634080\rsid14636249\rsid14814422\rsid14892228\rsid15031452\rsid15079468\rsid15084961\rsid15088206 +\rsid15150655\rsid15283250\rsid15291332\rsid15299259\rsid15413752\rsid15420320\rsid15490742\rsid15613967\rsid15620535\rsid15664614\rsid15668792\rsid15679176\rsid15744623\rsid15747980\rsid15755105\rsid15757396\rsid15800872\rsid15821976\rsid15824246 +\rsid15932640\rsid15937974\rsid15939092\rsid15941930\rsid15999168\rsid16002722\rsid16012515\rsid16021753\rsid16057925\rsid16132195\rsid16147558\rsid16151628\rsid16189992\rsid16206388\rsid16217378\rsid16276961\rsid16323149\rsid16348565\rsid16386593 +\rsid16401568\rsid16405367\rsid16456729\rsid16467273\rsid16470149\rsid16530750\rsid16534708\rsid16585076\rsid16599140\rsid16609230\rsid16610750\rsid16655487\rsid16662276\rsid16676162\rsid16713324\rsid16715055\rsid16720464\rsid16724586\rsid16731528} +{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Soren Hein}{\operator Soren Hein}{\creatim\yr2014\mo11\dy18\hr12\min16}{\revtim\yr2018\mo4\dy1\hr12\min6} +{\printim\yr2016\mo1\dy1\hr23\min11}{\version26}{\edmins0}{\nofpages22}{\nofwords6025}{\nofchars37958}{\*\company HP}{\nofcharsws43896}{\vern57445}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}} +\paperw12240\paperh15840\margl1417\margr1417\margt1417\margb1417\gutter0\ltrsect \widowctrl\ftnbj\aenddoc\hyphhotz425\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120 \dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\splytwnine\ftnlytwnine\htmautsp\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct\asianbrkrule\rsidroot4538894 \newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0{\*\wgrffmtfilter 2450} \nofeaturethrottle1\ilfomacatclnup0{\*\ftnsep \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14119459 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 { -\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid7019779 \chftnsep +\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid13843369 \chftnsep \par }}{\*\ftnsepc \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14119459 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\insrsid7019779 \chftnsepc +\insrsid13843369 \chftnsepc \par }}{\*\aftnsep \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14119459 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\insrsid7019779 \chftnsep +\insrsid13843369 \chftnsep \par }}{\*\aftnsepc \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14119459 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\insrsid7019779 \chftnsepc +\insrsid13843369 \chftnsepc \par }}\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\footerr \ltrpar \pard\plain \ltrpar\s24\qc \li0\ri0\nowidctlpar\tqc\tx4536\tqr\tx9072\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7483127\charrsid14119459 PAGE \\* MERGEFORMAT}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\lang1024\langfe1024\noproof\langnp1031\insrsid16713324\charrsid16713324 14}}}\sectd \ltrsect\linex0\endnhere\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7483127\charrsid14119459 +\f37\lang1024\langfe1024\noproof\langnp1031\insrsid12198414\charrsid12198414 22}}}\sectd \ltrsect\linex0\endnhere\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7483127\charrsid14119459 \par }\pard \ltrpar\s24\ql \li0\ri0\nowidctlpar\tqc\tx4536\tqr\tx9072\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid7483127 \par }}{\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}} {\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8 @@ -185,7 +186,7 @@ \par Latest DLL issue with this description is available at }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid15824246 HYPERLINK "http://www.bahnhof.se/wb758135/" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid15824246 {\*\datafield 00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b5800000068007400740070003a002f002f007700770077002e006200610068006e0068006f0066002e00730065002f00770062003700350038003100330035002f000000795881f43b1d7f48af2c825dc48527630000 -0000a5ab000000000011000000ff008c00507a49000032}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid6650094\charrsid15824246 http://www.bahnhof.se/wb758135/}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 +0000a5ab000000000011000000ff008c00507a4900003201}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid6650094\charrsid15824246 http://www.bahnhof.se/wb758135/}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid6650094\charrsid14119459 \par \par @@ -202,8 +203,8 @@ The callable functions are all preceded with }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs \f37\cf1\insrsid14119459 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13331862 \par \par }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid14119459\charrsid14119459 REF Return \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b020000000800000007000000520065007400750072006e0000000003}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Return codes}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 -\af1 \ltrch\fcs0 \f37\cf1\insrsid14119459 are given at the end.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10576044 +08d0c9ea79f9bace118c8200aa004ba90b020000000800000007000000520065007400750072006e000000000300}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Return codes}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { +\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14119459 are given at the end.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10576044 \par \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid13331862 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1789909 Not all functions are present in all versions of the DLL.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8154048 For historical reasons, the function names are not entirely consistent with respect to the input for @@ -302,17 +303,17 @@ ConvertToSidesTextFormat}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2238558 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14119459\charrsid14119459 - REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000006}} + REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000000629}} }{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789909 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5767474\charrsid14119459 REF deal \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c0000000014}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000001400}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16530750 dl,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 \par int target, \par int solutions, \par int mode, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12659025\charrsid14119459 REF futureTricks \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b00730000000014}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b007300000000143b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *futp, \par int threadIndex\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid13267252 Binary }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789909 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 @@ -323,17 +324,17 @@ The most basic function, solves a single hand from the beginning or from later p \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid13331862\charrsid13331862 REF SolveBoardPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid13331862 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000053006f006c007600650042006f00610072006400500042004e0000000030}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveBoardPBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000053006f006c007600650042006f00610072006400500042004e000000003000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveBoardPBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid13331862 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789909 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6968528\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e0000007748}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e000000774800}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid4616356 dlPBN}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16530750 ,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 \par int target, \par int solutions, \par int mode, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12659025\charrsid14119459 REF futureTricks \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b0073000000bf63}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b0073000000bf6300}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *futp, \par int threadIndex}{\rtlch\fcs1 \af1\afs18 \ltrch\fcs0 \f37\fs18\cf1\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid13267252 PBN}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -344,15 +345,15 @@ The most basic function, solves a single hand from the beginning or from later p \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid11107656\charrsid11107656 - REF CalcDDtable \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid11107656 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000430061006c006300440044007400610062006c00650000002030}} + REF CalcDDtable \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid11107656 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000430061006c006300440044007400610062006c0065000000203080}} }{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtable}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5974982 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid6901705 struct}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\insrsid8154048\charrsid6901705 } {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000226f}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000226f00}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid6901705 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid16456729\charrsid6901705 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 tableDeal, \line struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT } -{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000007200}}}{\fldrslt {\rtlch\fcs1 +{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000720007}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 * tablep\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid13267252 Binary }{ @@ -364,15 +365,15 @@ The most basic function, solves a single hand from the beginning or from later p \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid11107656\charrsid11107656 REF CalcDDtablePBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid11107656 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000430061006c006300440044007400610062006c006500500042004e0000006769}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtablePBN}}} +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000430061006c006300440044007400610062006c006500500042004e000000676900}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtablePBN}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst { \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e0000006500}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e000000650000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 \line }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6968528\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 tableDealPBN, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5974982 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000003036}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000303600}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 * tablep\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 PBN }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14307787\charrsid14119459 @@ -386,20 +387,20 @@ The most basic function, solves a single hand from the beginning or from later p \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid11107656\charrsid11107656 REF CalcAllTables \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid11107656 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e000000430061006c00630041006c006c005400610062006c006500730000002e03}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcAllTables}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e000000430061006c00630041006c006c005400610062006c006500730000002e0300}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcAllTables}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableDeals \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d000000640064005400610062006c0065004400650061006c00730000000012}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeals}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d000000640064005400610062006c0065004400650061006c0073000000001200}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeals}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 dealsp, \par int mode, \par int trumpFilter[5], \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTablesRes \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065007300520065007300000013eb}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065007300520065007300000013eb00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *resp, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6701983 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6701983\charrsid14119459 REF allParResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c0074007300000013a2}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c0074007300000013a212}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 presp\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 Binary \cell }\pard \ltrpar @@ -411,21 +412,21 @@ The most basic function, solves a single hand from the beginning or from later p \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid11107656\charrsid11107656 REF CalcAllTablesPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid11107656 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b020000000800000011000000430061006c00630041006c006c005400610062006c0065007300500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcAllTablesPBN}}} +08d0c9ea79f9bace118c8200aa004ba90b020000000800000011000000430061006c00630041006c006c005400610062006c0065007300500042004e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcAllTablesPBN}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableDealsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000010000000640064005400610062006c0065004400650061006c007300500042004e0000001400}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000010000000640064005400610062006c0065004400650061006c007300500042004e000000140012}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *dealsp, \par int mode, \par int trumpFilter[5], }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid70445\charrsid14119459 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTablesRes \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c006500730052006500730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c00650073005200650073000000000040}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *resp, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6701983 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6701983\charrsid14119459 REF allParResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c00740073000000c569}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c00740073000000c5691a}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 presp\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 PBN }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -440,14 +441,14 @@ The most basic function, solves a single hand from the beginning or from later p \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5320216\charrsid5320216 REF SolveAllBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5320216 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f00000053006f006c007600650041006c006c0042006f00610072006400730000002200}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllBoards}}} +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f00000053006f006c007600650041006c006c0042006f00610072006400730000002200cc}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllBoards}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e0000009100}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e00000091001a}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *bop, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14429502 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14429502\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f00610072006400730000001600}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f0061007200640073000000160000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid7880574 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574 * }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid7880574 solvedp\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 PBN }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -461,14 +462,14 @@ The most basic function, solves a single hand from the beginning or from later p \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5320216\charrsid5320216 REF SolveAllChunksBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5320216 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300420069006e0000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunksBin} -}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af2\afs18 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300420069006e000000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunksBin +}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f0061007200640073000000006e}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f0061007200640073000000006e00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *bop, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14429502 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14429502\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f00610072006400730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f0061007200640073000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 int chunkSize\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -481,13 +482,13 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5320216\charrsid5320216 REF SolveAllChunks \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5320216 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f00000053006f006c007600650041006c006c004300680075006e006b00730000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunks}}} +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f00000053006f006c007600650041006c006c004300680075006e006b0073000000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunks}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid16151628 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16151628\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16151628\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e00000000001d}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16151628\charrsid14119459 *bop, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16151628\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000b0}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000b06d}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16151628\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16151628\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16151628\charrsid14119459 solvedp, }{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 @@ -501,14 +502,14 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5320216\charrsid5320216 REF SolveAllChunksPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5320216 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunksPBN} -}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300500042004e00000000001a}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunksPBN +}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *bop, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14429502 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14429502\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f00610072006400730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f0061007200640073000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 solvedp, }{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 @@ -522,16 +523,16 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12520971 \page \par \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12658900\charrsid12658900 REF Par \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid12658900 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000400000050006100720000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 Par}}} +\f2\fs18\ul\cf19\insrsid16386593\charrsid12658900 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000040000005000610072000000000008}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 Par}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid12658900 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000054}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000005400}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 tablep, }{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6701983\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c007400730000000003}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c00740073000000000300}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *presp, \par int vulnerable\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 No format }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14307787\charrsid14119459 @@ -545,11 +546,11 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3567911 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3567911 DealerPar}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3567911\charrsid12658900 \cell }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3567911\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000d7}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000d700}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 tablep, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "parResultsDealer" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c0065007200000000d00000000000ff002e213120f5000072}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c0065007200000000d00000000000ff002e213120f50000726f}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid13701456\charrsid16456729 parResultsDealer}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid13701456 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 presp, @@ -564,11 +565,12 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3567911 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430\charrsid3220430 DealerParBin }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3220430 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 struct } {\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "ddTableResults" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000011006c00000aff0021080020a700001e}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 -ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000011006c00000aff0021080020a700001e6f}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 * tablep, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000780000000000ff00e200742085000012}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000780000000000ff00e20074208500001236}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 * presp, @@ -584,7 +586,7 @@ ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\a \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3567911 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430\charrsid3220430 ConvertToDealerTextFormat}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3220430 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 -{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d006100730074006500720000000068008c0000006d008e00202053000076}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d006100730074006500720000000068008c0000006d008e00202053000076e0}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 pres, @@ -598,11 +600,11 @@ Text}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid3220430\charrsid14 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid348894 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid15939092 SidesPar}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid348894\charrsid8538722 \cell }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid348894\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000002e}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000002e00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894\charrsid14119459 tablep, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "parResultsDealer" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c00650072000000000000000000000000de003c0096000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c00650072000000000000000000000000de003c0096000000e8}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3954019\charrsid16456729 parResultsDealer}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894\charrsid14119459 presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894 , @@ -616,11 +618,11 @@ Par results are given for sides with the DealerPar output format.}{\rtlch\fcs1 \ \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid348894 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430\charrsid3220430 SidesParBin}{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3220430 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 struct } {\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "ddTableResults" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000000000000000000002e3137001000f200}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 -ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \line }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\cf1\insrsid3220430\charrsid3220430 * tablep, +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000000000000000000002e3137001000f200c8}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\cf1\insrsid16456729 \line }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 * tablep, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d00610073007400650072000000000004000000000000b5006923a700f100}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d00610073007400650072000000000004000000000000b5006923a700f10000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 sidesRes[2], @@ -636,13 +638,14 @@ ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\a \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid348894 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430\charrsid3220430 ConvertToSidesTextFormat}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid16057925 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid8682482 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid8682482 -{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000000f0000e5002c008e0d3a006a00f100}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000000f0000e5002c008e0d3a006a00f10073}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16057925\charrsid8682482 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 pres, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid8682482 HYPERLINK \\l "parTextResults" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid8682482 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000700061007200540065007800740052006500730075006c007400730000000000000000f7000000d2003e00f700f100}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16057925\charrsid8682482 -parTextResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000700061007200540065007800740052006500730075006c007400730000000000000000f7000000d2003e00f700f1002b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\cs26\f2\fs18\ul\cf19\insrsid16057925\charrsid8682482 parTextResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 resp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid348894 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8290285 Text}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid3220430\charrsid13053124 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1520891 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid1520891\charrsid1520891 @@ -653,22 +656,22 @@ Example of text output from }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\i \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid8538722 - REF CalcPar \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid8538722 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000008000000430061006c00630050006100720000001337}}}{\fldrslt {\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcPar}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid8538722 \cell }\pard \ltrpar + REF CalcPar \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid8538722 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000008000000430061006c0063005000610072000000133700}}}{\fldrslt { +\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcPar}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid8538722 \cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid6557970 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c0000001300}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000130000}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid6557970 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482\charrsid6557970 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 tableDeal, \par int vulnerable, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000f8}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000f808}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15757396 \par * }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 tablep, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6701983 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6701983\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c0074007300000000eb}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c0074007300000000eb00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 presp\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14307787 Binary}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 @@ -679,21 +682,21 @@ Solves for both the DD result table and the par contracts}{\rtlch\fcs1 \af1\afs2 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid8538722 - REF CalcParPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid8538722 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000430061006c006300500061007200500042004e000000004a}} + REF CalcParPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid8538722 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000430061006c006300500061007200500042004e000000004a00}} }{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcParPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid8538722 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e00000000ba}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e00000000ba00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid70445\charrsid14119459 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 tableDealPBN, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid8682482 HYPERLINK \\l "ddTableResults" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid8682482 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000000000307b0f0020000435000068000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid6578564\charrsid8682482 -ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15757396 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000000000307b0f002000043500006800000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\cs26\f2\fs18\ul\cf19\insrsid6578564\charrsid8682482 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15757396 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 * tablep, \par int vulnerable, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6701983 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6701983\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c007400730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c00740073000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 presp\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 PBN \cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid2769001 As CalcPar, but with PBN input format.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid3034548 }{\rtlch\fcs1 \af1\afs22 @@ -705,18 +708,18 @@ ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\a \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12520971 \page \par \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid2849436 REF TracePlayBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 -\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid2849436 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d0000005400720061006300650050006c0061007900420069006e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid2849436 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d0000005400720061006300650050006c0061007900420069006e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalysePlayBin}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid2849436 \cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6968528\charrsid14119459 REF deal \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c0000000050}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000005001}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 dl, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF playTraceBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTraceBin}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e000000000010}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTraceBin}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6580905\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid14119459\charrsid14119459 play}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 ,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid14119459\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14119459\charrsid14119459 REF solvedPlay \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c006100790000000001}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c00610079000000000111}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid14119459\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid14119459\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid14119459\charrsid14119459 solvedp,}{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 @@ -730,18 +733,18 @@ ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\a \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid2849436 - REF TracePlayPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid2849436 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d0000005400720061006300650050006c0061007900500042004e0000000000}} -}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalysePlayPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid2849436 \cell + REF TracePlayPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid2849436 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d0000005400720061006300650050006c0061007900500042004e000000000012 +}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalysePlayPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid2849436 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6968528\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e0000002000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e000000200000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 dlPBN, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF playTracePBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e0000000053}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracePBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e000000005314}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracePBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 playPBN, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14119459\charrsid14119459 REF solvedPlay \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c0061007900000000ec}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c0061007900000000ec00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 solvedp, \par int thrId\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 PBN }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -756,16 +759,16 @@ ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\a \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid5979431 REF TraceAllPlaysBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5979431 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000110000005400720061006300650041006c006c0050006c00610079007300420069006e0000000042}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalyseAllPlaysBin}}} +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000110000005400720061006300650041006c006c0050006c00610079007300420069006e000000004200}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalyseAllPlaysBin}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid5979431 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f0061007200640073000000a069}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f0061007200640073000000a06900}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *bop, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF playTracesBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300420069006e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesBin}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300420069006e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesBin}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *plp, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF solvedPlays \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c0061007900730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c006100790073000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 solvedp, \par int chunkSize\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 Binary }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -779,17 +782,17 @@ boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \lt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid5979431 REF TraceAllPlaysPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5979431 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000110000005400720061006300650041006c006c0050006c00610079007300500042004e00000000e9}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalyseAllPlaysPBN}}} +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000110000005400720061006300650041006c006c0050006c00610079007300500042004e00000000e900}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalyseAllPlaysPBN}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid5979431 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *bopPBN, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF playTracesPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesPBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300500042004e0000000000d8}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesPBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 plpPBN, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF solvedPlays \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c0061007900730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c0061007900730000000000a2}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 solvedp, \par int chunkSize\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 PBN }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -803,7 +806,7 @@ boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \lt \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 REF SetMaxThreads \\h }{ -\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005300650074004d0061007800540068007200650061006400730000008f00}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005300650074004d0061007800540068007200650061006400730000008f00bd}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SetMaxThreads}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1056208\charrsid5979431 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1056208 int }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1056208\charrsid1056208 userThreads}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1056208\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 @@ -815,7 +818,7 @@ Used at initial start and can also be called with a request for allocating memor \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 REF FreeMemory \\h }{ -\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000046007200650065004d0065006d006f00720079000000de36}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000046007200650065004d0065006d006f00720079000000de36e6}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 FreeMemory}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1056208\charrsid5979431 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1056208 void}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1056208\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid1056208\charrsid14119459 \cell }\pard \ltrpar @@ -826,10 +829,10 @@ Used at initial start and can also be called with a request for allocating memor \brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 - REF GetDDSInfo \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000047006500740044004400530049006e0066006f0000001100}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 + REF GetDDSInfo \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000047006500740044004400530049006e0066006f000000110012}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 GetDDSInfo}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7483127\charrsid9069276 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1921007\charrsid1921007 - REF DDSInfo \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid1921007 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000044004400530049006e0066006f000000c200}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 + REF DDSInfo \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid1921007 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000044004400530049006e0066006f000000c20000}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1921007 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 DDSInfo}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7483127 * info\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid7483127\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8682482 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid7483127 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 { @@ -960,7 +963,7 @@ Holding\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1668\clshdrawnil \cellx1560\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3260\clshdrawnil \cellx4820\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4618\clshdrawnil \cellx9438\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid10576044\charrsid14119459 {\*\bkmkstart deal}deal{\*\bkmkend deal}\cell int trump;\cell }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid10239463\charrsid14119459 REF suit \\h \\ -* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000730075006900740000004702}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000047022c}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10239463\charrsid14119459 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10576044\charrsid14119459 \trowd \irow1\irowband1\ltrrow \ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -969,7 +972,7 @@ Holding\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4618\clshdrawnil \cellx9438\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid10576044\charrsid14119459 \cell int first;\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10239463\charrsid14119459 The hand leading to the trick. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF hand \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e00640000000800}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e0064000000080095}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10239463\charrsid14119459 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 \par \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10576044\charrsid14119459 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -978,7 +981,7 @@ Holding\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4618\clshdrawnil \cellx9438\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid10576044\charrsid14119459 \cell int currentTrickSuit[3];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12659025 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 Up to 3 cards may already have been played to the trick. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{ -\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000730075006900740000000072}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000007258}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid163452 }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid163452\charrsid163452 Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10576044\charrsid14119459 \trowd \irow3\irowband3\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 @@ -995,13 +998,13 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4618\clshdrawnil \cellx9438\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid10576044\charrsid14119459 \cell unsigned int remainCards[4][4];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12659025 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5254237 1st}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 index is }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid15757396\charrsid14119459 REF hand \\h \\ -* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e00640000002267}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e0064000000226700}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5254237 , 2nd}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 index is }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid15757396\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 -\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000201e}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}} -\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid15757396\charrsid14119459 . }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12983768 remainCards use}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000201e00}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit} +}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid15757396\charrsid14119459 . }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12983768 remainCards use}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5254237 s }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid12983768 HYPERLINK \\l "holding" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid12983768 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000068006f006c00640069006e006700000016003e23000200a40030340f002f00901c}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \cs26\f37\fs22\ul\cf19\insrsid5254237\charrsid12983768 Holding}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000068006f006c00640069006e006700000016003e23000200a40030340f002f00901c00}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \cs26\f37\fs22\ul\cf19\insrsid5254237\charrsid12983768 Holding}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12983768 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5254237 .}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10576044\charrsid14119459 \trowd \irow5\irowband5\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1021,7 +1024,7 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 {\*\bkmkstart dealPBN}dealPBN{\*\bkmkend dealPBN}\cell int trump;\cell }{\field{\*\fldinst { \rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000730075006900740000002002}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000200264}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow1\irowband1\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1029,8 +1032,8 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 \cell int first;\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 The hand leading to the trick. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF hand \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 -\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e00640000000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}} -\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid9713208 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 \cell }\pard \ltrpar +\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e0064000000000064}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand} +}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid9713208 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1038,7 +1041,7 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 \cell int currentTrickSuit[3];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 Up to 3 cards may already have been played to the trick. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{ -\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000ff}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000ff64}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding.\cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow3\irowband3\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1055,7 +1058,7 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 \cell char remainCards[80];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 Remaining cards. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF PBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 -\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000004000000500042004e0000002064}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 PBN}}} +\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000004000000500042004e000000206400}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 PBN}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 { \rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow5\irowband5\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv \brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl @@ -1070,10 +1073,10 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid10967321 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid10967321\charrsid14119459 {\*\bkmkstart ddTableDeal}ddTableDeal{\*\bkmkend ddTableDeal}\cell unsigned int cards[4][4]; \cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10967321 Encodes a deal. First index is hand. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid10967321\charrsid14119459 REF hand \\h \\* MERGEFORMAT }{ -\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e00640000001761}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e006400000017616d}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10967321 encoding. Second index is suit. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid10967321\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000206f}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000206f6d}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10967321\charrsid14119459 encoding.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10967321\charrsid10967321 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \b\f37\fs22\cf1\insrsid10967321\charrsid14119459 \trowd \irow1\irowband1\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1090,7 +1093,7 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12210879 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 {\*\bkmkstart ddTableDealPBN}ddTableDealPBN}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 {\*\bkmkend ddTableDealPBN} }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 \cell char cards[80];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12210879\charrsid14119459 Encodes a deal}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12658578\charrsid14119459 . }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12658578\charrsid14119459 REF PBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000004000000500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000004000000500042004e000000000055}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 PBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12658578\charrsid14119459 encoding.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12210879\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \b\f37\fs22\cf1\insrsid12210879\charrsid14119459 \trowd \irow1\irowband1\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1115,7 +1118,7 @@ Encodes a deal}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12658578 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid70445\charrsid14119459 \cell }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\lang1031\langfe1053\langnp1031\insrsid70445\charrsid7697883 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000009d}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\ +\f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000009d02}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\ * MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\lang1031\langfe1053\langnp1031\insrsid70445\charrsid7697883 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12210879 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\lang1031\langfe1053\langnp1031\insrsid12210879\charrsid7697883 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 @@ -1142,7 +1145,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12210879 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 \cell }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 s}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 truct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid12210879\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 -\ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e0000002000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e000000200000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 deals[}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 X}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 ];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12210879 X = }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid12210879 MAXNOOFTABLES * DDS_STRAINS}{ @@ -1166,7 +1169,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid6968528\charrsid14119459 REF deal \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c0000003000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000300000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par [}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 @@ -1177,7 +1180,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int target}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000054}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000005400}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow3\irowband3\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1186,7 +1189,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int solutions}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000006f}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000006f00}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow4\irowband4\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1195,7 +1198,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int mode}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000003c}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000003c00}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow5\irowband5\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1216,7 +1219,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid6968528\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 [}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 @@ -1227,7 +1230,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int target}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000006}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000000600}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow3\irowband3\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid12210879\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1236,7 +1239,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int solutions}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow4\irowband4\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid12210879\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1245,7 +1248,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int mode}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow5\irowband5\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid12210879\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1275,7 +1278,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12720965\charrsid14119459 \cell int suit[13];\cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12659025 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 Suit of the each returned card. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000730075006900740000000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12720965\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12720965\charrsid14119459 \trowd \irow9\irowband9\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1292,17 +1295,20 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 \cell int equals[13];\cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid15283250 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 Lower-ranked equals}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid15283250 . } {\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid15283250\charrsid12983768 HYPERLINK \\l "holding" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid15283250\charrsid12983768 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000068006f006c00640069006e006700000016003e2300020018000000006198189dff}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \cs26\f37\fs22\ul\cf19\insrsid15283250\charrsid12983768 Holding}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid15283250 encoding.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid15757396 \cell }\pard \ltrpar +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000068006f006c00640069006e006700000016003e2300020018000000006198189dff00}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \cs26\f37\fs22\ul\cf19\insrsid15283250\charrsid12983768 Holding}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid15283250 encoding.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid15757396 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow11\irowband11\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid12210879\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb \brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1951\clshdrawnil \cellx1843\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2977\clshdrawnil \cellx4820 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 \cell int score[13];\cell }\pard \ltrpar -\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12659025 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 -1: target not reached. -\par Otherwise: Target of maximum number of tricks.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 -\trowd \irow12\irowband12\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12659025 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 -1: target not reached.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025 + +\par }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid7472903 -2 (if mode == 0): O}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12198414 nly one card to be played; s}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5399796 +ee SolveBoard() description.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid7472903\charrsid14119459 +\par }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 Otherwise: Target of maximum number of tricks.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 +\ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow12\irowband12\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid12210879\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb \brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1951\clshdrawnil \cellx1843\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2977\clshdrawnil \cellx4820 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 @@ -1325,7 +1331,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4694\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14429502 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid14429502\charrsid14119459 REF futureTricks \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b00730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b0073000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12065713\charrsid11099036 solvedBoard}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12065713\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 @@ -1351,9 +1357,9 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5974982 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid5974982\charrsid14119459 int resTable[5][4];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5974982\charrsid14119459 Encodes the solution of a deal for combinations of denomination and declarer. First index is denomination. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid5974982\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000ff}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000ff00}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5974982\charrsid14119459 encoding. Second index is declarer. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid5974982\charrsid14119459 REF hand \\h \\* MERGEFORMAT }{ -\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e006400000000c0}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e006400000000c000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5974982\charrsid14119459 encoding. Each entry is a number of tricks.\cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow1\irowband1\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl \brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1378,7 +1384,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4694\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12210879 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 \cell struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid12210879\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000040}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000040dc}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 results[}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 X}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 ];\cell }{ \rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12210879 X = }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid12210879 MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -1407,7 +1413,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 {\*\bkmkstart parResults}parResults{\*\bkmkend parResults}\cell char parScore[2][16];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14429502 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14429502\charrsid14119459 First index is NS/EW. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid14429502\charrsid14119459 REF side \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000730069006400650000000003}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Side}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073006900640065000000000300}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Side}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14429502\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow1\irowband1\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1417,7 +1423,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 [2][128];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14429502\charrsid14119459 First index is NS/EW. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid14429502\charrsid14119459 REF side \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000730069006400650000000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Side}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073006900640065000000000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Side}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14429502\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow2\irowband2\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1500,7 +1506,7 @@ There are up to 20 declarer/strain combinations per DD table}{\rtlch\fcs1 \af1\a \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3844\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid4330566 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12400949\charrsid14119459 \cell }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12400949 struct } {\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid11276707 HYPERLINK \\l "contractType" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid11276707 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000063006f006e00740072006100630074005400790070006500000000001171430000d500944500258e000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \cs26\f2\fs20\ul\cf19\insrsid12400949\charrsid11276707 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000063006f006e00740072006100630074005400790070006500000000001171430000d500944500258e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \cs26\f2\fs20\ul\cf19\insrsid12400949\charrsid11276707 contractType}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf19\insrsid12400949\charrsid11276707 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf19\insrsid11276707 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12400949 contracts}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12400949\charrsid14119459 [10];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12400949\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12400949\charrsid14119459 \trowd \irow3\irowband3\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt @@ -1655,7 +1661,7 @@ contractType}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3844\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid750270\charrsid14119459 \cell int suit[52];\cell }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid750270\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000002a}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000002a00}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid750270\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1664,7 +1670,7 @@ contractType}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid750270\charrsid14119459 \cell int rank[52];\cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid750270 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid750270\charrsid14119459 Encoding 2 .. 14 (}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \i\f37\fs22\cf1\insrsid750270\charrsid14119459 not}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid750270\charrsid14119459 }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid750270\charrsid14119459 REF card \\h \\ -* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006300610072006400000000bc}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006300610072006400000000bc00}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Card}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid750270\charrsid14119459 encoding).\cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow3\irowband3\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl \brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1716,7 +1722,7 @@ String of cards with no space in between, also not between tricks. Each card co \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3844\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 { \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6580905 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid6580905\charrsid14119459 REF playTraceBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 -\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e00000000b2}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e00000000b200}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 playTraceBin}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11276707 \par plays[MAXNOOFBOARDS}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 ];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -1741,7 +1747,7 @@ String of cards with no space in between, also not between tricks. Each card co \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3844\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 { \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6580905 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 Struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid6580905\charrsid14119459 REF playTracePBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 -\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e00000000b1}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e00000000b100}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 playTracePBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11276707 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 p}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11276707 lays[MAXNOOFBOARDS}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 ]; @@ -1789,7 +1795,7 @@ String of cards with no space in between, also not between tricks. Each card co \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3844\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 { \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6580905 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid6580905\charrsid14119459 REF solvedPlay \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 -\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c006100790000000018}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c00610079000000001800}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11276707 \par solved[MAXNOOFBOARDS}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 ];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6580905\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow2\irowband2\lastrow \ltrrow @@ -1808,14 +1814,14 @@ String of cards with no space in between, also not between tricks. Each card co \b\f37\cf1\insrsid6099241\charrsid14119459 {\*\bkmkend SolveBoard} \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid8154048 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid5767474 REF deal \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid5767474 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000000d}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}} +\f2\fs18\ul\cf19\insrsid16386593\charrsid5767474 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000000d00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid8154048 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241 dl,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid8154048 \par int target, \par int solutions, \par int mode, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid12659025 REF futureTricks \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid12659025 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b00730000000069}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b0073000000006900}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid8154048 *futp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid8154048 \par int threadIndex}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241\charrsid14119459 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 \cell }\pard\plain \ltrpar @@ -1823,7 +1829,7 @@ String of cards with no space in between, also not between tricks. Each card co \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 {\*\bkmkstart SolveBoardPBN}SolveBoardPBN}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241\charrsid14119459 {\*\bkmkend SolveBoardPBN} \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16731528 d}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid15150655 l}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16731528 ,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 @@ -1831,7 +1837,7 @@ String of cards with no space in between, also not between tricks. Each card co \par int solutions, \par int mode, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF futureTricks \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b00730000000064}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b0073000000006400}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *futp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel2\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 int threadIndex}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241\charrsid14119459 @@ -1878,7 +1884,7 @@ rols how many solutions should be returned; and mode }{\rtlch\fcs1 \af1 \ltrch\f \ltrch\fcs0 \f37\cf1\insrsid16530750 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11294126 \par For equivalent cards, only the highest is returned, and lower equivalent cards are encoded in the }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid11294126\charrsid11294126 REF futureTricks \\h }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\ul\cf19\insrsid11294126 \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid11294126 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b007300000000bd}} +\f37\ul\cf19\insrsid11294126 \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid11294126 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b007300000000bd00}} }{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11294126 structure (see \'93equals\'94). \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16530750 \par @@ -2034,20 +2040,20 @@ is the responsibility of the programmer using the DLL to ensure that reusing the \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid6557970 {\*\bkmkstart CalcDDtable}CalcDDtable}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241\charrsid6557970 {\*\bkmkend CalcDDtable} \par }\pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid6901705 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c0000003700}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\ +\f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000370000}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\ * MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid6901705 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 tableDeal, \line }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000001600}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000160000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 * tablep}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 {\*\bkmkstart CalcDDtablePBN}CalcDDtablePBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid6099241\charrsid14119459 {\*\bkmkend CalcDDtablePBN} \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e0000001608}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e000000160800}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 tableDealPBN, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000164a}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000164a00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 * tablep}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f37\cf1\insrsid6099241\charrsid6099241 \cell }\pard\plain \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6099241 \trowd \irow0\irowband0\lastrow \ltrrow\ts18\trgaph108\trleft-108\trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid6099241\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt @@ -2068,16 +2074,16 @@ which must be declared before calling }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\in \par \ltrrow}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 {\*\bkmkstart CalcAllTables}CalcAllTables}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241\charrsid14119459 {\*\bkmkend CalcAllTables} \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTableDeals \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d000000640064005400610062006c0065004400650061006c00730000000e02}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d000000640064005400610062006c0065004400650061006c00730000000e0200}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeals}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *dealsp,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par int mode, \par int trumpFilter[5], \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTablesRes \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065007300520065007300000073ff}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065007300520065007300000073ff00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *resp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF allParResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c007400730000001300}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c00740073000000130000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid1846101 \par }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel2\rin0\lin0\pararsid5594575\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 @@ -2085,17 +2091,17 @@ which must be declared before calling }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\in \rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 {\*\bkmkstart CalcAllTablesPBN}CalcAllTables}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241 PBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241\charrsid14119459 {\*\bkmkend CalcAllTablesPBN} \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTableDealsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000010000000640064005400610062006c0065004400650061006c007300500042004e00000013ff}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000010000000640064005400610062006c0065004400650061006c007300500042004e00000013ff00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *dealsp, }{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par int mode, \par int trumpFilter[5], \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTablesRes \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c006500730052006500730000001306}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c00650073005200650073000000130600}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *resp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8323199\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF allParResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c007400730000001300}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c00740073000000130000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid1846101\charrsid5594575 \cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6099241 \trowd \irow0\irowband0\lastrow \ltrrow @@ -2117,15 +2123,16 @@ in }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid11762622\charrsid1 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9175287 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6099241 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 The }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid6099241\charrsid6099241 \'93mode\'94}{ \rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 parameter contains the vulnerability (}{\field{\*\fldinst {\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ul\cf19\insrsid6099241\charrsid6099241 REF vulnerable \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2 \ltrch\fcs0 -\f37\ul\cf19\insrsid16386593\charrsid6099241 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000760075006c006e0065007200610062006c006500000000eb}}}{\fldrslt {\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 -Vulnerable}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 encoding}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid5927621 ; not to be confused with the SolveBoard }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 -\b\f2\fs22\cf1\insrsid5927621\charrsid5927621 mode}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 ) for use in the par calculation. It is set to -1 if no par calculation is to be performed. +\f37\ul\cf19\insrsid16386593\charrsid6099241 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000760075006c006e0065007200610062006c006500000000eb00}}}{\fldrslt {\rtlch\fcs1 \af2 \ltrch\fcs0 +\f37\ul\cf19\insrsid16386593\charrsid16386593 Vulnerable}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 encoding}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid5927621 +; not to be confused with the SolveBoard }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid5927621\charrsid5927621 mode}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 +) for use in the par calculation. It is set to -1 if no par calculation is to be performed. \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid11762622 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6099241 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9713208 There are 5 possible denominations or strains (the four trump suits and no trump). }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 The parameter }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid11762622\charrsid11762622 \'93trumpFilter\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 describes which, if any, of the }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 5 possibilities}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 that will be }{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f37\cf1\insrsid11762622\charrsid6099241 excluded}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 from the calculations. They are defined}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 in }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid6099241\charrsid6099241 REF suit \\h \\* MERGEFORMAT }{ -\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid6099241 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000cd}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 +\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid6099241 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000cd00}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 encoding order, so}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 setting trumpFilter to \{ FALSE, FALSE, TRUE, TRUE, TRUE\} means that values will only be calculated for }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 the trump suits spades and h}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 earts.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13244366 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid13244366\charrsid9401184 @@ -2181,35 +2188,35 @@ Maximum number of DD tables\cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intb \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574 SolveAllBoards}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid7880574\charrsid5320216 \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid7880574\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f006100720064007300000000f3}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f006100720064007300000000f300}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *bop, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 \par struct}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574 }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f00610072006400730000000038}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f0061007200640073000000003812}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574 \par * solvedp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid7880574 \cell }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel2\rin0\lin0\pararsid5320216\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid5320216 {\*\bkmkstart SolveAllChunksBin}SolveAllChunksBin}{ \rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid7880574\charrsid5320216 {\*\bkmkend SolveAllChunksBin} \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5320216\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f00610072006400730000000013}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f0061007200640073000000001316}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *bop, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5320216\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f00610072006400730000000077}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000771a}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 int chunkSize}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid1846101 \cell }\pard\plain \ltrpar \s3\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel2\rin0\lin0\pararsid5320216\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid5320216 {\*\bkmkstart SolveAllChunksPBN}SolveAllChunksPBN}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid7880574\charrsid5320216 {\*\bkmkend SolveAllChunksPBN} \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5320216\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *bop, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5320216\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000c4}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000c421}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 int chunkSize}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574 \par @@ -2239,7 +2246,7 @@ rd 5, and so on. This continued until all boards had}{\rtlch\fcs1 \af1 \ltrch\f \f37\cf1\insrsid15668792 be waiting for the las}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11030455 t thread to finish}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid15668792 . \par \par The transposition table in a given thread (see }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid15668792\charrsid15668792 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\ul\cf19\insrsid16386593\charrsid15668792 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000137a}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 +\f37\ul\cf19\insrsid16386593\charrsid15668792 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000137a27}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid15668792 ) is generally not reused between board 2, 4 and 5 in thread 2. This only happens if SolveBoard itself determines that the boards are suspiciously similar. \par @@ -2264,10 +2271,10 @@ s possible to force the DD solver to use this knowledge. }{\rtlch\fcs1 \af1 \lt \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid12658900 {\*\bkmkstart Par}Par}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid12658900 {\*\bkmkend Par} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12658900\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12658900\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000007445}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000074452b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12658900\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c00740073000000300b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c00740073000000300b2c}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid14119459 *presp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12658900\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 int vulnerable}{\rtlch\fcs1 \af1 \ltrch\fcs0 @@ -2275,11 +2282,11 @@ s possible to force the DD solver to use this knowledge. }{\rtlch\fcs1 \af1 \lt \rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid12658900\charrsid12658900 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12658900\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12658900\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000001376}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000013762d}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5843075 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsDealer" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c0065007200000000000065005600ff0568002a1800f38800}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c0065007200000000000065005600ff0568002a1800f388008b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid5843075\charrsid7880574 parResultsDealer}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5843075 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid14119459 *presp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 \par int dealer, @@ -2293,11 +2300,11 @@ s possible to force the DD solver to use this knowledge. }{\rtlch\fcs1 \af1 \lt \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid11956256 Sides}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid11956256\charrsid12658900 Par}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid11956256 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12128238\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid11956256\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000006e62}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000006e6232}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid11956256\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256\charrsid14119459 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsDealer" }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c006500720000000000000000a400ffff7900002000855812}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c006500720000000000000000a400ffff790000200085581266}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\lang1033\langfe1031\langfenp1031\insrsid5843075\charrsid7880574 parResultsDealer}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5843075 *sidesRes[2],}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid11956256\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256\charrsid14119459 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12128238\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256\charrsid14119459 int vulnerable}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 @@ -2312,22 +2319,22 @@ s possible to force the DD solver to use this knowledge. }{\rtlch\fcs1 \af1 \lt \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450 Bin}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid10173450 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789515\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid10173450\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000007886}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000007886a3}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16132195\charrsid16132195 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsMaster" }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d00610073007400650072000000000016000fd000bc091a00005400fa2000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d00610073007400650072000000000016000fd000bc091a00005400fa200001}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16132195\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16132195\charrsid16132195 * presp,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789515\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 int vulnerable}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10173450\charrsid12658900 \cell }{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450 SidesParBin}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid10173450\charrsid12658900 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789515\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid10173450\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000007264}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000726452}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16132195\charrsid16132195 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsMaster" }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000001e000ff200ffde0100443000f96412}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000001e000ff200ffde0100443000f964129a}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16132195\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16132195\charrsid16132195 * presp,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 \par int dealer, @@ -2341,21 +2348,21 @@ s possible to force the DD solver to use this knowledge. }{\rtlch\fcs1 \af1 \lt \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid15800872\charrsid15800872 ConvertToDealerTextFormat}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid10173450 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789515\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16132195\charrsid15800872 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000c323000f5e0000c101003772005c0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000c323000f5e0000c101003772005c00009a}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16132195\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16132195\charrsid15800872 *pres,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789515\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15800872 char *resp}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10173450\charrsid12658900 \cell }{ \rtlch\fcs1 \af2 \ltrch\fcs0 \b\f31506\cf1\insrsid15800872\charrsid15800872 ConvertToSidesTextFormat}{\rtlch\fcs1 \af2 \ltrch\fcs0 \b\f31506\cf1\insrsid15800872 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15800872\charrsid15800872 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsMaster" }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d006100730074006500720000000037290044140004966020453100ec0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d006100730074006500720000000037290044140004966020453100ec00009a}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid15800872\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid15800872\charrsid15800872 *pres,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15800872 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15800872\charrsid15800872 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parTextResults" }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000700061007200540065007800740052006500730075006c0074007300000001492a0000fd00001c00006b6d00fe0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid15800872\charrsid7880574 -parTextResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid15800872\charrsid15800872 *resp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\cf1\insrsid15800872\charrsid15800872 \cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000700061007200540065007800740052006500730075006c0074007300000001492a0000fd00001c00006b6d00fe00000e}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\cs26\f2\fs18\ul\cf19\insrsid15800872\charrsid7880574 parTextResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid15800872\charrsid15800872 *resp}{\rtlch\fcs1 +\af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15800872\charrsid15800872 \cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10173450\charrsid11956256 \trowd \irow3\irowband3\lastrow \ltrrow \ts18\trgaph108\trleft-108\trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid1789515\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb \brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth4773\clshdrawnil \cellx4665\clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth4773\clshdrawnil \cellx9438\row }\pard \ltrpar @@ -2364,7 +2371,7 @@ parTextResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\a \f37\cf1\insrsid13072585 Par, DealerPar, SidesPar, DealerParBin and SidesParBin }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 calculate the par score and par contracts of a given double-dummy solution matrix }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid12658900\charrsid12658900 \'93*tablep\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 which would often be the solution of a call to }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid12658900\charrsid12658900 REF CalcDDtable \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid12658900 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000430061006c006300440044007400610062006c006500000000c2}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtable}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000430061006c006300440044007400610062006c006500000000c200}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtable}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10290420 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid10290420 Since the input is a table, there is no PBN and non-PBN version}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid13840817 of these}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid10290420 function}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid13840817 s}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid10290420 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12854747 @@ -2376,7 +2383,7 @@ Since the input is a table, there is no PBN and non-PBN version}{\rtlch\fcs1 \af \par \par The }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid12658900\charrsid12658900 \'93vulnerable\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 parameter is given using }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid12658900\charrsid12658900 REF vulnerable \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid12658900 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000760075006c006e0065007200610062006c00650000000094}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Vulnerable}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000760075006c006e0065007200610062006c0065000000009400}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Vulnerable}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { \rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 encoding. \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14574742 \par The Par() function uses knowledge of the vulnerability, but @@ -2384,7 +2391,7 @@ Since the input is a table, there is no PBN and non-PBN version}{\rtlch\fcs1 \af \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2505631 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2838088 The DealerPar}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14574742 () function also uses knowledge of the }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid14574742\charrsid14574742 \'93 dealer\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14574742 using }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid14574742\charrsid14574742 REF hand \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\ul\cf19\insrsid16386593\charrsid14574742 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e00640000005800}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect +\f37\ul\cf19\insrsid16386593\charrsid14574742 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e0064000000580019}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14574742 encoding. The argument is that in all practical cases, the dealer is known when the vulnerability is known. Therefore all results returned will be for the same side. \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9716036 @@ -2410,9 +2417,8 @@ the par results are given in the same format as for DealerPar(). \f37\insrsid14574742\charrsid14574742 pades and }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 h}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid14574742 earts contracts, 2 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 spades and 2 h }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid14574742 earts with an overtrick.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid14574742 This is from the NS view}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 , shown by \'93NS:\'94 meaning that NS made the first bid}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid14574742 . }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 -Note that this information is actually not enough -, as it may be that N and S can make a given contract and that either E or W can bid this same contract (for instance 1NT) before N but not before S. So in the rare cases where the NS and EW sides are not the same, the results will take some manual inspe -ction. +Note that this information is actually not enough, as it may be that N and S can make a given contract +and that either E or W can bid this same contract (for instance 1NT) before N but not before S. So in the rare cases where the NS and EW sides are not the same, the results will take some manual inspection. \par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1 \ltrch\fcs0 \f3\lang1033\langfe1053\langnp1033\langfenp1053\insrsid14574742 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar \ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\ls3\rin0\lin360\itap0\pararsid14574742 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 \'93}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid9515749 NS:NS 23S,N 23H}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid14574742 \'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 : Only North makes 3 hearts. @@ -2427,16 +2433,17 @@ separate text string: \qj \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\ls3\rin0\lin360\itap0\pararsid2369496 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid2369496 \'934S*-EW-1\'94 means that E and W can both sacrifice in four spades doubled, going down one trick. \par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1 \ltrch\fcs0 \f3\lang1033\langfe1053\langnp1033\langfenp1053\insrsid2369496 \loch\af3\dbch\af0\hich\f3 \'b7\tab}\'933N-EW\'94 means that E and W can both make exactly 3NT. \par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1 \ltrch\fcs0 \f3\lang1033\langfe1053\langnp1033\langfenp1053\insrsid2369496 \loch\af3\dbch\af0\hich\f3 \'b7\tab}\'934N-W+1\'94 - means that only West can make 4NT +1. In the last example, 5NT just making can also be considered a par contract, but North-South don\rquote -t have a profitable sacrifice against 4NT, so the par contract is shown in this way. If North-South did indeed have a profitable sacrifice, perhaps 5C*_NS-2, then par contract would have been shown as \'935N-W\'94. Par() would show \'934N-W+1\'94 as -\'93W 45N\'94. + means that only West can make 4NT +1. In the last example, 5NT just making can also be considered a par contract, but North-South don\rquote t ha +ve a profitable sacrifice against 4NT, so the par contract is shown in this way. If North-South did indeed have a profitable sacrifice, perhaps 5C*_NS-2, then par contract would have been shown as \'935N-W\'94. Par() would show \'934N-W+1\'94 as \'93 +W 45N\'94. \par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1 \ltrch\fcs0 \f3\lang1033\langfe1053\langnp1033\langfenp1053\insrsid2369496 \loch\af3\dbch\af0\hich\f3 \'b7\tab}SidesPar() give the par contract text strings as described above for each side. \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid3547548 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2369496 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid11099036 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid269493 DealerParBin and SidesParBin are similar to DealerPar }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9000425 -and}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid269493 SidesPar}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9000425 , respectively}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid269493 , except that both functions give the output results in binary us -ing the }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493\charrsid13703926 \'93}{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\cf19\insrsid2101911\charrsid7880574 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000bb3100000000000001000000c1fd6800}}}{\fldrslt {\rtlch\fcs1 \af2\afs22 -\ltrch\fcs0 \cs26\b\f2\fs22\ul\cf19\insrsid269493\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493\charrsid13703926 \'94}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 +and}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid269493 SidesPar}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9000425 , respectively}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid269493 +, except that both functions give the output results in binary using the }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493\charrsid13703926 \'93}{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid7880574 + HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid7880574 {\*\datafield +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000bb3100000000000001000000c1fd680000}}}{\fldrslt {\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 +\cs26\b\f2\fs22\ul\cf19\insrsid269493\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493\charrsid13703926 \'94}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493 }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid269493\charrsid269493 structure}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493 .}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid9000425 }{ \rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid5186751 This simplifies the writing of a conversion program to }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid14092583 get }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid5186751 an own result output format.}{\rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid9000425 }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid4268479 Examples of such programs are }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\cf1\insrsid4268479\charrsid4268479 @@ -2463,30 +2470,30 @@ s in parResultsMaster are used when calling }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid7931676\charrsid6557970 {\*\bkmkstart CalcPar}CalcPar}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid7931676\charrsid6557970 {\*\bkmkend CalcPar} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8538722\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid6901705 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c0000005800}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000580000}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722\charrsid6901705 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722 dl}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 \par int vulnerable, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000002200}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000220000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722 * t}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 p, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid4071901\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c007400730000007400}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c00740073000000740000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid4071901 *presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6058144\charrsid4071901 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid7931676\charrsid7931676 {\*\bkmkstart CalcParPBN}CalcParPBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid7931676 {\*\bkmkend CalcParPBN} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8538722\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e0000006300}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e000000630000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722 dl}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 , \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722 * t}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 p, \par int vulnerable, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c007400730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c00740073000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722\charrsid14119459 *presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6058144 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid4071901\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid6058144\charrsid7931676 \cell }\pard \ltrpar @@ -2517,26 +2524,26 @@ s in parResultsMaster are used when calling }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid2849436 PlayBin}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid2849436 {\*\bkmkend TracePlayBin} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid2849436\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF deal \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 dl, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF playTraceBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTraceBin}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTraceBin}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 play,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF solvedPlay \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c006100790000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c0061007900000000000b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par int thrId}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid2849436\charrsid2849436 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3347855\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid2449260 {\*\bkmkstart TracePlayPBN}Analyse}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid2849436 PlayPBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid2849436\charrsid2849436 {\*\bkmkend TracePlayPBN} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid2849436\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e0000001400}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e00000014006f}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 dlPBN, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF playTracePBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e000000004b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracePBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e000000004b17}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracePBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 playPBN, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF solvedPlay \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c006100790000000094}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c00610079000000009448}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par int thrId}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid2849436\charrsid2849436 \cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid2849436 \trowd \irow0\irowband0\lastrow \ltrrow @@ -2549,8 +2556,9 @@ s in parResultsMaster are used when calling }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ \par }\pard\plain \ltrpar\s3\qj \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0\pararsid2849436 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436\charrsid2849436 The }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436 function returns a list of double-dummy values after each specific played card in a hand. Since the function uses }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid2849436\charrsid2849436 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid2849436 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000094}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj -{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436 , the same comments apply concerning the thread number \'93thrId\'94 and the transposition tables.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436\charrsid2849436 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000094b4}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436 , the same comments apply concerning the thread number \'93thrId\'94 and the transposition tables.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436\charrsid2849436 + \par }\pard\plain \ltrpar\s23\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid2849436 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \f37\fs22\lang1031\langfe1033\cgrid\langnp1031\langfenp1033 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid2849436 \par }\pard\plain \ltrpar\s3\qj \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0\pararsid2849436 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 @@ -2574,26 +2582,26 @@ s viewpoint (he is the one to the right of the opening leader). There is one mo \b\f37\insrsid2849436 {\*\bkmkend TraceAllPlaysBin} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5979431\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f00610072006400730000000095}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *bop, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f00610072006400730000000095c8}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { +\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *bop, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF playTracesBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300420069006e0000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesBin}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300420069006e0000000000fb}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesBin}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *plp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF solvedPlays \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c006100790073000000cb00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c006100790073000000cb0003}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par int chunkSize}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\insrsid5979431\charrsid2849436 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1190356\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\lang1033\langfe1031\langfenp1031\insrsid2449260 {\*\bkmkstart TraceAllPlaysPBN}Analyse}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid2849436 AllPlaysPBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\insrsid2849436\charrsid2849436 {\*\bkmkend TraceAllPlaysPBN} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5979431\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e000000af00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e000000af0066}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *bopPBN, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF playTracesPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300500042004e000000f000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesPBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300500042004e000000f00066}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesPBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *plpPBN, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF solvedPlays \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c0061007900730000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c006100790073000000000069}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par int chunkSize}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid2849436 \cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid2849436 \trowd \irow0\irowband0\lastrow \ltrrow @@ -2609,7 +2617,7 @@ s viewpoint (he is the one to the right of the opening leader). There is one mo \f37\cf1\insrsid10376323 AllPlays* functions invoke SolveBoard several times in parallel in multiple threads, rather than sequentially in a single thread. This increases execution speed. Up to 20 boards are permitted per call. \par \par Concerning chunkSize, exactly the same remarks apply as with }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid10376323\charrsid10376323 REF SolveAllChunksBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\ul\cf19\insrsid16386593\charrsid10376323 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300420069006e0000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 +\f37\ul\cf19\insrsid16386593\charrsid10376323 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300420069006e000000000006}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunksBin}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10376323 . \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7759131 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9000425 \page }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7759131 @@ -3074,18 +3082,18 @@ fffffffffffffffffdffffff04000000feffffff05000000fefffffffeffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff010000000c6ad98892f1d411a65f0040963251e500000000000000000000000010a8 -cd71a0c9d3010300000080020000000000004d0073006f004400610074006100530074006f0072006500000000000000000000000000000000000000000000000000000000000000000000000000000000001a000101ffffffffffffffff02000000000000000000000000000000000000000000000010a8cd71a0c9d301 -10a8cd71a0c9d301000000000000000000000000d80056004800300048005500d20057005500c4005300c6005500c2005a003500c50046004900d300580041003d003d000000000000000000000000000000000032000101ffffffffffffffff03000000000000000000000000000000000000000000000010a8cd71a0c9 -d30110a8cd71a0c9d3010000000000000000000000004900740065006d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffff04000000ffffffff000000000000000000000000000000000000000000000000 +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff010000000c6ad98892f1d411a65f0040963251e5000000000000000000000000504d +f11ca1c9d3010300000080020000000000004d0073006f004400610074006100530074006f0072006500000000000000000000000000000000000000000000000000000000000000000000000000000000001a000101ffffffffffffffff020000000000000000000000000000000000000000000000504df11ca1c9d301 +504df11ca1c9d3010000000000000000000000005700d200cf004a00c700410047005100c700d4004700320055005700dc005000dc0053005300cc00db0041003d003d000000000000000000000000000000000032000101ffffffffffffffff030000000000000000000000000000000000000000000000504df11ca1c9 +d301504df11ca1c9d3010000000000000000000000004900740065006d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffff04000000ffffffff000000000000000000000000000000000000000000000000 00000000000000000000000000000000fc00000000000000010000000200000003000000feffffff0500000006000000070000000800000009000000feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3c623a536f75726365732053656c65637465645374796c653d225c415041536978746845646974696f6e4f66666963654f6e6c696e652e78736c22205374796c654e616d653d22415041222056657273696f6e3d22362220786d6c6e733a 623d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f6269626c696f6772617068792220786d6c6e733d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e74 -2f323030362f6269626c696f677261706879223e3c2f623a536f75726365733e000000003c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d226e6f223f3e0d0a3c64733a6461746173746f72654974656d2064733a6974656d49443d227b31444441 -353145312d393634432d343435322d413635322d3236354639343532333335437d2220786d6c6e733a64733d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f637573746f6d586d6c223e3c64733a736368656d61526566733e3c +2f323030362f6269626c696f677261706879223e3c2f623a536f75726365733e000000003c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d226e6f223f3e0d0a3c64733a6461746173746f72654974656d2064733a6974656d49443d227b39434339 +324235422d393030312d343139462d394335312d3646304646313234414345437d2220786d6c6e733a64733d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f637573746f6d586d6c223e3c64733a736368656d61526566733e3c 64733a736368656d615265662064733a7572693d22687474703a2f2f736368656d61732e6f70656e500072006f007000650072007400690065007300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000200ffffffffffffffffffffffff000000000000 0000000000000000000000000000000000000000000000000000000000000400000055010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000 From 1ac7086e13e61abc63d34caca2c0a335e4a166de Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 1 Apr 2018 12:11:29 +0200 Subject: [PATCH 111/132] Cleanup, fewer TODOs --- src/System.cpp | 10 +++------- src/TransTableS.cpp | 7 ------- src/TransTableS.h | 2 -- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/System.cpp b/src/System.cpp index 004f9c18..2e46905c 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -458,10 +458,6 @@ int System::RunThreadsBoost() // STL // ////////////////////////////////////////////////////////////////////// -// TODO Remove -// int runSched = 0; -// int runDetect = 0; - int System::RunThreadsSTL() { #ifdef DDS_THREADS_STL @@ -505,7 +501,7 @@ int System::RunThreadsSTLIMPL() if (thrId == -1) { thrId = thrIdNext++; - if (thrIdNext > 16) // Hmm... + if (thrId >= numThreads) err = true; } @@ -513,7 +509,7 @@ int System::RunThreadsSTLIMPL() }); if (err) - return RETURN_THREAD_INDEX; // TODO: Not quite right + return RETURN_THREAD_INDEX; (* CallbackCopyList[runCat])(crossrefs); #endif @@ -587,7 +583,7 @@ int System::RunThreadsPPLIMPL() sched->Release(); if (err) - return RETURN_THREAD_INDEX; // TODO: Not quite right + return RETURN_THREAD_INDEX; (* CallbackCopyList[runCat])(crossrefs); #endif diff --git a/src/TransTableS.cpp b/src/TransTableS.cpp index 6f17f4fe..306aa439 100644 --- a/src/TransTableS.cpp +++ b/src/TransTableS.cpp @@ -313,13 +313,6 @@ void TransTableS::ReturnAllMemory() return; TTInUse = 0; -#if defined(DDS_TT_STATS) - // TODO Reactivate: Move somewhere else, where fout is known? - // PrintResetStats(); - // PrintNodeStats(); -#endif - - Wipe(); if (pw[0]) diff --git a/src/TransTableS.h b/src/TransTableS.h index 4bad10b9..85990b70 100644 --- a/src/TransTableS.h +++ b/src/TransTableS.h @@ -188,8 +188,6 @@ class TransTableS: public TransTable const nodeCardsType& first, const bool flag); - // TODO: Fold up with L functions, same name? - void PrintNodeStats(ofstream& fout) const; void PrintResetStats(ofstream& fout) const; From 224a56f4c553213f7b7926b3e6213fe87fae42e5 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 1 Apr 2018 12:24:24 +0200 Subject: [PATCH 112/132] Removed throw's in Par.cpp (not permitted in DLL) --- src/Par.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/Par.cpp b/src/Par.cpp index 4b426130..37f7237b 100644 --- a/src/Par.cpp +++ b/src/Par.cpp @@ -578,7 +578,8 @@ int STDCALL SidesParBin( k = 2; break; default: - throw std::runtime_error("j not in [0..3] in Par"); + return RETURN_UNKNOWN_ERROR; + // j not in (0..4) } max_lower = min(max_low[k][best_par[m][i].par_tricks - 6], @@ -1210,8 +1211,8 @@ int STDCALL DealerParBin( presp->contracts[k].denom = 4; break; default: - throw std::runtime_error( - "contracts[1] not in (NSHDC) in DealerParBin"); + return RETURN_UNKNOWN_FAULT; + // denomination not in (NSHDC) } if (strstr(parContr2[k].contracts, "NS")) @@ -1389,7 +1390,8 @@ int STDCALL ConvertToDealerTextFormat( strcat(resp, "EW "); break; default: - throw std::runtime_error("Seats not in [N,W,S,W,NS,EW] in ConvertToDealerTextFormat"); + return RETURN_UNKNOWN_FAULT; + // Seats not in (N,W,S,W,NS,EW) } for (i = 0; i < 10; i++) @@ -1415,7 +1417,8 @@ int STDCALL ConvertToDealerTextFormat( strcat(resp, "C"); break; default: - throw std::runtime_error("denom not in [N,S,H,D,C] in ConvertToDealerTextFormat"); + return RETURN_UNKNOWN_FAULT; + // denom not in /N,S,H,D,C) } if (pres->contracts[k].underTricks > 0) @@ -1488,7 +1491,8 @@ int STDCALL ConvertToSidesTextFormat( strcat(resp->parText[i], "EW "); break; default: - throw std::runtime_error("Seats not in [N,W,S,W,NS,EW] in ConvertToSidesTextFormat"); + return RETURN_UNKNOWN_ERROR; + // Seats not in (N,W,S,W,NS,EW) } for (j = 0; j < 10; j++) @@ -1514,7 +1518,8 @@ int STDCALL ConvertToSidesTextFormat( strcat(resp->parText[i], "C"); break; default: - throw std::runtime_error("denom not in [N,S,H,D,C] in ConvertToSidesTextFormat"); + return RETURN_UNKNOWN_ERROR; + // denom not in (N,S,H,D,C) } if ((pres + i)->contracts[k].underTricks > 0) From 54e3db57ddeb689586cc2a417121669434260de0 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 1 Apr 2018 12:28:48 +0200 Subject: [PATCH 113/132] Typo in return code --- src/Par.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Par.cpp b/src/Par.cpp index 37f7237b..4cc8f923 100644 --- a/src/Par.cpp +++ b/src/Par.cpp @@ -578,7 +578,7 @@ int STDCALL SidesParBin( k = 2; break; default: - return RETURN_UNKNOWN_ERROR; + return RETURN_UNKNOWN_FAULT; // j not in (0..4) } @@ -1491,7 +1491,7 @@ int STDCALL ConvertToSidesTextFormat( strcat(resp->parText[i], "EW "); break; default: - return RETURN_UNKNOWN_ERROR; + return RETURN_UNKNOWN_FAULT; // Seats not in (N,W,S,W,NS,EW) } @@ -1518,7 +1518,7 @@ int STDCALL ConvertToSidesTextFormat( strcat(resp->parText[i], "C"); break; default: - return RETURN_UNKNOWN_ERROR; + return RETURN_UNKNOWN_FAULT; // denom not in (N,S,H,D,C) } From 375c26a3cb4848f827b60b25525f16dac4f200b7 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 1 Apr 2018 13:08:54 +0200 Subject: [PATCH 114/132] Started to update some documentation, moved to 2.9.0 --- ChangeLog | 35 +++++++++++++ INSTALL | 141 ++++++++++++++++++++++++++++++++++---------------- README.md | 14 ++--- include/dll.h | 4 +- src/dds.rc | 8 +-- 5 files changed, 143 insertions(+), 59 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc54f55f..c32481ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,38 @@ +Release Notes DDS 2.9.0 +----------------------- +Included code for a number of multi-threading systems: +- Windows API (was already there) +- OpenMP (was already there) +- GCD (new, intended for Mac, not really tested) +- Boost (new, works on many systems, but you may have to install it) +- STL (new, should work on most systems with a modern compiler) +- TBB (new, not so broadly available, but portable in principle) +- STLIMPL (new, don't use) +- PPLIMPL (new, don't use) + +The number of threads is now unlimited in principle, although the +DLL will not let you go beyond 1.5 * the number of processor cores. + +Enabled the transposition-table code for both the large and the small +versions in the same DLL. Therefore there is only a single DLL +distributed now for both. + +Enabled the DLL to pick the best combination of large and small +transposition tables for a given resource set-up consisting of +available memory and number of threads. Yes, the DLL can choose to +run 4 large and 2 small threads, for example. + +Expanded the DDSInfo systemString (which now needs 1024 chars as +stated in the new dll.h). + +Fixed a reliance that char == signed char (not the case on Android, +which caused a bug). + +Dealt with the reported issues on the GitHub issues list. + +Lots of clean-up of internal code. The code also looks more like C++. + + Release Notes DDS 2.8.4 ----------------------- Added a lower-memory DLL version with a compile flag. This is about diff --git a/INSTALL b/INSTALL index 1331b621..1c40e83e 100644 --- a/INSTALL +++ b/INSTALL @@ -7,7 +7,7 @@ know what you're doing and you'll figure it out :-). The first step is to compile the library. -If you have trouble, read the Makefile. They all have the compiler +If you have trouble, read the Makefiles. They all have the compiler warning levels set rather high, and they are set to fail even on warnings. You can turn this off. The Visual C++ version also requires a couple of tools that you may not have, but this too is @@ -24,14 +24,14 @@ Generally speaking: the Makefile, then modify the Makefile. Once you've tested the source, you'll need the library file, the -dll.h include from the include directory, and possibly other files +dll.h include file from the include directory, and possibly other files such as dll.lib, depending on the exact system. You don't need include/portab.h, although you're welcome to use it. The library files needed are: Microsoft Visual C++: dds.dll, dds.lib mingw and cygwin: dds.dll, dds.def -Mac and linux: libdds.a +Mac and linux: libdds.a or libdds.so depending on compilation General instructions @@ -41,88 +41,131 @@ General instructions 2. Copy the right Makefile_... from the Makefiles sub-directory to the src directory and call it Makefile, see below. (Or use make -f) +So for example "cp Makefiles/Makefile_Visual Makefile". +See "System-specific data" below. -3. If your compiler does not have the name assumed in the Makefile -(see below), modify the Makefile. +3. Check the configuration section and make any changes you need. +Section (1) has to do with paths for certain multi-threading systems +which you may or may not want/have. Section (2) sets the threading +systems with which you want to compile the DLL. Note that you can +have as many as you like (see below). Section (3) has to do with +certain debugging flags etc. which you normally shouldn't set. -4. If you don't have the "windres" and "cvtres" programs, -then you can also manage without. These are just used for -getting version information into the DLL. Delete the corresponding -lines. +3. Check the "Often OK" section, in particular the name of the +compiler you want to use. -5. If you want OpenMP rather than Windows multi-threading for -some reason, find the right place in the Makefile and uncomment -one line and comment the other. +4. If you're on Windows and you don't have the "windres" and +"cvtres" programs, then you can also manage without. These are +just used for getting version information into the DLL. Delete +the corresponding lines. -6. make clean (not necessary if you're starting clean). +6. "make clean" (not necessary if you're starting clean). -7. make depend (ditto). +7. There is a "make depend" target, but DO NOT USE IT. The Makefile +is set up to read the dependencies from Makefiles/depends_*.txt. -8. make (produces dds.dll on Windows, libdds.a on Linux and Mac). +8. "make" (produces dds.dll on Windows, libdds.a or libdds.so on +Linux and Mac). -9. make install (if you want to run tests; this is only a -local install to ../lib, not a system-wide one). +9. "make install" (if you want to run tests; this is only a +local install to ../test and ../examples, not a system-wide one). System-specific data ==================== -Microsoft Visual C++ (Unix-like, so Cygwin and mingw) +Microsoft Visual C++ -------------------- Makefile: Makefile_Visual Compiler: cl +If you don't have a Cygwin-like set-up with access to commands +such as "cp", see the last lines of that Makefile. -Microsoft Visual C++ (Windows-like, so no "mV", different "make") --------------------- -Makefile: Makefile_Visual_Windows -Compiler: cl - -Mingw ------ +Windows Mingw +------------- Makefile: Makefile_mingw -Compiler: i686-w64-mingw32-g++ - -32-bit and 64-bit variants for the tdc compiler are available. +Compiler: g++ -Cygwin ------- +Windows Cygwin +-------------- Makefile: Makefile_cygwin Compiler: g++ Linux (static library .a) -===== -Makefile: Makefile_linux +----- +Makefile: Makefile_linux_static Compiler: g++ -Linux (dynamic library .ld) -===== +Linux (dynamic library .so) +----- Makefile: Makefile_linux_shared Compiler: g++ -Apple -===== -Makefile: Makefile_Mac_clang (for clang compiler, single-threaded) +MacOS clang (static library .a) +----- +Makefile: Makefile_Mac_clang_static +Compiler: g++ + + +MacOS clang (shared library .a) +----- +Makefile: Makefile_Mac_clang_static Compiler: g++ -Supports both OpenMP and GDD multi-threading. -Makefile: Makefile_Mac_gcc (for GNU g++ compiler, multi-threaded) -Makefile: Makefile_Mac_shared (for GNU g++ compiler, multi-threaded) + +MacOS GNU g++ (static library .a) +----- +Makefile: Makefile_Mac_clang_static +Compiler: gcc-4.9 + + +MacOS GNU g++ (shared library .a) +----- +Makefile: Makefile_Mac_clang_static +Compiler: gcc-4.9 + + +Multi-threading +=============== + +As of v2.9.0 this works differently. It is possible to have +multiple threading systems in the same library. There is a new +DLL function called SetThreading() to select the one you want, +in case there is more than one. If the DLL is compiled only +single-threaded, that is what you'll get. If there are multiple +options, the DLL will default to the multi-threaded one with the +lowest number (among those compiled in, of course). The numbers +can be found in ../include/dll.h. + +It is NOT recommended to use STLIMPL and PPLIMPL as they are today. +You cannot control the number of threads that they will want, nor +the memory that they will consume. But maybe some day... + +The others are very equivalent in terms of speed, but you might as +well use STL if you have it, as this is probably the most portable. + +If you don't have a C++17 compiler, you will not get STLIMPL or +PPLIMPL. + +The *IMPL versions let the system handle threads autonomously, +whereas the others are handled by DDS internally. Testing ======= The step "make install" above should have put the library file -in ../lib. +in ../test. test ---- +In the test directory you can compile the dtest program. This program tests five main modes of DDS: * solve, the solution of a hand for a given declarer and strain. @@ -135,9 +178,11 @@ The program can use a number of pre-defined input files in the ../hands directory. To compile the program, you follow the same steps as for the library, -except that you don't do a "make install". +except that you don't do a "make install". So you copy the right +Makefile from Makefiles (e.g. "cp Makefiles/Makefile_Visual Makefile"), +then type "make". -You now have a program called "dtest" or "dtest.exe". Let us +You should now have a program called "dtest" or "dtest.exe". Let us assume dtest.exe. Let us also assume that your system is set up in such a way that your path does not include the current working directory. @@ -155,11 +200,15 @@ file.txt has to be the name of a file EITHER in the current directory OR in ../hands. The program checks first in the current directory. A good starting example is list100.txt. -mode has to be one of solve, calc, play, parand dealerpar. +[TODO UPDATE] + +mode has to be one of solve, calc, play, par and dealerpar. The number of threads is optional. If it is not supplied, DDS figures one out itself. If it is supplied, then it is passed to -SetMaxThreads(). +SetMaxThreads(). You can also use SetResources() instead of +SetMaxThreads() to set the memory consumption as well. If you use +SetResources(), there is no need to use SetMaxThreads(). Generally speaking, the test program first shows some information about how it was compiled. Then it shows some ongoing timing @@ -179,7 +228,7 @@ minimally to support a multi-threaded DLL. However, it doesn't use the full capabilities of DDS, as it was written at a time when functions such as CalcAllTables and SolveAllBoards were not yet available. Therefore it is rather slow, but it does have a nice -hand generator built in. +hand generator built in. It has not been updated since v2.8.4. examples diff --git a/README.md b/README.md index 0afa25f8..1bc42e43 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ DDS offers a wide range of functions, including par-score calculations. Please refer to the [home page](http://privat.bahnhof.se/wb758135) for details. -The current version is DDS 2.8.4 released in March 2016 and licensed under the Apache 2.0 license in the LICENSE FILE. +The current version is DDS 2.9.0 released in April 2018 and licensed under the Apache 2.0 license in the LICENSE FILE. Release notes are in the ChangeLog file. -(c) Bo Haglund 2006-2014, (c) Bo Haglund / Soren Hein 2014-2016. +(c) Bo Haglund 2006-2014, (c) Bo Haglund / Soren Hein 2014-2018. Credits @@ -27,7 +27,7 @@ Foppe Hemminga maintains DDS on ArchLinux. He also contributed a version of the Pierre Cossard contributed the code for multi-threading on the Mac using GDS. -Soren Hein made a number of contributions before becoming a co-author starting in v2.8 in 2014. +Soren Hein made a number of contributions before becoming a co-author starting with v2.8 in 2014. Overview @@ -52,7 +52,7 @@ Supported systems ================= The DLLs work out of the box on Windows systems. There is a single-threaded version for old Windows versions, and there is a multi-threaded version that works on all modern Windows systems. This is the one you should use if in doubt. -The Windows versions use the Windows multi-threading. The code compiles on windows (see INSTALL) with at least: +The distributed Windows DLL uses Windows multi-threading. The code compiles on windows (see INSTALL) with at least: * Visual C++ 2010 Express editions or later. * The TDM-GCC/Mingw port of g++. @@ -76,17 +76,17 @@ Thanks for Pierre Cossard's contribution, the Mac port now also supports GCD mul Usage ===== -DDS tries to figure out the available number of cores and the available memory. Based on this, DDS calculates a reasonable number of threads to use. The user can override this by calling the `SetMaxThreads()` function. In principle SetMaxThreads can be called multiple times, but there is overhead associated with this, so only call it at the beginning of your program unless you really want to change the number of threads dynamically. +DDS tries to figure out the available number of cores and the available memory. Based on this, DDS calculates a reasonable number of threads to use. The user can override this by calling the `SetMaxThreads()` or the `SetResources()` function. In principle these functions can be called multiple times, but there is overhead associated with this, so only call it at the beginning of your program unless you really want to change the number of threads dynamically. DDS on Windows calls SetMaxThreads itself when it is attached to a process, so you don't have to. On Unix-like systems we use an equivalent mechanism, but we have had a report that this does not always happen in the right order of things, so you may want to call SetMaxThreads explicitly. Docs ==== -The DDS library interface is very well documented. You find the docs, including a Markdown version which you can read online, in the /doc folder. +The DDS library interface is documented. You find the docs, including a Markdown version which you can read online, in the /doc folder. The Markdown version has not been updated since v2.8.4. Bugs ==== -Version 2.8.4 has no known bugs. +Version 2.9.0 has no known bugs. Please report bugs to bo.haglund@bahnhof.se and soren.hein@gmail.com. diff --git a/include/dll.h b/include/dll.h index fb9394ff..c946e4a3 100644 --- a/include/dll.h +++ b/include/dll.h @@ -26,8 +26,8 @@ #define EXTERN_C #endif -/* Version 2.8.4. Allowing for 2 digit minor versions */ -#define DDS_VERSION 20804 +/* Version 2.9.0. Allowing for 2 digit minor versions */ +#define DDS_VERSION 20900 #define DDS_HANDS 4 diff --git a/src/dds.rc b/src/dds.rc index 0934fdcb..7b27b734 100644 --- a/src/dds.rc +++ b/src/dds.rc @@ -1,6 +1,6 @@ 1 VERSIONINFO - FILEVERSION 2,8,4,0 - PRODUCTVERSION 2,8,4,0 + FILEVERSION 2,9,0,0 + PRODUCTVERSION 2,9,0,0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x40004L @@ -13,12 +13,12 @@ BEGIN BEGIN VALUE "CompanyName", "http://privat.bahnhof.se/wb758135/" VALUE "FileDescription", "dds MinGW" - VALUE "FileVersion", "2.8.4.0" + VALUE "FileVersion", "2.9.0.0" VALUE "InternalName", "dds.dll" VALUE "LegalCopyright", "Copyright © 2006-2014 Bo Haglund / 2014-18 Bo Haglund Soren Hein" VALUE "OriginalFilename", "dds.dll" VALUE "ProductName", "Bridge double dummy solver" - VALUE "ProductVersion", "2.8.4.0" + VALUE "ProductVersion", "2.9.0.0" END END BLOCK "VarFileInfo" From e4d15fa9a27144f48f75776b635ea61892d6a0c8 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 1 Apr 2018 15:03:14 +0200 Subject: [PATCH 115/132] Updated documentation --- ChangeLog | 2 + README.md | 2 + doc/DLL-dds_x.rtf | 1241 +++++++++++++++++++++++++-------------------- 3 files changed, 709 insertions(+), 536 deletions(-) diff --git a/ChangeLog b/ChangeLog index c32481ce..e279fbd4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,6 +25,8 @@ run 4 large and 2 small threads, for example. Expanded the DDSInfo systemString (which now needs 1024 chars as stated in the new dll.h). +MAXNOOFTABLES was increased from 32 to 40. + Fixed a reliance that char == signed char (not the case on Android, which caused a bug). diff --git a/README.md b/README.md index 1bc42e43..b5d3e1c1 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,8 @@ The `without-multilib` is important because you won't get OpenMP otherwise, and Thanks for Pierre Cossard's contribution, the Mac port now also supports GCD multi-threading with LLVM. +There's an example .Net wrapper on https://github.com/anorsich/dds.net (not supported by us). + Usage ===== diff --git a/doc/DLL-dds_x.rtf b/doc/DLL-dds_x.rtf index e16233ed..eb3bbbd7 100644 --- a/doc/DLL-dds_x.rtf +++ b/doc/DLL-dds_x.rtf @@ -1,25 +1,25 @@ {\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff1\deff0\stshfdbch0\stshfloch37\stshfhich37\stshfbi37\deflang1031\deflangfe1031\themelang1053\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} {\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f3\fbidi \froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f10\fbidi \fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;} -{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri{\*\falt Calibri};}{\f39\fbidi \froman\fcharset0\fprq2{\*\panose 00000000000000000000}Cambria;} -{\f40\fbidi \fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Tahoma;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} -{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 00000000000000000000}Cambria;} +{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri{\*\falt Calibri};}{\f39\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;} +{\f40\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Tahoma;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;} {\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} {\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri{\*\falt Calibri};} -{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f41\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f42\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\f44\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f45\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f46\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f47\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\f48\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f49\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f51\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f52\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;} -{\f54\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f55\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f56\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f57\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);} -{\f58\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f59\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f61\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f62\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;} -{\f64\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f65\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f66\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f67\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);} -{\f68\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f69\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f381\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f382\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;} -{\f384\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f385\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f388\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f389\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);} -{\f411\fbidi \fswiss\fcharset238\fprq2 Calibri CE{\*\falt Calibri};}{\f412\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr{\*\falt Calibri};}{\f414\fbidi \fswiss\fcharset161\fprq2 Calibri Greek{\*\falt Calibri};} -{\f415\fbidi \fswiss\fcharset162\fprq2 Calibri Tur{\*\falt Calibri};}{\f416\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew){\*\falt Calibri};}{\f417\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic){\*\falt Calibri};} -{\f418\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic{\*\falt Calibri};}{\f419\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese){\*\falt Calibri};}{\f431\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\f432\fbidi \froman\fcharset204\fprq2 Cambria Cyr;} -{\f434\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\f435\fbidi \froman\fcharset162\fprq2 Cambria Tur;}{\f438\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\f439\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);} -{\f441\fbidi \fswiss\fcharset238\fprq2 Tahoma CE;}{\f442\fbidi \fswiss\fcharset204\fprq2 Tahoma Cyr;}{\f444\fbidi \fswiss\fcharset161\fprq2 Tahoma Greek;}{\f445\fbidi \fswiss\fcharset162\fprq2 Tahoma Tur;} -{\f446\fbidi \fswiss\fcharset177\fprq2 Tahoma (Hebrew);}{\f447\fbidi \fswiss\fcharset178\fprq2 Tahoma (Arabic);}{\f448\fbidi \fswiss\fcharset186\fprq2 Tahoma Baltic;}{\f449\fbidi \fswiss\fcharset163\fprq2 Tahoma (Vietnamese);} -{\f450\fbidi \fswiss\fcharset222\fprq2 Tahoma (Thai);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f268\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f269\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\f271\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f272\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f273\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f274\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\f275\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f276\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f278\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f279\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;} +{\f281\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f282\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f283\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f284\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);} +{\f285\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f286\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f288\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f289\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;} +{\f291\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f292\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f293\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f294\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);} +{\f295\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f296\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f608\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f609\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;} +{\f611\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f612\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f615\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f616\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);} +{\f638\fbidi \fswiss\fcharset238\fprq2 Calibri CE{\*\falt Calibri};}{\f639\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr{\*\falt Calibri};}{\f641\fbidi \fswiss\fcharset161\fprq2 Calibri Greek{\*\falt Calibri};} +{\f642\fbidi \fswiss\fcharset162\fprq2 Calibri Tur{\*\falt Calibri};}{\f643\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew){\*\falt Calibri};}{\f644\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic){\*\falt Calibri};} +{\f645\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic{\*\falt Calibri};}{\f646\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese){\*\falt Calibri};}{\f658\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\f659\fbidi \froman\fcharset204\fprq2 Cambria Cyr;} +{\f661\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\f662\fbidi \froman\fcharset162\fprq2 Cambria Tur;}{\f665\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\f666\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);} +{\f668\fbidi \fswiss\fcharset238\fprq2 Tahoma CE;}{\f669\fbidi \fswiss\fcharset204\fprq2 Tahoma Cyr;}{\f671\fbidi \fswiss\fcharset161\fprq2 Tahoma Greek;}{\f672\fbidi \fswiss\fcharset162\fprq2 Tahoma Tur;} +{\f673\fbidi \fswiss\fcharset177\fprq2 Tahoma (Hebrew);}{\f674\fbidi \fswiss\fcharset178\fprq2 Tahoma (Arabic);}{\f675\fbidi \fswiss\fcharset186\fprq2 Tahoma Baltic;}{\f676\fbidi \fswiss\fcharset163\fprq2 Tahoma (Vietnamese);} +{\f677\fbidi \fswiss\fcharset222\fprq2 Tahoma (Thai);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} {\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} {\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} {\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} @@ -87,210 +87,331 @@ {\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4170\lin4170 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567617 \'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li4890\lin4890 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5610\lin5610 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6330\lin6330 }{\listname -;}\listid161943208}{\list\listtemplateid1379147632\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat3\levelspace0\levelindent0{\leveltext\leveltemplateid-926013378\'01\u-3913 ?;}{\levelnumbers;} -\loch\af3\hich\af3\dbch\af0\fbias0 \fi-360\li360\lin360 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 -\fi-360\li1080\lin1080 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li1800\lin1800 }{\listlevel -\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2520\lin2520 }{\listlevel\levelnfc23\levelnfcn23\leveljc0 -\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3240\lin3240 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li3960\lin3960 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0 -\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li4680\lin4680 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5400\lin5400 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567621 -\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6120\lin6120 }{\listname ;}\listid356662528}{\list\listtemplateid-1508340354\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0 -{\leveltext\leveltemplateid728809608\'01\u-3913 ?;}{\levelnumbers;}\loch\af3\hich\af3\dbch\af0\fbias0 \fi-360\li570\lin570 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1290\lin1290 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567621 -\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2010\lin2010 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;} -\f3\fbias0 \fi-360\li2730\lin2730 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3450\lin3450 } -{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4170\lin4170 }{\listlevel\levelnfc23\levelnfcn23 -\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li4890\lin4890 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 -\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5610\lin5610 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0 -\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6330\lin6330 }{\listname ;}\listid871384482}{\list\listtemplateid59153134\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 -\levelstartat3\levelspace0\levelindent0{\leveltext\leveltemplateid-320719486\'01\u-3986 ?;}{\levelnumbers;}\loch\af10\hich\af10\dbch\af0\fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0 -{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567617 -\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 -\fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\lin4320 }{\listlevel -\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0 -\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\lin6480 }{\listname ;}\listid880896998}{\list\listtemplateid1722038506\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0 -\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid69009423\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0 -\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid69009433\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1 -\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid69009435\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative -\levelspace0\levelindent0{\leveltext\leveltemplateid69009423\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0 -\levelindent0{\leveltext\leveltemplateid69009433\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0 -{\leveltext\leveltemplateid69009435\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\leveltemplateid69009423\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\leveltemplateid69009433\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\leveltemplateid69009435\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li6480\lin6480 }{\listname ;}\listid894395624}{\list\listtemplateid-681416416\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0 -\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid69009423\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative -\levelspace0\levelindent0{\leveltext\leveltemplateid69009433\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0 -\levelindent0{\leveltext\leveltemplateid69009435\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0 -{\leveltext\leveltemplateid69009423\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +;}\listid161943208}{\list\listtemplateid-1463488010\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 +\fi-360\li360\lin360 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1080\lin1080 }{\listlevel +\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li1800\lin1800 }{\listlevel\levelnfc23\levelnfcn23\leveljc0 +\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2520\lin2520 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 +\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3240\lin3240 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360 +\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li3960\lin3960 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li4680\lin4680 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567619 +\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5400\lin5400 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;} +\f10\fbias0 \fi-360\li6120\lin6120 }{\listname ;}\listid229731547}{\list\listtemplateid1379147632\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat3\levelspace0\levelindent0{\leveltext\leveltemplateid-926013378 +\'01\u-3913 ?;}{\levelnumbers;}\loch\af3\hich\af3\dbch\af0\fbias0 \fi-360\li360\lin360 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567619 +\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1080\lin1080 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 +\fi-360\li1800\lin1800 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2520\lin2520 }{\listlevel +\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3240\lin3240 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 +\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li3960\lin3960 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1 +\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li4680\lin4680 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0 +\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5400\lin5400 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6120\lin6120 }{\listname ;}\listid356662528}{\list\listtemplateid-1451302670\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1 +\levelspace360\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li360\lin360 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0 +{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1080\lin1080 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567621 +\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li1800\lin1800 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;} +\f3\fbias0 \fi-360\li2520\lin2520 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3240\lin3240 } +{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li3960\lin3960 }{\listlevel\levelnfc23 +\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li4680\lin4680 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 +\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5400\lin5400 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative +\levelspace360\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6120\lin6120 }{\listname ;}\listid830560009}{\list\listtemplateid-1508340354\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 +\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid728809608\'01\u-3913 ?;}{\levelnumbers;}\loch\af3\hich\af3\dbch\af0\fbias0 \fi-360\li570\lin570 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 +\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1290\lin1290 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0 +\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2010\lin2010 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2730\lin2730 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567619 +\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3450\lin3450 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 +\fi-360\li4170\lin4170 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li4890\lin4890 }{\listlevel +\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5610\lin5610 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 +\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6330\lin6330 }{\listname ;}\listid871384482}{\list\listtemplateid59153134\listhybrid{\listlevel +\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat3\levelspace0\levelindent0{\leveltext\leveltemplateid-320719486\'01\u-3986 ?;}{\levelnumbers;}\loch\af10\hich\af10\dbch\af0\fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23 +\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 +\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative +\levelspace0\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567621 +\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;} +\f3\fbias0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\lin5760 } +{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\lin6480 }{\listname ;}\listid880896998} +{\list\listtemplateid180496522\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li360\lin360 } +{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1080\lin1080 }{\listlevel\levelnfc23\levelnfcn23 +\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li1800\lin1800 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 +\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2520\lin2520 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative +\levelspace360\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3240\lin3240 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li3960\lin3960 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567617 +\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li4680\lin4680 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 +\fi-360\li5400\lin5400 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6120\lin6120 } +{\listname ;}\listid885608239}{\list\listtemplateid1722038506\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid69009423\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 +\af0 \ltrch\fcs0 \fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid69009433\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 +\ltrch\fcs0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid69009435\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid69009423\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid69009433\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid69009435\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid69009423\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid69009433\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid69009435\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-180\li6480\lin6480 }{\listname ;}\listid894395624}{\list\listtemplateid-1142497534\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67567621 +\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li360\lin360 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 +\fi-360\li1080\lin1080 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li1800\lin1800 } +{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2520\lin2520 }{\listlevel\levelnfc23\levelnfcn23 +\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3240\lin3240 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 +\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li3960\lin3960 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative +\levelspace360\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li4680\lin4680 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0 +{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5400\lin5400 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567621 +\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6120\lin6120 }{\listname ;}\listid1203058793}{\list\listtemplateid-681416416\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\leveltemplateid69009423\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid69009433\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid69009435\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid69009423\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext \leveltemplateid69009433\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext \leveltemplateid69009435\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext \leveltemplateid69009423\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext \leveltemplateid69009433\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\leveltemplateid69009435\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li6480\lin6480 }{\listname ;}\listid1355108172}}{\*\listoverridetable{\listoverride\listid880896998\listoverridecount0\ls1}{\listoverride\listid111049838 -\listoverridecount0\ls2}{\listoverride\listid356662528\listoverridecount0\ls3}{\listoverride\listid894395624\listoverridecount0\ls4}{\listoverride\listid1355108172\listoverridecount0\ls5}{\listoverride\listid161943208\listoverridecount0\ls6} -{\listoverride\listid60494166\listoverridecount0\ls7}{\listoverride\listid871384482\listoverridecount0\ls8}}{\*\revtbl {Unknown;}}{\*\pgptbl {\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}}{\*\rsidtbl \rsid7744\rsid70445\rsid75593\rsid81923\rsid133834\rsid163452\rsid201282\rsid269493 -\rsid270015\rsid337766\rsid340960\rsid348894\rsid394021\rsid409864\rsid415956\rsid425889\rsid488565\rsid490522\rsid532764\rsid543320\rsid556337\rsid591688\rsid617158\rsid619035\rsid678750\rsid726458\rsid750270\rsid750573\rsid856123\rsid875686\rsid876335 -\rsid930020\rsid940090\rsid943124\rsid1056208\rsid1187219\rsid1190356\rsid1191142\rsid1202844\rsid1212155\rsid1258951\rsid1261441\rsid1313463\rsid1336469\rsid1385888\rsid1386919\rsid1445386\rsid1449865\rsid1469964\rsid1520891\rsid1538933\rsid1579764 -\rsid1595222\rsid1596512\rsid1706832\rsid1708722\rsid1716250\rsid1716707\rsid1721597\rsid1770393\rsid1775603\rsid1783690\rsid1789515\rsid1789909\rsid1800033\rsid1839042\rsid1846101\rsid1852854\rsid1900643\rsid1910210\rsid1918919\rsid1921007\rsid2057006 -\rsid2060511\rsid2101911\rsid2112235\rsid2112392\rsid2123303\rsid2165691\rsid2181632\rsid2229366\rsid2238558\rsid2244172\rsid2260548\rsid2365273\rsid2369496\rsid2427760\rsid2443070\rsid2446079\rsid2447429\rsid2449260\rsid2493172\rsid2494613\rsid2505631 -\rsid2566533\rsid2568164\rsid2635362\rsid2637590\rsid2641133\rsid2647507\rsid2769001\rsid2833141\rsid2838088\rsid2849436\rsid2884635\rsid2894529\rsid2952804\rsid3023369\rsid3034397\rsid3034548\rsid3036029\rsid3095740\rsid3167271\rsid3220430\rsid3228943 -\rsid3231049\rsid3240706\rsid3243212\rsid3301731\rsid3303530\rsid3308555\rsid3342996\rsid3347855\rsid3352595\rsid3547548\rsid3552042\rsid3567911\rsid3752772\rsid3819803\rsid3893966\rsid3937665\rsid3954019\rsid4000336\rsid4002451\rsid4071901\rsid4076363 -\rsid4091367\rsid4155951\rsid4264099\rsid4268479\rsid4272774\rsid4288894\rsid4330566\rsid4350787\rsid4405244\rsid4460289\rsid4460640\rsid4475334\rsid4533879\rsid4538894\rsid4542728\rsid4545218\rsid4602097\rsid4616356\rsid4658062\rsid4675069\rsid4679222 -\rsid4679726\rsid4683401\rsid4738929\rsid4744549\rsid4877901\rsid4981561\rsid5054625\rsid5070438\rsid5113162\rsid5186751\rsid5191231\rsid5248313\rsid5254237\rsid5318615\rsid5320216\rsid5332441\rsid5376200\rsid5388872\rsid5399796\rsid5462095\rsid5506187 -\rsid5519688\rsid5525810\rsid5526679\rsid5532374\rsid5594575\rsid5638529\rsid5650157\rsid5653460\rsid5712409\rsid5712463\rsid5767474\rsid5779433\rsid5843075\rsid5862788\rsid5927621\rsid5928646\rsid5974982\rsid5979431\rsid6045873\rsid6047888\rsid6048783 -\rsid6054214\rsid6058144\rsid6099241\rsid6115982\rsid6164997\rsid6170015\rsid6179193\rsid6228168\rsid6246771\rsid6247188\rsid6302457\rsid6309374\rsid6309794\rsid6313661\rsid6317456\rsid6362316\rsid6377474\rsid6384684\rsid6436444\rsid6499600\rsid6516102 -\rsid6557897\rsid6557970\rsid6569652\rsid6570883\rsid6573516\rsid6578564\rsid6580905\rsid6629265\rsid6633554\rsid6641819\rsid6643870\rsid6650094\rsid6699576\rsid6701983\rsid6771888\rsid6845226\rsid6894851\rsid6895698\rsid6901705\rsid6910245\rsid6950962 -\rsid6957422\rsid6968528\rsid7019779\rsid7041439\rsid7089377\rsid7167315\rsid7277737\rsid7285964\rsid7302518\rsid7305895\rsid7415269\rsid7421144\rsid7472903\rsid7483127\rsid7542885\rsid7545453\rsid7616262\rsid7678768\rsid7683346\rsid7686926\rsid7697883 -\rsid7759131\rsid7763137\rsid7804526\rsid7807046\rsid7880574\rsid7931676\rsid7949161\rsid7952569\rsid7959800\rsid7998566\rsid8000484\rsid8001475\rsid8090374\rsid8129941\rsid8137115\rsid8154048\rsid8194765\rsid8261617\rsid8281290\rsid8290285\rsid8323199 -\rsid8395240\rsid8408337\rsid8522857\rsid8527940\rsid8538722\rsid8541195\rsid8549130\rsid8588264\rsid8592696\rsid8593145\rsid8610523\rsid8616569\rsid8655475\rsid8682482\rsid8799536\rsid8923128\rsid8939615\rsid8983788\rsid8984001\rsid8999377\rsid9000425 -\rsid9002512\rsid9047914\rsid9069276\rsid9125746\rsid9175287\rsid9176944\rsid9249735\rsid9306501\rsid9314635\rsid9315241\rsid9331762\rsid9389132\rsid9401184\rsid9450855\rsid9515364\rsid9515749\rsid9530285\rsid9534906\rsid9572146\rsid9586997\rsid9588289 -\rsid9589735\rsid9713208\rsid9716036\rsid9716705\rsid9731125\rsid9834330\rsid9838060\rsid9845272\rsid9851850\rsid9856546\rsid9898065\rsid9907738\rsid9911854\rsid9974881\rsid10056466\rsid10108539\rsid10122796\rsid10173450\rsid10174318\rsid10176355 +\leveltemplateid69009435\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li6480\lin6480 }{\listname ;}\listid1355108172}{\list\listtemplateid-1975356656\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 +\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li360\lin360 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360 +\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1080\lin1080 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li1800\lin1800 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567617 +\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2520\lin2520 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 +\fi-360\li3240\lin3240 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li3960\lin3960 } +{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567617\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li4680\lin4680 }{\listlevel\levelnfc23\levelnfcn23 +\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567619\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5400\lin5400 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 +\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67567621\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6120\lin6120 }{\listname ;}\listid1369648479}}{\*\listoverridetable{\listoverride\listid880896998 +\listoverridecount0\ls1}{\listoverride\listid111049838\listoverridecount0\ls2}{\listoverride\listid356662528\listoverridecount0\ls3}{\listoverride\listid894395624\listoverridecount0\ls4}{\listoverride\listid1355108172\listoverridecount0\ls5} +{\listoverride\listid161943208\listoverridecount0\ls6}{\listoverride\listid60494166\listoverridecount0\ls7}{\listoverride\listid871384482\listoverridecount0\ls8}{\listoverride\listid1203058793\listoverridecount0\ls9}{\listoverride\listid1369648479 +\listoverridecount0\ls10}{\listoverride\listid885608239\listoverridecount0\ls11}{\listoverride\listid830560009\listoverridecount0\ls12}{\listoverride\listid229731547\listoverridecount0\ls13}}{\*\revtbl {Unknown;}}{\*\pgptbl {\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}} +{\*\rsidtbl \rsid7744\rsid70445\rsid75593\rsid81923\rsid133834\rsid163452\rsid201282\rsid269493\rsid270015\rsid337766\rsid340960\rsid348894\rsid394021\rsid409864\rsid415956\rsid425889\rsid488565\rsid490522\rsid532764\rsid543320\rsid556337\rsid591688 +\rsid617158\rsid619035\rsid678750\rsid726458\rsid750270\rsid750573\rsid856123\rsid875686\rsid876335\rsid930020\rsid940090\rsid943124\rsid1056208\rsid1187219\rsid1190356\rsid1191142\rsid1202844\rsid1212155\rsid1258951\rsid1261441\rsid1313463\rsid1336469 +\rsid1385888\rsid1386919\rsid1389500\rsid1445386\rsid1449865\rsid1469964\rsid1520891\rsid1538933\rsid1579764\rsid1595222\rsid1596512\rsid1706832\rsid1708722\rsid1716250\rsid1716707\rsid1721597\rsid1770393\rsid1775603\rsid1783690\rsid1789515\rsid1789909 +\rsid1800033\rsid1839042\rsid1846101\rsid1852854\rsid1900643\rsid1910210\rsid1918919\rsid1921007\rsid2057006\rsid2060511\rsid2101911\rsid2112235\rsid2112392\rsid2123303\rsid2165691\rsid2181632\rsid2229366\rsid2238558\rsid2244172\rsid2260548\rsid2365273 +\rsid2369496\rsid2427760\rsid2443070\rsid2446079\rsid2447429\rsid2449260\rsid2493172\rsid2494613\rsid2504324\rsid2505631\rsid2566533\rsid2568164\rsid2623319\rsid2635362\rsid2637590\rsid2641133\rsid2647507\rsid2769001\rsid2833141\rsid2838088\rsid2849436 +\rsid2884635\rsid2894529\rsid2952804\rsid3023369\rsid3034397\rsid3034548\rsid3036029\rsid3095740\rsid3167271\rsid3220430\rsid3228943\rsid3231049\rsid3240706\rsid3243212\rsid3301731\rsid3303530\rsid3308555\rsid3342996\rsid3347855\rsid3352595\rsid3547548 +\rsid3552042\rsid3567911\rsid3752772\rsid3819803\rsid3893966\rsid3937665\rsid3954019\rsid4000336\rsid4002451\rsid4071901\rsid4076363\rsid4091367\rsid4155951\rsid4264099\rsid4268479\rsid4272774\rsid4288894\rsid4330566\rsid4350787\rsid4405244\rsid4460289 +\rsid4460640\rsid4475334\rsid4533879\rsid4538894\rsid4542728\rsid4545218\rsid4602097\rsid4616356\rsid4658062\rsid4675069\rsid4679222\rsid4679726\rsid4683401\rsid4738929\rsid4744549\rsid4877901\rsid4981561\rsid5054625\rsid5070438\rsid5113162\rsid5186751 +\rsid5191231\rsid5248313\rsid5254237\rsid5318615\rsid5320216\rsid5332441\rsid5376200\rsid5388872\rsid5399796\rsid5462095\rsid5506187\rsid5519688\rsid5525810\rsid5526679\rsid5532374\rsid5594575\rsid5638529\rsid5650157\rsid5653460\rsid5712409\rsid5712463 +\rsid5767474\rsid5779433\rsid5843075\rsid5862788\rsid5902855\rsid5927621\rsid5928646\rsid5974982\rsid5979431\rsid6045873\rsid6047888\rsid6048783\rsid6054214\rsid6058144\rsid6099241\rsid6115982\rsid6164997\rsid6170015\rsid6179193\rsid6228168\rsid6246771 +\rsid6247188\rsid6302457\rsid6309374\rsid6309794\rsid6313661\rsid6317456\rsid6318629\rsid6362316\rsid6377474\rsid6378612\rsid6384684\rsid6436444\rsid6499600\rsid6516102\rsid6557897\rsid6557970\rsid6569652\rsid6570883\rsid6573516\rsid6578564\rsid6580905 +\rsid6629265\rsid6633554\rsid6641819\rsid6643870\rsid6650094\rsid6699576\rsid6701983\rsid6771888\rsid6839745\rsid6845226\rsid6894851\rsid6895698\rsid6901705\rsid6910245\rsid6950962\rsid6957422\rsid6968528\rsid6975890\rsid7019779\rsid7041439\rsid7089377 +\rsid7167315\rsid7277737\rsid7285964\rsid7302518\rsid7305895\rsid7350065\rsid7415269\rsid7421144\rsid7472903\rsid7483127\rsid7542885\rsid7545453\rsid7560207\rsid7616262\rsid7678768\rsid7683346\rsid7686926\rsid7697883\rsid7759131\rsid7763137\rsid7804526 +\rsid7807046\rsid7880574\rsid7880615\rsid7931676\rsid7949161\rsid7952569\rsid7959800\rsid7998566\rsid8000484\rsid8001475\rsid8090374\rsid8129941\rsid8137115\rsid8154048\rsid8194765\rsid8261617\rsid8281290\rsid8290285\rsid8323199\rsid8395240\rsid8408337 +\rsid8522857\rsid8527940\rsid8538722\rsid8541195\rsid8549130\rsid8588264\rsid8592696\rsid8593145\rsid8610523\rsid8616569\rsid8655475\rsid8682482\rsid8799536\rsid8923128\rsid8939615\rsid8983788\rsid8984001\rsid8997327\rsid8999377\rsid9000425\rsid9002512 +\rsid9047914\rsid9069276\rsid9125746\rsid9175287\rsid9176944\rsid9249735\rsid9306501\rsid9314635\rsid9315241\rsid9331762\rsid9389132\rsid9401184\rsid9450855\rsid9515364\rsid9515749\rsid9530285\rsid9534906\rsid9572146\rsid9586997\rsid9588289\rsid9589735 +\rsid9713208\rsid9716036\rsid9716705\rsid9731125\rsid9834330\rsid9838060\rsid9845272\rsid9851850\rsid9856546\rsid9898065\rsid9907738\rsid9911854\rsid9974881\rsid9977698\rsid10056466\rsid10108539\rsid10122796\rsid10173450\rsid10174318\rsid10176355 \rsid10239463\rsid10245607\rsid10290420\rsid10308289\rsid10310988\rsid10313626\rsid10376323\rsid10383915\rsid10423813\rsid10426263\rsid10452726\rsid10486826\rsid10487319\rsid10490777\rsid10496751\rsid10567623\rsid10576044\rsid10616963\rsid10631094 \rsid10646944\rsid10698169\rsid10774562\rsid10813614\rsid10831092\rsid10838587\rsid10843677\rsid10967321\rsid11030455\rsid11078728\rsid11089766\rsid11099036\rsid11107656\rsid11149793\rsid11173409\rsid11276707\rsid11277669\rsid11279197\rsid11280091 -\rsid11294126\rsid11297517\rsid11344057\rsid11351616\rsid11367514\rsid11540483\rsid11562205\rsid11762622\rsid11801900\rsid11805493\rsid11868543\rsid11882119\rsid11930665\rsid11946565\rsid11952575\rsid11956256\rsid11958279\rsid12008966\rsid12014436 -\rsid12065713\rsid12068517\rsid12069216\rsid12071252\rsid12087407\rsid12128238\rsid12156867\rsid12198414\rsid12210879\rsid12400949\rsid12408664\rsid12460046\rsid12520971\rsid12530193\rsid12595610\rsid12595779\rsid12615130\rsid12649012\rsid12657542 -\rsid12658578\rsid12658900\rsid12659025\rsid12720965\rsid12732549\rsid12739696\rsid12788235\rsid12797083\rsid12854747\rsid12874235\rsid12914880\rsid12915233\rsid12941889\rsid12982360\rsid12983768\rsid12986669\rsid12992185\rsid12998134\rsid13053124 -\rsid13071121\rsid13072585\rsid13174672\rsid13180120\rsid13200681\rsid13244366\rsid13250408\rsid13267252\rsid13316938\rsid13319718\rsid13321745\rsid13331862\rsid13336457\rsid13444065\rsid13452191\rsid13457490\rsid13530431\rsid13593709\rsid13641876 -\rsid13697230\rsid13701456\rsid13703926\rsid13714332\rsid13771084\rsid13780248\rsid13840817\rsid13843369\rsid13857996\rsid13902528\rsid13902769\rsid13915886\rsid14090435\rsid14092583\rsid14095979\rsid14098709\rsid14102810\rsid14119459\rsid14169293 -\rsid14171083\rsid14292727\rsid14295269\rsid14307787\rsid14370947\rsid14429502\rsid14435334\rsid14436934\rsid14444034\rsid14498845\rsid14574742\rsid14634080\rsid14636249\rsid14814422\rsid14892228\rsid15031452\rsid15079468\rsid15084961\rsid15088206 -\rsid15150655\rsid15283250\rsid15291332\rsid15299259\rsid15413752\rsid15420320\rsid15490742\rsid15613967\rsid15620535\rsid15664614\rsid15668792\rsid15679176\rsid15744623\rsid15747980\rsid15755105\rsid15757396\rsid15800872\rsid15821976\rsid15824246 -\rsid15932640\rsid15937974\rsid15939092\rsid15941930\rsid15999168\rsid16002722\rsid16012515\rsid16021753\rsid16057925\rsid16132195\rsid16147558\rsid16151628\rsid16189992\rsid16206388\rsid16217378\rsid16276961\rsid16323149\rsid16348565\rsid16386593 -\rsid16401568\rsid16405367\rsid16456729\rsid16467273\rsid16470149\rsid16530750\rsid16534708\rsid16585076\rsid16599140\rsid16609230\rsid16610750\rsid16655487\rsid16662276\rsid16676162\rsid16713324\rsid16715055\rsid16720464\rsid16724586\rsid16731528} -{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Soren Hein}{\operator Soren Hein}{\creatim\yr2014\mo11\dy18\hr12\min16}{\revtim\yr2018\mo4\dy1\hr12\min6} -{\printim\yr2016\mo1\dy1\hr23\min11}{\version26}{\edmins0}{\nofpages22}{\nofwords6025}{\nofchars37958}{\*\company HP}{\nofcharsws43896}{\vern57445}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}} -\paperw12240\paperh15840\margl1417\margr1417\margt1417\margb1417\gutter0\ltrsect +\rsid11294126\rsid11297517\rsid11301755\rsid11344057\rsid11351616\rsid11367514\rsid11540483\rsid11562205\rsid11762622\rsid11801900\rsid11805493\rsid11868543\rsid11882119\rsid11930665\rsid11946565\rsid11952575\rsid11956256\rsid11958279\rsid12008966 +\rsid12014436\rsid12065713\rsid12068517\rsid12069172\rsid12069216\rsid12071252\rsid12087407\rsid12128238\rsid12156867\rsid12198414\rsid12203684\rsid12210879\rsid12400949\rsid12408664\rsid12460046\rsid12520971\rsid12530193\rsid12595610\rsid12595779 +\rsid12615130\rsid12649012\rsid12657542\rsid12658578\rsid12658900\rsid12659025\rsid12720965\rsid12732549\rsid12739696\rsid12788235\rsid12797083\rsid12854747\rsid12874235\rsid12914880\rsid12915233\rsid12941889\rsid12982360\rsid12983768\rsid12986669 +\rsid12992185\rsid12998134\rsid13042502\rsid13053124\rsid13071121\rsid13072585\rsid13174672\rsid13180120\rsid13200681\rsid13244366\rsid13250408\rsid13267252\rsid13316938\rsid13319718\rsid13321745\rsid13331862\rsid13336457\rsid13444065\rsid13452191 +\rsid13457490\rsid13530431\rsid13593709\rsid13641876\rsid13697230\rsid13701456\rsid13703926\rsid13714332\rsid13771084\rsid13780248\rsid13840817\rsid13843369\rsid13857996\rsid13902528\rsid13902769\rsid13915886\rsid14090435\rsid14092583\rsid14095979 +\rsid14098709\rsid14102810\rsid14119459\rsid14169293\rsid14171083\rsid14292727\rsid14295269\rsid14307787\rsid14310469\rsid14368275\rsid14370947\rsid14429502\rsid14435334\rsid14436934\rsid14444034\rsid14498845\rsid14574742\rsid14579995\rsid14634080 +\rsid14636249\rsid14814422\rsid14892228\rsid15031452\rsid15079468\rsid15084961\rsid15088206\rsid15150655\rsid15283250\rsid15291332\rsid15299259\rsid15413752\rsid15420320\rsid15490742\rsid15613967\rsid15620535\rsid15664614\rsid15668792\rsid15679176 +\rsid15744623\rsid15747980\rsid15755105\rsid15757396\rsid15800872\rsid15821976\rsid15824246\rsid15932640\rsid15937974\rsid15939092\rsid15941930\rsid15999168\rsid16002722\rsid16012515\rsid16021753\rsid16057925\rsid16132195\rsid16147558\rsid16151628 +\rsid16189992\rsid16206388\rsid16217378\rsid16264811\rsid16276961\rsid16323149\rsid16348565\rsid16386593\rsid16401568\rsid16405367\rsid16456729\rsid16467273\rsid16470149\rsid16530750\rsid16534708\rsid16585076\rsid16599140\rsid16609230\rsid16610750 +\rsid16655487\rsid16662276\rsid16676162\rsid16713324\rsid16715055\rsid16720464\rsid16724586\rsid16731528}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info +{\author Soren Hein}{\operator Soren Hein}{\creatim\yr2014\mo11\dy18\hr12\min16}{\revtim\yr2018\mo4\dy1\hr15\min2}{\printim\yr2016\mo1\dy1\hr23\min11}{\version35}{\edmins0}{\nofpages22}{\nofwords6173}{\nofchars38892}{\*\company HP}{\nofcharsws44976} +{\vern57445}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1417\margr1417\margt1417\margb1417\gutter0\ltrsect \widowctrl\ftnbj\aenddoc\hyphhotz425\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120 \dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\splytwnine\ftnlytwnine\htmautsp\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct\asianbrkrule\rsidroot4538894 \newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0{\*\wgrffmtfilter 2450} \nofeaturethrottle1\ilfomacatclnup0{\*\ftnsep \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14119459 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 { -\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid13843369 \chftnsep +\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12069172 \chftnsep \par }}{\*\ftnsepc \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14119459 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\insrsid13843369 \chftnsepc +\insrsid12069172 \chftnsepc \par }}{\*\aftnsep \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14119459 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\insrsid13843369 \chftnsep +\insrsid12069172 \chftnsep \par }}{\*\aftnsepc \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14119459 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\insrsid13843369 \chftnsepc +\insrsid12069172 \chftnsepc \par }}\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\footerr \ltrpar \pard\plain \ltrpar\s24\qc \li0\ri0\nowidctlpar\tqc\tx4536\tqr\tx9072\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 -\f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7483127\charrsid14119459 PAGE \\* MERGEFORMAT}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\lang1024\langfe1024\noproof\langnp1031\insrsid12198414\charrsid12198414 22}}}\sectd \ltrsect\linex0\endnhere\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7483127\charrsid14119459 -\par }\pard \ltrpar\s24\ql \li0\ri0\nowidctlpar\tqc\tx4536\tqr\tx9072\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid7483127 +\f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid6318629\charrsid14119459 PAGE \\* MERGEFORMAT}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\lang1024\langfe1024\noproof\langnp1031\insrsid5902855\charrsid5902855 22}}}\sectd \ltrsect\linex0\endnhere\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid6318629\charrsid14119459 +\par }\pard \ltrpar\s24\ql \li0\ri0\nowidctlpar\tqc\tx4536\tqr\tx9072\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6318629 \par }}{\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}} {\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8 \pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\lang1031\langfe1053\langnp1031\insrsid6650094\charrsid16456729 Bo Haglund, }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\lang1031\langfe1053\langnp1031\insrsid2123303\charrsid16456729 Soren Hein, }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\lang1031\langfe1053\langnp1031\insrsid6650094\charrsid16456729 Bob Richardson -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid11030455 Rev Z}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid16720464 , 2016-01-01}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid6650094\charrsid14119459 -\par Latest DLL issue with this description is available at }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid15824246 HYPERLINK "http://www.bahnhof.se/wb758135/" }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\cf19\insrsid2101911\charrsid15824246 {\*\datafield +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid11301755 Rev AA, 2018-04-01}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid6650094\charrsid14119459 +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid11301755 GitHub releases are}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid9977698 available}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid11301755 at }{\field\flddirty{\*\fldinst {\rtlch\fcs1 \af37 \ltrch\fcs0 +\f31506\ul\cf19\insrsid11301755\charrsid16264811 HYPERLINK "https://github.com/dds-bridge/dds/releases" }{\rtlch\fcs1 \af37 \ltrch\fcs0 \f31506\ul\cf19\insrsid16264811\charrsid16264811 {\*\datafield +00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b6e000000680074007400700073003a002f002f006700690074006800750062002e0063006f006d002f006400640073002d006200720069006400670065002f006400640073002f00720065006c006500610073006500 +73000000795881f43b1d7f48af2c825dc485276300000000a5ab000300}}}{\fldrslt {\rtlch\fcs1 \af37 \ltrch\fcs0 \f31506\ul\cf19\insrsid11301755\charrsid16264811 https://github.com/dds-bridge/dds/releases}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid6650094\charrsid16264811 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid9977698 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid9977698\charrsid14119459 Latest DLL issue with this description is available at }{\field\fldedit{\*\fldinst {\rtlch\fcs1 +\af1 \ltrch\fcs0 \cf19\insrsid9977698\charrsid15824246 HYPERLINK "http://www.bahnhof.se/wb758135/" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid9977698\charrsid15824246 {\*\datafield 00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b5800000068007400740070003a002f002f007700770077002e006200610068006e0068006f0066002e00730065002f00770062003700350038003100330035002f000000795881f43b1d7f48af2c825dc48527630000 -0000a5ab000000000011000000ff008c00507a4900003201}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid6650094\charrsid15824246 http://www.bahnhof.se/wb758135/}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\insrsid6650094\charrsid14119459 -\par -\par +0000a5ab000000000011000000ff008c00507a4900003201008b87}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid9977698\charrsid15824246 http://www.bahnhof.se/wb758135/}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 +\cf19\insrsid9977698\charrsid11301755 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid6650094\charrsid16264811 \par }\pard\plain \ltrpar\s2\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 -\b\f37\ul\cf1\insrsid1595222 D}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\ul\cf1\insrsid6650094\charrsid14119459 escription of the DLL functions supported in D}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\ul\cf1\insrsid5318615 ouble Dummy Problem Solver}{ -\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\ul\cf1\insrsid270015 2.8}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\ul\cf1\insrsid11030455 .4}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\ul\cf1\insrsid6650094\charrsid14119459 -\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid10576044\charrsid14119459 -\par }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 -\b\f37\cf1\insrsid6650094\charrsid14119459 Callable functions -\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1789909\charrsid14119459 -The callable functions are all preceded with }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \f2\fs22\cf1\insrsid1789909\charrsid1789909 extern "C" __declspec(dllimport) int __stdcall}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1789909 . }{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\cf1\insrsid10576044 The prototypes are available in dll.h}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16456729 in the \'93include\'94 directory}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10576044 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid14119459 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13331862 +\b\f37\ul\cf1\insrsid1595222 D}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\ul\cf1\insrsid6650094\charrsid14119459 escription of the DLL functions supported in D}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\ul\cf1\insrsid5318615 ouble Dummy Solver}{\rtlch\fcs1 +\ab\af1 \ltrch\fcs0 \b\f37\ul\cf1\insrsid11301755 2.9.0}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\ul\cf1\insrsid6650094\charrsid14119459 +\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10576044 +\par }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0\pararsid14310469 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \ab\af1 +\ltrch\fcs0 \b\f37\cf1\insrsid14368275\charrsid14119459 Callable functions}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid14368275\charrsid14310469 +\par }\pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid13042502 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid14368275\charrsid14119459 The callable functions are all preceded with }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \f2\fs22\cf1\insrsid14368275\charrsid1789909 extern "C" __declspec(dllimport) int __stdcall}{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid14368275 . The prototypes are available in dll.h in the \'93include\'94 directory. }{\field\flddirty{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid14368275\charrsid14119459 REF Return \\h \\* MERGEFORMAT }{\rtlch\fcs1 +\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid14368275\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000007000000520065007400750072006e000000000300550078}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 +\f37\ul\cf19\insrsid14368275\charrsid16386593 Return codes}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14368275 are given at the end.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14368275 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14368275 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14368275 +\par }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0\pararsid14310469 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \ab\af1 +\ltrch\fcs0 \b\f37\cf1\insrsid9977698\charrsid9977698 Historical note}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid9977698\charrsid14310469 +\par }\pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid9977698 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9977698 I +n addition to the core functions, further layers of interface functions and functionality +have been added to DDS over time. Therefore it is not always consistent whether a pointer or an entire structure is passed to or from DDS. So please read the documentation carefully. \par -\par }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid14119459\charrsid14119459 REF Return \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b020000000800000007000000520065007400750072006e000000000300}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Return codes}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { -\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14119459 are given at the end.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10576044 +\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14368275 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9977698 For the same reason, the function names are not entirely consistent wi +th respect to the input format. In the future}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8997327 ,}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9977698 functions accepting \'93binary\'94 deals will end on Bin, and those accepting PBN }{\rtlch\fcs1 +\af1 \ltrch\fcs0 \f37\cf1\insrsid7350065 text }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9977698 deals will end on PBN. At some point existing function names may be changed as well}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7350065 .}{\rtlch\fcs1 +\af1 \ltrch\fcs0 \f37\cf1\insrsid9977698\charrsid14119459 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10576044 +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid9977698\charrsid9977698 Types of }{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid14368275 functions}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid9977698\charrsid9977698 +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9977698 +\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts18\trqc\trgaph70\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid6318629\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb +\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth908\clshdrawnil \cellx800\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3871\clshdrawnil \cellx4671 +\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4260\clshdrawnil \cellx8931\pard\plain \ltrpar +\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid9977698\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\b\f37\cf1\insrsid6318629\charrsid14579995 Mode\cell }\pard \ltrpar\qc \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6318629\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid6318629\charrsid14579995 Single\cell Multiple\cell +}\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid6318629 \trowd \irow0\irowband0\ltrrow\ts18\trqc\trgaph70\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid6318629\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb +\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth908\clshdrawnil \cellx800\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3871\clshdrawnil \cellx4671 +\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4260\clshdrawnil \cellx8931\row \ltrrow}\trowd \irow1\irowband1\ltrrow\ts18\trqc\trgaph70\trleft-108\trbrdrt\brdrs\brdrw10 +\trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid6318629\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb +\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth908\clshdrawnil \cellx800\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1985\clshdrawnil \cellx2785 +\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1886\clshdrawnil \cellx4671\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr +\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2084\clshdrawnil \cellx6755\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2176\clshdrawnil \cellx8931\pard\plain \ltrpar +\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid7350065\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7350065 \cell }{ +\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f37\cf1\insrsid7350065\charrsid7350065 Bin\cell PBN\cell Bin\cell PBN\cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 +\ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7350065 \trowd \irow1\irowband1\ltrrow\ts18\trqc\trgaph70\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 +\trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid6318629\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 +\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth908\clshdrawnil \cellx800\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr +\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1985\clshdrawnil \cellx2785\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1886\clshdrawnil \cellx4671\clvertalt\clbrdrt +\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2084\clshdrawnil \cellx6755\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 +\cltxlrtb\clftsWidth3\clwWidth2176\clshdrawnil \cellx8931\row \ltrrow}\pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid7350065\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 +\f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7350065 Solve\cell SolveBoard +\par \cell SolveBoardPBN\cell SolveAllChunksBin +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \strike\f37\cf1\insrsid7350065\charrsid7350065 \cell }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7350065 SolveAllBoards +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \strike\f37\cf1\insrsid7350065\charrsid7350065 SolveAllChunks SolveAllChunksPBN\cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 +\ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7350065 \trowd \irow2\irowband2\ltrrow\ts18\trqc\trgaph70\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 +\trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid6318629\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 +\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth908\clshdrawnil \cellx800\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr +\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1985\clshdrawnil \cellx2785\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1886\clshdrawnil \cellx4671\clvertalt\clbrdrt +\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2084\clshdrawnil \cellx6755\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 +\cltxlrtb\clftsWidth3\clwWidth2176\clshdrawnil \cellx8931\row \ltrrow}\pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid7350065\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 +\f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7350065 Calc\cell CalcDDtable +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12203684 CalcPar\cell }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7350065 CalcDDtablePBN +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12203684 CalcParPBN\cell }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7350065 CalcAllTables\cell CalcAllTablesPBN\cell }\pard\plain \ltrpar +\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7350065 +\trowd \irow3\irowband3\ltrrow\ts18\trqc\trgaph70\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid6318629\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb +\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth908\clshdrawnil \cellx800\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1985\clshdrawnil \cellx2785 +\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1886\clshdrawnil \cellx4671\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr +\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2084\clshdrawnil \cellx6755\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2176\clshdrawnil \cellx8931\row \ltrrow +}\pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid7350065\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid7350065 Play\cell AnalysePlayBin\cell AnalysePlayPBN\cell AnalyseAllPlaysBin\cell AnalyseAllPlaysPBN\cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 +\af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7350065 \trowd \irow4\irowband4\lastrow \ltrrow\ts18\trqc\trgaph70\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl +\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid6318629\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb +\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth908\clshdrawnil \cellx800\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1985\clshdrawnil \cellx2785 +\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1886\clshdrawnil \cellx4671\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr +\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2084\clshdrawnil \cellx6755\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2176\clshdrawnil \cellx8931\row }\pard \ltrpar +\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid9977698 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7350065 +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9977698 There are currently four main families of solvers, and each solver function contains exactly one of these words: +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14579995 +\par {\listtext\pard\plain\ltrpar \s28 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\cf1\lang1033\langfe1053\langnp1033\langfenp1053\insrsid9977698 \loch\af10\dbch\af0\hich\f10 \'a7\tab}}\pard\plain \ltrpar +\s28\ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\ls9\rin0\lin360\itap0\pararsid9977698\contextualspace \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid9977698 Solve: Solve hands for a given leader, strain etc.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14579995 , whether from the opening lead or later.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14310469 +(Do not use the function names that are struck through.)}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9977698 +\par {\listtext\pard\plain\ltrpar \s28 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\cf1\lang1033\langfe1053\langnp1033\langfenp1053\insrsid9977698 \loch\af10\dbch\af0\hich\f10 \'a7\tab}Calc: }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14579995 Calculate tables }{ +\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9977698 for all }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7880615 5 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7880615 {\field{\*\fldinst SYMBOL 215 \\f "Symbol" \\s 12}{\fldrslt\f3\fs24}}}{ +\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7880615 4 = 20 combinations }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9977698 leaders }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7880615 and strains in one go}{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid14579995 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9977698 +\par {\listtext\pard\plain\ltrpar \s28 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\cf1\lang1033\langfe1053\langnp1033\langfenp1053\insrsid9977698 \loch\af10\dbch\af0\hich\f10 \'a7\tab}Play}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14579995 +: Find the optimal results after each card that was actually played on a given hand.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9977698 +\par {\listtext\pard\plain\ltrpar \s28 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\cf1\lang1033\langfe1053\langnp1033\langfenp1053\insrsid9977698 \loch\af10\dbch\af0\hich\f10 \'a7\tab}Par}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14579995 +: Calculate the par result. This can also be integrated within a Calc function.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9977698\charrsid9977698 +\par }\pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid13331862 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid13042502 +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14368275 The Bin functions are for deals that are specified in \'93binary\'94 format, while the PBN functions are for deals that are specified as PBN-like text strings. The \'93Single\'94 + functions are for solving a single instance, while the \'93Multiple\'94 functions are for solving several instances in one call. If you have multiple hands to solve +, you will almost surely be better off using a Multiple function and letting DDS figure out the multi-threading for you}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8997327 \endash see below.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14368275 + +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13042502 +\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts18\trqc\trgaph70\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid16269820\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb +\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1384\clshdrawnil \cellx1276\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2268\clshdrawnil \cellx3544 +\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth5245\clshdrawnil \cellx8789\pard\plain \ltrpar +\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid13042502\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\b\f37\cf1\insrsid13042502\charrsid13042502 Par family\cell }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid13331862\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid13042502\charrsid13042502 Uses\cell }\pard \ltrpar +\qc \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid13042502\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid13042502\charrsid13042502 Output format}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13042502 \cell }\pard\plain \ltrpar +\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13042502 +\trowd \irow0\irowband0\ltrrow\ts18\trqc\trgaph70\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid16269820\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb +\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1384\clshdrawnil \cellx1276\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2268\clshdrawnil \cellx3544 +\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth5245\clshdrawnil \cellx8789\row \ltrrow}\trowd \irow1\irowband1\ltrrow\ts18\trqc\trgaph70\trleft-108\trbrdrt\brdrs\brdrw10 +\trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid13042502\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb +\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1384\clshdrawnil \cellx1276\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2268\clshdrawnil \cellx3544 +\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1843\clshdrawnil \cellx5387\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr +\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1559\clshdrawnil \cellx6946\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1843\clshdrawnil \cellx8789\pard\plain \ltrpar +\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid13331862\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13042502 \cell \cell } +{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f37\cf1\insrsid13042502\charrsid13042502 Text-1\cell Text-2\cell Bin\cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 +\ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13042502 \trowd \irow1\irowband1\ltrrow\ts18\trqc\trgaph70\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 +\trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid13042502\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb +\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1384\clshdrawnil \cellx1276\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2268\clshdrawnil \cellx3544 +\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1843\clshdrawnil \cellx5387\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr +\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1559\clshdrawnil \cellx6946\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1843\clshdrawnil \cellx8789\row \ltrrow +}\pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid13042502\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid13042502 Par\cell Vul, but not dealer\cell Par\cell SidesPar\cell SidesParBin\cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 +\f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13042502 \trowd \irow2\irowband2\ltrrow\ts18\trqc\trgaph70\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr +\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid13042502\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 +\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1384\clshdrawnil \cellx1276\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr +\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2268\clshdrawnil \cellx3544\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1843\clshdrawnil \cellx5387\clvertalt\clbrdrt +\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1559\clshdrawnil \cellx6946\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 +\cltxlrtb\clftsWidth3\clwWidth1843\clshdrawnil \cellx8789\row \ltrrow}\pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid13042502\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 +\f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13042502 Dealer\cell Vul and dealer\cell (not available)\cell DealerPar\cell DealerParBin\cell }\pard\plain \ltrpar +\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13042502 +\trowd \irow3\irowband3\lastrow \ltrrow\ts18\trqc\trgaph70\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid13042502\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb +\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1384\clshdrawnil \cellx1276\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2268\clshdrawnil \cellx3544 +\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1843\clshdrawnil \cellx5387\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr +\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1559\clshdrawnil \cellx6946\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1843\clshdrawnil \cellx8789\row }\pard \ltrpar +\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid13331862 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14368275 +\par The Par functions are divided differently, as they operate on a finished Calc table (or in the case of CalcPar and CalcParPBN, the par results are generated directly from a Calc function as well). }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8997327 P +ar calculations are so fast that they are never multi-threaded.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14368275 +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14310469 +\par The \'93Par\'94 family, which does not contain the word \'93Dealer\'94, makes use of the vulnerability but not of the dealer in a given deal. This can lead to rare differences depending on who opens the bidding; for example both sides might make 1NT. +The \'93Dealer\'94 family makes use of both the vulnerability and the dealer to arrive at a single overall par score. +\par +\par The Text-1 and Text-2 output formats are described later. The \'93Bin\'94 output format can be used to generate your own output text strings if you don\rquote t like ours. The two }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14368275 help functions +ConvertTo}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14310469 \-Sides\-}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14368275 Te}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14310469 xtFormat and ConvertToDealer}{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid14368275 TextFormat }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14310469 do this for the Text-2 and Bin formats, respectively, and you can look at the code at the end of Par.cpp if you are so inclined.}{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid14368275 \par -\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid13331862 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1789909 Not all functions are present in all versions of the DLL.}{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid8154048 For historical reasons, the function names are not entirely consistent with respect to the input for -mat. Functions accepting binary deals will end on Bin, and those accepting PBN deals will end on PBN in the future. At some point existing function names may be changed as well, so use the new names!}{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid6650094 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8395240 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f37\cf1\insrsid8395240\charrsid1800033 The Basic Functions -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8395240 -\par The basic functions SolveBoard and SolveBoardPBN }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16456729 each }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8395240 solve a single hand }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12941889 -and are thread-safe}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 , }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12941889 making it possible }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 to use }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid6641819 them for solving}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12941889 several hands in parallel. The other callable functions use the SolveBoard functions either directly or indirectly. +\par There are also some functions to do with DDS itself: +\par {\listtext\pard\plain\ltrpar \s28 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\cf1\lang1033\langfe1053\langnp1033\langfenp1053\insrsid14368275 \loch\af10\dbch\af0\hich\f10 \'a7\tab}}\pard\plain \ltrpar +\s28\qj \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\ls10\rin0\lin360\itap0\pararsid14368275\contextualspace \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid14368275 GetDDSInfo can provide information about the DLL and how it is compiled and configured. +\par {\listtext\pard\plain\ltrpar \s28 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\cf1\lang1033\langfe1053\langnp1033\langfenp1053\insrsid14368275 \loch\af10\dbch\af0\hich\f10 \'a7\tab}ErrorMessage can turn an error code into an error string. +\par {\listtext\pard\plain\ltrpar \s28 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\cf1\lang1033\langfe1053\langnp1033\langfenp1053\insrsid14368275 \loch\af10\dbch\af0\hich\f10 \'a7\tab}SetThreading controls the type of threading that is used internally. If you\rquote +re using a ready-made DLL, you probably don\rquote t need to call this. +\par {\listtext\pard\plain\ltrpar \s28 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\cf1\lang1033\langfe1053\langnp1033\langfenp1053\insrsid14368275 \loch\af10\dbch\af0\hich\f10 \'a7\tab}SetMaxThreads sets the maximum number of threads to be used internally. +\par {\listtext\pard\plain\ltrpar \s28 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\cf1\lang1033\langfe1053\langnp1033\langfenp1053\insrsid14368275 \loch\af10\dbch\af0\hich\f10 \'a7\tab}SetResources sets both the maximum memory and the maximum number of threads.}{ +\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8997327 This of SetMaxThreads }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8997327 should probably always be called on Linux/Mac, with a zero argument for auto-configuration}{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid8997327 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14368275 +\par {\listtext\pard\plain\ltrpar \s28 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\cf1\lang1033\langfe1053\langnp1033\langfenp1053\insrsid14368275 \loch\af10\dbch\af0\hich\f10 \'a7\tab}FreeMemory relinquishes all dynamically allocated memory.}{\rtlch\fcs1 \af1 +\ltrch\fcs0 \f37\cf1\insrsid14368275\charrsid14368275 +\par }\pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid13331862 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid14368275 +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid8997327\charrsid8997327 Multi-threading}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid12941889\charrsid14310469 +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8997327 DDS is }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14310469 quite optimized for performance}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8997327 }{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid14310469 including}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8997327 multi-threading. For example, DDS takes advantage of similarity between hands (such as the same cards and strain but a different de +clarer) and solves such hands as groups. DDS sets up threads and tries to load the threads as equally as possible, looking into the individual hands as well. Unless you have an unusual set-up, you\rquote re probably not going to beat DDS\rquote +s multi-threading by trying to do it manually instead. \par -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f37\cf1\insrsid7545453\charrsid1800033 The Multi-}{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f37\cf1\insrsid12520971 T}{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f37\cf1\insrsid7545453\charrsid1800033 hread}{\rtlch\fcs1 \af1 \ltrch\fcs0 -\i\f37\cf1\insrsid12941889\charrsid1800033 Double Dummy Solver Functions -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6054214 -\par The double dummy trick values for all }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 5 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 {\field{\*\fldinst SYMBOL 215 \\f "Symbol" \\s 12}{\fldrslt\f3\fs24}}}{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid12520971 4 = }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6054214 20 possible combinations of a hand\rquote s trump strain and declarer han}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid5506187 d alternatives are solved by a}{ -\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6054214 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4738929 single }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6054214 call to }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid5506187 one of }{\rtlch\fcs1 -\af1 \ltrch\fcs0 \f37\cf1\insrsid6054214 the function}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid5506187 s CalcDDtable and CalcDDtablePBN.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid856123 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16456729 }{ -\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid856123 T}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16456729 hreads are allocated per strain in order to save computations.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6054214 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid856123 -\par To obtain better utilization of available threads, the double dummy}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4155951 (DD)}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid856123 tables can be grouped using one of the func}{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\cf1\insrsid5388872 tions CalcAllTables and }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid856123 CalcAllTablesPBN. -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11277669 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4155951 Solving hands can be done much }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 more }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4155951 quick}{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid12520971 ly}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4155951 using one of the multi-thread alternatives }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6910245 for}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4155951 }{\rtlch\fcs1 -\af1 \ltrch\fcs0 \f37\cf1\insrsid6910245 calling }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4155951 SolveBoard. Then a number of hands are grouped for a sing}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12008966 le call to one of the functions}{ -\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16456729 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid5927621 SolveAllBoards, }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid5388872 SolveAllChunksBin and }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid4155951 SolveAllChunksPBN.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12008966 T}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1708722 he hands }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid12008966 are then solved }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1708722 in parallel}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12008966 using the available threads}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1708722 . -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1900643 -\par The number of threads is automatically configured by DDS}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid5927621 on Windows}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 ,}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1900643 - taking into account the number of processor cores and available memory. }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1900643 The number of threads can be influenced }{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\cf1\insrsid16456729 by calling}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1900643 SetMaxThreads.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid5927621 - This function should probably always be called on Linux/Mac, with a zero argument for auto-configuration.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1900643 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4076363 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16456729 Calling}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4076363 FreeMemory causes DDS to give up its dynamically allocated memory. -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1800033 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f37\cf1\insrsid1800033\charrsid7959800 The PAR Calculation Functions -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1800033 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11958279 The PAR calculation functions }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6957422 find the optimal contract(s) assuming open cards and optimal bidding from both sides.}{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\cf1\insrsid5650157 In very rare cases it matters which side }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4002451 or hand that starts the bidding, i.e. which side or hand that }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10423813 -is first to bid its optimal contract.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1800033 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 -\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid10308289 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid5650157 Two }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2833141 alternatives are given}{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\cf1\insrsid10308289 : -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f37\cf1\lang1033\langfe1053\langnp1033\langfenp1053\insrsid10308289 \hich\af37\dbch\af0\loch\f37 1.\tab}}\pard \ltrpar -\qj \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\ls5\rin0\lin720\itap0\pararsid11099036 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10308289 The PAR scores / contracts are calculated separately for each side. In almost all cases the results w}{ -\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid3752772 ill be identical for both sides, but in rare cases}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9834330 the result is dependent on which side that \'93starts the bidding\'94, }{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\cf1\insrsid9834330\charrsid9834330 i.e. }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9834330 that first finds the }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9834330\charrsid9834330 bid that is most b}{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid7305895 eneficial for the }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9834330 own side. }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid409864\charrsid7305895 One example is when both sides can make 1 NT.}{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid10308289\charrsid7305895 -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f37\cf1\lang1033\langfe1053\langnp1033\langfenp1053\insrsid10308289\charrsid9834330 \hich\af37\dbch\af0\loch\f37 2.\tab}}\pard \ltrpar -\qj \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\ls5\rin0\lin720\itap0\pararsid2057006 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10308289\charrsid9834330 The dealer hand is}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10383915 assumed to \'93 -start the bidding\'94.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid15755105\charrsid9834330 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10308289\charrsid9834330 -\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid13331862 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7804526 The presentation of the par sco}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid3301731 re and contracts are given in }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7804526 alternative formats.}{ -\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4155951 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6054214 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6573516 The functions Par, }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid3352595 SidesPar and DealerPar }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1386919 do the par calculation}{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\cf1\insrsid12520971 ;}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1386919 their call}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6573516 must be preceded by a function }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1386919 call }{ -\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6573516 calculating the double dummy table value}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11952575 s}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6573516 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid12941889 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid3301731 The functions SidesParBin and DealerParBin provide binary output of the par results}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 ,}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid3301731 - making it easy to tailor-ma}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 k}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid3301731 e the output text format. }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 Two}{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\cf1\insrsid3301731 such functions}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16456729 ,}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid3301731 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid3301731\charrsid3301731 -ConvertToSidesTextFormat}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2238558 and }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2238558\charrsid2238558 ConvertToDealerTextFormat}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2238558 , are included}{ -\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2568164 as examples}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2238558 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid3301731 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid3352595 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2238558 It is }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid3352595\charrsid3352595 possible as an option to perform par calculation in CalcAllTables and CalcAllTablesPBN. }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid3352595 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6573516 -\par The par calculation is }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1386919 executed}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6573516 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9974881 using}{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid7305895 a single thread. But }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6573516 the calculation is very fast and }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4533879 i}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7305895 t}{ -\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4533879 s }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7305895 duration is negligible}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6573516 compared to the }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid7763137 double}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6573516 dummy calculation}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4533879 duration}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6573516 . -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7959800 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f37\cf1\insrsid13902528 Double Dummy Value}{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f37\cf1\insrsid7959800\charrsid7959800 Analyser Functions -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7959800 -\par The functions AnalysePlayBin, AnalysePlayPBN, AnalyseAllPlaysBin and AnalyseAll}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13902528 PlaysPBN take}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7959800 the played cards in a game }{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\cf1\insrsid10313626 or games }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7959800 and calculate and present their double dummy values. -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12941889 -\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8154048\charrsid14119459 -\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 \page }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1789909\charrsid14119459 +\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14310469 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid8997327 DDS has two types of threads available internally, \'93large\'94 ones which are +a bit faster and use more memory, and \'93small\'94 ones which are the opposite. DDS automatically chooses the right mixture of thread types based on the available memory and number of threads.}{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid8154048\charrsid14119459 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12520971 \page }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1789909\charrsid14119459 \par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11099036\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt @@ -303,38 +424,38 @@ ConvertToSidesTextFormat}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2238558 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14119459\charrsid14119459 - REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000000629}} + REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000006290000dc}} }{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789909 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5767474\charrsid14119459 REF deal \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000001400}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000001400ca0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16530750 dl,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 \par int target, \par int solutions, \par int mode, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12659025\charrsid14119459 REF futureTricks \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b007300000000143b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b007300000000143b00120c}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *futp, \par int threadIndex\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid13267252 Binary }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 -\f37\fs22\cf1\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789909 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 -The most basic function, solves a single hand from the beginning or from later play\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 +\f37\fs22\cf1\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789909 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 The most basi +c function, solves a single hand from the beginning or from later play\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow1\irowband1\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11099036\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid13331862\charrsid13331862 REF SolveBoardPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid13331862 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000053006f006c007600650042006f00610072006400500042004e000000003000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveBoardPBN}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid13331862 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789909 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6968528\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e000000774800}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000053006f006c007600650042006f00610072006400500042004e000000003000654100}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveBoardPBN}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid13331862 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789909 {\rtlch\fcs1 \af2\afs18 +\ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6968528\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e00000077480065ba00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid4616356 dlPBN}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16530750 ,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 \par int target, \par int solutions, \par int mode, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12659025\charrsid14119459 REF futureTricks \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b0073000000bf6300}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b0073000000bf6300005b7f}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *futp, \par int threadIndex}{\rtlch\fcs1 \af1\afs18 \ltrch\fcs0 \f37\fs18\cf1\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid13267252 PBN}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -345,17 +466,17 @@ The most basic function, solves a single hand from the beginning or from later p \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid11107656\charrsid11107656 - REF CalcDDtable \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid11107656 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000430061006c006300440044007400610062006c0065000000203080}} -}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtable}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell -}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5974982 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid6901705 struct}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\insrsid8154048\charrsid6901705 } -{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000226f00}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid6901705 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid16456729\charrsid6901705 - + REF CalcDDtable \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid11107656 {\*\datafield +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000430061006c006300440044007400610062006c00650000002030800000ad}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtable}}}\sectd \ltrsect +\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5974982 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\cf1\insrsid8154048\charrsid6901705 struct}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\insrsid8154048\charrsid6901705 }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{ +\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000226f00040000}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\cf1\insrsid8154048\charrsid6901705 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid16456729\charrsid6901705 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 tableDeal, \line struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT } -{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000720007}}}{\fldrslt {\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\cf1\insrsid16456729 +{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000720007320000}}}{\fldrslt { +\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 +\ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 * tablep\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid13267252 Binary }{ \rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 \cell Solves an initial hand for all possible declarers and denominations (}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid16012515 up to }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 20 combinations)\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 @@ -365,16 +486,16 @@ The most basic function, solves a single hand from the beginning or from later p \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid11107656\charrsid11107656 REF CalcDDtablePBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid11107656 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000430061006c006300440044007400610062006c006500500042004e000000676900}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtablePBN}}} +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000430061006c006300440044007400610062006c006500500042004e000000676900314000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtablePBN}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst { \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e000000650000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 \line }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6968528\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e0000006500003100a8}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 \line }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6968528\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 tableDealPBN, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5974982 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000303600}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000303600745f14}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 * tablep\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 PBN }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14307787\charrsid14119459 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar @@ -387,21 +508,21 @@ The most basic function, solves a single hand from the beginning or from later p \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid11107656\charrsid11107656 REF CalcAllTables \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid11107656 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e000000430061006c00630041006c006c005400610062006c006500730000002e0300}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcAllTables}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 -\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableDeals \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d000000640064005400610062006c0065004400650061006c0073000000001200}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeals}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e000000430061006c00630041006c006c005400610062006c006500730000002e030072dc00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcAllTables}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst { +\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableDeals \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d000000640064005400610062006c0065004400650061006c0073000000001200611a69}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeals}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 dealsp, \par int mode, \par int trumpFilter[5], \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTablesRes \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065007300520065007300000013eb00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065007300520065007300000013eb006c0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *resp, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6701983 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6701983\charrsid14119459 REF allParResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c0074007300000013a212}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c0074007300000013a2126e0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 presp\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 Binary \cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 Solves a number of hands in parallel. Multi-threaded.\cell }\pard \ltrpar @@ -412,22 +533,22 @@ The most basic function, solves a single hand from the beginning or from later p \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid11107656\charrsid11107656 REF CalcAllTablesPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid11107656 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b020000000800000011000000430061006c00630041006c006c005400610062006c0065007300500042004e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcAllTablesPBN}}} -\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af2\afs18 +08d0c9ea79f9bace118c8200aa004ba90b020000000800000011000000430061006c00630041006c006c005400610062006c0065007300500042004e000000000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcAllTablesPBN} +}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid11107656 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableDealsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000010000000640064005400610062006c0065004400650061006c007300500042004e000000140012}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000010000000640064005400610062006c0065004400650061006c007300500042004e000000140012000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *dealsp, \par int mode, \par int trumpFilter[5], }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid70445\charrsid14119459 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTablesRes \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c00650073005200650073000000000040}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c006500730052006500730000000000402d0094}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *resp, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6701983 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6701983\charrsid14119459 REF allParResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c00740073000000c5691a}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c00740073000000c5691a06486e}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 presp\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 PBN }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14307787\charrsid14119459 @@ -441,35 +562,35 @@ The most basic function, solves a single hand from the beginning or from later p \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5320216\charrsid5320216 REF SolveAllBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5320216 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f00000053006f006c007600650041006c006c0042006f00610072006400730000002200cc}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllBoards}}} +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f00000053006f006c007600650041006c006c0042006f00610072006400730000002200cc55a469}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllBoards}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e00000091001a}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e00000091001a326700}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *bop, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14429502 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14429502\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f0061007200640073000000160000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f0061007200640073000000160000204700}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid7880574 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574 * }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid7880574 solvedp\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 PBN }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14307787\charrsid14119459 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 { -\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8682482 Consider using this instead of the next 3 \'93Chunk\'94 functions\'94!}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar -\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow7\irowband7\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 -\trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8682482 Consider }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid2623319 using this instead of the next 2}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8682482 \'93Chunk\'94 + functions\'94!}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8154048\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\insrsid3937665\charrsid14119459 \trowd \irow7\irowband7\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11099036\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5320216\charrsid5320216 REF SolveAllChunksBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5320216 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300420069006e000000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunksBin -}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 {\rtlch\fcs1 \af2\afs18 -\ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f0061007200640073000000006e00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 -boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *bop, +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300420069006e000000000000484900}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 +SolveAllChunksBin}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8154048 { +\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 +\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f0061007200640073000000006e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *bop, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14429502 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14429502\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f0061007200640073000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f0061007200640073000000000000005700}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8154048\charrsid14119459 int chunkSize\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -482,13 +603,13 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5320216\charrsid5320216 REF SolveAllChunks \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5320216 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f00000053006f006c007600650041006c006c004300680075006e006b0073000000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunks}}} +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f00000053006f006c007600650041006c006c004300680075006e006b0073000000000000005700}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunks}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid16151628 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16151628\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16151628\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e00000000001d}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e00000000001d000800}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16151628\charrsid14119459 *bop, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16151628\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000b06d}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000b06d000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16151628\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16151628\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16151628\charrsid14119459 solvedp, }{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 @@ -502,14 +623,14 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5320216\charrsid5320216 REF SolveAllChunksPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5320216 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300500042004e00000000001a}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunksPBN -}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 -\ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300500042004e00000000001a250000}}}{\fldrslt {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 +SolveAllChunksPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8154048\charrsid5320216 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 { +\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 +\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e000000000000be0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *bop, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14429502 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14429502\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f0061007200640073000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f0061007200640073000000000000a82000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 solvedp, }{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 @@ -523,16 +644,16 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12520971 \page \par \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12658900\charrsid12658900 REF Par \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid12658900 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000040000005000610072000000000008}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 Par}}} +\f2\fs18\ul\cf19\insrsid16386593\charrsid12658900 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000040000005000610072000000000008366118}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 Par}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid12658900 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000005400}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000005400c22016}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 tablep, }{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6701983\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c00740073000000000300}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c007400730000000003003e8089}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *presp, \par int vulnerable\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 No format }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14307787\charrsid14119459 @@ -546,11 +667,11 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3567911 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3567911 DealerPar}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3567911\charrsid12658900 \cell }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3567911\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000d700}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000d7003d8000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 tablep, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "parResultsDealer" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c0065007200000000d00000000000ff002e213120f50000726f}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c0065007200000000d00000000000ff002e213120f50000726faa0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid13701456\charrsid16456729 parResultsDealer}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid13701456 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3567911\charrsid14119459 presp, @@ -565,12 +686,12 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3567911 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430\charrsid3220430 DealerParBin }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3220430 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 struct } {\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "ddTableResults" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000011006c00000aff0021080020a700001e6f}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000011006c00000aff0021080020a700001e6f6f0800}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 * tablep, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000780000000000ff00e20074208500001236}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000780000000000ff00e20074208500001236040000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 * presp, @@ -586,7 +707,7 @@ Solves a number of hands in parallel. Multi-threaded.}{\rtlch\fcs1 \af1\afs22 \l \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3567911 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430\charrsid3220430 ConvertToDealerTextFormat}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3220430 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 -{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d006100730074006500720000000068008c0000006d008e00202053000076e0}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d006100730074006500720000000068008c0000006d008e00202053000076e0000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 pres, @@ -600,11 +721,11 @@ Text}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid3220430\charrsid14 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid348894 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid15939092 SidesPar}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid348894\charrsid8538722 \cell }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid348894\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000002e00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000002e00fb0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894\charrsid14119459 tablep, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "parResultsDealer" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c00650072000000000000000000000000de003c0096000000e8}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c00650072000000000000000000000000de003c0096000000e8371700}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3954019\charrsid16456729 parResultsDealer}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894\charrsid14119459 presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid348894 , @@ -618,11 +739,11 @@ Par results are given for sides with the DealerPar output format.}{\rtlch\fcs1 \ \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid348894 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430\charrsid3220430 SidesParBin}{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3220430 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 struct } {\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "ddTableResults" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000000000000000000002e3137001000f200c8}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000000000000000000002e3137001000f200c83c0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \line }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 * tablep, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid16456729 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid16456729 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d00610073007400650072000000000004000000000000b5006923a700f10000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d00610073007400650072000000000004000000000000b5006923a700f10000eb2f00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid3220430\charrsid16456729 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16456729 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid3220430\charrsid3220430 sidesRes[2], @@ -638,12 +759,12 @@ Par results are given for sides with the DealerPar output format.}{\rtlch\fcs1 \ \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid348894 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430\charrsid3220430 ConvertToSidesTextFormat}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid3220430 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid16057925 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid8682482 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid8682482 -{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000000f0000e5002c008e0d3a006a00f10073}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000000f0000e5002c008e0d3a006a00f10073413100}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16057925\charrsid8682482 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 pres, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid8682482 HYPERLINK \\l "parTextResults" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid8682482 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000700061007200540065007800740052006500730075006c007400730000000000000000f7000000d2003e00f700f1002b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000700061007200540065007800740052006500730075006c007400730000000000000000f7000000d2003e00f700f1002b356800}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16057925\charrsid8682482 parTextResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16057925\charrsid16057925 resp}{\rtlch\fcs1 @@ -656,22 +777,22 @@ Example of text output from }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\i \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid8538722 - REF CalcPar \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid8538722 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000008000000430061006c0063005000610072000000133700}}}{\fldrslt { + REF CalcPar \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid8538722 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000008000000430061006c006300500061007200000013370061fa00}}}{\fldrslt { \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcPar}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid8538722 \cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid6557970 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000130000}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000130000826100}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid6557970 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482\charrsid6557970 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 tableDeal, \par int vulnerable, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5974982\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000f808}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15757396 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000000f808612000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15757396 \par * }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 tablep, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6701983 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6701983\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c0074007300000000eb00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c0074007300000000eb00558000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 presp\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14307787 Binary}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 @@ -682,21 +803,21 @@ Solves for both the DD result table and the par contracts}{\rtlch\fcs1 \af1\afs2 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid8538722 - REF CalcParPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid8538722 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000430061006c006300500061007200500042004e000000004a00}} + REF CalcParPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid8538722 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000430061006c006300500061007200500042004e000000004a00656c69}} }{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 CalcParPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid8538722 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e00000000ba00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid70445\charrsid14119459 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e00000000ba006e6e00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid70445\charrsid14119459 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 tableDealPBN, \par struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid8682482 HYPERLINK \\l "ddTableResults" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid8682482 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000000000307b0f002000043500006800000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000000000307b0f002000043500006800000000492200}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid6578564\charrsid8682482 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15757396 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 * tablep, \par int vulnerable, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6701983 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6701983\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c00740073000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c00740073000000000000de0a00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 presp\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 PBN \cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid2769001 As CalcPar, but with PBN input format.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid3034548 }{\rtlch\fcs1 \af1\afs22 @@ -708,18 +829,18 @@ Solves for both the DD result table and the par contracts}{\rtlch\fcs1 \af1\afs2 \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12520971 \page \par \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid2849436 REF TracePlayBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 -\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid2849436 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d0000005400720061006300650050006c0061007900420069006e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid2849436 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d0000005400720061006300650050006c0061007900420069006e000000000000426409}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalysePlayBin}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid2849436 \cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6968528\charrsid14119459 REF deal \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000005001}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000005001005800}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 dl, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF playTraceBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e000000000010}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTraceBin}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e000000000010250000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTraceBin}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6580905\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid14119459\charrsid14119459 play}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 ,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid14119459\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14119459\charrsid14119459 REF solvedPlay \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c00610079000000000111}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c00610079000000000111000006}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid14119459\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid14119459\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid14119459\charrsid14119459 solvedp,}{ \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 @@ -733,18 +854,18 @@ Solves for both the DD result table and the par contracts}{\rtlch\fcs1 \af1\afs2 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid2849436 - REF TracePlayPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid2849436 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d0000005400720061006300650050006c0061007900500042004e000000000012 -}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalysePlayPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid2849436 \cell -}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid6968528\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e000000200000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { -\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 dlPBN, + REF TracePlayPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid2849436 {\*\datafield +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d0000005400720061006300650050006c0061007900500042004e000000000012051a00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalysePlayPBN}}}\sectd \ltrsect +\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid2849436 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6968528\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e000000200000ff9a00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 dlPBN, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF playTracePBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e000000005314}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracePBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e000000005314af0079}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracePBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 playPBN, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid14119459\charrsid14119459 REF solvedPlay \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c0061007900000000ec00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c0061007900000000ec00001ec8}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 solvedp, \par int thrId\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 PBN }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -759,16 +880,16 @@ Solves for both the DD result table and the par contracts}{\rtlch\fcs1 \af1\afs2 \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid5979431 REF TraceAllPlaysBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5979431 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000110000005400720061006300650041006c006c0050006c00610079007300420069006e000000004200}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalyseAllPlaysBin}}} -\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid5979431 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000110000005400720061006300650041006c006c0050006c00610079007300420069006e000000004200001e75}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalyseAllPlaysBin +}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid5979431 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f0061007200640073000000a06900}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 -boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *bop, +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f0061007200640073000000a06900000057}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *bop, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF playTracesBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300420069006e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesBin}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *plp, +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300420069006e000000000000010200}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesBin}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *plp, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF solvedPlays \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c006100790073000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c006100790073000000000000ec0500}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 solvedp, \par int chunkSize\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 Binary }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -782,17 +903,17 @@ boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \lt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid5979431 REF TraceAllPlaysPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid5979431 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000110000005400720061006300650041006c006c0050006c00610079007300500042004e00000000e900}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalyseAllPlaysPBN}}} -\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid5979431 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000110000005400720061006300650041006c006c0050006c00610079007300500042004e00000000e900001aca}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 AnalyseAllPlaysPBN +}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12657542\charrsid5979431 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid70445\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e000000000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *bopPBN, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF playTracesPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300500042004e0000000000d8}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesPBN}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300500042004e0000000000d8000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesPBN}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 plpPBN, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6580905\charrsid14119459 REF solvedPlays \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c0061007900730000000000a2}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c0061007900730000000000a2009100}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 *}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8682482 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12657542\charrsid14119459 solvedp, \par int chunkSize\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12657542\charrsid14119459 PBN }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -805,38 +926,59 @@ boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \lt \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11099036\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 +\cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field\flddirty{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5902855 HYPERLINK \\ +l "SetThreading" }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5902855 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000053006500740054006800720065006100640069006e0067000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 +\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1389500\charrsid5902855 SetThreading}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1389500 \cell }\pard \ltrpar +\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1389500 int code\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 { +\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid1389500\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6771888 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid1389500 +Can be used to select the multi-threading system that is used internally. You probably don\rquote t need this. The codes are in dll.h\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 +\af1 \ltrch\fcs0 \insrsid1389500\charrsid14119459 \trowd \irow4\irowband4\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11099036\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 +\clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt +\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 REF SetMaxThreads \\h }{ -\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005300650074004d0061007800540068007200650061006400730000008f00bd}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005300650074004d0061007800540068007200650061006400730000008f00bd000000}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 SetMaxThreads}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1056208\charrsid5979431 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1056208 int }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1056208\charrsid1056208 userThreads}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1056208\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid1056208\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6771888 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6771888 Used at initial start and can also be called with a request for allocating memory for a specified number of threads. }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6643870 Is apparently mandatory on Linux and Mac (optional on Windows)}{ \rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid1056208\charrsid3034548 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid1056208\charrsid14119459 -\trowd \irow4\irowband4\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\trowd \irow5\irowband5\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11099036\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 +\clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt +\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 +\cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field\flddirty{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1389500 HYPERLINK \\ +l "SetResources" }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1389500 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d0000005300650074005200650073006f00750072006300650073000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 +\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2623319\charrsid1389500 SetResources}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2623319 \cell }\pard \ltrpar +\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2623319 int maxMemoryMB,\line int maxThreads\cell }\pard \ltrpar +\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid2623319\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6771888 +{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid2623319 Like SetMaxThreads, but also sets the maximum memory to use. One of these two functions is enough.\cell }\pard \ltrpar +\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid2623319\charrsid14119459 \trowd \irow6\irowband6\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 +\trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11099036\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 REF FreeMemory \\h }{ -\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000046007200650065004d0065006d006f00720079000000de36e6}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000046007200650065004d0065006d006f00720079000000de36e60000bf}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 FreeMemory}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1056208\charrsid5979431 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1056208 void}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1056208\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid1056208\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8682482 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6771888 Frees }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid8682482 all}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6771888 allocated dynamical memory.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid1056208\charrsid3034548 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 { -\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid1056208\charrsid14119459 \trowd \irow5\irowband5\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv +\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid1056208\charrsid14119459 \trowd \irow7\irowband7\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv \brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11099036\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb \brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2288\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 - REF GetDDSInfo \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000047006500740044004400530049006e0066006f000000110012}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid7483127 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 GetDDSInfo}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 + REF GetDDSInfo \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000047006500740044004400530049006e0066006f0000001100120000ff}}{\rtlch\fcs1 \af2\afs18 +\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7483127 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 GetDDSInfo}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7483127\charrsid9069276 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12657542 {\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1921007\charrsid1921007 - REF DDSInfo \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid1921007 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000044004400530049006e0066006f000000c20000}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid1921007 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 DDSInfo}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 + REF DDSInfo \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid1921007 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000044004400530049006e0066006f000000c20000730000}}{\rtlch\fcs1 \af2\afs18 +\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid1921007 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 DDSInfo}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7483127 * info\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid7483127\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8682482 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid7483127 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 { -\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid7483127\charrsid14119459 \trowd \irow6\irowband6\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv +\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid7483127\charrsid14119459 \trowd \irow8\irowband8\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv \brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11099036\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb \brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1353\clshdrawnil \cellx7226\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr @@ -845,7 +987,7 @@ Used at initial start and can also be called with a request for allocating memor \par char line[80]\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14307787 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid9069276\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8682482 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid9069276 Turns a return code into an error message string\cell }\pard \ltrpar -\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid9069276\charrsid14119459 \trowd \irow7\irowband7\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl +\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid9069276\charrsid14119459 \trowd \irow9\irowband9\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl \brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11099036\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2918\clshdrawnil \cellx2810\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3063\clshdrawnil \cellx5873\clvertalt @@ -963,7 +1105,7 @@ Holding\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1668\clshdrawnil \cellx1560\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3260\clshdrawnil \cellx4820\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4618\clshdrawnil \cellx9438\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid10576044\charrsid14119459 {\*\bkmkstart deal}deal{\*\bkmkend deal}\cell int trump;\cell }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid10239463\charrsid14119459 REF suit \\h \\ -* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000047022c}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000047022c000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10239463\charrsid14119459 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10576044\charrsid14119459 \trowd \irow1\irowband1\ltrrow \ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -972,7 +1114,7 @@ Holding\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4618\clshdrawnil \cellx9438\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid10576044\charrsid14119459 \cell int first;\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10239463\charrsid14119459 The hand leading to the trick. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF hand \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e0064000000080095}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e0064000000080095000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10239463\charrsid14119459 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 \par \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10576044\charrsid14119459 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -981,7 +1123,7 @@ Holding\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4618\clshdrawnil \cellx9438\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid10576044\charrsid14119459 \cell int currentTrickSuit[3];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12659025 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 Up to 3 cards may already have been played to the trick. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{ -\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000007258}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000007258000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid163452 }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid163452\charrsid163452 Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10576044\charrsid14119459 \trowd \irow3\irowband3\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 @@ -998,16 +1140,16 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4618\clshdrawnil \cellx9438\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid10576044\charrsid14119459 \cell unsigned int remainCards[4][4];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12659025 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5254237 1st}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 index is }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid15757396\charrsid14119459 REF hand \\h \\ -* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e0064000000226700}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e0064000000226700000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5254237 , 2nd}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 index is }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid15757396\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 -\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000201e00}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit} -}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid15757396\charrsid14119459 . }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12983768 remainCards use}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 -\f37\fs22\cf1\insrsid5254237 s }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid12983768 HYPERLINK \\l "holding" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid12983768 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000068006f006c00640069006e006700000016003e23000200a40030340f002f00901c00}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \cs26\f37\fs22\ul\cf19\insrsid5254237\charrsid12983768 Holding}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12983768 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5254237 .}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10576044\charrsid14119459 -\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10576044\charrsid14119459 \trowd \irow5\irowband5\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt -\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000201e00000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 +Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid15757396\charrsid14119459 . }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12983768 remainCards use}{\rtlch\fcs1 \af1\afs22 +\ltrch\fcs0 \f37\fs22\cf1\insrsid5254237 s }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid12983768 HYPERLINK \\l "holding" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid12983768 {\*\datafield +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000068006f006c00640069006e006700000016003e23000200a40030340f002f00901c00000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \cs26\f37\fs22\ul\cf19\insrsid5254237\charrsid12983768 Holding}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12983768 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5254237 .}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\f37\fs22\cf1\insrsid10576044\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10576044\charrsid14119459 +\trowd \irow5\irowband5\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid14119459\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1668\clshdrawnil \cellx1560\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3260\clshdrawnil \cellx4820\clvertalt \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4618\clshdrawnil \cellx9438\row }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 @@ -1024,7 +1166,7 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 {\*\bkmkstart dealPBN}dealPBN{\*\bkmkend dealPBN}\cell int trump;\cell }{\field{\*\fldinst { \rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000200264}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000200264000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow1\irowband1\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1032,8 +1174,8 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 \cell int first;\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 The hand leading to the trick. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF hand \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 -\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e0064000000000064}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand} -}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid9713208 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 \cell }\pard \ltrpar +\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e0064000000000064000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 +Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid9713208 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1041,7 +1183,7 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 \cell int currentTrickSuit[3];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 Up to 3 cards may already have been played to the trick. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{ -\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000ff64}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000ff64000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding.\cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow3\irowband3\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1058,8 +1200,8 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 \cell char remainCards[80];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 Remaining cards. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF PBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 -\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000004000000500042004e000000206400}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 PBN}}} -\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 { +\f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000004000000500042004e000000206400000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 PBN} +}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 { \rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow5\irowband5\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv \brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl \brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth1951\clshdrawnil \cellx1843\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 @@ -1073,10 +1215,10 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid10967321 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid10967321\charrsid14119459 {\*\bkmkstart ddTableDeal}ddTableDeal{\*\bkmkend ddTableDeal}\cell unsigned int cards[4][4]; \cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10967321 Encodes a deal. First index is hand. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid10967321\charrsid14119459 REF hand \\h \\* MERGEFORMAT }{ -\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e006400000017616d}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e006400000017616d000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10967321 encoding. Second index is suit. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid10967321\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000206f6d}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000206f6d000069}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10967321\charrsid14119459 encoding.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid10967321\charrsid10967321 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \b\f37\fs22\cf1\insrsid10967321\charrsid14119459 \trowd \irow1\irowband1\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1093,7 +1235,7 @@ Set to 0 if no card has been played.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12210879 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 {\*\bkmkstart ddTableDealPBN}ddTableDealPBN}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 {\*\bkmkend ddTableDealPBN} }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 \cell char cards[80];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12210879\charrsid14119459 Encodes a deal}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12658578\charrsid14119459 . }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12658578\charrsid14119459 REF PBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000004000000500042004e000000000055}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000004000000500042004e000000000055000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 PBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12658578\charrsid14119459 encoding.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12210879\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \b\f37\fs22\cf1\insrsid12210879\charrsid14119459 \trowd \irow1\irowband1\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1118,7 +1260,7 @@ Encodes a deal}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12658578 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid70445\charrsid14119459 \cell }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\lang1031\langfe1053\langnp1031\insrsid70445\charrsid7697883 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000009d02}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\ +\f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000009d02330096}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\ * MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\lang1031\langfe1053\langnp1031\insrsid70445\charrsid7697883 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12210879 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\lang1031\langfe1053\langnp1031\insrsid12210879\charrsid7697883 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 @@ -1145,7 +1287,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12210879 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 \cell }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 s}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 truct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid12210879\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 -\ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e000000200000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e0000002000000000be}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 deals[}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 X}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 ];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12210879 X = }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid12210879 MAXNOOFTABLES * DDS_STRAINS}{ @@ -1169,7 +1311,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid6968528\charrsid14119459 REF deal \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000300000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c0000003000000000d4}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par [}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 @@ -1180,7 +1322,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int target}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000005400}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f00610072006400000000540000004b}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow3\irowband3\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1189,7 +1331,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int solutions}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000006f00}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000006f0000001c}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow4\irowband4\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1198,7 +1340,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int mode}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000003c00}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000003c00000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow5\irowband5\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1219,8 +1361,8 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4678\clshdrawnil \cellx9498\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid6968528\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { -\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid12210879 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e000000000000000002}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj +{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 [}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1230,7 +1372,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int target}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000000600}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000006000080ff}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow3\irowband3\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid12210879\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1239,7 +1381,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int solutions}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000000000000ff}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow4\irowband4\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid12210879\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1248,7 +1390,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 \cell int mode}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6968528\charrsid14119459 [MAXNOOFBOARDS];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 See }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid6968528\charrsid14119459 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000000000000ff}}}{\fldrslt {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6968528\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6968528\charrsid14119459 \trowd \irow5\irowband5\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid12210879\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1278,7 +1420,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12720965\charrsid14119459 \cell int suit[13];\cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12659025 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 Suit of the each returned card. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000000000005f00}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 encoding}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12720965\charrsid14119459 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12720965\charrsid14119459 \trowd \irow9\irowband9\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1295,7 +1437,7 @@ MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\in \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6968528 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12659025\charrsid14119459 \cell int equals[13];\cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid15283250 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12659025\charrsid14119459 Lower-ranked equals}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid15283250 . } {\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid15283250\charrsid12983768 HYPERLINK \\l "holding" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid15283250\charrsid12983768 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000068006f006c00640069006e006700000016003e2300020018000000006198189dff00}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \cs26\f37\fs22\ul\cf19\insrsid15283250\charrsid12983768 Holding}}} +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000800000068006f006c00640069006e006700000016003e2300020018000000006198189dff00000001}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \cs26\f37\fs22\ul\cf19\insrsid15283250\charrsid12983768 Holding}}} \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid15283250 encoding.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid12659025\charrsid15757396 \cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12659025\charrsid14119459 \trowd \irow11\irowband11\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1331,8 +1473,8 @@ ee SolveBoard() description.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\i \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4694\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14429502 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid14429502\charrsid14119459 REF futureTricks \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b0073000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 -\f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b007300000000000000ff00}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 +\ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12065713\charrsid11099036 solvedBoard}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12065713\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 [MAXNOOFBOARDS];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -1357,9 +1499,9 @@ ee SolveBoard() description.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\i \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5974982 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid5974982\charrsid14119459 int resTable[5][4];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5974982\charrsid14119459 Encodes the solution of a deal for combinations of denomination and declarer. First index is denomination. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid5974982\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000ff00}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000ff000030ff}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5974982\charrsid14119459 encoding. Second index is declarer. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid5974982\charrsid14119459 REF hand \\h \\* MERGEFORMAT }{ -\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e006400000000c000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e006400000000c000006500}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5974982\charrsid14119459 encoding. Each entry is a number of tricks.\cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow1\irowband1\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl \brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1384,8 +1526,8 @@ ee SolveBoard() description.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\i \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4694\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12210879 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 \cell struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid12210879\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000040dc}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000040dc697700}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 results[}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879 X}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid14119459 ];\cell }{ \rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12210879 X = }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12210879\charrsid12210879 MAXNOOFTABLES * DDS_STRAINS}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12210879\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \b\f37\fs22\cf1\insrsid12210879\charrsid14119459 @@ -1413,7 +1555,7 @@ ee SolveBoard() description.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\i \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 {\*\bkmkstart parResults}parResults{\*\bkmkend parResults}\cell char parScore[2][16];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid14429502 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14429502\charrsid14119459 First index is NS/EW. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid14429502\charrsid14119459 REF side \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073006900640065000000000300}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Side}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073006900640065000000000300003000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Side}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14429502\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow1\irowband1\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1423,7 +1565,7 @@ ee SolveBoard() description.}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\i \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid14429502\charrsid14119459 [2][128];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14429502\charrsid14119459 First index is NS/EW. }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid14429502\charrsid14119459 REF side \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073006900640065000000000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Side}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073006900640065000000000000e60aff}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Side}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid14429502\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow2\irowband2\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1506,8 +1648,9 @@ There are up to 20 declarer/strain combinations per DD table}{\rtlch\fcs1 \af1\a \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3844\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid4330566 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12400949\charrsid14119459 \cell }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12400949 struct } {\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid11276707 HYPERLINK \\l "contractType" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid11276707 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000063006f006e00740072006100630074005400790070006500000000001171430000d500944500258e00000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \cs26\f2\fs20\ul\cf19\insrsid12400949\charrsid11276707 -contractType}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf19\insrsid12400949\charrsid11276707 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf19\insrsid11276707 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000063006f006e00740072006100630074005400790070006500000000001171430000d500944500258e00000000027100}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\cs26\f2\fs20\ul\cf19\insrsid12400949\charrsid11276707 contractType}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf19\insrsid12400949\charrsid11276707 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\f2\fs20\cf19\insrsid11276707 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12400949 contracts}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid12400949\charrsid14119459 [10];\cell }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid12400949\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid12400949\charrsid14119459 \trowd \irow3\irowband3\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1661,7 +1804,7 @@ contractType}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3844\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid750270\charrsid14119459 \cell int suit[52];\cell }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid750270\charrsid14119459 REF suit \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000002a00}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000500000073007500690074000000002a00005e00}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid750270\charrsid14119459 encoding.\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid11276707\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb @@ -1670,7 +1813,7 @@ contractType}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid750270\charrsid14119459 \cell int rank[52];\cell }\pard \ltrpar \ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid750270 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid750270\charrsid14119459 Encoding 2 .. 14 (}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \i\f37\fs22\cf1\insrsid750270\charrsid14119459 not}{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid750270\charrsid14119459 }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid750270\charrsid14119459 REF card \\h \\ -* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006300610072006400000000bc00}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 +* MERGEFORMAT }{\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006300610072006400000000bc00005900}}}{\fldrslt {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\ul\cf19\insrsid16386593\charrsid16386593 Card}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid750270\charrsid14119459 encoding).\cell }\pard \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow3\irowband3\lastrow \ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl \brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 @@ -1722,7 +1865,7 @@ String of cards with no space in between, also not between tricks. Each card co \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3844\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 { \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6580905 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid6580905\charrsid14119459 REF playTraceBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 -\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e00000000b200}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e00000000b200009469}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 playTraceBin}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11276707 \par plays[MAXNOOFBOARDS}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 ];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 @@ -1747,7 +1890,7 @@ String of cards with no space in between, also not between tricks. Each card co \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3844\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 { \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6580905 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 Struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid6580905\charrsid14119459 REF playTracePBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 -\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e00000000b100}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e00000000b100000300}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 playTracePBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11276707 \par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 p}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11276707 lays[MAXNOOFBOARDS}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 ]; @@ -1795,7 +1938,7 @@ String of cards with no space in between, also not between tricks. Each card co \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3844\clshdrawnil \cellx9514\row \ltrrow}\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 { \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6580905 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid6580905\charrsid14119459 REF solvedPlay \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 -\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c00610079000000001800}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 +\f2\fs20\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c00610079000000001800ff0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11276707 \par solved[MAXNOOFBOARDS}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid6580905\charrsid14119459 ];\cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3342996 {\rtlch\fcs1 \af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid6580905\charrsid14119459 \cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow2\irowband2\lastrow \ltrrow @@ -1814,14 +1957,14 @@ String of cards with no space in between, also not between tricks. Each card co \b\f37\cf1\insrsid6099241\charrsid14119459 {\*\bkmkend SolveBoard} \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid8154048 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid5767474 REF deal \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid5767474 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000000d00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}} -\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid8154048 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241 dl,}{\rtlch\fcs1 \af2\afs18 -\ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid8154048 +\f2\fs18\ul\cf19\insrsid16386593\charrsid5767474 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000000d00ff1e00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 +deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid8154048 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241 dl,}{\rtlch\fcs1 +\af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid8154048 \par int target, \par int solutions, \par int mode, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid12659025 REF futureTricks \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid12659025 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b0073000000006900}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b0073000000006900ff1e4c}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid8154048 *futp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid8154048 \par int threadIndex}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241\charrsid14119459 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 \cell }\pard\plain \ltrpar @@ -1829,7 +1972,7 @@ String of cards with no space in between, also not between tricks. Each card co \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 {\*\bkmkstart SolveBoardPBN}SolveBoardPBN}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241\charrsid14119459 {\*\bkmkend SolveBoardPBN} \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e000000000000ffe300}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16731528 d}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid15150655 l}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16731528 ,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 @@ -1837,7 +1980,7 @@ String of cards with no space in between, also not between tricks. Each card co \par int solutions, \par int mode, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF futureTricks \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b0073000000006400}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b0073000000006400ffcf07}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *futp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel2\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 int threadIndex}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241\charrsid14119459 @@ -1862,30 +2005,30 @@ t do that, and they also hide the implementation details such as transposition t \par }\pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid13331862 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14119459\charrsid14119459 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6650094\charrsid14119459 SolveBoard is threa}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4542728\charrsid14119459 d-safe, so several threads }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid6650094\charrsid14119459 can call SolveBoard in parallel.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4538894\charrsid14119459 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9716036 -Thus the user of DDS can create threads and call SolveBoard in parallel over them. }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4538894\charrsid14119459 The }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14119459\charrsid14119459 +\f37\cf1\insrsid6650094\charrsid14119459 can call SolveBoard in parallel.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4538894\charrsid14119459 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9716036 Thus the user of DD +S can create threads and call SolveBoard in parallel over them. }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid4538894\charrsid14119459 The }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14119459\charrsid14119459 maximum number of threads is fixed in the DLL at co}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13331862 mpile time and is currently 16. So }{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid16530750\charrsid16530750 \'93}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid13331862\charrsid16530750 threadIndex}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid16530750\charrsid16530750 \'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13331862 must be between 0 and 15 inclusive}{ \rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9000425 ; see also the function SetMaxThreads}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13331862 . }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10108539 Together with the }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436 Play}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10108539 Analyse}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436 functions, t}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13331862 his is the only function that exposes the thread number to the user.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9716036 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13331862 -\par There is a \'93transposition table\'94 memory associated with each thread. Each node in the table is effectiv -ely a position after certain cards have been played and other certain cards remain. The table is not deleted automatically after each call to SolveBoard, so it can be reused from call to call. However, it only really makes sense to reuse the table when -the hand is very similar in the two calls. The function will still run if this is not the case, but it won\rquote t be as efficient.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13857996 The reu}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16323149 -se of the transposition table can be}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13857996 controlled by the \'93}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid13857996\charrsid13857996 mode}{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid13857996 \'94 parameter}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11540483 , but normally this is not needed and should not be done}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13857996 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid16530750 +\par There is a \'93transposition table\'94 memory associated with each thread. Each node in the table is effectively a position after certain cards have been played a +nd other certain cards remain. The table is not deleted automatically after each call to SolveBoard, so it can be reused from call to call. However, it only really makes sense to reuse the table when the hand is very similar in the two calls. The funct +ion will still run if this is not the case, but it won\rquote t be as efficient.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13857996 The reu}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16323149 se of the transposition table can be}{\rtlch\fcs1 +\af1 \ltrch\fcs0 \f37\cf1\insrsid13857996 controlled by the \'93}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid13857996\charrsid13857996 mode}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13857996 \'94 parameter}{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid11540483 , but normally this is not needed and should not be done}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13857996 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16530750 \par \par The three parameters \'93}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid16530750\charrsid16530750 target}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16530750 \'94, \'93}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid16530750\charrsid16530750 solutions}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16530750 \'94 and \'93}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid16530750\charrsid16530750 mode}{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\cf1\insrsid16530750 \'94 together control the function. General}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13857996 ly speaking, the target is the number of tricks to be won (at least) by the side to play; solutions cont -rols how many solutions should be returned; and mode }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11294126 controls the search behavior.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16467273 See next page for definitions.}{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\cf1\insrsid16530750 +\f37\cf1\insrsid16530750 \'94 together control the function. General}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13857996 +ly speaking, the target is the number of tricks to be won (at least) by the side to play; solutions controls how many solutions should be returned; and mode }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11294126 controls the search behavior.}{ +\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16467273 See next page for definitions.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16530750 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11294126 \par For equivalent cards, only the highest is returned, and lower equivalent cards are encoded in the }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid11294126\charrsid11294126 REF futureTricks \\h }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\ul\cf19\insrsid11294126 \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid11294126 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b007300000000bd00}} -}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11294126 structure (see \'93equals\'94). +\f37\ul\cf19\insrsid11294126 \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid11294126 {\*\datafield +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000066007500740075007200650054007200690063006b007300000000bd00ff0028}}}{\fldrslt {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\ul\cf19\insrsid16386593\charrsid16386593 futureTricks}}}\sectd \ltrsect +\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11294126 structure (see \'93equals\'94). \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16530750 \par \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11294126 \page }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16530750 @@ -2040,26 +2183,27 @@ is the responsibility of the programmer using the DLL to ensure that reusing the \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid6557970 {\*\bkmkstart CalcDDtable}CalcDDtable}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241\charrsid6557970 {\*\bkmkend CalcDDtable} \par }\pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid6901705 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000370000}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\ +\f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c0000003700000ae300}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\ * MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid6901705 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 tableDeal, \line }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000160000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000160000002e55}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 * tablep}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 {\*\bkmkstart CalcDDtablePBN}CalcDDtablePBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid6099241\charrsid14119459 {\*\bkmkend CalcDDtablePBN} \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e000000160800}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e00000016080000181e}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 tableDealPBN, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000164a00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 * tablep}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f37\cf1\insrsid6099241\charrsid6099241 \cell }\pard\plain \ltrpar -\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6099241 -\trowd \irow0\irowband0\lastrow \ltrrow\ts18\trgaph108\trleft-108\trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid6099241\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt -\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth4773\clshdrawnil \cellx4665\clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth4773\clshdrawnil -\cellx9438\row }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0\pararsid11107656 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 -\af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000164a000e5628}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 * tablep}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f37\cf1\insrsid6099241\charrsid6099241 \cell +}\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\insrsid6099241 \trowd \irow0\irowband0\lastrow \ltrrow +\ts18\trgaph108\trleft-108\trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid6099241\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb +\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth4773\clshdrawnil \cellx4665\clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth4773\clshdrawnil \cellx9438\row }\pard\plain \ltrpar +\s3\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0\pararsid11107656 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\cf1\insrsid6099241 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11107656 CalcDDtablePBN is just like CalcDDtable, except for the input format. \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid11107656 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid11107656 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6099241 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11107656 CalcDDtable}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11107656\charrsid14119459 solves a single deal }{ @@ -2074,35 +2218,36 @@ which must be declared before calling }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\in \par \ltrrow}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 {\*\bkmkstart CalcAllTables}CalcAllTables}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241\charrsid14119459 {\*\bkmkend CalcAllTables} \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTableDeals \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d000000640064005400610062006c0065004400650061006c00730000000e0200}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeals}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *dealsp,}{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d000000640064005400610062006c0065004400650061006c00730000000e0200115f48}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 +\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeals}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *dealsp,}{ +\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par int mode, \par int trumpFilter[5], \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTablesRes \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065007300520065007300000073ff00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065007300520065007300000073ff0001ac00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *resp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF allParResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c00740073000000130000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c00740073000000130000007b00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid1846101 \par }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel2\rin0\lin0\pararsid5594575\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid1846101 \cell }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 { \rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 {\*\bkmkstart CalcAllTablesPBN}CalcAllTables}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241 PBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241\charrsid14119459 {\*\bkmkend CalcAllTablesPBN} \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTableDealsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000010000000640064005400610062006c0065004400650061006c007300500042004e00000013ff00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 -\ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *dealsp, }{ -\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000010000000640064005400610062006c0065004400650061006c007300500042004e00000013ff00b49700}}}{\fldrslt {\rtlch\fcs1 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 + *dealsp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par int mode, \par int trumpFilter[5], \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF ddTablesRes \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c00650073005200650073000000130600}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c00650073005200650073000000130600354b00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTablesRes}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *resp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8323199\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6099241\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6099241\charrsid14119459 REF allParResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c00740073000000130000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000061006c006c0050006100720052006500730075006c00740073000000130000f30000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 allParResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6099241\charrsid14119459 *presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid1846101\charrsid5594575 \cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6099241 \trowd \irow0\irowband0\lastrow \ltrrow \ts18\trgaph108\trleft-108\trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid6099241\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb @@ -2123,7 +2268,7 @@ in }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid11762622\charrsid1 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9175287 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6099241 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 The }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid6099241\charrsid6099241 \'93mode\'94}{ \rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 parameter contains the vulnerability (}{\field{\*\fldinst {\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ul\cf19\insrsid6099241\charrsid6099241 REF vulnerable \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2 \ltrch\fcs0 -\f37\ul\cf19\insrsid16386593\charrsid6099241 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000760075006c006e0065007200610062006c006500000000eb00}}}{\fldrslt {\rtlch\fcs1 \af2 \ltrch\fcs0 +\f37\ul\cf19\insrsid16386593\charrsid6099241 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000760075006c006e0065007200610062006c006500000000eb00001e34}}}{\fldrslt {\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Vulnerable}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 encoding}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid5927621 ; not to be confused with the SolveBoard }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid5927621\charrsid5927621 mode}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 ) for use in the par calculation. It is set to -1 if no par calculation is to be performed. @@ -2132,9 +2277,9 @@ in }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid11762622\charrsid1 \ltrch\fcs0 \f37\cf1\insrsid11762622 The parameter }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid11762622\charrsid11762622 \'93trumpFilter\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 describes which, if any, of the }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 5 possibilities}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 that will be }{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f37\cf1\insrsid11762622\charrsid6099241 excluded}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 from the calculations. They are defined}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 in }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid6099241\charrsid6099241 REF suit \\h \\* MERGEFORMAT }{ -\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid6099241 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000cd00}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 encoding order, so}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 setting trumpFilter to \{ -FALSE, FALSE, TRUE, TRUE, TRUE\} means that values will only be calculated for }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 the trump suits spades and h}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 earts.}{\rtlch\fcs1 \af1 \ltrch\fcs0 +\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid6099241 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000007300750069007400000000cd000012ed}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\ul\cf19\insrsid16386593\charrsid16386593 Suit}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 encoding order, so}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 setting trumpFilter to \{FAL +SE, FALSE, TRUE, TRUE, TRUE\} means that values will only be calculated for }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid6099241 the trump suits spades and h}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11762622 earts.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13244366 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid13244366\charrsid9401184 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9713208 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6099241 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9175287 The maxim}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16713324 um number of DD tables in a Calc}{\rtlch\fcs1 @@ -2145,9 +2290,9 @@ FALSE, FALSE, TRUE, TRUE, TRUE\} means that values will only be calculated for } \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid14090435\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2235\clshdrawnil \cellx2127\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3543\clshdrawnil \cellx5670 \pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\b\f37\cf1\insrsid6099241\charrsid6099241 Number of strains\cell }\pard \ltrpar\qc \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241\charrsid6099241 -Maximum number of DD tables\cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 { -\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6099241 \trowd \irow0\irowband0\ltrrow\ts18\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 +\b\f37\cf1\insrsid6099241\charrsid6099241 Number of strains\cell }\pard \ltrpar\qc \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid6099241\charrsid6099241 M +aximum number of DD tables\cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 +\af1 \ltrch\fcs0 \insrsid6099241 \trowd \irow0\irowband0\ltrrow\ts18\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid14090435\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2235\clshdrawnil \cellx2127\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth3543\clshdrawnil \cellx5670\row \ltrrow }\pard\plain \ltrpar\qc \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid6099241\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 @@ -2188,35 +2333,35 @@ Maximum number of DD tables\cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intb \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574 SolveAllBoards}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid7880574\charrsid5320216 \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid7880574\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f006100720064007300000000f300}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 -boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *bop, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\cf1\insrsid7880574\charrsid14119459 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f006100720064007300000000f300001ef6}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *bop, }{\rtlch\fcs1 \af2\afs18 +\ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 \par struct}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574 }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f0061007200640073000000003812}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f00610072006400730000000038120012f5}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574 \par * solvedp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid7880574 \cell }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel2\rin0\lin0\pararsid5320216\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid5320216 {\*\bkmkstart SolveAllChunksBin}SolveAllChunksBin}{ \rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid7880574\charrsid5320216 {\*\bkmkend SolveAllChunksBin} \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5320216\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f0061007200640073000000001316}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 -boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *bop, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\cf1\insrsid7880574\charrsid14119459 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f0061007200640073000000001316001e0b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *bop, }{\rtlch\fcs1 \af2\afs18 +\ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5320216\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000771a}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000771a00bc8f}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 int chunkSize}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid1846101 \cell }\pard\plain \ltrpar \s3\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel2\rin0\lin0\pararsid5320216\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid5320216 {\*\bkmkstart SolveAllChunksPBN}SolveAllChunksPBN}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid7880574\charrsid5320216 {\*\bkmkend SolveAllChunksPBN} \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5320216\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e00000000000000db00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *bop, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5320216\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid7880574\charrsid14119459 REF solvedBoards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000c421}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000073006f006c0076006500640042006f006100720064007300000000c42100fce2}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedBoards}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7880574\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574\charrsid14119459 int chunkSize}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7880574 \par @@ -2246,7 +2391,7 @@ rd 5, and so on. This continued until all boards had}{\rtlch\fcs1 \af1 \ltrch\f \f37\cf1\insrsid15668792 be waiting for the las}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11030455 t thread to finish}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid15668792 . \par \par The transposition table in a given thread (see }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid15668792\charrsid15668792 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\ul\cf19\insrsid16386593\charrsid15668792 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000137a27}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 +\f37\ul\cf19\insrsid16386593\charrsid15668792 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f006100720064000000137a2700a53c}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid15668792 ) is generally not reused between board 2, 4 and 5 in thread 2. This only happens if SolveBoard itself determines that the boards are suspiciously similar. \par @@ -2262,8 +2407,8 @@ sition table in a given thread wa}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid \ltrch\fcs0 \f37\cf1\insrsid15668792 that boards are gr}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11030455 ouped in chunks of 2 or 10, it wa}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid15668792 s possible to force the DD solver to use this knowledge. }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7880574 However, this is rather limiting on the user, as the alignment must remain perfect throughout the batch. \par -\par SolveAllBoards now detects repetitions automatically within a batch, whether or not the hands are evenly arranged and whether or not the duplicates are next to each other. This is more flexible and transparent to the user, and the overhead - is negligible. Therefore, use SolveAllBoards! +\par SolveAllBoards now detects repetitions automatically within a batch, whether or not the hands are evenly arranged and whether or not the duplicates are next to each other. This is more flexible and transparent to the user, + and the overhead is negligible. Therefore, use SolveAllBoards! \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 \page \par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts18\trgaph108\trleft-108\trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid12658900\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt \clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth4773\clshdrawnil \cellx4665\clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth4773\clshdrawnil @@ -2271,10 +2416,10 @@ s possible to force the DD solver to use this knowledge. }{\rtlch\fcs1 \af1 \lt \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid12658900 {\*\bkmkstart Par}Par}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid12658900 {\*\bkmkend Par} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12658900\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12658900\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000074452b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000074452b0092ac}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12658900\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 -\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c00740073000000300b2c}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c00740073000000300b2c0060ad}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid14119459 *presp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12658900\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 int vulnerable}{\rtlch\fcs1 \af1 \ltrch\fcs0 @@ -2282,11 +2427,12 @@ s possible to force the DD solver to use this knowledge. }{\rtlch\fcs1 \af1 \lt \rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid12658900\charrsid12658900 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12658900\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid12658900\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000013762d}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c0074007300000013762d00906b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 + \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5843075 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsDealer" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c0065007200000000000065005600ff0568002a1800f388008b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c0065007200000000000065005600ff0568002a1800f388008b002400}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid5843075\charrsid7880574 parResultsDealer}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5843075 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid12658900\charrsid14119459 *presp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid12658900\charrsid14119459 \par int dealer, @@ -2300,11 +2446,11 @@ s possible to force the DD solver to use this knowledge. }{\rtlch\fcs1 \af1 \lt \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid11956256 Sides}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid11956256\charrsid12658900 Par}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid11956256 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12128238\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid11956256\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000006e6232}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid11956256\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000006e6232006b40}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid11956256\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256\charrsid14119459 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsDealer" }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c006500720000000000000000a400ffff790000200085581266}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004400650061006c006500720000000000000000a400ffff790000200085581266002e00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\lang1033\langfe1031\langfenp1031\insrsid5843075\charrsid7880574 parResultsDealer}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5843075 *sidesRes[2],}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid11956256\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256\charrsid14119459 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid12128238\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid11956256\charrsid14119459 int vulnerable}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 @@ -2319,22 +2465,23 @@ s possible to force the DD solver to use this knowledge. }{\rtlch\fcs1 \af1 \lt \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450 Bin}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid10173450 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789515\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid10173450\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000007886a3}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000007886a3000013}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16132195\charrsid16132195 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsMaster" }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d00610073007400650072000000000016000fd000bc091a00005400fa200001}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d00610073007400650072000000000016000fd000bc091a00005400fa20000100d400}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16132195\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16132195\charrsid16132195 * presp,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789515\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 int vulnerable}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10173450\charrsid12658900 \cell }{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450 SidesParBin}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid10173450\charrsid12658900 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789515\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid10173450\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000726452}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000726452008200}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 *tablep, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 + \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16132195\charrsid16132195 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsMaster" }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000001e000ff200ffde0100443000f964129a}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000001e000ff200ffde0100443000f964129a006700}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16132195\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16132195\charrsid16132195 * presp,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450\charrsid14119459 \par int dealer, @@ -2348,19 +2495,19 @@ s possible to force the DD solver to use this knowledge. }{\rtlch\fcs1 \af1 \lt \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid15800872\charrsid15800872 ConvertToDealerTextFormat}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid10173450 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789515\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid16132195\charrsid15800872 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000c323000f5e0000c101003772005c00009a}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000c323000f5e0000c101003772005c00009ad62000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid16132195\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid16132195\charrsid15800872 *pres,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid10173450\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid10173450 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1789515\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15800872 char *resp}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10173450\charrsid12658900 \cell }{ \rtlch\fcs1 \af2 \ltrch\fcs0 \b\f31506\cf1\insrsid15800872\charrsid15800872 ConvertToSidesTextFormat}{\rtlch\fcs1 \af2 \ltrch\fcs0 \b\f31506\cf1\insrsid15800872 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15800872\charrsid15800872 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsMaster" }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d006100730074006500720000000037290044140004966020453100ec00009a}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d006100730074006500720000000037290044140004966020453100ec00009a000100}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid15800872\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid15800872\charrsid15800872 *pres,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15800872 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15800872\charrsid15800872 struct }{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid4877901\charrsid7880574 HYPERLINK \\l "parTextResults" }{ \rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\lang1033\langfe1031\langfenp1031\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000700061007200540065007800740052006500730075006c0074007300000001492a0000fd00001c00006b6d00fe00000e}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000700061007200540065007800740052006500730075006c0074007300000001492a0000fd00001c00006b6d00fe00000e002a00}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \cs26\f2\fs18\ul\cf19\insrsid15800872\charrsid7880574 parTextResults}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid15800872\charrsid15800872 *resp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid15800872\charrsid15800872 \cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid10173450\charrsid11956256 \trowd \irow3\irowband3\lastrow \ltrrow @@ -2371,10 +2518,10 @@ s possible to force the DD solver to use this knowledge. }{\rtlch\fcs1 \af1 \lt \f37\cf1\insrsid13072585 Par, DealerPar, SidesPar, DealerParBin and SidesParBin }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 calculate the par score and par contracts of a given double-dummy solution matrix }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid12658900\charrsid12658900 \'93*tablep\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 which would often be the solution of a call to }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid12658900\charrsid12658900 REF CalcDDtable \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid12658900 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000430061006c006300440044007400610062006c006500000000c200}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtable}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10290420 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid10290420 -Since the input is a table, there is no PBN and non-PBN version}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid13840817 of these}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid10290420 function}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid13840817 s}{\rtlch\fcs1 -\af1 \ltrch\fcs0 \f37\insrsid10290420 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12854747 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000430061006c006300440044007400610062006c006500000000c200005700}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 CalcDDtable}}}\sectd \ltrsect +\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 .}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10290420 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid10290420 Since the input is a table, there is no PBN and non-PBN v +ersion}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid13840817 of these}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid10290420 function}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid13840817 s}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid10290420 .}{\rtlch\fcs1 \af1 +\ltrch\fcs0 \f37\cf1\insrsid12854747 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 \par Before the functions can be called, a structure of the type }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid12658900\charrsid12658900 \'93parResults\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2165691 ,}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2505631 }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid2505631\charrsid2505631 \'93parResultsDealer\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2505631 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2165691 or }{ @@ -2383,17 +2530,17 @@ Since the input is a table, there is no PBN and non-PBN version}{\rtlch\fcs1 \af \par \par The }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid12658900\charrsid12658900 \'93vulnerable\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 parameter is given using }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid12658900\charrsid12658900 REF vulnerable \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid12658900 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000760075006c006e0065007200610062006c0065000000009400}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Vulnerable}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { -\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 encoding. +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b000000760075006c006e0065007200610062006c00650000000094000032a7}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Vulnerable}}}\sectd \ltrsect +\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid12658900 encoding. \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14574742 -\par The Par() function uses knowledge of the vulnerability, but - not of the dealer. It attempts to return results for both declaring sides. These results can be different in some rare cases, for instance when both sides can make 1NT due to the opening lead. +\par The Par() function uses knowledge of the vulnerability, but not of the dealer. It attempts to return results for both declaring sides. These results can be different in some rare cases, for instance when both sides can make 1NT due + to the opening lead. \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2505631 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2838088 The DealerPar}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14574742 () function also uses knowledge of the }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid14574742\charrsid14574742 \'93 dealer\'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14574742 using }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid14574742\charrsid14574742 REF hand \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\ul\cf19\insrsid16386593\charrsid14574742 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e0064000000580019}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Hand}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14574742 encoding. The argument is that in all practical cases, the dealer is known when the vulnerability is known. Therefore all results returned will be for the same side. - +\f37\ul\cf19\insrsid16386593\charrsid14574742 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b020000000800000005000000680061006e0064000000580019000353}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 Hand}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid14574742 encoding. The argument is that in all practical cases, the dealer is known when the vulnerability is known. Therefore all re +sults returned will be for the same side. \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9716036 \par The SidesPar() function is similar to the Par() function, the only difference is }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid13840817 that }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9716036 the par results are given in the same format as for DealerPar(). @@ -2417,8 +2564,8 @@ the par results are given in the same format as for DealerPar(). \f37\insrsid14574742\charrsid14574742 pades and }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 h}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid14574742 earts contracts, 2 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 spades and 2 h }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid14574742 earts with an overtrick.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid14574742 This is from the NS view}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 , shown by \'93NS:\'94 meaning that NS made the first bid}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid14574742 . }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 -Note that this information is actually not enough, as it may be that N and S can make a given contract -and that either E or W can bid this same contract (for instance 1NT) before N but not before S. So in the rare cases where the NS and EW sides are not the same, the results will take some manual inspection. +Note that this information is actually not enough, as it may be that N and S can make a given contract and that either E or W can bid this same c +ontract (for instance 1NT) before N but not before S. So in the rare cases where the NS and EW sides are not the same, the results will take some manual inspection. \par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1 \ltrch\fcs0 \f3\lang1033\langfe1053\langnp1033\langfenp1053\insrsid14574742 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar \ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\ls3\rin0\lin360\itap0\pararsid14574742 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 \'93}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid9515749 NS:NS 23S,N 23H}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742\charrsid14574742 \'94}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid14574742 : Only North makes 3 hearts. @@ -2433,16 +2580,15 @@ separate text string: \qj \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\ls3\rin0\lin360\itap0\pararsid2369496 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid2369496 \'934S*-EW-1\'94 means that E and W can both sacrifice in four spades doubled, going down one trick. \par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1 \ltrch\fcs0 \f3\lang1033\langfe1053\langnp1033\langfenp1053\insrsid2369496 \loch\af3\dbch\af0\hich\f3 \'b7\tab}\'933N-EW\'94 means that E and W can both make exactly 3NT. \par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1 \ltrch\fcs0 \f3\lang1033\langfe1053\langnp1033\langfenp1053\insrsid2369496 \loch\af3\dbch\af0\hich\f3 \'b7\tab}\'934N-W+1\'94 - means that only West can make 4NT +1. In the last example, 5NT just making can also be considered a par contract, but North-South don\rquote t ha -ve a profitable sacrifice against 4NT, so the par contract is shown in this way. If North-South did indeed have a profitable sacrifice, perhaps 5C*_NS-2, then par contract would have been shown as \'935N-W\'94. Par() would show \'934N-W+1\'94 as \'93 -W 45N\'94. + means that only West can make 4NT +1. In the last example, 5NT just making can also be considered a par contract, but North-South don\rquote t have a profitable sacrifice against 4NT, so the par contract is shown in this way. If North-Sou +th did indeed have a profitable sacrifice, perhaps 5C*_NS-2, then par contract would have been shown as \'935N-W\'94. Par() would show \'934N-W+1\'94 as \'93W 45N\'94. \par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1 \ltrch\fcs0 \f3\lang1033\langfe1053\langnp1033\langfenp1053\insrsid2369496 \loch\af3\dbch\af0\hich\f3 \'b7\tab}SidesPar() give the par contract text strings as described above for each side. \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid3547548 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2369496 \par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid11099036 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid269493 DealerParBin and SidesParBin are similar to DealerPar }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9000425 and}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid269493 SidesPar}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9000425 , respectively}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid269493 , except that both functions give the output results in binary using the }{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493\charrsid13703926 \'93}{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid4877901\charrsid7880574 HYPERLINK \\l "parResultsMaster" }{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf19\insrsid2101911\charrsid7880574 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000bb3100000000000001000000c1fd680000}}}{\fldrslt {\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000001100000070006100720052006500730075006c00740073004d0061007300740065007200000000bb3100000000000001000000c1fd680000006f00}}}{\fldrslt {\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \cs26\b\f2\fs22\ul\cf19\insrsid269493\charrsid7880574 parResultsMaster}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493\charrsid13703926 \'94}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493 }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid269493\charrsid269493 structure}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid269493 .}{\rtlch\fcs1 \af2\afs22 \ltrch\fcs0 \b\f2\fs22\cf1\insrsid9000425 }{ \rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid5186751 This simplifies the writing of a conversion program to }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid14092583 get }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f31506\cf1\insrsid5186751 @@ -2470,30 +2616,30 @@ s in parResultsMaster are used when calling }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid7931676\charrsid6557970 {\*\bkmkstart CalcPar}CalcPar}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid7931676\charrsid6557970 {\*\bkmkend CalcPar} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8538722\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid6901705 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705\charrsid6901705 REF ddTableDeal \\h }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid6901705 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000580000}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c000000640064005400610062006c0065004400650061006c000000580000007300}}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid6901705 \\* MERGEFORMAT }}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDeal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722\charrsid6901705 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722 dl}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 \par int vulnerable, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000220000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722 * t}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 p, +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000220000002398}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722 * t}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 p, \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid4071901\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c00740073000000740000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c007400730000007400000000be}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid4071901 *presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6058144\charrsid4071901 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid7931676\charrsid7931676 {\*\bkmkstart CalcParPBN}CalcParPBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid7931676 {\*\bkmkend CalcParPBN} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid8538722\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid14119459 REF ddTableDealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e000000630000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722 dl}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 -\f2\fs18\cf1\insrsid8538722\charrsid14119459 , +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c0065004400650061006c00500042004e000000630000000004}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableDealPBN}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722\charrsid14119459 }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722 dl}{\rtlch\fcs1 \af2\afs18 +\ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 , \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid14119459 REF ddTableResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c00740073000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722 * t}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 p, +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000f000000640064005400610062006c00650052006500730075006c007400730000000000000000bc}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 ddTableResults}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722 * t}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid8538722\charrsid14119459 p, \par int vulnerable, \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid8538722\charrsid14119459 REF parResults \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c00740073000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000070006100720052006500730075006c007400730000000000005d009e}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 parResults}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722\charrsid14119459 *presp}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid8538722 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6058144 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid4071901\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid6058144\charrsid7931676 \cell }\pard \ltrpar @@ -2524,26 +2670,26 @@ s in parResultsMaster are used when calling }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid2849436 PlayBin}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid2849436 {\*\bkmkend TracePlayBin} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid2849436\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF deal \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000050000006400650061006c000000000000000037}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 deal}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 dl, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF playTraceBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e000000000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTraceBin}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500420069006e000000000000c40015}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTraceBin}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 play,}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF solvedPlay \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c0061007900000000000b}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c0061007900000000000b4000df}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par int thrId}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid2849436\charrsid2849436 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid3347855\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid2449260 {\*\bkmkstart TracePlayPBN}Analyse}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid2849436 PlayPBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid2849436\charrsid2849436 {\*\bkmkend TracePlayPBN} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid2849436\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF dealPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e00000014006f}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { -\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 dlPBN, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 +08d0c9ea79f9bace118c8200aa004ba90b0200000008000000080000006400650061006c00500042004e00000014006f000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 dealPBN}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj +{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 dlPBN, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF playTracePBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e000000004b17}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracePBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000d00000070006c006100790054007200610063006500500042004e000000004b170000ad}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracePBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 playPBN, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid2849436\charrsid14119459 REF solvedPlay \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c00610079000000009448}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000073006f006c0076006500640050006c00610079000000009448ff0092}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlay}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid2849436\charrsid14119459 \par int thrId}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\cf1\insrsid2849436\charrsid2849436 \cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid2849436 \trowd \irow0\irowband0\lastrow \ltrrow @@ -2556,7 +2702,7 @@ s in parResultsMaster are used when calling }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ \par }\pard\plain \ltrpar\s3\qj \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0\pararsid2849436 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436\charrsid2849436 The }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436 function returns a list of double-dummy values after each specific played card in a hand. Since the function uses }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid2849436\charrsid2849436 REF SolveBoard \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid2849436 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000094b4}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000b00000053006f006c007600650042006f0061007200640000000094b4004264}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 SolveBoard}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436 , the same comments apply concerning the thread number \'93thrId\'94 and the transposition tables.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436\charrsid2849436 \par }\pard\plain \ltrpar\s23\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid2849436 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \f37\fs22\lang1031\langfe1033\cgrid\langnp1031\langfenp1033 {\rtlch\fcs1 \af0 @@ -2568,9 +2714,8 @@ s in parResultsMaster are used when calling }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f37\ \par \par 9 10 10 10 10 9 9 \par -\par The number of tricks are always seen from declarer\rquote -s viewpoint (he is the one to the right of the opening leader). There is one more result in the trace than there are cards played, because there is a DD value before any card is played, and one DD value after each card played.}{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\cf1\insrsid2849436 +\par The number of tricks are always seen from declarer\rquote s viewpoint (he is the one to the right of the opening leader). + There is one more result in the trace than there are cards played, because there is a DD value before any card is played, and one DD value after each card played.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid2849436 \par }\pard \ltrpar\s3\qj \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0\pararsid16720464 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16720464\charrsid16720464 \par As of v2.8.3, }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16720464 the functions can be invoked not just from the beginning of a 13-trick hand, but from any position. Cards in dl.currentTrickSuit and dl.currentTrickRank are respected.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16720464\charrsid16720464 @@ -2582,26 +2727,27 @@ s viewpoint (he is the one to the right of the opening leader). There is one mo \b\f37\insrsid2849436 {\*\bkmkend TraceAllPlaysBin} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5979431\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF boards \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f00610072006400730000000095c8}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000700000062006f00610072006400730000000095c8004277}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boards}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { \rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *bop, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF playTracesBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300420069006e0000000000fb}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesBin}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *plp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300420069006e0000000000fb010000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesBin}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *plp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF solvedPlays \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c006100790073000000cb0003}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c006100790073000000cb0003000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par int chunkSize}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\insrsid5979431\charrsid2849436 \cell }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid1190356\yts18 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\lang1033\langfe1031\langfenp1031\insrsid2449260 {\*\bkmkstart TraceAllPlaysPBN}Analyse}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\lang1033\langfe1031\langfenp1031\insrsid2849436\charrsid2849436 AllPlaysPBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\insrsid2849436\charrsid2849436 {\*\bkmkend TraceAllPlaysPBN} \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid5979431\yts18 {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF boardsPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e000000af0066}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000a00000062006f006100720064007300500042004e000000af0066480000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 boardsPBN}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *bopPBN, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF playTracesPBN \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300500042004e000000f00066}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesPBN}}}\sectd \ltrsect -\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *plpPBN, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e00000070006c0061007900540072006100630065007300500042004e000000f00066000000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 playTracesPBN}}} +\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *plpPBN, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 + \par struct }{\field{\*\fldinst {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid5979431\charrsid14119459 REF solvedPlays \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid14119459 {\*\datafield -08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c006100790073000000000069}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect +08d0c9ea79f9bace118c8200aa004ba90b02000000080000000c00000073006f006c0076006500640050006c006100790073000000000069020000}}}{\fldrslt {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\ul\cf19\insrsid16386593\charrsid16386593 solvedPlays}}}\sectd \ltrsect \linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid5979431\charrsid14119459 *solvedp, }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid5979431\charrsid14119459 \par int chunkSize}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid2849436 \cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid2849436 \trowd \irow0\irowband0\lastrow \ltrrow @@ -2617,52 +2763,73 @@ s viewpoint (he is the one to the right of the opening leader). There is one mo \f37\cf1\insrsid10376323 AllPlays* functions invoke SolveBoard several times in parallel in multiple threads, rather than sequentially in a single thread. This increases execution speed. Up to 20 boards are permitted per call. \par \par Concerning chunkSize, exactly the same remarks apply as with }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\ul\cf19\insrsid10376323\charrsid10376323 REF SolveAllChunksBin \\h \\* MERGEFORMAT }{\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\ul\cf19\insrsid16386593\charrsid10376323 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300420069006e000000000006}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 +\f37\ul\cf19\insrsid16386593\charrsid10376323 {\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000001200000053006f006c007600650041006c006c004300680075006e006b007300420069006e000000000006000000}}}{\fldrslt {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\ul\cf19\insrsid16386593\charrsid16386593 SolveAllChunksBin}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid10376323 . \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7759131 \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid9000425 \page }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid7759131 -\par \ltrrow}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid75593\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\b\f37\lang1033\langfe1031\langfenp1031\insrsid7759131 {\*\bkmkstart SetMaxThreads}SetMaxThreads}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7759131\charrsid14119459 {\*\bkmkend SetMaxThreads} }{\rtlch\fcs1 -\af1 \ltrch\fcs0 \b\f37\insrsid7759131\charrsid15413752 -\par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7759131\charrsid14119459 int }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7759131 userThreads}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7759131\charrsid11946565 \cell }{ -\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\lang1033\langfe1031\langfenp1031\insrsid7759131 {\*\bkmkstart FreeMemory}FreeMemory}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\insrsid7759131\charrsid2849436 {\*\bkmkend FreeMemory} -\par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7759131 void}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7759131 \cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 -\af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid7759131 \trowd \irow0\irowband0\lastrow \ltrrow -\ts18\trgaph108\trleft-108\trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid75593\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb -\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth4773\clshdrawnil \cellx4665\clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth4773\clshdrawnil \cellx9438\row }\pard \ltrpar -\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid10376323 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7759131 -\par }\pard\plain \ltrpar\s1\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid7759131 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\b\f37\insrsid7759131\charrsid3240706 SetMaxThreads}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7759131 r}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7759131\charrsid7759131 eturns }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid9000425 the }{\rtlch\fcs1 \af1 -\ltrch\fcs0 \f37\insrsid7759131\charrsid7759131 actual number of threads.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7759131 -\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid11099036 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\insrsid9000425\charrsid11099036 -\par }\pard\plain \ltrpar\s1\qj \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid11099036 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\insrsid7759131\charrsid7759131 DDS has a preferred memory size per thread, currently about 95 MB, and a maximum memory size per thread, currently about 160 MB. It will also not use more than 70% of the available memory. It will not create more thr -eads than there are processor cores, as this will only require more memory and will not improve performance. Within these constraints, DDS auto-configures the number of threads. -\par -\par DDS first detects the number of cores and the available memory. If this doesn't work for some reason, it defaults to 1 thread which is allowed to use the maximum memory size per thread. -\par -\par DDS then checks whether a number of threads equal to the number of cores will fit within the available memory when each thread may use the maxim -um memory per thread. If there is not enough memory for this, DDS scales back its ambition. If there is enough memory for the preferred memory size, then DDS still creates a number of threads equal to the number of cores. If there is not even enough me -mory for this, DDS scales back the number of threads to fit within the memory. -\par -\par }\pard \ltrpar\s1\qj \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid15088206 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7759131\charrsid7759131 -The user can suggest to DDS a number of threads by calling SetMaxThreads. DDS will never create more threads than requested, but it may create fewer if there is not enough memo -ry, calculated as above. Calling SetMaxThreads is optional, not mandatory. DDS will always select a suitab}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid15088206 le number of threads on its own. +\par \ltrrow}\trowd \irow0\irowband0\lastrow \ltrrow\ts18\trgaph108\trleft-108\trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid6378612\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0 +\tblindtype3 \clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth3469\clshdrawnil \cellx3361\clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl +\cltxlrtb\clftsWidth3\clwWidth2798\clshdrawnil \cellx6159\clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth3355\clshdrawnil \cellx9514\pard\plain \ltrpar +\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid75593\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\b\f37\lang1033\langfe1031\langfenp1031\insrsid6378612 {\*\bkmkstart SetMaxThreads}SetMaxThreads}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid6378612\charrsid14119459 {\*\bkmkend SetMaxThreads} }{\rtlch\fcs1 +\af1 \ltrch\fcs0 \b\f37\insrsid6378612\charrsid15413752 +\par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6378612\charrsid14119459 int }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6378612 userThreads}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid6378612\charrsid11946565 \cell }{ +\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\lang1033\langfe1031\langfenp1031\insrsid6378612 {\*\bkmkstart SetResources}SetResources{\*\bkmkend SetResources} +\par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1389500 int maxMemoryMB,\line int userThreads}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\lang1033\langfe1031\langfenp1031\insrsid1389500 \cell {\*\bkmkstart SetThreading}SetThreading}{\rtlch\fcs1 \af1 +\ltrch\fcs0 \b\f37\insrsid6378612\charrsid2849436 {\*\bkmkend SetThreading} +\par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid1389500 int code}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid6378612 \cell }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 +\af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6378612 \trowd \irow0\irowband0\lastrow \ltrrow +\ts18\trgaph108\trleft-108\trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid6378612\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrtbl \clbrdrl +\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth3469\clshdrawnil \cellx3361\clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth2798\clshdrawnil \cellx6159\clvertalt\clbrdrt +\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth3355\clshdrawnil \cellx9514\row }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid10376323 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\insrsid7759131 +\par }\pard\plain \ltrpar\s1\qj \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid1389500 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\b\f37\insrsid7759131\charrsid3240706 SetMaxThreads}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7759131 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1389500 and }{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\insrsid1389500\charrsid1389500 SetResources}{\rtlch\fcs1 +\af1 \ltrch\fcs0 \f37\insrsid1389500 set the system resources for DDS. SetThreading can set the threading system that is used internally in DDS; you probably do not need this. The codes are in DLL.h. +\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid1389500 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid1389500 +\par }\pard\plain \ltrpar\s1\qj \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid1389500 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\insrsid1389500\charrsid1389500 DDS }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1389500 has two thread sizes internally, \'93large\'94 (about 95-160 MB) and \'93small\'94 (about 20-30 MB). The large ones are about 12-14% faster at the moment. D +DS chooses the best mixture given the resources constraints. More specifically, the memory usage will be limited as follows. +\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid1389500 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid1389500 +\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\lang1033\langfe1053\langnp1033\langfenp1053\insrsid1389500 \loch\af10\dbch\af0\hich\f10 \'a7\tab}}\pard\plain \ltrpar +\s1\qj \fi-360\li360\ri0\keepn\nowidctlpar\wrapdefault\faauto\ls12\outlinelevel0\rin0\lin360\itap0\pararsid1389500 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\insrsid1389500 maxMemoryMB plus a percentage}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1389500\charrsid1389500 (this }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1389500 works out statistically). +\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\lang1033\langfe1053\langnp1033\langfenp1053\insrsid1389500\charrsid1389500 \loch\af10\dbch\af0\hich\f10 \'a7\tab}}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1389500\charrsid1389500 +70% of the free memory. +\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\lang1033\langfe1053\langnp1033\langfenp1053\insrsid1389500\charrsid1389500 \loch\af10\dbch\af0\hich\f10 \'a7\tab}No more than 1800 MB if we\rquote re on a 32-bit system. +\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid1389500 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\insrsid1389500\charrsid1389500 +\par }\pard\plain \ltrpar\s1\qj \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid1389500 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\insrsid1389500 The number of threads will }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7560207 currently }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1389500 be limited as follows. +\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid1389500 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid1389500 +\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\lang1033\langfe1053\langnp1033\langfenp1053\insrsid1389500\charrsid7560207 \loch\af10\dbch\af0\hich\f10 \'a7\tab}}\pard\plain \ltrpar +\s1\qj \fi-360\li360\ri0\keepn\nowidctlpar\wrapdefault\faauto\ls12\outlinelevel0\rin0\lin360\itap0\pararsid7560207 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\insrsid1389500\charrsid7560207 If compiled single-threaded, or single-threading is selected: 1. +\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\lang1033\langfe1053\langnp1033\langfenp1053\insrsid7560207\charrsid7560207 \loch\af10\dbch\af0\hich\f10 \'a7\tab}}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7560207\charrsid7560207 +If one of the experimental \'93IMP\'94 codes is used (don\rquote t use!), 1.5 times the number of processor cores.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1389500\charrsid7560207 +\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\lang1033\langfe1053\langnp1033\langfenp1053\insrsid7560207\charrsid7560207 \loch\af10\dbch\af0\hich\f10 \'a7\tab}}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7560207\charrsid7560207 +Otherwise the lower of userThreads and 1.5 times the number of processor cores.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7560207 +\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \af1 \ltrch\fcs0 \f10\lang1033\langfe1053\langnp1033\langfenp1053\insrsid7560207\charrsid7560207 \loch\af10\dbch\af0\hich\f10 \'a7\tab}}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7560207\charrsid7560207 +But fewer threads if there is not enough memory.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid7560207\charrsid7560207 \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid15088206 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid15088206 \par }\pard\plain \ltrpar\s1\qj \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid15088206 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\f37\insrsid15088206\charrsid15088206 It may be possible, }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid15088206 especiall -y on non-Windows systems, to call SetMaxThreads() actively, even though the user does not want to influence the default values. In this case, use a 0 argument.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid15088206\charrsid15088206 +\f37\insrsid15088206\charrsid15088206 It }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7560207 is}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid15088206\charrsid15088206 possible, }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid15088206 +especially on non-Windows systems, to call SetMaxThreads() actively, even though the user does not want to influence the default values. In this case, use a 0 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1389500 as }{\rtlch\fcs1 \af1 \ltrch\fcs0 +\f37\insrsid15088206 argument.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid15088206\charrsid15088206 \par }\pard \ltrpar\s1\qj \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid11099036 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7759131\charrsid7759131 -\par SetMaxThreads can be called multiple times even within the same session. So it is theoretically possible to change the number of threads dynamically.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid3240706 +\par SetMaxThreads}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1389500 /SetResources}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7759131\charrsid7759131 + can be called multiple times even within the same session. So it is theoretically possible to change the number of threads dynamically.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid3240706 \par +\par }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid1389500\charrsid3240706 FreeMemory}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\cf1\insrsid1389500 \par }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\cf1\insrsid3240706\charrsid3240706 It is possible to ask DDS to give up its dynamically allocated memory by calling }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f37\cf1\insrsid3240706\charrsid3240706 FreeMemory}{\rtlch\fcs1 -\ab\af1 \ltrch\fcs0 \f37\cf1\insrsid3240706\charrsid3240706 . This could be useful for instance if there is a long pause where DDS is not used within a session. DDS - will free its memory when the DLL detaches from the user program, so there is no need for the user to call this function before detaching.}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\cf1\insrsid7483127 +\ab\af1 \ltrch\fcs0 \f37\cf1\insrsid3240706\charrsid3240706 . This could be useful for instance if there is a long pause where DDS is not used within a session. DDS will free its memory when the DLL detaches from t +he user program, so there is no need for the user to call this function before detaching.}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \f37\cf1\insrsid7483127 \par -\par \ltrrow}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid7483127\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 -\b\f37\lang1033\langfe1031\langfenp1031\insrsid7483127 {\*\bkmkstart GetDDSInfo}GetDDSInfo}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7483127\charrsid14119459 {\*\bkmkend GetDDSInfo} }{\rtlch\fcs1 \af1 -\ltrch\fcs0 \b\f37\insrsid7483127\charrsid15413752 +\par \ltrrow}\trowd \irow0\irowband0\lastrow \ltrrow\ts18\trgaph108\trleft-108\trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid7483127\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0 +\tblindtype3 \clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth3\clwWidth4773\clshdrawnil \cellx4665\clvertalt\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl +\cltxlrtb\clftsWidth3\clwWidth4773\clshdrawnil \cellx9438\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0\pararsid7483127\yts18 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 +\f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\lang1033\langfe1031\langfenp1031\insrsid7483127 {\*\bkmkstart GetDDSInfo}GetDDSInfo}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 +\f2\fs18\cf1\lang1033\langfe1031\langfenp1031\insrsid7483127\charrsid14119459 {\*\bkmkend GetDDSInfo} }{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\insrsid7483127\charrsid15413752 \par }{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7483127 DDSInfo * info}{\rtlch\fcs1 \af2\afs18 \ltrch\fcs0 \f2\fs18\cf1\insrsid7483127\charrsid11946565 \cell }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid7483127 \cell }\pard\plain \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid7483127 \trowd \irow0\irowband0\lastrow \ltrrow\ts18\trgaph108\trleft-108\trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid7483127\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 @@ -2866,8 +3033,8 @@ A played card is not held by the right player.}{\rtlch\fcs1 \ab\af1\afs22 \ltrch \clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth5185\clshdrawnil \cellx9438\row \ltrrow}\pard\plain \ltrpar \s1\qc \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel0\rin0\lin0\pararsid14119459 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid3937665 -103\cell }\pard \ltrpar\s1\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel0\rin0\lin0\pararsid14119459 {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid3937665 RETURN_THREAD_WAIT\cell -}\pard \ltrpar\s1\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel0\rin0\lin0\pararsid5862788 {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5862788 -Returned from multi-threading functions when something went wrong while waiting for all threads to complete.}{\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5862788\charrsid5862788 \cell }\pard\plain \ltrpar +}\pard \ltrpar\s1\ql \li0\ri0\keepn\nowidctlpar\intbl\wrapdefault\faauto\outlinelevel0\rin0\lin0\pararsid5862788 {\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5862788 Returned from multi-threading functions +when something went wrong while waiting for all threads to complete.}{\rtlch\fcs1 \ab\af1\afs22 \ltrch\fcs0 \f37\fs22\cf1\insrsid5862788\charrsid5862788 \cell }\pard\plain \ltrpar \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \f1\fs24\lang1033\langfe1053\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid3937665\charrsid14119459 \trowd \irow23\irowband23\ltrrow\ts11\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid5054625\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 @@ -2963,7 +3130,9 @@ Extended maximum number of tables when calling CalcAllTables}{\rtlch\fcs1 \af1 \ \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16720464 \par Rev Y, 2016-01-01\tab Update to v2.8.3. \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11030455 -\par Rez Z, 2016-03-20\tab Update to v2.8.4.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11030455\charrsid16724586 +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16264811 Rev}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid11030455 Z, 2016-03-20\tab Update to v2.8.4. +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16264811 +\par Rev AA, 2018-04-01\tab Update to v.2.9.0.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\cf1\insrsid16264811\charrsid16724586 \par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a 9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad 5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6 @@ -3082,18 +3251,18 @@ fffffffffffffffffdffffff04000000feffffff05000000fefffffffeffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff010000000c6ad98892f1d411a65f0040963251e5000000000000000000000000504d -f11ca1c9d3010300000080020000000000004d0073006f004400610074006100530074006f0072006500000000000000000000000000000000000000000000000000000000000000000000000000000000001a000101ffffffffffffffff020000000000000000000000000000000000000000000000504df11ca1c9d301 -504df11ca1c9d3010000000000000000000000005700d200cf004a00c700410047005100c700d4004700320055005700dc005000dc0053005300cc00db0041003d003d000000000000000000000000000000000032000101ffffffffffffffff030000000000000000000000000000000000000000000000504df11ca1c9 -d301504df11ca1c9d3010000000000000000000000004900740065006d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffff04000000ffffffff000000000000000000000000000000000000000000000000 +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff010000000c6ad98892f1d411a65f0040963251e5000000000000000000000000e0bf +fcaab9c9d3010300000080020000000000004d0073006f004400610074006100530074006f0072006500000000000000000000000000000000000000000000000000000000000000000000000000000000001a000101ffffffffffffffff020000000000000000000000000000000000000000000000e0bffcaab9c9d301 +e0bffcaab9c9d301000000000000000000000000d100c700460045004c00cc004900c200c1004500ce0046003400cb0041004a00cc00470056004600570051003d003d000000000000000000000000000000000032000101ffffffffffffffff030000000000000000000000000000000000000000000000e0bffcaab9c9 +d301e0bffcaab9c9d3010000000000000000000000004900740065006d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffff04000000ffffffff000000000000000000000000000000000000000000000000 00000000000000000000000000000000fc00000000000000010000000200000003000000feffffff0500000006000000070000000800000009000000feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3c623a536f75726365732053656c65637465645374796c653d225c415041536978746845646974696f6e4f66666963654f6e6c696e652e78736c22205374796c654e616d653d22415041222056657273696f6e3d22362220786d6c6e733a 623d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f6269626c696f6772617068792220786d6c6e733d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e74 -2f323030362f6269626c696f677261706879223e3c2f623a536f75726365733e000000003c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d226e6f223f3e0d0a3c64733a6461746173746f72654974656d2064733a6974656d49443d227b39434339 -324235422d393030312d343139462d394335312d3646304646313234414345437d2220786d6c6e733a64733d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f637573746f6d586d6c223e3c64733a736368656d61526566733e3c +2f323030362f6269626c696f677261706879223e3c2f623a536f75726365733e000000003c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d226e6f223f3e0d0a3c64733a6461746173746f72654974656d2064733a6974656d49443d227b32453434 +373143362d323243322d344238342d383537412d4230303942303635343535397d2220786d6c6e733a64733d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f637573746f6d586d6c223e3c64733a736368656d61526566733e3c 64733a736368656d615265662064733a7572693d22687474703a2f2f736368656d61732e6f70656e500072006f007000650072007400690065007300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000200ffffffffffffffffffffffff000000000000 0000000000000000000000000000000000000000000000000000000000000400000055010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000 From f7a3d37b825aa062d4d971c5ff858315f68e5c28 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 1 Apr 2018 15:24:56 +0200 Subject: [PATCH 116/132] Removed testStats --- INSTALL | 13 +- test/Makefiles/depends_obj.txt | 4 +- test/Makefiles/own_sources.txt | 3 +- test/TestTimer.h | 2 +- test/dtest.cpp | 2 +- test/dtest.h | 2 +- test/testStats.cpp | 242 --------------------------------- test/testStats.h | 38 ------ test/testcommon.cpp | 7 +- test/testcommon.h | 2 +- 10 files changed, 15 insertions(+), 300 deletions(-) delete mode 100644 test/testStats.cpp delete mode 100644 test/testStats.h diff --git a/INSTALL b/INSTALL index 1c40e83e..96aa7cd2 100644 --- a/INSTALL +++ b/INSTALL @@ -45,11 +45,14 @@ So for example "cp Makefiles/Makefile_Visual Makefile". See "System-specific data" below. 3. Check the configuration section and make any changes you need. -Section (1) has to do with paths for certain multi-threading systems -which you may or may not want/have. Section (2) sets the threading -systems with which you want to compile the DLL. Note that you can -have as many as you like (see below). Section (3) has to do with -certain debugging flags etc. which you normally shouldn't set. +- Section (1) has to do with paths for certain multi-threading systems + which you may or may not want/have. If you set a certain compiler + flag, it is your own responsibility that you have the corresponding + threading system available -- otherwise the code will not compile. +- Section (2) sets the threading systems with which you want to compile + the DLL. Note that you can have as many as you like (see below). +- Section (3) has to do with certain debugging flags etc. which you + normally shouldn't set. 3. Check the "Often OK" section, in particular the name of the compiler you want to use. diff --git a/test/Makefiles/depends_obj.txt b/test/Makefiles/depends_obj.txt index 58dcc1d2..726e12c3 100644 --- a/test/Makefiles/depends_obj.txt +++ b/test/Makefiles/depends_obj.txt @@ -63,9 +63,7 @@ ../src/TimeStatList.obj: ../src/TimeStatList.h ../src/TimeStat.h ../src/TransTable.obj: ../src/dds.h ../include/portab.h ../include/dll.h ../src/TransTable.obj: ../src/TransTable.h ../src/debug.h -testcommon.obj: ../include/dll.h ../include/portab.h testStats.h TestTimer.h +testcommon.obj: ../include/dll.h ../include/portab.h testcommon.obj: dtest.h -TestTimer.obj: TestTimer.h -testStats.obj: ../include/portab.h testStats.h itest.obj: ../include/dll.h testcommon.h dtest.obj: ../include/dll.h testcommon.h diff --git a/test/Makefiles/own_sources.txt b/test/Makefiles/own_sources.txt index c89055b1..76f10918 100644 --- a/test/Makefiles/own_sources.txt +++ b/test/Makefiles/own_sources.txt @@ -1,4 +1,3 @@ DTEST_SOURCE_FILES = \ testcommon.cpp \ - TestTimer.cpp \ - testStats.cpp + TestTimer.cpp diff --git a/test/TestTimer.h b/test/TestTimer.h index d8fee490..1f926d3c 100644 --- a/test/TestTimer.h +++ b/test/TestTimer.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ diff --git a/test/dtest.cpp b/test/dtest.cpp index 63545b99..3a64ef37 100644 --- a/test/dtest.cpp +++ b/test/dtest.cpp @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ diff --git a/test/dtest.h b/test/dtest.h index 78cfa64d..75356a0c 100644 --- a/test/dtest.h +++ b/test/dtest.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ diff --git a/test/testStats.cpp b/test/testStats.cpp deleted file mode 100644 index a694e6cc..00000000 --- a/test/testStats.cpp +++ /dev/null @@ -1,242 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - - -#include -#include -#include -#include - -#include - -using Clock = std::chrono::steady_clock; -using std::chrono::time_point; -using std::chrono::duration_cast; -using std::chrono::milliseconds; - -using namespace std; - -#include "../include/portab.h" -#include "testStats.h" - -#define NUM_TIMERS 2000 -#define COUNTER_SLOTS 200 - -time_point ttimerUser0; -time_point ttimerUser1; -time_point ttimerListUser0[NUM_TIMERS]; -time_point ttimerListUser1[NUM_TIMERS]; - -clock_t ttimerSys0; -clock_t ttimerSys1; -clock_t ttimerListSys0[NUM_TIMERS]; -clock_t ttimerListSys1[NUM_TIMERS]; - -int ttimerCount; -int ttimerListCount[NUM_TIMERS]; - -int ttimerNameSet; - -char ttimerName[80]; - -long long ttimerUserCum; -long long ttimerSysCum; -long long ttimerListUserCum[NUM_TIMERS]; -long long ttimerListSysCum[NUM_TIMERS]; -long long tpredError; -long long tpredAbsError; - - -void TestInitTimer() -{ - ttimerCount = 0; - ttimerUserCum = 0; - ttimerSysCum = 0; - ttimerNameSet = 0; - - tpredError = 0; - tpredAbsError = 0; -} - - -void TestSetTimerName(const char * name) -{ - strcpy(ttimerName, name); - ttimerNameSet = 1; -} - - -void TestStartTimer() -{ - ttimerCount++; - ttimerSys0 = clock(); - - ttimerUser0 = Clock::now(); -} - - -void TestEndTimer() -{ - ttimerSys1 = clock(); - - ttimerUser1 = Clock::now(); - - chrono::duration d = ttimerUser1 - ttimerUser0; - - int ttimeUser = static_cast(1000. * d.count()); - - ttimerUserCum += ttimeUser; - - ttimerSysCum += static_cast((1000 * (ttimerSys1 - ttimerSys0)) / - static_cast(CLOCKS_PER_SEC)); -} - - -void TestPrintTimer() -{ - if (ttimerCount == 0) return; - - if (ttimerNameSet) - printf("%-18s : %s\n", "Timer name", ttimerName); - - printf("%-18s : %10d\n", "Number of calls", ttimerCount); - - if (ttimerUserCum == 0) - printf("%-18s : %s\n", "User time", "zero"); - else - { - printf("%-18s : %10lld\n", "User time/ticks", ttimerUserCum); - printf("%-18s : %10.2f\n", "User per call", - static_cast(ttimerUserCum / ttimerCount)); - } - - if (ttimerSysCum == 0) - printf("%-18s : %s\n", "Sys time", "zero"); - else - { - printf("%-18s : %10lld\n", "Sys time/ticks", ttimerSysCum); - printf("%-18s : %10.2f\n", "Sys per call", - static_cast(ttimerSysCum / ttimerCount)); - printf("%-18s : %10.2f\n", "Ratio", - static_cast(ttimerSysCum / ttimerUserCum)); - } - printf("\n"); -} - - -void TestInitTimerList() -{ - for (int i = 0; i < NUM_TIMERS; i++) - { - ttimerListCount [i] = 0; - ttimerListUserCum[i] = 0; - ttimerListSysCum [i] = 0; - } -} - - -void TestStartTimerNo(int no) -{ - ttimerListCount[no]++; - ttimerListSys0[no] = clock(); - - ttimerListUser0[no] = Clock::now(); -} - - -void TestEndTimerNo(int no) -{ - ttimerListSys1[no] = clock(); - - ttimerListUser1[no] = Clock::now(); - - chrono::duration d = ttimerListUser1[no] - - ttimerListUser0[no]; - - int timeUser = static_cast(1000. * d.count()); - - ttimerListUserCum[no] += static_cast(timeUser); - - ttimerListSysCum[no] += - static_cast((1000 * - (ttimerListSys1[no] - ttimerListSys0[no])) / - static_cast(CLOCKS_PER_SEC)); -} - - -void TestEndTimerNoAndComp(int no, int pred) -{ - ttimerListSys1[no] = clock(); - - ttimerListUser1[no] = Clock::now(); - - chrono::duration d = ttimerListUser1[no] - - ttimerListUser0[no]; - - int timeUser = static_cast(1000. * d.count()); - - ttimerListUserCum[no] += static_cast(timeUser); - - tpredError += timeUser - pred; - - tpredAbsError += (timeUser >= pred ? - timeUser - pred : pred - timeUser); - - ttimerListSysCum[no] += - static_cast( - (1000 * (ttimerListSys1[no] - ttimerListSys0[no])) / - static_cast(CLOCKS_PER_SEC)); -} - - -void TestPrintTimerList() -{ - int totNum = 0; - for (int no = 0; no < NUM_TIMERS; no++) - { - if (ttimerListCount[no] == 0) - continue; - - totNum += ttimerListCount[no]; - } - - if (totNum == 0) - return; - - printf("%5s %10s %12s %10s %10s\n", - "n", "Number", "User ticks", "Avg", "Syst time"); - - for (int no = 0; no < NUM_TIMERS; no++) - { - double avg = static_cast(ttimerListUserCum[no]) / - static_cast(ttimerListCount[no]); - - // For some reason I have trouble when putting it on one line... - printf("%5d %10d %12lld ", - no, - ttimerListCount[no], - ttimerListUserCum[no]); - printf(" %10.2f %10lld\n", - avg, - ttimerListSysCum[no]); - } - printf("\n"); - if (tpredError != 0) - { - printf("Total number %10d\n", totNum); - printf("Prediction mean %10.0f\n", - static_cast(tpredError) / - static_cast(totNum)); - printf("Prediction abs mean %10.0f\n", - static_cast(tpredAbsError) / - static_cast(totNum)); - printf("\n"); - } -} - diff --git a/test/testStats.h b/test/testStats.h deleted file mode 100644 index 80a23160..00000000 --- a/test/testStats.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - - -#ifndef DDS_STATSH -#define DDS_STATSH - -void TestInitTimer(); - -void TestSetTimerName(const char * name); - -void TestStartTimer(); - -void TestEndTimer(); - -void TestPrintTimer(); - -void TestInitTimerList(); - -void TestStartTimerNo(int n); - -void TestEndTimerNo(int n); - -void TestEndTimerNoAndComp(int n, int pred); - -void TestPrintTimerList(); - -void TestInitCounter(); - -void TestPrintCounter(); - -#endif diff --git a/test/testcommon.cpp b/test/testcommon.cpp index 336a9d06..71eb2db7 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ @@ -15,7 +15,6 @@ #include "../include/dll.h" #include "../include/portab.h" -#include "testStats.h" #include "TestTimer.h" #include "dtest.h" @@ -48,8 +47,6 @@ int realMain(int argc, char * argv[]) timer.reset(); timer.setname("Hand stats"); - TestSetTimerName("Timer title"); - if (argc != 3 && argc != 4 && argc != 5) { printf( @@ -151,8 +148,6 @@ int realMain(int argc, char * argv[]) } timer.printHands(); - TestPrintTimer(); - TestPrintTimerList(); free(dealer_list); free(vul_list); diff --git a/test/testcommon.h b/test/testcommon.h index b067403f..31af981f 100644 --- a/test/testcommon.h +++ b/test/testcommon.h @@ -2,7 +2,7 @@ DDS, a bridge double dummy solver. Copyright (C) 2006-2014 by Bo Haglund / - 2014-2016 by Bo Haglund & Soren Hein. + 2014-2018 by Bo Haglund & Soren Hein. See LICENSE and README. */ From ac0b1e8b36ce3b1f9ae42d0ec321734bafd70d3b Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Sun, 1 Apr 2018 20:18:10 +0200 Subject: [PATCH 117/132] Added args.cpp and .h to dtest --- src/System.cpp | 11 +- test/Makefiles/own_sources.txt | 1 + test/TestTimer.h | 4 +- test/args.cpp | 332 +++++++++++++++++++++++++++++++++ test/args.h | 24 +++ test/cst.h | 53 ++++++ test/dtest.cpp | 15 +- test/dtest.h | 2 +- test/testcommon.cpp | 73 ++++---- 9 files changed, 462 insertions(+), 53 deletions(-) create mode 100644 test/args.cpp create mode 100644 test/args.h create mode 100644 test/cst.h diff --git a/src/System.cpp b/src/System.cpp index 2e46905c..bcd1085d 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -729,9 +729,16 @@ string System::GetThreading(int& thr) const string System::GetThreadSizes(char * sizes) const { - string st; + int l = 0, s = 0; for (unsigned i = 0; i < static_cast(numThreads); i++) - st += memory.ThreadSize(i); + { + if (memory.ThreadSize(i) == "S") + s++; + else + l++; + } + + const string st = to_string(s) + " S, " + to_string(l) + " L"; strcpy(sizes, st.c_str()); return st; } diff --git a/test/Makefiles/own_sources.txt b/test/Makefiles/own_sources.txt index 76f10918..792c8d56 100644 --- a/test/Makefiles/own_sources.txt +++ b/test/Makefiles/own_sources.txt @@ -1,3 +1,4 @@ DTEST_SOURCE_FILES = \ + args.cpp \ testcommon.cpp \ TestTimer.cpp diff --git a/test/TestTimer.h b/test/TestTimer.h index 1f926d3c..7dd3add8 100644 --- a/test/TestTimer.h +++ b/test/TestTimer.h @@ -7,8 +7,8 @@ See LICENSE and README. */ -#ifndef DDS_TIMING_H -#define DDS_TIMING_H +#ifndef DTEST_TESTTIMER_H +#define DTEST_TESTTIMER_H #include #include diff --git a/test/args.cpp b/test/args.cpp new file mode 100644 index 00000000..506c5f2c --- /dev/null +++ b/test/args.cpp @@ -0,0 +1,332 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +// These functions parse the command line for options. + + +#include +#include +#include +#include +#include +#include +#include +#include + + +#include "args.h" +#include "cst.h" + +using namespace std; + + +extern OptionsType options; + +struct optEntry +{ + string shortName; + string longName; + unsigned numArgs; +}; + +#define DTEST_NUM_OPTIONS 5 + +const optEntry optList[DTEST_NUM_OPTIONS] = +{ + {"f", "file", 1}, + {"s", "solver", 1}, + {"t", "threading", 1}, + {"n", "numthr", 1}, + {"m", "memory", 1} +}; + +const vector solverList = +{ + "solve", + "calc", + "play", + "par", + "dealerpar" +}; + +const vector threadingList = +{ + "none", + "WinAPI", + "OpenMP", + "GCD", + "Boost", + "STL", + "TBB", + "STLIMPL", + "PPLIMPL", + "default", +}; + +string shortOptsAll, shortOptsWithArg; + +int GetNextArgToken( + int argc, + char * argv[]); + +void SetDefaults(); + +bool ParseRound(); + + +void Usage( + const char base[]) +{ + string basename(base); + const size_t l = basename.find_last_of("\\/"); + if (l != string::npos) + basename.erase(0, l+1); + + cout << + "Usage: " << basename << " [options]\n\n" << + "-f, --file s Input file, or the number n;\n" << + " '100' means ../hands/list100.txt).\n" << + " (Default: input.txt)\n" << + "\n" << + "-s, --solver One of: solve, calc, play, par, dealerpar.\n" << + " (Default: solve)\n" << + "\n" << + "-t, --threading t Currently one of (case-insensitive):\n" << + " default, none, winapi, openmp, gcd, boost,\n" << + " stl, tbb, stlimpl, pplimpl.\n" << + " (Default: default meaning that DDS decides)\n" << + "\n" << + "-n, --numthr n Maximum number of threads.\n" << + " (Default: 0 meaning that DDS decides)\n" << + "\n" << + "-m, --memory n Total DDS memory size in MB.\n" << + " (Default: 0 meaning that DDS decides)\n" << + "\n" << + endl; +} + + +int nextToken = 1; +char * optarg; + +int GetNextArgToken( + int argc, + char * argv[]) +{ + // 0 means done, -1 means error. + + if (nextToken >= argc) + return 0; + + string str(argv[nextToken]); + if (str[0] != '-' || str.size() == 1) + return -1; + + if (str[1] == '-') + { + if (str.size() == 2) + return -1; + str.erase(0, 2); + } + else if (str.size() == 2) + str.erase(0, 1); + else + return -1; + + for (unsigned i = 0; i < DTEST_NUM_OPTIONS; i++) + { + if (str == optList[i].shortName || str == optList[i].longName) + { + if (optList[i].numArgs == 1) + { + if (nextToken+1 >= argc) + return -1; + + optarg = argv[nextToken+1]; + nextToken += 2; + } + else + nextToken++; + + return str[0]; + } + } + + return -1; +} + + +void SetDefaults() +{ + options.fname = "input.txt"; + options.solver = DTEST_SOLVER_SOLVE; + options.threading = DTEST_THREADING_DEFAULT; + options.numThreads = 0; + options.memoryMB = 0; +} + + +void PrintOptions() +{ + cout << left; + cout << setw(12) << "file" << + setw(12) << options.fname << "\n"; + cout << setw(12) << "solver" << setw(12) << + solverList[options.solver] << "\n"; + cout << setw(12) << "threading" << setw(12) << + threadingList[options.threading] << "\n"; + cout << setw(12) << "threads" << setw(12) << + options.numThreads << "\n"; + cout << setw(12) << "memory" << setw(12) << + options.memoryMB << " MB\n"; + cout << "\n" << right; +} + + +void ReadArgs( + int argc, + char * argv[]) +{ + for (unsigned i = 0; i < DTEST_NUM_OPTIONS; i++) + { + shortOptsAll += optList[i].shortName; + if (optList[i].numArgs) + shortOptsWithArg += optList[i].shortName; + } + + if (argc == 1) + { + Usage(argv[0]); + exit(0); + } + + SetDefaults(); + + int c, m; + bool errFlag = false, matchFlag; + string stmp; + char * ctmp; + struct stat buffer; + + while ((c = GetNextArgToken(argc, argv)) > 0) + { + switch(c) + { + case 'f': + if (stat(optarg, &buffer) == 0) + { + options.fname = string(optarg); + break; + } + + stmp = "../hands/list" + string(optarg) + ".txt"; + if (stat(stmp.c_str(), &buffer) == 0) + { + options.fname = stmp; + break; + } + + cout << "Input file '" << optarg << "' not found\n"; + cout << "Input file '" << stmp << "' not found\n"; + nextToken -= 2; + errFlag = true; + break; + + case 's': + matchFlag = false; + stmp = optarg; + transform(stmp.begin(), stmp.end(), stmp.begin(), ::tolower); + + for (unsigned i = 0; i < DTEST_SOLVER_SIZE && ! matchFlag; i++) + { + string s = solverList[i]; + transform(s.begin(), s.end(), s.begin(), ::tolower); + if (stmp == s) + { + m = i; + matchFlag = true; + } + } + + if (matchFlag) + options.solver = static_cast(m); + else + { + cout << "Solver '" << optarg << "' not found\n"; + nextToken -= 2; + errFlag = true; + } + break; + + case 't': + matchFlag = false; + stmp = optarg; + transform(stmp.begin(), stmp.end(), stmp.begin(), ::tolower); + + for (unsigned i = 0; i < DTEST_THREADING_SIZE && ! matchFlag; i++) + { + string s = threadingList[i]; + transform(s.begin(), s.end(), s.begin(), ::tolower); + if (stmp == s) + { + m = i; + matchFlag = true; + } + } + + if (matchFlag) + options.threading = static_cast(m); + else + { + cout << "Threading '" << optarg << "' not found\n"; + nextToken -= 2; + errFlag = true; + } + break; + + case 'n': + m = static_cast(strtol(optarg, &ctmp, 0)); + if (m < 0) + { + cout << "Number of threads must be >= 0\n\n"; + nextToken -= 2; + errFlag = true; + } + options.numThreads = static_cast(m); + break; + + case 'm': + m = static_cast(strtol(optarg, &ctmp, 0)); + if (m < 0) + { + cout << "Memory in MB must be >= 0\n\n"; + nextToken -= 2; + errFlag = true; + } + options.memoryMB = static_cast(m); + break; + + default: + cout << "Unknown option\n"; + errFlag = true; + break; + } + if (errFlag) + break; + } + + if (errFlag || c == -1) + { + cout << "Error while parsing option '" << argv[nextToken] << "'\n"; + cout << "Invoke the program without arguments for help" << endl; + exit(0); + } +} + diff --git a/test/args.h b/test/args.h new file mode 100644 index 00000000..46006d1c --- /dev/null +++ b/test/args.h @@ -0,0 +1,24 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#ifndef DTEST_ARGS_H +#define DTEST_ARGS_H + +void Usage( + const char base[]); + +void PrintOptions(); + +void ReadArgs( + int argc, + char * argv[]); + +#endif + diff --git a/test/cst.h b/test/cst.h new file mode 100644 index 00000000..5c0b8e43 --- /dev/null +++ b/test/cst.h @@ -0,0 +1,53 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DTEST_CST_H +#define DTEST_CST_H + +#include + +using namespace std; + + +enum Solver +{ + DTEST_SOLVER_SOLVE = 0, + DTEST_SOLVER_CALC = 1, + DTEST_SOLVER_PLAY = 2, + DTEST_SOLVER_PAR = 3, + DTEST_SOLVER_DEALERPAR = 4, + DTEST_SOLVER_SIZE = 5 +}; + +enum Threading +{ + DTEST_THREADING_NONE = 0, + DTEST_THREADING_WINAPI = 1, + DTEST_THREADING_OPENMP = 2, + DTEST_THREADING_GCD = 3, + DTEST_THREADING_BOOST = 4, + DTEST_THREADING_STL = 5, + DTEST_THREADING_TBB = 6, + DTEST_THREADING_STLIMPL = 7, + DTEST_THREADING_PPLIMPL = 8, + DTEST_THREADING_DEFAULT = 9, + DTEST_THREADING_SIZE = 10 +}; + +struct OptionsType +{ + string fname; + Solver solver; + Threading threading; + int numThreads; + int memoryMB; +}; + +#endif + diff --git a/test/dtest.cpp b/test/dtest.cpp index 3a64ef37..fc908452 100644 --- a/test/dtest.cpp +++ b/test/dtest.cpp @@ -14,21 +14,22 @@ #include "../include/dll.h" #include "testcommon.h" +#include "args.h" +#include "cst.h" using namespace std; +OptionsType options; + int main(int argc, char * argv[]) { - if (argc >= 5) - SetThreading(threadingCode(argv[4])); + ReadArgs(argc, argv); - int nthreads = 0; - if (argc >= 4) - nthreads = atoi(argv[3]); - SetMaxThreads(nthreads); + if (options.threading != DTEST_THREADING_DEFAULT) + SetThreading(static_cast(options.threading)); - SetResources(1800, nthreads); + SetResources(options.memoryMB, options.numThreads); DDSInfo info; GetDDSInfo(&info); diff --git a/test/dtest.h b/test/dtest.h index 75356a0c..52eb57d9 100644 --- a/test/dtest.h +++ b/test/dtest.h @@ -18,7 +18,7 @@ void main_identify(); void set_constants(); bool read_file( - char * fname, + char const * fname, int * number, int ** dealer_list, int ** vul_list, diff --git a/test/testcommon.cpp b/test/testcommon.cpp index 71eb2db7..257a324a 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -17,9 +17,12 @@ #include "../include/portab.h" #include "TestTimer.h" #include "dtest.h" +#include "cst.h" using namespace std; +extern OptionsType options; + TestTimer timer; #define SOLVE_SIZE MAXNOOFBOARDS @@ -43,30 +46,23 @@ int realMain(int argc, char * argv[]); int realMain(int argc, char * argv[]) { + UNUSED(argc); + UNUSED(argv); input_number = 0; timer.reset(); timer.setname("Hand stats"); - if (argc != 3 && argc != 4 && argc != 5) - { - printf( - "Usage: dtest file.txt solve|calc|par|dealerpar|play [nthreads [threading]]\n"); - return 1; - } - - char * fname = argv[1]; - char * type = argv[2]; - - if (! strcmp(type, "solve")) + // TODO: Make one. + if (options.solver == DTEST_SOLVER_SOLVE) input_number = SOLVE_SIZE; - else if (! strcmp(type, "calc")) + else if (options.solver == DTEST_SOLVER_CALC) input_number = BOARD_SIZE; - else if (! strcmp(type, "par")) + else if (options.solver == DTEST_SOLVER_PLAY) + input_number = TRACE_SIZE; + else if (options.solver == DTEST_SOLVER_PAR) input_number = PAR_REPEAT; - else if (! strcmp(type, "dealerpar")) + else if (options.solver == DTEST_SOLVER_DEALERPAR) input_number = PAR_REPEAT; - else if (! strcmp(type, "play")) - input_number = TRACE_SIZE; set_constants(); main_identify(); @@ -90,7 +86,7 @@ int realMain(int argc, char * argv[]) solvedPlay * trace_list; int number; - if (read_file(fname, &number, &dealer_list, &vul_list, + if (read_file(options.fname.c_str(), &number, &dealer_list, &vul_list, &deal_list, &fut_list, &table_list, &par_list, &dealerpar_list, &play_list, &trace_list) == false) { @@ -98,7 +94,7 @@ int realMain(int argc, char * argv[]) exit(0); } - if (! strcmp(type, "solve")) + if (options.solver == DTEST_SOLVER_SOLVE) { if (GIBmode) { @@ -107,43 +103,43 @@ int realMain(int argc, char * argv[]) } loop_solve(&bop, &solvedbdp, deal_list, fut_list, number); } - else if (! strcmp(type, "calc")) + else if (options.solver == DTEST_SOLVER_CALC) { loop_calc(&dealsp, &resp, &parp, deal_list, table_list, number); } - else if (! strcmp(type, "par")) + else if (options.solver == DTEST_SOLVER_PLAY) { if (GIBmode) { printf("GIB file does not work with solve\n"); exit(0); } - loop_par(vul_list, table_list, par_list, number); + loop_play(&bop, &playsp, &solvedplp, + deal_list, play_list, trace_list, number); } - else if (! strcmp(type, "dealerpar")) + else if (options.solver == DTEST_SOLVER_PAR) { if (GIBmode) { printf("GIB file does not work with solve\n"); exit(0); } - loop_dealerpar(dealer_list, vul_list, table_list, - dealerpar_list, number); + loop_par(vul_list, table_list, par_list, number); } - else if (! strcmp(type, "play")) + else if (options.solver == DTEST_SOLVER_DEALERPAR) { if (GIBmode) { printf("GIB file does not work with solve\n"); exit(0); } - loop_play(&bop, &playsp, &solvedplp, - deal_list, play_list, trace_list, number); + loop_dealerpar(dealer_list, vul_list, table_list, + dealerpar_list, number); } else { - printf("Unknown type %s\n", type); + printf("Unknown type %d\n", options.solver); exit(0); } @@ -270,7 +266,7 @@ int threadingCode(char * arg) bool read_file( - char * fname, + char const * fname, int * number, int ** dealer_list, int ** vul_list, @@ -283,24 +279,21 @@ bool read_file( solvedPlay ** trace_list) { char line[256]; - char * name; FILE * fp; fp = fopen(fname, "r"); if (fp == NULL) { - char backup[80]; - sprintf(backup, "../hands/%s", fname); - fp = fopen(backup, "r"); - name = backup; - if (fp == NULL) - return false; + printf("fp %s is NULL\n", fname); + return false; } - else - name = fname; if (! fgets(line, sizeof(line), fp)) + { + printf("First line bad\n"); return false; + } + if (parse_NUMBER(line, number) == false) { if (parseable_GIB(line)) @@ -317,9 +310,7 @@ bool read_file( } fclose(fp); - fp = fopen(name, "r"); - if (fp == NULL) - return false; + return false; } else return false; From 6c64e5c9b865f71d2a44b3fd3b765c3183128d20 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Mon, 2 Apr 2018 12:50:55 +0200 Subject: [PATCH 118/132] Split testcommon.cpp part off into parse.cpp --- test/Makefiles/depends_obj.txt | 105 +++-- test/Makefiles/own_sources.txt | 1 + test/dtest.h | 194 --------- test/itest.cpp | 22 +- test/parse.cpp | 636 +++++++++++++++++++++++++++++ test/parse.h | 28 ++ test/testcommon.cpp | 722 ++++++--------------------------- test/testcommon.h | 5 +- 8 files changed, 859 insertions(+), 854 deletions(-) delete mode 100644 test/dtest.h create mode 100644 test/parse.cpp create mode 100644 test/parse.h diff --git a/test/Makefiles/depends_obj.txt b/test/Makefiles/depends_obj.txt index 726e12c3..9b721e81 100644 --- a/test/Makefiles/depends_obj.txt +++ b/test/Makefiles/depends_obj.txt @@ -1,69 +1,88 @@ ../src/dds.obj: ../include/dll.h ../src/Init.h ../src/dds.h ../src/dds.obj: ../include/portab.h ../src/Memory.h ../src/TransTable.h -../src/dds.obj: ../src/Moves.h ../src/debug.h -../src/ABsearch.obj: ../src/dds.h ../include/portab.h ../include/dll.h -../src/ABsearch.obj: ../src/TransTable.h ../src/Moves.h ../src/QuickTricks.h -../src/ABsearch.obj: ../src/Memory.h ../src/debug.h ../src/LaterTricks.h -../src/ABsearch.obj: ../src/ABsearch.h ../src/ABstats.h ../src/TimerList.h -../src/ABsearch.obj: ../src/TimerGroup.h ../src/Timer.h -../src/ABstats.obj: ../src/dds.h ../include/portab.h ../include/dll.h +../src/dds.obj: ../src/TransTableS.h ../src/TransTableL.h ../src/Moves.h +../src/dds.obj: ../src/File.h ../src/debug.h +../src/ABsearch.obj: ../src/TransTable.h ../src/dds.h ../include/portab.h +../src/ABsearch.obj: ../include/dll.h ../src/Moves.h ../src/QuickTricks.h +../src/ABsearch.obj: ../src/Memory.h ../src/TransTableS.h +../src/ABsearch.obj: ../src/TransTableL.h ../src/File.h ../src/debug.h +../src/ABsearch.obj: ../src/LaterTricks.h ../src/ABsearch.h ../src/ABstats.h +../src/ABsearch.obj: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h +../src/ABsearch.obj: ../src/dump.h ../src/ABstats.obj: ../src/ABstats.h ../src/debug.h -../src/CalcTables.obj: ../src/dds.h ../include/portab.h ../include/dll.h -../src/CalcTables.obj: ../src/SolveBoard.h ../src/PBN.h +../src/CalcTables.obj: ../src/SolverIF.h ../src/dds.h ../include/portab.h +../src/CalcTables.obj: ../include/dll.h ../src/Memory.h ../src/TransTable.h +../src/CalcTables.obj: ../src/TransTableS.h ../src/TransTableL.h +../src/CalcTables.obj: ../src/Moves.h ../src/File.h ../src/debug.h +../src/CalcTables.obj: ../src/SolveBoard.h ../src/System.h ../src/Scheduler.h +../src/CalcTables.obj: ../src/TimeStatList.h ../src/TimeStat.h ../src/Timer.h +../src/CalcTables.obj: ../src/PBN.h ../src/DealerPar.obj: ../src/dds.h ../include/portab.h ../include/dll.h ../src/Init.obj: ../src/Init.h ../src/dds.h ../include/portab.h ../src/Init.obj: ../include/dll.h ../src/Memory.h ../src/TransTable.h -../src/Init.obj: ../src/Moves.h ../src/debug.h ../src/System.h +../src/Init.obj: ../src/TransTableS.h ../src/TransTableL.h ../src/Moves.h +../src/Init.obj: ../src/File.h ../src/debug.h ../src/System.h ../src/Init.obj: ../src/Scheduler.h ../src/TimeStatList.h ../src/TimeStat.h ../src/Init.obj: ../src/Timer.h ../src/LaterTricks.obj: ../src/LaterTricks.h ../src/dds.h ../include/portab.h ../src/LaterTricks.obj: ../include/dll.h ../src/Memory.h ../src/TransTable.h -../src/LaterTricks.obj: ../src/Moves.h ../src/debug.h -../src/Memory.obj: ../src/Memory.h ../src/TransTable.h ../include/dll.h -../src/Memory.obj: ../src/dds.h ../include/portab.h ../src/Moves.h +../src/LaterTricks.obj: ../src/TransTableS.h ../src/TransTableL.h +../src/LaterTricks.obj: ../src/Moves.h ../src/File.h ../src/debug.h +../src/Memory.obj: ../src/Memory.h ../src/TransTable.h ../src/dds.h +../src/Memory.obj: ../include/portab.h ../include/dll.h ../src/TransTableS.h +../src/Memory.obj: ../src/TransTableL.h ../src/Moves.h ../src/File.h ../src/Memory.obj: ../src/debug.h -../src/Moves.obj: ../src/dds.h ../include/portab.h ../include/dll.h -../src/Moves.obj: ../src/Moves.h ../src/ABsearch.h ../src/debug.h +../src/Moves.obj: ../src/Moves.h ../src/dds.h ../include/portab.h +../src/Moves.obj: ../include/dll.h ../src/debug.h ../src/Par.obj: ../src/dds.h ../include/portab.h ../include/dll.h ../src/Par.obj: ../src/PBN.h -../src/PlayAnalyser.obj: ../src/dds.h ../include/portab.h ../include/dll.h -../src/PlayAnalyser.obj: ../src/SolverIF.h ../src/Memory.h -../src/PlayAnalyser.obj: ../src/TransTable.h ../src/Moves.h ../src/debug.h +../src/PlayAnalyser.obj: ../src/SolverIF.h ../src/dds.h ../include/portab.h +../src/PlayAnalyser.obj: ../include/dll.h ../src/Memory.h ../src/TransTable.h +../src/PlayAnalyser.obj: ../src/TransTableS.h ../src/TransTableL.h +../src/PlayAnalyser.obj: ../src/Moves.h ../src/File.h ../src/debug.h ../src/PlayAnalyser.obj: ../src/System.h ../src/Scheduler.h ../src/PlayAnalyser.obj: ../src/TimeStatList.h ../src/TimeStat.h ../src/PlayAnalyser.obj: ../src/Timer.h ../src/PBN.h ../src/PBN.obj: ../src/dds.h ../include/portab.h ../include/dll.h ../src/PBN.obj: ../src/PBN.h -../src/QuickTricks.obj: ../src/dds.h ../include/portab.h ../include/dll.h -../src/QuickTricks.obj: ../src/QuickTricks.h ../src/Memory.h -../src/QuickTricks.obj: ../src/TransTable.h ../src/Moves.h ../src/debug.h -../src/Scheduler.obj: ../src/Scheduler.h ../src/TimeStatList.h -../src/Scheduler.obj: ../src/TimeStat.h ../src/Timer.h ../src/dds.h -../src/Scheduler.obj: ../include/portab.h ../include/dll.h -../src/SolveBoard.obj: ../src/SolverIF.h ../src/Memory.h ../src/TransTable.h -../src/SolveBoard.obj: ../include/dll.h ../src/dds.h ../include/portab.h -../src/SolveBoard.obj: ../src/Moves.h ../src/debug.h ../src/SolveBoard.h -../src/SolveBoard.obj: ../src/System.h ../src/Scheduler.h +../src/QuickTricks.obj: ../src/QuickTricks.h ../src/dds.h ../include/portab.h +../src/QuickTricks.obj: ../include/dll.h ../src/Memory.h ../src/TransTable.h +../src/QuickTricks.obj: ../src/TransTableS.h ../src/TransTableL.h +../src/QuickTricks.obj: ../src/Moves.h ../src/File.h ../src/debug.h +../src/Scheduler.obj: ../src/Scheduler.h ../src/dds.h ../include/portab.h +../src/Scheduler.obj: ../include/dll.h ../src/TimeStatList.h +../src/Scheduler.obj: ../src/TimeStat.h ../src/Timer.h +../src/SolveBoard.obj: ../src/SolverIF.h ../src/dds.h ../include/portab.h +../src/SolveBoard.obj: ../include/dll.h ../src/Memory.h ../src/TransTable.h +../src/SolveBoard.obj: ../src/TransTableS.h ../src/TransTableL.h +../src/SolveBoard.obj: ../src/Moves.h ../src/File.h ../src/debug.h +../src/SolveBoard.obj: ../src/SolveBoard.h ../src/System.h ../src/Scheduler.h ../src/SolveBoard.obj: ../src/TimeStatList.h ../src/TimeStat.h ../src/Timer.h ../src/SolveBoard.obj: ../src/PBN.h -../src/SolverIF.obj: ../src/dds.h ../include/portab.h ../include/dll.h -../src/SolverIF.obj: ../src/Init.h ../src/Memory.h ../src/TransTable.h -../src/SolverIF.obj: ../src/Moves.h ../src/debug.h ../src/ABsearch.h -../src/SolverIF.obj: ../src/SolverIF.h ../src/TimerList.h ../src/TimerGroup.h +../src/SolverIF.obj: ../src/SolverIF.h ../src/dds.h ../include/portab.h +../src/SolverIF.obj: ../include/dll.h ../src/Memory.h ../src/TransTable.h +../src/SolverIF.obj: ../src/TransTableS.h ../src/TransTableL.h ../src/Moves.h +../src/SolverIF.obj: ../src/File.h ../src/debug.h ../src/Init.h +../src/SolverIF.obj: ../src/ABsearch.h ../src/TimerList.h ../src/TimerGroup.h ../src/SolverIF.obj: ../src/Timer.h ../src/System.h ../src/Scheduler.h -../src/SolverIF.obj: ../src/TimeStatList.h ../src/TimeStat.h -../src/System.obj: ../include/dll.h ../src/dds.h ../include/portab.h -../src/System.obj: ../src/System.h ../src/SolveBoard.h ../src/PlayAnalyser.h +../src/SolverIF.obj: ../src/TimeStatList.h ../src/TimeStat.h ../src/dump.h +../src/System.obj: ../src/SolveBoard.h ../src/dds.h ../include/portab.h +../src/System.obj: ../include/dll.h ../src/CalcTables.h ../src/PlayAnalyser.h +../src/System.obj: ../src/parallel.h ../src/System.h ../src/Memory.h +../src/System.obj: ../src/TransTable.h ../src/TransTableS.h +../src/System.obj: ../src/TransTableL.h ../src/Moves.h ../src/File.h +../src/System.obj: ../src/debug.h ../src/Scheduler.h ../src/TimeStatList.h +../src/System.obj: ../src/TimeStat.h ../src/Timer.h ../src/Timer.obj: ../src/Timer.h ../src/TimerGroup.obj: ../src/TimerGroup.h ../src/Timer.h ../src/TimerList.obj: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h -../src/TimerList.obj: ../src/debug.h ../src/dds.h ../include/portab.h -../src/TimerList.obj: ../include/dll.h +../src/TimerList.obj: ../src/debug.h ../src/TimeStat.obj: ../src/TimeStat.h ../src/TimeStatList.obj: ../src/TimeStatList.h ../src/TimeStat.h -../src/TransTable.obj: ../src/dds.h ../include/portab.h ../include/dll.h -../src/TransTable.obj: ../src/TransTable.h ../src/debug.h -testcommon.obj: ../include/dll.h ../include/portab.h -testcommon.obj: dtest.h -itest.obj: ../include/dll.h testcommon.h -dtest.obj: ../include/dll.h testcommon.h +args.obj: args.h cst.h +parse.obj: ../include/dll.h parse.h +testcommon.obj: ../include/dll.h ../include/portab.h TestTimer.h parse.h +testcommon.obj: cst.h testcommon.h +TestTimer.obj: TestTimer.h +itest.obj: ../include/dll.h testcommon.h args.h cst.h +dtest.obj: ../include/dll.h testcommon.h args.h cst.h diff --git a/test/Makefiles/own_sources.txt b/test/Makefiles/own_sources.txt index 792c8d56..be38bcb1 100644 --- a/test/Makefiles/own_sources.txt +++ b/test/Makefiles/own_sources.txt @@ -1,4 +1,5 @@ DTEST_SOURCE_FILES = \ args.cpp \ + parse.cpp \ testcommon.cpp \ TestTimer.cpp diff --git a/test/dtest.h b/test/dtest.h deleted file mode 100644 index 52eb57d9..00000000 --- a/test/dtest.h +++ /dev/null @@ -1,194 +0,0 @@ -/* - DDS, a bridge double dummy solver. - - Copyright (C) 2006-2014 by Bo Haglund / - 2014-2018 by Bo Haglund & Soren Hein. - - See LICENSE and README. -*/ - - -void print_rank_count(); -unsigned short int dbitMapRank[16]; -unsigned char dcardRank[16]; -unsigned char dcardSuit[5]; - -void main_identify(); - -void set_constants(); - -bool read_file( - char const * fname, - int * number, - int ** dealer_list, - int ** vul_list, - struct dealPBN ** deal_list, - struct futureTricks ** fut_list, - struct ddTableResults ** table_list, - struct parResults ** par_list, - struct parResultsDealer ** dealerpar_list, - struct playTracePBN ** play_list, - struct solvedPlay ** trace_list); - -bool parse_NUMBER( - char * line, - int * number); - -bool parse_PBN( - char * line, - int * dealer, - int * vul, - struct dealPBN * dl); - -bool parse_FUT( - char * line, - struct futureTricks * fut); - -bool parse_TABLE( - char * line, - struct ddTableResults * table); - -bool parse_PAR( - char * line, - struct parResults * par); - -bool parse_DEALERPAR( - char * line, - struct parResultsDealer * par); - -bool parse_PLAY( - char * line, - struct playTracePBN * playp); - -bool parse_TRACE( - char * line, - struct solvedPlay * solvedp); - -bool parseable_GIB( - char line[]); - -bool parse_GIB( - char line[], - dealPBN * dl, - ddTableResults * table); - -bool compare_PBN( - struct dealPBN * dl1, - struct dealPBN * dl2); - -bool compare_FUT( - struct futureTricks * fut1, - struct futureTricks * fut2); - -bool compare_TABLE( - struct ddTableResults * table1, - struct ddTableResults * table2); - -bool compare_PAR( - struct parResults * par1, - struct parResults * par2); - -bool compare_DEALERPAR( - struct parResultsDealer * par1, - struct parResultsDealer * par2); - -bool compare_TRACE( - struct solvedPlay * trace1, - struct solvedPlay * trace2); - -bool print_PBN( - struct dealPBN * dl); - -bool print_FUT( - struct futureTricks * fut); - -void equals_to_string( - int equals, - char * res); - -bool print_TABLE( - struct ddTableResults * table); - -bool print_PAR( - struct parResults * par); - -bool print_DEALERPAR( - struct parResultsDealer * par); - -bool print_PLAY( - struct playTracePBN * play); - -bool print_TRACE( - struct solvedPlay * solvedp); - -void loop_solve( - struct boardsPBN * bop, - struct solvedBoards * solvedbdp, - struct dealPBN * deal_list, - struct futureTricks * fut_list, - int number); - -bool loop_calc( - struct ddTableDealsPBN * dealsp, - struct ddTablesRes * resp, - struct allParResults * parp, - struct dealPBN * deal_list, - struct ddTableResults * table_list, - int number); - -bool loop_par( - int * vul_list, - struct ddTableResults * table_list, - struct parResults * par_list, - int number); - -bool loop_dealerpar( - int * dealer_list, - int * vul_list, - struct ddTableResults * table_list, - struct parResultsDealer * dealerpar_list, - int number); - -bool loop_play( - struct boardsPBN * bop, - struct playTracesPBN * playsp, - struct solvedPlays * solvedplp, - struct dealPBN * deal_list, - struct playTracePBN * play_list, - struct solvedPlay * trace_list, - int number); - -void print_times( - int number); - -#ifndef _WIN32 -int timeval_diff( - timeval x, - timeval y); -#endif - -void timer_start(); - -int timer_end(); - -bool consume_int( - char * line, - int * pos, - int * res); - -bool consume_string( - char * line, - int * pos, - char * res); - -bool consume_tag( - char * line, - int * pos, - const char * tag); - -void dump_string( - const char * line); - -void set_complexity(); - -void set_weight(); diff --git a/test/itest.cpp b/test/itest.cpp index d4f768ba..cb5ead27 100644 --- a/test/itest.cpp +++ b/test/itest.cpp @@ -8,28 +8,28 @@ */ -#include -#include +#include +#include +#include + #include "../include/dll.h" #include "testcommon.h" +#include "args.h" +#include "cst.h" int main(int argc, char * argv[]) { - int nthreads = 0; - if (argc >= 4) - nthreads = atoi(argv[3]); + ReadArgs(argc, argv); - SetMaxThreads(nthreads); + if (options.threading != DTEST_THREADING_DEFAULT) + SetThreading(static_cast(options.threading)); - if (argc >= 5) - SetThreading(threadingCode(argv[4])); + SetResources(options.memory.MB, options.numThreads); DDSInfo info; GetDDSInfo(&info); - printf("%s", info.systemString); - printf("%-12s %20s\n\n", "Version", info.versionString); - fflush(stdout); + cout << info.systemString << endl; realMain(argc, argv); diff --git a/test/parse.cpp b/test/parse.cpp new file mode 100644 index 00000000..a7562dbd --- /dev/null +++ b/test/parse.cpp @@ -0,0 +1,636 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#include +#include +#include + +#include "../include/dll.h" +#include "parse.h" + +using namespace std; + + +bool parse_NUMBER( + char * line, + int * number); + +bool parse_PBN( + char * line, + int * dealer, + int * vul, + struct dealPBN * dl); + +bool parse_FUT( + char * line, + struct futureTricks * fut); + +bool parse_TABLE( + char * line, + struct ddTableResults * table); + +bool parse_PAR( + char * line, + struct parResults * par); + +bool parse_DEALERPAR( + char * line, + struct parResultsDealer * par); + +bool parse_PLAY( + char * line, + struct playTracePBN * playp); + +bool parse_TRACE( + char * line, + struct solvedPlay * solvedp); + +bool parseable_GIB( + char line[]); + +bool parse_GIB( + char line[], + dealPBN * dl, + ddTableResults * table); + +bool consume_int( + char * line, + int * pos, + int * res); + +bool consume_string( + char * line, + int * pos, + char * res); + +bool consume_tag( + char * line, + int * pos, + const char * tag); + + +// #define DEBUG +#define ZERO (static_cast('0')) +#define NINE (static_cast('9')) +#define SPACE (static_cast(' ')) +#define QUOTE (static_cast('"')) + + +bool read_file( + char const * fname, + int * number, + int ** dealer_list, + int ** vul_list, + dealPBN ** deal_list, + futureTricks ** fut_list, + ddTableResults ** table_list, + parResults ** par_list, + parResultsDealer ** dealerpar_list, + playTracePBN ** play_list, + solvedPlay ** trace_list, + bool& GIBmode) +{ + char line[256]; + + FILE * fp; + fp = fopen(fname, "r"); + if (fp == NULL) + { + printf("fp %s is NULL\n", fname); + return false; + } + + if (! fgets(line, sizeof(line), fp)) + { + printf("First line bad\n"); + return false; + } + + if (parse_NUMBER(line, number) == false) + { + if (parseable_GIB(line)) + { + GIBmode = true; + + * number = 1; + // Count lines, then start over. + while (1) + { + if (! fgets(line, sizeof(line), fp)) + break; + (*number)++; + } + + fclose(fp); + return false; + } + else + return false; + } + + if (*number < 0 || *number > 100000) + { + printf("Suspect number %d\n", *number); + return false; + } + + size_t number_t = static_cast(* number); + + if ((*dealer_list = static_cast + (calloc(number_t, sizeof(int)))) == NULL) + return false; + + if ((*vul_list = static_cast + (calloc(number_t, sizeof(int)))) == NULL) + return false; + + if ((*deal_list = static_cast + (calloc(number_t, sizeof(dealPBN)))) == NULL) + return false; + + if ((*fut_list = static_cast + (calloc(number_t, sizeof(futureTricks)))) == NULL) + return false; + + if ((*table_list = static_cast + (calloc(number_t, sizeof(ddTableResults)))) == NULL) + return false; + + if ((*par_list = static_cast + (calloc(number_t, sizeof(parResults)))) == NULL) + return false; + + if ((*dealerpar_list = static_cast + (calloc(number_t, sizeof(parResultsDealer)))) == NULL) + return false; + + if ((*play_list = static_cast + (calloc(number_t, sizeof(playTracePBN)))) == NULL) + return false; + + if ((*trace_list = static_cast + (calloc(number_t, sizeof(solvedPlay)))) == NULL) + return false; + + if (GIBmode) + { + int n = 0; + while (fgets(line, sizeof(line), fp)) + { + if (parse_GIB(line, &(*deal_list)[n], &(*table_list)[n]) + == false) + return false; + n++; + } + } + else + { + for (int n = 0; n < *number; n++) + { +#ifdef DEBUG + printf("Starting to read hand number %d\n", n); + printf("-------------------------------\n"); + printf("play_list[%d].number = %d\n", n, (*play_list)[n].number); +#endif + + if (! fgets(line, sizeof(line), fp)) return false; + if (parse_PBN(line, &(*dealer_list)[n], &(*vul_list)[n], + &(*deal_list)[n]) == false) return false; + + if (! fgets(line, sizeof(line), fp)) return false; + if (parse_FUT(line, &(*fut_list)[n]) == false) return false; + + if (! fgets(line, sizeof(line), fp)) return false; + if (parse_TABLE(line, &(*table_list)[n]) == false) return false; + + if (! fgets(line, sizeof(line), fp)) return false; + if (parse_PAR(line, &(*par_list)[n]) == false) return false; + + if (! fgets(line, sizeof(line), fp)) return false; + if (parse_DEALERPAR(line, &(*dealerpar_list)[n]) == false) + return false; + + if (! fgets(line, sizeof(line), fp)) return false; + if (parse_PLAY(line, &(*play_list)[n]) == false) return false; + + if (! fgets(line, sizeof(line), fp)) return false; + if (parse_TRACE(line, &(*trace_list)[n]) == false) return false; + } + } + + fclose(fp); + return 1; +} + + +bool parse_NUMBER(char * line, int * number) +{ +#ifdef DEBUG + printf("parse_NUMBER: Got line '%s'\n", line); +#endif + int pos = 0; + if (consume_tag(line, &pos, "NUMBER") == false) return false; +#ifdef DEBUG + printf("parse_NUMBER: Got tag 'NUMBER'\n"); +#endif + + if (consume_int(line, &pos, number) == false) return false; +#ifdef DEBUG + printf("parse_NUMBER: Read number %d\n", * number); +#endif + return true; +} + + +bool parse_PBN( + char * line, + int * dealer, + int * vul, + dealPBN * dl) +{ +#ifdef DEBUG + printf("parse_PBN: Got line '%s'\n", line); +#endif + int pos = 0; + if (consume_tag(line, &pos, "PBN") == false) return false; +#ifdef DEBUG + printf("parse_PBN: Got tag 'PBN'\n"); +#endif + + if (consume_int(line, &pos, dealer) == false) return false; +#ifdef DEBUG + printf("parse_PBN: Read dealer %d\n", * dealer); +#endif + + if (consume_int(line, &pos, vul) == false) return false; +#ifdef DEBUG + printf("parse_PBN: Read vul %d\n", * dealer); +#endif + + if (consume_int(line, &pos, &dl->trump) == false) return false; +#ifdef DEBUG + printf("parse_PBN: Read trump %d\n", dl->trump); +#endif + + if (consume_int(line, &pos, &dl->first) == false) return false; +#ifdef DEBUG + printf("parse_PBN: Read first %d\n", dl->first); +#endif + + if (consume_string(line, &pos, dl->remainCards) == false) + return false; +#ifdef DEBUG + printf("parse_PBN: Read string '%s'\n", dl->remainCards); +#endif + + return true; +} + + +bool parse_FUT(char * line, futureTricks * fut) +{ +#ifdef DEBUG + printf("parse_FUT: Got line '%s'\n", line); +#endif + int pos = 0; + if (consume_tag(line, &pos, "FUT") == false) return false; +#ifdef DEBUG + printf("parse_FUT: Got tag 'FUT'\n"); +#endif + + if (consume_int(line, &pos, &fut->cards) == false) return false; +#ifdef DEBUG + printf("parse_FUT: Read cards %d\n", fut->cards); +#endif + + for (int c = 0; c < fut->cards; c++) + { + if (consume_int(line, &pos, &fut->suit[c]) == false) return false; +#ifdef DEBUG + printf("parse_FUT: Read suit[%d]: %d\n", c, fut->suit[c]); +#endif + } + + for (int c = 0; c < fut->cards; c++) + { + if (consume_int(line, &pos, &fut->rank[c]) == false) return false; +#ifdef DEBUG + printf("parse_FUT: Read rank[%d]: %d\n", c, fut->rank[c]); +#endif + } + + for (int c = 0; c < fut->cards; c++) + { + if (consume_int(line, &pos, &fut->equals[c]) == false) return false; +#ifdef DEBUG + printf("parse_FUT: Read equals[%d]: %d\n", c, fut->equals[c]); +#endif + } + + for (int c = 0; c < fut->cards; c++) + { + if (consume_int(line, &pos, &fut->score[c]) == false) return false; +#ifdef DEBUG + printf("parse_FUT: Read score[%d]: %d\n", c, fut->score[c]); +#endif + } + + return true; +} + + +bool parse_TABLE(char * line, ddTableResults * table) +{ + int pos = 0; + if (consume_tag(line, &pos, "TABLE") == false) return false; +#ifdef DEBUG + printf("parse_FUT: Got tag 'TABLE'\n"); +#endif + + for (int suit = 0; suit <= 4; suit++) + { + for (int pl = 0; pl <= 3; pl++) + { + if (consume_int(line, &pos, &table->resTable[suit][pl]) == false) + return false; +#ifdef DEBUG + printf("parse_TABLE: Read table[%d][%d] = %d\n", + suit, pl, table->resTable[suit][pl]); +#endif + } + } + return true; +} + + +bool parse_PAR(char * line, parResults * par) +{ +#ifdef DEBUG + printf("parse_PAR: Got line '%s'\n", line); +#endif + + int pos = 0; + if (consume_tag(line, &pos, "PAR") == false) return false; +#ifdef DEBUG + printf("parse_PAR: Got tag 'PAR'\n"); +#endif + + if (consume_string(line, &pos, par->parScore[0]) == false) + return false; +#ifdef DEBUG + printf("parse_PAR: Read string '%s'\n", par->parScore[0]); +#endif + + if (consume_string(line, &pos, par->parScore[1]) == false) + return false; +#ifdef DEBUG + printf("parse_PAR: Read string '%s'\n", par->parScore[1]); +#endif + + if (consume_string(line, &pos, par->parContractsString[0]) == false) + return false; +#ifdef DEBUG + printf("parse_PAR: Read string '%s'\n", par->parContractsString[0]); +#endif + + if (consume_string(line, &pos, par->parContractsString[1]) == false) + return false; +#ifdef DEBUG + printf("parse_PAR: Read string '%s'\n", par->parContractsString[1]); +#endif + + return true; +} + + +bool parse_DEALERPAR(char * line, parResultsDealer * par) +{ +#ifdef DEBUG + printf("parse_DEALERPAR: Got line '%s'\n", line); +#endif + + int pos = 0; + if (consume_tag(line, &pos, "PAR2") == false) return false; +#ifdef DEBUG + printf("parse_DEALERPAR: Got tag 'PAR2'\n"); +#endif + + char str[256]; + if (consume_string(line, &pos, str) == false) + return false; +#ifdef DEBUG + printf("parse_DEALERPAR: Read string '%s'\n", str); +#endif + if (sscanf(str, "%d", &par->score) != 1) + return false; +#ifdef DEBUG + printf("parse_DEALERPAR: Read string '%s', number %d\n", + str, par->score); +#endif + + int no = 0; + while (1) + { + if (consume_string(line, &pos, par->contracts[no]) == false) + break; +#ifdef DEBUG + printf("parse_DEALERPAR: Read string number %d, '%s'\n", + no, par->contracts[no]); +#endif + no++; + } + + par->number = no; +#ifdef DEBUG + printf("parse_DEALERPAR: Read to number incl %d\n", no - 1); +#endif + + return true; +} + + +bool parse_PLAY(char * line, playTracePBN * playp) +{ +#ifdef DEBUG + printf("parse_PLAY: Got line '%s'\n", line); +#endif + + int pos = 0; + if (consume_tag(line, &pos, "PLAY") == false) return false; +#ifdef DEBUG + printf("parse_PLAY: Got tag 'PLAY', pos now %d\n", pos); +#endif + + if (consume_int(line, &pos, &playp->number) == false) return false; +#ifdef DEBUG + printf("parse_PLAY: Read number %d\n", playp->number); +#endif + + if (consume_string(line, &pos, playp->cards) == false) + return false; +#ifdef DEBUG + printf("parse_PLAY: Read cards '%s'\n", playp->cards); +#endif + + return true; +} + + +bool parse_TRACE(char * line, solvedPlay * solvedp) +{ +#ifdef DEBUG + printf("parse_TRACE: Got line '%s'\n", line); +#endif + + int pos = 0; + if (consume_tag(line, &pos, "TRACE") == false) return false; +#ifdef DEBUG + printf("parse_TRACE: Got tag 'TRACE'\n"); +#endif + + if (consume_int(line, &pos, &solvedp->number) == false) return false; +#ifdef DEBUG + printf("parse_TRACE: Read number %d\n", solvedp->number); +#endif + + for (int i = 0; i < solvedp->number; i++) + { + if (consume_int(line, &pos, &solvedp->tricks[i]) == false) + return false; +#ifdef DEBUG + printf("parse_TRACE: Read tricks[%d] = %d\n", i, solvedp->tricks[i]); +#endif + } + return true; +} + + +bool parseable_GIB(char line[]) +{ + if (strlen(line) != 89) + return false; + + if (line[67] != ':') + return false; + + return true; +} + +int GIB_TO_DDS[4] = {1, 0, 3, 2}; + +bool parse_GIB(char line[], dealPBN * dl, ddTableResults * table) +{ + strcpy(dl->remainCards, "W:"); + strncpy(dl->remainCards + 2, line, 67); + dl->remainCards[69] = '\0'; + + int zero = static_cast('0'); + int leta = static_cast('A') - 10; + int dds_strain, dds_hand; + + for (int s = 0; s < DDS_STRAINS; s++) + { + dds_strain = (s == 0 ? 4 : s - 1); + for (int h = 0; h < DDS_HANDS; h++) + { + dds_hand = GIB_TO_DDS[h]; + char c = line[68 + 4 * s + h]; + int d; + if (c >= '0' && c <= '9') + d = static_cast (line[68 + 4 * s + h] - zero); + else if (c >= 'A' && c <= 'F') + d = static_cast (line[68 + 4 * s + h] - leta); + else + return false; + + if (dds_hand & 1) + d = 13 - d; + + table->resTable[dds_strain][dds_hand] = d; + } + } + return true; +} + + +bool consume_int( + char * line, + int * pos, + int * res) +{ + /* Too much Perl programming spoils one... No doubt there + is a good way to do this in C. */ + + int len = static_cast(strlen(line)); + int i = * pos; + int value = 0; + while (i < len && + static_cast(line[i]) >= ZERO && + static_cast(line[i]) <= NINE) + { + value = 10 * value + static_cast(line[i++]) - ZERO; + } + if (static_cast(line[i]) != SPACE) + { + printf("Doesn't end on space\n"); + return false; + } + *pos = i + 1; + *res = value; + return true; +} + +bool consume_string( + char * line, + int * pos, + char * res) +{ + int len = static_cast(strlen(line)); + int i = * pos; + + if (static_cast(line[i]) != QUOTE) return false; + i++; + + while (i < len && static_cast(line[i]) != QUOTE) + i++; + + if (static_cast(line[i] ) != QUOTE) return false; + if (static_cast(line[i + 1]) != SPACE) return false; + i += 2; + + strncpy(res, line + *pos + 1, static_cast(i - *pos - 3)); + res[i - *pos - 3] = '\0'; + *pos = i; + return true; +} + + +bool consume_tag( + char * line, + int * pos, + const char * tag) +{ + int len = static_cast(strlen(line)); + int i = * pos; + char read[80] = ""; + + while (i < len && static_cast(line[i]) != SPACE) + { + i++; + } + i++; + + strncpy(read, line + *pos, static_cast(i - *pos - 1)); + if (strcmp(read, tag)) return false; + + *pos = i; + return true; +} + diff --git a/test/parse.h b/test/parse.h new file mode 100644 index 00000000..df43ba39 --- /dev/null +++ b/test/parse.h @@ -0,0 +1,28 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DTEST_PARSE_H +#define DTEST_PARSE_H + +bool read_file( + char const * fname, + int * number, + int ** dealer_list, + int ** vul_list, + struct dealPBN ** deal_list, + struct futureTricks ** fut_list, + struct ddTableResults ** table_list, + struct parResults ** par_list, + struct parResultsDealer ** dealerpar_list, + struct playTracePBN ** play_list, + struct solvedPlay ** trace_list, + bool& GIBmode); + +#endif + diff --git a/test/testcommon.cpp b/test/testcommon.cpp index 257a324a..cd9d92ff 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -16,8 +16,9 @@ #include "../include/dll.h" #include "../include/portab.h" #include "TestTimer.h" -#include "dtest.h" +#include "parse.h" #include "cst.h" +#include "testcommon.h" using namespace std; @@ -25,13 +26,124 @@ extern OptionsType options; TestTimer timer; + +void print_rank_count(); +unsigned short int dbitMapRank[16]; +unsigned char dcardRank[16]; +unsigned char dcardSuit[5]; + +void main_identify(); + +void set_constants(); + +bool compare_PBN( + struct dealPBN * dl1, + struct dealPBN * dl2); + +bool compare_FUT( + struct futureTricks * fut1, + struct futureTricks * fut2); + +bool compare_TABLE( + struct ddTableResults * table1, + struct ddTableResults * table2); + +bool compare_PAR( + struct parResults * par1, + struct parResults * par2); + +bool compare_DEALERPAR( + struct parResultsDealer * par1, + struct parResultsDealer * par2); + +bool compare_TRACE( + struct solvedPlay * trace1, + struct solvedPlay * trace2); + +bool print_PBN( + struct dealPBN * dl); + +bool print_FUT( + struct futureTricks * fut); + +void equals_to_string( + int equals, + char * res); + +bool print_TABLE( + struct ddTableResults * table); + +bool print_PAR( + struct parResults * par); + +bool print_DEALERPAR( + struct parResultsDealer * par); + +bool print_PLAY( + struct playTracePBN * play); + +bool print_TRACE( + struct solvedPlay * solvedp); + +void loop_solve( + struct boardsPBN * bop, + struct solvedBoards * solvedbdp, + struct dealPBN * deal_list, + struct futureTricks * fut_list, + int number); + +bool loop_calc( + struct ddTableDealsPBN * dealsp, + struct ddTablesRes * resp, + struct allParResults * parp, + struct dealPBN * deal_list, + struct ddTableResults * table_list, + int number); + +bool loop_par( + int * vul_list, + struct ddTableResults * table_list, + struct parResults * par_list, + int number); + +bool loop_dealerpar( + int * dealer_list, + int * vul_list, + struct ddTableResults * table_list, + struct parResultsDealer * dealerpar_list, + int number); + +bool loop_play( + struct boardsPBN * bop, + struct playTracesPBN * playsp, + struct solvedPlays * solvedplp, + struct dealPBN * deal_list, + struct playTracePBN * play_list, + struct solvedPlay * trace_list, + int number); + +void print_times( + int number); + +#ifndef _WIN32 +int timeval_diff( + timeval x, + timeval y); +#endif + +void timer_start(); + +int timer_end(); + + + + #define SOLVE_SIZE MAXNOOFBOARDS #define BOARD_SIZE MAXNOOFTABLES #define TRACE_SIZE MAXNOOFBOARDS #define PAR_REPEAT 1 int input_number; -bool GIBmode = false; // #define DEBUG @@ -52,6 +164,8 @@ int realMain(int argc, char * argv[]) timer.reset(); timer.setname("Hand stats"); + bool GIBmode = false; + // TODO: Make one. if (options.solver == DTEST_SOLVER_SOLVE) input_number = SOLVE_SIZE; @@ -88,7 +202,7 @@ int realMain(int argc, char * argv[]) if (read_file(options.fname.c_str(), &number, &dealer_list, &vul_list, &deal_list, &fut_list, &table_list, &par_list, &dealerpar_list, - &play_list, &trace_list) == false) + &play_list, &trace_list, GIBmode) == false) { printf("read_file failed.\n"); exit(0); @@ -236,521 +350,6 @@ void set_constants() } -int threadingCode(char * arg); - -int threadingCode(char * arg) -{ - string str(arg); - transform(str.begin(), str.end(), str.begin(), ::tolower); - if (str == "basic") - return 0; - else if (str == "winapi") - return 1; - else if (str == "openmp") - return 2; - else if (str == "gcd") - return 3; - else if (str == "boost") - return 4; - else if (str == "stl") - return 5; - else if (str == "tbb") - return 6; - else if (str == "stlimpl") - return 7; - else if (str == "pplimpl") - return 8; - else - return 9; -} - - -bool read_file( - char const * fname, - int * number, - int ** dealer_list, - int ** vul_list, - dealPBN ** deal_list, - futureTricks ** fut_list, - ddTableResults ** table_list, - parResults ** par_list, - parResultsDealer ** dealerpar_list, - playTracePBN ** play_list, - solvedPlay ** trace_list) -{ - char line[256]; - - FILE * fp; - fp = fopen(fname, "r"); - if (fp == NULL) - { - printf("fp %s is NULL\n", fname); - return false; - } - - if (! fgets(line, sizeof(line), fp)) - { - printf("First line bad\n"); - return false; - } - - if (parse_NUMBER(line, number) == false) - { - if (parseable_GIB(line)) - { - GIBmode = true; - - * number = 1; - // Count lines, then start over. - while (1) - { - if (! fgets(line, sizeof(line), fp)) - break; - (*number)++; - } - - fclose(fp); - return false; - } - else - return false; - } - - if (*number < 0 || *number > 100000) - { - printf("Suspect number %d\n", *number); - return false; - } - - size_t number_t = static_cast(* number); - - if ((*dealer_list = static_cast - (calloc(number_t, sizeof(int)))) == NULL) - return false; - - if ((*vul_list = static_cast - (calloc(number_t, sizeof(int)))) == NULL) - return false; - - if ((*deal_list = static_cast - (calloc(number_t, sizeof(dealPBN)))) == NULL) - return false; - - if ((*fut_list = static_cast - (calloc(number_t, sizeof(futureTricks)))) == NULL) - return false; - - if ((*table_list = static_cast - (calloc(number_t, sizeof(ddTableResults)))) == NULL) - return false; - - if ((*par_list = static_cast - (calloc(number_t, sizeof(parResults)))) == NULL) - return false; - - if ((*dealerpar_list = static_cast - (calloc(number_t, sizeof(parResultsDealer)))) == NULL) - return false; - - if ((*play_list = static_cast - (calloc(number_t, sizeof(playTracePBN)))) == NULL) - return false; - - if ((*trace_list = static_cast - (calloc(number_t, sizeof(solvedPlay)))) == NULL) - return false; - - if (GIBmode) - { - int n = 0; - while (fgets(line, sizeof(line), fp)) - { - if (parse_GIB(line, &(*deal_list)[n], &(*table_list)[n]) - == false) - return false; - n++; - } - } - else - { - for (int n = 0; n < *number; n++) - { -#ifdef DEBUG - printf("Starting to read hand number %d\n", n); - printf("-------------------------------\n"); - printf("play_list[%d].number = %d\n", n, (*play_list)[n].number); -#endif - - if (! fgets(line, sizeof(line), fp)) return false; - if (parse_PBN(line, &(*dealer_list)[n], &(*vul_list)[n], - &(*deal_list)[n]) == false) return false; - - if (! fgets(line, sizeof(line), fp)) return false; - if (parse_FUT(line, &(*fut_list)[n]) == false) return false; - - if (! fgets(line, sizeof(line), fp)) return false; - if (parse_TABLE(line, &(*table_list)[n]) == false) return false; - - if (! fgets(line, sizeof(line), fp)) return false; - if (parse_PAR(line, &(*par_list)[n]) == false) return false; - - if (! fgets(line, sizeof(line), fp)) return false; - if (parse_DEALERPAR(line, &(*dealerpar_list)[n]) == false) - return false; - - if (! fgets(line, sizeof(line), fp)) return false; - if (parse_PLAY(line, &(*play_list)[n]) == false) return false; - - if (! fgets(line, sizeof(line), fp)) return false; - if (parse_TRACE(line, &(*trace_list)[n]) == false) return false; - - /* - print_PBN (&(*deal_list )[n]); - print_FUT (&(*fut_list )[n]); - print_TABLE (&(*table_list )[n]); - print_PAR (&(*par_list )[n]); - print_DEALERPAR(&(*dealerpar_list)[n]); - print_PLAY (&(*play_list )[n]); - print_TRACE (&(*trace_list )[n]); - */ - } - } - - fclose(fp); - return 1; -} - - -bool parse_NUMBER(char * line, int * number) -{ -#ifdef DEBUG - printf("parse_NUMBER: Got line '%s'\n", line); -#endif - int pos = 0; - if (consume_tag(line, &pos, "NUMBER") == false) return false; -#ifdef DEBUG - printf("parse_NUMBER: Got tag 'NUMBER'\n"); -#endif - - if (consume_int(line, &pos, number) == false) return false; -#ifdef DEBUG - printf("parse_NUMBER: Read number %d\n", * number); -#endif - return true; -} - - -bool parse_PBN( - char * line, - int * dealer, - int * vul, - dealPBN * dl) -{ -#ifdef DEBUG - printf("parse_PBN: Got line '%s'\n", line); -#endif - int pos = 0; - if (consume_tag(line, &pos, "PBN") == false) return false; -#ifdef DEBUG - printf("parse_PBN: Got tag 'PBN'\n"); -#endif - - if (consume_int(line, &pos, dealer) == false) return false; -#ifdef DEBUG - printf("parse_PBN: Read dealer %d\n", * dealer); -#endif - - if (consume_int(line, &pos, vul) == false) return false; -#ifdef DEBUG - printf("parse_PBN: Read vul %d\n", * dealer); -#endif - - if (consume_int(line, &pos, &dl->trump) == false) return false; -#ifdef DEBUG - printf("parse_PBN: Read trump %d\n", dl->trump); -#endif - - if (consume_int(line, &pos, &dl->first) == false) return false; -#ifdef DEBUG - printf("parse_PBN: Read first %d\n", dl->first); -#endif - - if (consume_string(line, &pos, dl->remainCards) == false) - return false; -#ifdef DEBUG - printf("parse_PBN: Read string '%s'\n", dl->remainCards); -#endif - - return true; -} - - -bool parse_FUT(char * line, futureTricks * fut) -{ -#ifdef DEBUG - printf("parse_FUT: Got line '%s'\n", line); -#endif - int pos = 0; - if (consume_tag(line, &pos, "FUT") == false) return false; -#ifdef DEBUG - printf("parse_FUT: Got tag 'FUT'\n"); -#endif - - if (consume_int(line, &pos, &fut->cards) == false) return false; -#ifdef DEBUG - printf("parse_FUT: Read cards %d\n", fut->cards); -#endif - - for (int c = 0; c < fut->cards; c++) - { - if (consume_int(line, &pos, &fut->suit[c]) == false) return false; -#ifdef DEBUG - printf("parse_FUT: Read suit[%d]: %d\n", c, fut->suit[c]); -#endif - } - - for (int c = 0; c < fut->cards; c++) - { - if (consume_int(line, &pos, &fut->rank[c]) == false) return false; -#ifdef DEBUG - printf("parse_FUT: Read rank[%d]: %d\n", c, fut->rank[c]); -#endif - } - - for (int c = 0; c < fut->cards; c++) - { - if (consume_int(line, &pos, &fut->equals[c]) == false) return false; -#ifdef DEBUG - printf("parse_FUT: Read equals[%d]: %d\n", c, fut->equals[c]); -#endif - } - - for (int c = 0; c < fut->cards; c++) - { - if (consume_int(line, &pos, &fut->score[c]) == false) return false; -#ifdef DEBUG - printf("parse_FUT: Read score[%d]: %d\n", c, fut->score[c]); -#endif - } - - return true; -} - - -bool parse_TABLE(char * line, ddTableResults * table) -{ - int pos = 0; - if (consume_tag(line, &pos, "TABLE") == false) return false; -#ifdef DEBUG - printf("parse_FUT: Got tag 'TABLE'\n"); -#endif - - for (int suit = 0; suit <= 4; suit++) - { - for (int pl = 0; pl <= 3; pl++) - { - if (consume_int(line, &pos, &table->resTable[suit][pl]) == false) - return false; -#ifdef DEBUG - printf("parse_TABLE: Read table[%d][%d] = %d\n", - suit, pl, table->resTable[suit][pl]); -#endif - } - } - return true; -} - - -bool parse_PAR(char * line, parResults * par) -{ -#ifdef DEBUG - printf("parse_PAR: Got line '%s'\n", line); -#endif - - int pos = 0; - if (consume_tag(line, &pos, "PAR") == false) return false; -#ifdef DEBUG - printf("parse_PAR: Got tag 'PAR'\n"); -#endif - - if (consume_string(line, &pos, par->parScore[0]) == false) - return false; -#ifdef DEBUG - printf("parse_PAR: Read string '%s'\n", par->parScore[0]); -#endif - - if (consume_string(line, &pos, par->parScore[1]) == false) - return false; -#ifdef DEBUG - printf("parse_PAR: Read string '%s'\n", par->parScore[1]); -#endif - - if (consume_string(line, &pos, par->parContractsString[0]) == false) - return false; -#ifdef DEBUG - printf("parse_PAR: Read string '%s'\n", par->parContractsString[0]); -#endif - - if (consume_string(line, &pos, par->parContractsString[1]) == false) - return false; -#ifdef DEBUG - printf("parse_PAR: Read string '%s'\n", par->parContractsString[1]); -#endif - - return true; -} - - -bool parse_DEALERPAR(char * line, parResultsDealer * par) -{ -#ifdef DEBUG - printf("parse_DEALERPAR: Got line '%s'\n", line); -#endif - - int pos = 0; - if (consume_tag(line, &pos, "PAR2") == false) return false; -#ifdef DEBUG - printf("parse_DEALERPAR: Got tag 'PAR2'\n"); -#endif - - char str[256]; - if (consume_string(line, &pos, str) == false) - return false; -#ifdef DEBUG - printf("parse_DEALERPAR: Read string '%s'\n", str); -#endif - if (sscanf(str, "%d", &par->score) != 1) - return false; -#ifdef DEBUG - printf("parse_DEALERPAR: Read string '%s', number %d\n", - str, par->score); -#endif - - int no = 0; - while (1) - { - if (consume_string(line, &pos, par->contracts[no]) == false) - break; -#ifdef DEBUG - printf("parse_DEALERPAR: Read string number %d, '%s'\n", - no, par->contracts[no]); -#endif - no++; - } - - par->number = no; -#ifdef DEBUG - printf("parse_DEALERPAR: Read to number incl %d\n", no - 1); -#endif - - return true; -} - - -bool parse_PLAY(char * line, playTracePBN * playp) -{ -#ifdef DEBUG - printf("parse_PLAY: Got line '%s'\n", line); -#endif - - int pos = 0; - if (consume_tag(line, &pos, "PLAY") == false) return false; -#ifdef DEBUG - printf("parse_PLAY: Got tag 'PLAY', pos now %d\n", pos); -#endif - - if (consume_int(line, &pos, &playp->number) == false) return false; -#ifdef DEBUG - printf("parse_PLAY: Read number %d\n", playp->number); -#endif - - if (consume_string(line, &pos, playp->cards) == false) - return false; -#ifdef DEBUG - printf("parse_PLAY: Read cards '%s'\n", playp->cards); -#endif - - return true; -} - - -bool parse_TRACE(char * line, solvedPlay * solvedp) -{ -#ifdef DEBUG - printf("parse_TRACE: Got line '%s'\n", line); -#endif - - int pos = 0; - if (consume_tag(line, &pos, "TRACE") == false) return false; -#ifdef DEBUG - printf("parse_TRACE: Got tag 'TRACE'\n"); -#endif - - if (consume_int(line, &pos, &solvedp->number) == false) return false; -#ifdef DEBUG - printf("parse_TRACE: Read number %d\n", solvedp->number); -#endif - - for (int i = 0; i < solvedp->number; i++) - { - if (consume_int(line, &pos, &solvedp->tricks[i]) == false) - return false; -#ifdef DEBUG - printf("parse_TRACE: Read tricks[%d] = %d\n", i, solvedp->tricks[i]); -#endif - } - return true; -} - - -bool parseable_GIB(char line[]) -{ - if (strlen(line) != 89) - return false; - - if (line[67] != ':') - return false; - - return true; -} - -int GIB_TO_DDS[4] = {1, 0, 3, 2}; - -bool parse_GIB(char line[], dealPBN * dl, ddTableResults * table) -{ - strcpy(dl->remainCards, "W:"); - strncpy(dl->remainCards + 2, line, 67); - dl->remainCards[69] = '\0'; - - int zero = static_cast('0'); - int leta = static_cast('A') - 10; - int dds_strain, dds_hand; - - for (int s = 0; s < DDS_STRAINS; s++) - { - dds_strain = (s == 0 ? 4 : s - 1); - for (int h = 0; h < DDS_HANDS; h++) - { - dds_hand = GIB_TO_DDS[h]; - char c = line[68 + 4 * s + h]; - int d; - if (c >= '0' && c <= '9') - d = static_cast (line[68 + 4 * s + h] - zero); - else if (c >= 'A' && c <= 'F') - d = static_cast (line[68 + 4 * s + h] - leta); - else - return false; - - if (dds_hand & 1) - d = 13 - d; - - table->resTable[dds_strain][dds_hand] = d; - } - } - return true; -} - - bool compare_PBN(dealPBN * dl1, dealPBN * dl2) { if (dl1->trump != dl2->trump) return false; @@ -1238,90 +837,3 @@ bool loop_play( return true; } - -bool consume_int( - char * line, - int * pos, - int * res) -{ - /* Too much Perl programming spoils one... No doubt there - is a good way to do this in C. */ - - int len = static_cast(strlen(line)); - int i = * pos; - int value = 0; - while (i < len && - static_cast(line[i]) >= ZERO && - static_cast(line[i]) <= NINE) - { - value = 10 * value + static_cast(line[i++]) - ZERO; - } - if (static_cast(line[i]) != SPACE) - { - printf("Doesn't end on space\n"); - return false; - } - *pos = i + 1; - *res = value; - return true; -} - -bool consume_string( - char * line, - int * pos, - char * res) -{ - int len = static_cast(strlen(line)); - int i = * pos; - - if (static_cast(line[i]) != QUOTE) return false; - i++; - - while (i < len && static_cast(line[i]) != QUOTE) - i++; - - if (static_cast(line[i] ) != QUOTE) return false; - if (static_cast(line[i + 1]) != SPACE) return false; - i += 2; - - strncpy(res, line + *pos + 1, static_cast(i - *pos - 3)); - res[i - *pos - 3] = '\0'; - *pos = i; - return true; -} - - -bool consume_tag( - char * line, - int * pos, - const char * tag) -{ - int len = static_cast(strlen(line)); - int i = * pos; - char read[80] = ""; - - while (i < len && static_cast(line[i]) != SPACE) - { - i++; - } - i++; - - strncpy(read, line + *pos, static_cast(i - *pos - 1)); - if (strcmp(read, tag)) return false; - - *pos = i; - return true; -} - - -void dump_string( - const char * line) -{ - int len = static_cast(strlen(line)); - printf("Dumping len %d\n", len); - for (int i = 0; i <= len; i++) - { - printf("%2d %c %d\n", i, line[i], static_cast(line[i])); - } -} - diff --git a/test/testcommon.h b/test/testcommon.h index 31af981f..7413eb24 100644 --- a/test/testcommon.h +++ b/test/testcommon.h @@ -7,7 +7,10 @@ See LICENSE and README. */ +#ifndef DTEST_TESTCOMMON_H +#define DTEST_TESTCOMMON_H int realMain(int argc, char * argv[]); -int threadingCode(char * arg); +#endif + From f89cd685e0f0602dc54efe0a9e30f34f8b981b64 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Mon, 2 Apr 2018 15:44:36 +0200 Subject: [PATCH 119/132] New C++ parse seems to work --- test/parse.cpp | 772 ++++++++++++++++++++++++-------------------- test/parse.h | 27 +- test/testcommon.cpp | 6 +- 3 files changed, 434 insertions(+), 371 deletions(-) diff --git a/test/parse.cpp b/test/parse.cpp index a7562dbd..aae3aa1c 100644 --- a/test/parse.cpp +++ b/test/parse.cpp @@ -7,85 +7,93 @@ See LICENSE and README. */ +#include +#include +#include -#include -#include -#include - -#include "../include/dll.h" #include "parse.h" +#include "../include/portab.h" using namespace std; +// #define DEBUG -bool parse_NUMBER( - char * line, - int * number); bool parse_PBN( - char * line, - int * dealer, - int * vul, - struct dealPBN * dl); + const vector& list, + int& dealer, + int& vul, + dealPBN * dl); bool parse_FUT( - char * line, - struct futureTricks * fut); + const vector& list, + futureTricks * fut); bool parse_TABLE( - char * line, - struct ddTableResults * table); + const vector& list, + ddTableResults * table); bool parse_PAR( - char * line, - struct parResults * par); + const vector& list, + parResults * par); bool parse_DEALERPAR( - char * line, - struct parResultsDealer * par); + const vector& list, + parResultsDealer * par); bool parse_PLAY( - char * line, - struct playTracePBN * playp); + const vector& list, + playTracePBN * play); bool parse_TRACE( - char * line, - struct solvedPlay * solvedp); + const vector& list, + solvedPlay * solved); -bool parseable_GIB( - char line[]); +bool parseable_GIB(const string& line); bool parse_GIB( - char line[], + const string& line, dealPBN * dl, ddTableResults * table); -bool consume_int( - char * line, - int * pos, - int * res); +bool get_any_line( + ifstream& fin, + vector& list, + const string& tag, + const int n); -bool consume_string( - char * line, - int * pos, - char * res); +bool get_head_element( + const string& elem, + const string& expected); -bool consume_tag( - char * line, - int * pos, - const char * tag); +bool get_int_element( + const string& elem, + int& res, + const string& errtext); +bool strip_quotes( + const string& st, + char * cstr, + const string& errtag); -// #define DEBUG -#define ZERO (static_cast('0')) -#define NINE (static_cast('9')) -#define SPACE (static_cast(' ')) -#define QUOTE (static_cast('"')) +bool strip_quotes( + const string& st, + int& res, + const string& errtag); + +void splitIntoWords( + const string& text, + vector& words); + +bool str2int( + const string& text, + int& res); bool read_file( - char const * fname, - int * number, + const string& fname, + int& number, + bool& GIBmode, int ** dealer_list, int ** vul_list, dealPBN ** deal_list, @@ -94,54 +102,58 @@ bool read_file( parResults ** par_list, parResultsDealer ** dealerpar_list, playTracePBN ** play_list, - solvedPlay ** trace_list, - bool& GIBmode) + solvedPlay ** trace_list) { - char line[256]; + ifstream fin; + fin.open(fname); - FILE * fp; - fp = fopen(fname, "r"); - if (fp == NULL) + string line; + if (! getline(fin, line)) { - printf("fp %s is NULL\n", fname); + cout << "First line bad: '" << line << "'" << endl; return false; } - if (! fgets(line, sizeof(line), fp)) - { - printf("First line bad\n"); - return false; - } + vector list; + splitIntoWords(line, list); - if (parse_NUMBER(line, number) == false) + if (list.size() == 2 && get_head_element(list[0], "NUMBER")) { - if (parseable_GIB(line)) + // Hopefully a txt-style file. + if (! str2int(list[1], number)) { - GIBmode = true; - - * number = 1; - // Count lines, then start over. - while (1) - { - if (! fgets(line, sizeof(line), fp)) - break; - (*number)++; - } - - fclose(fp); + cout << "Not a number of hands: '" << list[1] << "'" << endl; return false; } - else + else if (number <= 0 || number > 100000) + { + cout << "Suspect number of hands: " << number << endl; return false; + } } - - if (*number < 0 || *number > 100000) + else if (! parseable_GIB(line)) { - printf("Suspect number %d\n", *number); + cout << "Not a GIB-style start: '" << line << "'" << endl; return false; } + else + { + // Count the lines, then start over. + number = 1; + while (1) + { + if (! getline(fin, line)) + break; + number++; + } + fin.close(); + fin.open(fname); + } + - size_t number_t = static_cast(* number); + // Make enough room for the hands. + + const size_t number_t = static_cast(number); if ((*dealer_list = static_cast (calloc(number_t, sizeof(int)))) == NULL) @@ -181,343 +193,310 @@ bool read_file( if (GIBmode) { - int n = 0; - while (fgets(line, sizeof(line), fp)) + for (int n = 0; n < number; n++) { - if (parse_GIB(line, &(*deal_list)[n], &(*table_list)[n]) - == false) + if (! getline(fin, line)) + { + cout << "Expected GIB line " << n << endl; + return false; + } + if (! parse_GIB(line, &(*deal_list)[n], &(*table_list)[n])) return false; - n++; } } else { - for (int n = 0; n < *number; n++) + for (int n = 0; n < number; n++) { #ifdef DEBUG - printf("Starting to read hand number %d\n", n); - printf("-------------------------------\n"); - printf("play_list[%d].number = %d\n", n, (*play_list)[n].number); + cout << "Starting to read hand number " << n << "\n"; + cout << string(31, '-') << "\n"; + cout << "play_list[" << n << "].number = " << + (*play_list)[n].number << "\n"; #endif - if (! fgets(line, sizeof(line), fp)) return false; - if (parse_PBN(line, &(*dealer_list)[n], &(*vul_list)[n], - &(*deal_list)[n]) == false) return false; + if (! get_any_line(fin, list, "PBN", n)) + return false; + if (! parse_PBN(list, (*dealer_list)[n], + (*vul_list)[n], &(*deal_list)[n])) + return false; - if (! fgets(line, sizeof(line), fp)) return false; - if (parse_FUT(line, &(*fut_list)[n]) == false) return false; + if (! get_any_line(fin, list, "FUT", n)) + return false; + if (! parse_FUT(list, &(*fut_list)[n])) + return false; - if (! fgets(line, sizeof(line), fp)) return false; - if (parse_TABLE(line, &(*table_list)[n]) == false) return false; + if (! get_any_line(fin, list, "TABLE", n)) + return false; + if (! parse_TABLE(list, &(*table_list)[n])) + return false; - if (! fgets(line, sizeof(line), fp)) return false; - if (parse_PAR(line, &(*par_list)[n]) == false) return false; + if (! get_any_line(fin, list, "PAR", n)) + return false; + if (! parse_PAR(list, &(*par_list)[n])) + return false; - if (! fgets(line, sizeof(line), fp)) return false; - if (parse_DEALERPAR(line, &(*dealerpar_list)[n]) == false) + if (! get_any_line(fin, list, "DEALERPAR", n)) + return false; + if (! parse_DEALERPAR(list, &(*dealerpar_list)[n])) return false; - if (! fgets(line, sizeof(line), fp)) return false; - if (parse_PLAY(line, &(*play_list)[n]) == false) return false; + if (! get_any_line(fin, list, "PLAY", n)) + return false; + if (! parse_PLAY(list, &(*play_list)[n])) + return false; - if (! fgets(line, sizeof(line), fp)) return false; - if (parse_TRACE(line, &(*trace_list)[n]) == false) return false; + if (! get_any_line(fin, list, "TRACE", n)) + return false; + if (! parse_TRACE(list, &(*trace_list)[n])) + return false; } } - fclose(fp); - return 1; -} - - -bool parse_NUMBER(char * line, int * number) -{ -#ifdef DEBUG - printf("parse_NUMBER: Got line '%s'\n", line); -#endif - int pos = 0; - if (consume_tag(line, &pos, "NUMBER") == false) return false; -#ifdef DEBUG - printf("parse_NUMBER: Got tag 'NUMBER'\n"); -#endif - - if (consume_int(line, &pos, number) == false) return false; -#ifdef DEBUG - printf("parse_NUMBER: Read number %d\n", * number); -#endif + fin.close(); return true; } bool parse_PBN( - char * line, - int * dealer, - int * vul, + const vector& list, + int& dealer, + int& vul, dealPBN * dl) { -#ifdef DEBUG - printf("parse_PBN: Got line '%s'\n", line); -#endif - int pos = 0; - if (consume_tag(line, &pos, "PBN") == false) return false; -#ifdef DEBUG - printf("parse_PBN: Got tag 'PBN'\n"); -#endif - - if (consume_int(line, &pos, dealer) == false) return false; -#ifdef DEBUG - printf("parse_PBN: Read dealer %d\n", * dealer); -#endif - - if (consume_int(line, &pos, vul) == false) return false; -#ifdef DEBUG - printf("parse_PBN: Read vul %d\n", * dealer); -#endif + if (list.size() != 9) + { + cout << "PBN list does not have 9 elements: " << list.size() << "\n"; + return false; + } - if (consume_int(line, &pos, &dl->trump) == false) return false; -#ifdef DEBUG - printf("parse_PBN: Read trump %d\n", dl->trump); -#endif + if (! get_head_element(list[0], "PBN")) + return false; + if (! get_int_element(list[1], dealer, "PBN dealer failed")) + return false; + if (! get_int_element(list[2], vul, "PBN vul failed")) + return false; + if (! get_int_element(list[3], dl->trump, "PBN trump failed")) + return false; + if (! get_int_element(list[4], dl->first, "PBN trump failed")) + return false; - if (consume_int(line, &pos, &dl->first) == false) return false; -#ifdef DEBUG - printf("parse_PBN: Read first %d\n", dl->first); -#endif + for (int i = 0; i < 3; i++) + { + dl->currentTrickSuit[i] = 0; + dl->currentTrickRank[i] = 0; + } - if (consume_string(line, &pos, dl->remainCards) == false) + if (! strip_quotes( + list[5] + " " + list[6] + " " + list[7] + " " + list[8], + dl->remainCards, "PBN string")) return false; -#ifdef DEBUG - printf("parse_PBN: Read string '%s'\n", dl->remainCards); -#endif return true; } -bool parse_FUT(char * line, futureTricks * fut) +bool parse_FUT( + const vector& list, + futureTricks * fut) { -#ifdef DEBUG - printf("parse_FUT: Got line '%s'\n", line); -#endif - int pos = 0; - if (consume_tag(line, &pos, "FUT") == false) return false; -#ifdef DEBUG - printf("parse_FUT: Got tag 'FUT'\n"); -#endif - - if (consume_int(line, &pos, &fut->cards) == false) return false; -#ifdef DEBUG - printf("parse_FUT: Read cards %d\n", fut->cards); -#endif - - for (int c = 0; c < fut->cards; c++) + if (list.size() < 2) { - if (consume_int(line, &pos, &fut->suit[c]) == false) return false; -#ifdef DEBUG - printf("parse_FUT: Read suit[%d]: %d\n", c, fut->suit[c]); -#endif + cout << "PBN list does not have 2+ elements: " << list.size() << endl; + return false; } - for (int c = 0; c < fut->cards; c++) - { - if (consume_int(line, &pos, &fut->rank[c]) == false) return false; -#ifdef DEBUG - printf("parse_FUT: Read rank[%d]: %d\n", c, fut->rank[c]); -#endif - } + if (! get_head_element(list[0], "FUT")) + return false; + if (! get_int_element(list[1], fut->cards, "FUT cards")) + return false; - for (int c = 0; c < fut->cards; c++) + if (static_cast(list.size()) != 4 * fut->cards + 2) { - if (consume_int(line, &pos, &fut->equals[c]) == false) return false; -#ifdef DEBUG - printf("parse_FUT: Read equals[%d]: %d\n", c, fut->equals[c]); -#endif + cout << "PBN list does not have right length: " << list.size() << endl; + return false; } - for (int c = 0; c < fut->cards; c++) - { - if (consume_int(line, &pos, &fut->score[c]) == false) return false; -#ifdef DEBUG - printf("parse_FUT: Read score[%d]: %d\n", c, fut->score[c]); -#endif - } + const int n = fut->cards; + for (int c = 0; c < n; c++) + if (! get_int_element(list[c+2], fut->suit[c], "FUT suit")) + return false; + + for (int c = 0; c < n; c++) + if (! get_int_element(list[c+n+2], fut->rank[c], "FUT rank")) + return false; + + for (int c = 0; c < n; c++) + if (! get_int_element(list[c+2*n+2], fut->equals[c], "FUT equals")) + return false; + + for (int c = 0; c < n; c++) + if (! get_int_element(list[c+3*n+2], fut->score[c], "FUT score")) + return false; return true; } -bool parse_TABLE(char * line, ddTableResults * table) +bool parse_TABLE( + const vector& list, + ddTableResults * table) { - int pos = 0; - if (consume_tag(line, &pos, "TABLE") == false) return false; -#ifdef DEBUG - printf("parse_FUT: Got tag 'TABLE'\n"); -#endif + if (list.size() != 21) + { + cout << "Table list does not have 21 elements: " << list.size() << endl; + return false; + } + + if (! get_head_element(list[0], "TABLE")) + return false; - for (int suit = 0; suit <= 4; suit++) + for (int suit = 0; suit < DDS_STRAINS; suit++) { - for (int pl = 0; pl <= 3; pl++) + for (int pl = 0; pl < DDS_HANDS; pl++) { - if (consume_int(line, &pos, &table->resTable[suit][pl]) == false) + if (! get_int_element(list[DDS_HANDS * suit + pl + 1], + table->resTable[suit][pl], "TABLE entry")) return false; -#ifdef DEBUG - printf("parse_TABLE: Read table[%d][%d] = %d\n", - suit, pl, table->resTable[suit][pl]); -#endif } } + return true; } -bool parse_PAR(char * line, parResults * par) +bool parse_PAR( + const vector& list, + parResults * par) { -#ifdef DEBUG - printf("parse_PAR: Got line '%s'\n", line); -#endif + if (list.size() < 9) + { + cout << "PAR list does not have 9+ elements: " << list.size() << endl; + return false; + } - int pos = 0; - if (consume_tag(line, &pos, "PAR") == false) return false; -#ifdef DEBUG - printf("parse_PAR: Got tag 'PAR'\n"); -#endif + if (! get_head_element(list[0], "PAR")) + return false; - if (consume_string(line, &pos, par->parScore[0]) == false) + if (! strip_quotes(list[1] + " " + list[2], par->parScore[0], + "PAR score 0")) return false; -#ifdef DEBUG - printf("parse_PAR: Read string '%s'\n", par->parScore[0]); -#endif - if (consume_string(line, &pos, par->parScore[1]) == false) + if (! strip_quotes(list[3] + " " + list[4], par->parScore[1], + "PAR score 1")) return false; -#ifdef DEBUG - printf("parse_PAR: Read string '%s'\n", par->parScore[1]); -#endif - if (consume_string(line, &pos, par->parContractsString[0]) == false) + unsigned i = 5; + string st = ""; + while (i < list.size()) + { + st += " " + list[i++]; + if (st.back() == '"') + break; + } + + if (! strip_quotes(st.substr(1), par->parContractsString[0], + "PAR contract 0")) return false; -#ifdef DEBUG - printf("parse_PAR: Read string '%s'\n", par->parContractsString[0]); -#endif - if (consume_string(line, &pos, par->parContractsString[1]) == false) + st = ""; + while (i < list.size()) + { + st += " " + list[i++]; + if (st.back() == '"') + break; + } + + if (! strip_quotes(st.substr(1), par->parContractsString[1], + "PAR contract 1")) return false; -#ifdef DEBUG - printf("parse_PAR: Read string '%s'\n", par->parContractsString[1]); -#endif return true; } -bool parse_DEALERPAR(char * line, parResultsDealer * par) +bool parse_DEALERPAR( + const vector& list, + parResultsDealer * par) { -#ifdef DEBUG - printf("parse_DEALERPAR: Got line '%s'\n", line); -#endif - - int pos = 0; - if (consume_tag(line, &pos, "PAR2") == false) return false; -#ifdef DEBUG - printf("parse_DEALERPAR: Got tag 'PAR2'\n"); -#endif + if (list.size() < 3) + { + cout << "PAR2 list does not have 3+ elements: " << list.size() << endl; + return false; + } - char str[256]; - if (consume_string(line, &pos, str) == false) + if (! get_head_element(list[0], "PAR2")) return false; -#ifdef DEBUG - printf("parse_DEALERPAR: Read string '%s'\n", str); -#endif - if (sscanf(str, "%d", &par->score) != 1) + + if (! strip_quotes(list[1], par->score, "PBN string")) return false; -#ifdef DEBUG - printf("parse_DEALERPAR: Read string '%s', number %d\n", - str, par->score); -#endif int no = 0; while (1) { - if (consume_string(line, &pos, par->contracts[no]) == false) + if (! strip_quotes(list[no+2], par->contracts[no], "PAR2 contract")) break; -#ifdef DEBUG - printf("parse_DEALERPAR: Read string number %d, '%s'\n", - no, par->contracts[no]); -#endif no++; } par->number = no; -#ifdef DEBUG - printf("parse_DEALERPAR: Read to number incl %d\n", no - 1); -#endif - return true; } -bool parse_PLAY(char * line, playTracePBN * playp) +bool parse_PLAY( + const vector& list, + playTracePBN * playp) { -#ifdef DEBUG - printf("parse_PLAY: Got line '%s'\n", line); -#endif + if (list.size() != 3) + { + cout << "PLAY list does not have 3 elements: " << list.size() << endl; + return false; + } - int pos = 0; - if (consume_tag(line, &pos, "PLAY") == false) return false; -#ifdef DEBUG - printf("parse_PLAY: Got tag 'PLAY', pos now %d\n", pos); -#endif + if (! get_head_element(list[0], "PLAY")) + return false; - if (consume_int(line, &pos, &playp->number) == false) return false; -#ifdef DEBUG - printf("parse_PLAY: Read number %d\n", playp->number); -#endif + if (! get_int_element(list[1], playp->number, "PLAY number")) + return false; - if (consume_string(line, &pos, playp->cards) == false) + if (! strip_quotes(list[2], playp->cards, "PLAY string")) return false; -#ifdef DEBUG - printf("parse_PLAY: Read cards '%s'\n", playp->cards); -#endif return true; } -bool parse_TRACE(char * line, solvedPlay * solvedp) +bool parse_TRACE( + const vector& list, + solvedPlay * solvedp) { -#ifdef DEBUG - printf("parse_TRACE: Got line '%s'\n", line); -#endif + if (list.size() < 2) + { + cout << "TRACE list does not have 2+ elements: " << list.size() << endl; + return false; + } - int pos = 0; - if (consume_tag(line, &pos, "TRACE") == false) return false; -#ifdef DEBUG - printf("parse_TRACE: Got tag 'TRACE'\n"); -#endif + if (! get_head_element(list[0], "TRACE")) + return false; - if (consume_int(line, &pos, &solvedp->number) == false) return false; -#ifdef DEBUG - printf("parse_TRACE: Read number %d\n", solvedp->number); -#endif + if (! get_int_element(list[1], solvedp->number, "TRACE number")) + return false; for (int i = 0; i < solvedp->number; i++) - { - if (consume_int(line, &pos, &solvedp->tricks[i]) == false) + if (! get_int_element(list[2+i], solvedp->tricks[i], "TRACE element")) return false; -#ifdef DEBUG - printf("parse_TRACE: Read tricks[%d] = %d\n", i, solvedp->tricks[i]); -#endif - } + return true; } -bool parseable_GIB(char line[]) +bool parseable_GIB(const string& line) { - if (strlen(line) != 89) + if (line.size() != 89) return false; - if (line[67] != ':') + if (line.substr(67, 1) != ":") return false; return true; @@ -525,28 +504,27 @@ bool parseable_GIB(char line[]) int GIB_TO_DDS[4] = {1, 0, 3, 2}; -bool parse_GIB(char line[], dealPBN * dl, ddTableResults * table) +bool parse_GIB( + const string& line, + dealPBN * dl, + ddTableResults * table) { - strcpy(dl->remainCards, "W:"); - strncpy(dl->remainCards + 2, line, 67); - dl->remainCards[69] = '\0'; + string st = "W:" + line.substr(0, 67); + strcpy(dl->remainCards, st.c_str()); - int zero = static_cast('0'); - int leta = static_cast('A') - 10; int dds_strain, dds_hand; - for (int s = 0; s < DDS_STRAINS; s++) { dds_strain = (s == 0 ? 4 : s - 1); for (int h = 0; h < DDS_HANDS; h++) { dds_hand = GIB_TO_DDS[h]; - char c = line[68 + 4 * s + h]; + const char * c = line.substr(68 + 4*s + h, 1).c_str(); int d; - if (c >= '0' && c <= '9') - d = static_cast (line[68 + 4 * s + h] - zero); - else if (c >= 'A' && c <= 'F') - d = static_cast (line[68 + 4 * s + h] - leta); + if (c[0] >= '0' && c[0] <= '9') + d = static_cast (c[0] - '0'); + else if (c[0] >= 'A' && c[0] <= 'F') + d = static_cast (c[0] + 10 - 'A'); else return false; @@ -560,77 +538,153 @@ bool parse_GIB(char line[], dealPBN * dl, ddTableResults * table) } -bool consume_int( - char * line, - int * pos, - int * res) +bool get_any_line( + ifstream& fin, + vector& list, + const string& tag, + const int n) { - /* Too much Perl programming spoils one... No doubt there - is a good way to do this in C. */ - - int len = static_cast(strlen(line)); - int i = * pos; - int value = 0; - while (i < len && - static_cast(line[i]) >= ZERO && - static_cast(line[i]) <= NINE) + string line; + if (! getline(fin, line)) { - value = 10 * value + static_cast(line[i++]) - ZERO; + cout << "Expected txt " << tag << " line " << n << endl; + return false; } - if (static_cast(line[i]) != SPACE) + + list.clear(); + splitIntoWords(line, list); + return true; +} + + +bool get_head_element( + const string& elem, + const string& expected) +{ + if (elem != expected) { - printf("Doesn't end on space\n"); + cout << "PBN list does not start with " << expected << + ": '" << elem << "'" << endl; return false; } - *pos = i + 1; - *res = value; - return true; + else + return true; } -bool consume_string( - char * line, - int * pos, - char * res) + +bool get_int_element( + const string& elem, + int& res, + const string& errtext) { - int len = static_cast(strlen(line)); - int i = * pos; + if (! str2int(elem, res)) + { + cout << errtext << ": '" << elem << "'\n"; + return false; + } + else + return true; +} + + +bool strip_quotes( + const string& st, + char * cstr, + const string& errtag) +{ + // Could just be past the last one. + if (st.size() == 0) + return false; + + if (st.front() != '\"' || st.back() != '\"') + { + cout << errtag << " not in quotations: '" << st << "'\n"; + return false; + } + strcpy(cstr, st.substr(1, st.size()-2).c_str()); + return true; +} - if (static_cast(line[i]) != QUOTE) return false; - i++; - while (i < len && static_cast(line[i]) != QUOTE) - i++; +bool strip_quotes( + const string& st, + int& res, + const string& errtag) +{ + if (st.front() != '\"' || st.back() != '\"') + { + cout << errtag << " not in quotations: '" << st << "'" << endl; + return false; + } - if (static_cast(line[i] ) != QUOTE) return false; - if (static_cast(line[i + 1]) != SPACE) return false; - i += 2; + if (! str2int(st.substr(1, st.size()-2).c_str(), res)) + { + cout << st << " not an int" << endl; + return false; + } - strncpy(res, line + *pos + 1, static_cast(i - *pos - 3)); - res[i - *pos - 3] = '\0'; - *pos = i; return true; } -bool consume_tag( - char * line, - int * pos, - const char * tag) +void splitIntoWords( + const string& text, + vector& words) { - int len = static_cast(strlen(line)); - int i = * pos; - char read[80] = ""; + // Split into words (split on \s+, effectively). + unsigned pos = 0; + unsigned startPos = 0; + bool isSpace = true; + const unsigned l = static_cast(text.length()); - while (i < len && static_cast(line[i]) != SPACE) + while (pos < l) { - i++; + if (text.at(pos) == ' ') + { + if (! isSpace) + { + words.push_back(text.substr(startPos, pos-startPos)); + isSpace = true; + } + } + else if (isSpace) + { + isSpace = false; + startPos = pos; + } + pos++; } - i++; - strncpy(read, line + *pos, static_cast(i - *pos - 1)); - if (strcmp(read, tag)) return false; + if (! isSpace) + words.push_back(text.substr(startPos, pos-startPos)); +} + + +bool str2int( + const string& text, + int& res) +{ + int i; + size_t pos; + try + { + i = stoi(text, &pos); + if (pos != text.size()) + return false; + + } + catch (const invalid_argument& ia) + { + UNUSED(ia); + return false; + } + catch (const out_of_range& ia) + { + UNUSED(ia); + return false; + } - *pos = i; + res = i; return true; } diff --git a/test/parse.h b/test/parse.h index df43ba39..a849dd16 100644 --- a/test/parse.h +++ b/test/parse.h @@ -10,19 +10,26 @@ #ifndef DTEST_PARSE_H #define DTEST_PARSE_H +#include + +#include "../include/dll.h" + +using namespace std; + + bool read_file( - char const * fname, - int * number, + const string& fname, + int& number, + bool& GIBmode, int ** dealer_list, int ** vul_list, - struct dealPBN ** deal_list, - struct futureTricks ** fut_list, - struct ddTableResults ** table_list, - struct parResults ** par_list, - struct parResultsDealer ** dealerpar_list, - struct playTracePBN ** play_list, - struct solvedPlay ** trace_list, - bool& GIBmode); + dealPBN ** deal_list, + futureTricks ** fut_list, + ddTableResults ** table_list, + parResults ** par_list, + parResultsDealer ** dealerpar_list, + playTracePBN ** play_list, + solvedPlay ** trace_list); #endif diff --git a/test/testcommon.cpp b/test/testcommon.cpp index cd9d92ff..5409270e 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -200,9 +200,9 @@ int realMain(int argc, char * argv[]) solvedPlay * trace_list; int number; - if (read_file(options.fname.c_str(), &number, &dealer_list, &vul_list, + if (read_file(options.fname, number, GIBmode, &dealer_list, &vul_list, &deal_list, &fut_list, &table_list, &par_list, &dealerpar_list, - &play_list, &trace_list, GIBmode) == false) + &play_list, &trace_list) == false) { printf("read_file failed.\n"); exit(0); @@ -727,6 +727,8 @@ bool loop_par( if (! compare_PAR(&presp, &par_list[i])) { printf("loop_par i %d: Difference\n", i); + print_PAR(&presp); + print_PAR(&par_list[i]); } } From 315ee1c544b832c69a181c9a7d8ea74b1f2c095f Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Mon, 2 Apr 2018 15:58:37 +0200 Subject: [PATCH 120/132] Now does GIB as well --- test/parse.cpp | 22 +++++++--------------- test/testcommon.cpp | 4 ---- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/test/parse.cpp b/test/parse.cpp index aae3aa1c..e47420ad 100644 --- a/test/parse.cpp +++ b/test/parse.cpp @@ -16,8 +16,6 @@ using namespace std; -// #define DEBUG - bool parse_PBN( const vector& list, @@ -139,6 +137,7 @@ bool read_file( else { // Count the lines, then start over. + GIBmode = 1; number = 1; while (1) { @@ -208,13 +207,6 @@ bool read_file( { for (int n = 0; n < number; n++) { -#ifdef DEBUG - cout << "Starting to read hand number " << n << "\n"; - cout << string(31, '-') << "\n"; - cout << "play_list[" << n << "].number = " << - (*play_list)[n].number << "\n"; -#endif - if (! get_any_line(fin, list, "PBN", n)) return false; if (! parse_PBN(list, (*dealer_list)[n], @@ -493,7 +485,7 @@ bool parse_TRACE( bool parseable_GIB(const string& line) { - if (line.size() != 89) + if (line.size() != 88) return false; if (line.substr(67, 1) != ":") @@ -519,12 +511,12 @@ bool parse_GIB( for (int h = 0; h < DDS_HANDS; h++) { dds_hand = GIB_TO_DDS[h]; - const char * c = line.substr(68 + 4*s + h, 1).c_str(); + char const c = (line.substr(68 + 4*s + h, 1).c_str())[0]; int d; - if (c[0] >= '0' && c[0] <= '9') - d = static_cast (c[0] - '0'); - else if (c[0] >= 'A' && c[0] <= 'F') - d = static_cast (c[0] + 10 - 'A'); + if (c >= 48 && c <= 57) // 0, 9 + d = c-48; + else if (c >= 65 && c <= 70) // A, F + d = c-55; else return false; diff --git a/test/testcommon.cpp b/test/testcommon.cpp index 5409270e..21781a14 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -725,11 +725,7 @@ bool loop_par( } if (! compare_PAR(&presp, &par_list[i])) - { printf("loop_par i %d: Difference\n", i); - print_PAR(&presp); - print_PAR(&par_list[i]); - } } return true; From f63dbd736944ec7a6d42cdeb5356be4f76f85120 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Mon, 2 Apr 2018 18:35:07 +0200 Subject: [PATCH 121/132] Split out compare.cpp --- test/Makefiles/own_sources.txt | 1 + test/compare.cpp | 124 ++++++++++++++++++++++++++++++ test/compare.h | 38 +++++++++ test/dtest.cpp | 2 - test/testcommon.cpp | 136 ++------------------------------- 5 files changed, 169 insertions(+), 132 deletions(-) create mode 100644 test/compare.cpp create mode 100644 test/compare.h diff --git a/test/Makefiles/own_sources.txt b/test/Makefiles/own_sources.txt index be38bcb1..81533e2a 100644 --- a/test/Makefiles/own_sources.txt +++ b/test/Makefiles/own_sources.txt @@ -1,5 +1,6 @@ DTEST_SOURCE_FILES = \ args.cpp \ + compare.cpp \ parse.cpp \ testcommon.cpp \ TestTimer.cpp diff --git a/test/compare.cpp b/test/compare.cpp new file mode 100644 index 00000000..dd0d5336 --- /dev/null +++ b/test/compare.cpp @@ -0,0 +1,124 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#include + +#include "../include/dll.h" + +using namespace std; + + +bool compare_PBN( + const dealPBN& dl1, + const dealPBN& dl2) +{ + if (dl1.trump != dl2.trump) + return false; + if (dl1.first != dl2.first) + return false; + if (strcmp(dl1.remainCards, dl2.remainCards)) + return false; + + return true; +} + + +bool compare_FUT( + const futureTricks& fut1, + const futureTricks& fut2) +{ + if (fut1.cards != fut2.cards) + return false; + + for (int i = 0; i < fut1.cards; i++) + { + if (fut1.suit[i] != fut2.suit[i]) + return false; + if (fut1.rank[i] != fut2.rank[i]) + return false; + if (fut1.equals[i] != fut2.equals[i]) + return false; + if (fut1.score[i] != fut2.score[i]) + return false; + } + + return true; +} + + +bool compare_TABLE( + const ddTableResults& table1, + const ddTableResults& table2) +{ + for (int suit = 0; suit < DDS_SUITS; suit++) + { + for (int pl = 0; pl < DDS_HANDS; pl++) + if (table1.resTable[suit][pl] != table2.resTable[suit][pl]) + return false; + } + + return true; +} + + +bool compare_PAR( + const parResults& par1, + const parResults& par2) +{ + if (strcmp(par1.parScore[0], par2.parScore[0])) + return false; + if (strcmp(par1.parScore[1], par2.parScore[1])) + return false; + if (strcmp(par1.parContractsString[0], par2.parContractsString[0])) + return false; + if (strcmp(par1.parContractsString[1], par2.parContractsString[1])) + return false; + + return true; +} + + +bool compare_DEALERPAR( + const parResultsDealer& par1, + const parResultsDealer& par2) +{ + if (par1.score != par2.score) + return false; + + for (int i = 0; i < par1.number; i++) + if (strcmp(par1.contracts[i], par2.contracts[i])) + return false; + + return true; +} + + +bool compare_TRACE( + const solvedPlay& trace1, + const solvedPlay& trace2) +{ + // In a buglet, Trace returned trace1 == -3 if there is + // no input at all (trace2 is then 0). + if (trace1.number != trace2.number && trace2.number > 0) + return false; + + // Once that was fixed, the input file had length 0, not 1. + if (trace1.number == 1 && trace2.number == 0) + return true; + + for (int i = 0; i < trace1.number; i++) + { + if (trace1.tricks[i] != trace2.tricks[i]) + return false; + } + + return true; +} + diff --git a/test/compare.h b/test/compare.h new file mode 100644 index 00000000..88b8fdc7 --- /dev/null +++ b/test/compare.h @@ -0,0 +1,38 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DTEST_COMPARE_H +#define DTEST_COMPARE_H + +bool compare_PBN( + const dealPBN& dl1, + const dealPBN& dl2); + +bool compare_FUT( + const futureTricks& fut1, + const futureTricks& fut2); + +bool compare_TABLE( + const ddTableResults& table1, + const ddTableResults& table2); + +bool compare_PAR( + const parResults& par1, + const parResults& par2); + +bool compare_DEALERPAR( + const parResultsDealer& par1, + const parResultsDealer& par2); + +bool compare_TRACE( + const solvedPlay& trace1, + const solvedPlay& trace2); + +#endif + diff --git a/test/dtest.cpp b/test/dtest.cpp index fc908452..44e23b49 100644 --- a/test/dtest.cpp +++ b/test/dtest.cpp @@ -9,8 +9,6 @@ #include -#include -#include #include "../include/dll.h" #include "testcommon.h" diff --git a/test/testcommon.cpp b/test/testcommon.cpp index 21781a14..7bae4e3b 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -17,6 +17,7 @@ #include "../include/portab.h" #include "TestTimer.h" #include "parse.h" +#include "compare.h" #include "cst.h" #include "testcommon.h" @@ -36,30 +37,6 @@ void main_identify(); void set_constants(); -bool compare_PBN( - struct dealPBN * dl1, - struct dealPBN * dl2); - -bool compare_FUT( - struct futureTricks * fut1, - struct futureTricks * fut2); - -bool compare_TABLE( - struct ddTableResults * table1, - struct ddTableResults * table2); - -bool compare_PAR( - struct parResults * par1, - struct parResults * par2); - -bool compare_DEALERPAR( - struct parResultsDealer * par1, - struct parResultsDealer * par2); - -bool compare_TRACE( - struct solvedPlay * trace1, - struct solvedPlay * trace2); - bool print_PBN( struct dealPBN * dl); @@ -350,107 +327,6 @@ void set_constants() } -bool compare_PBN(dealPBN * dl1, dealPBN * dl2) -{ - if (dl1->trump != dl2->trump) return false; - if (dl1->first != dl2->first) return false; - if (strcmp(dl1->remainCards, dl2->remainCards)) return false; - return true; -} - - -bool compare_FUT(futureTricks * fut1, futureTricks * fut2) -{ - if (fut1->cards != fut2->cards) - return false; - - for (int i = 0; i < fut1->cards; i++) - { - if (fut1->suit [i] != fut2->suit [i]) return false; - if (fut1->rank [i] != fut2->rank [i]) return false; - if (fut1->equals[i] != fut2->equals[i]) return false; - if (fut1->score [i] != fut2->score [i]) return false; - } - return true; -} - - -bool compare_TABLE(ddTableResults * table1, ddTableResults * table2) -{ - for (int suit = 0; suit <= 4; suit++) - { - for (int pl = 0; pl <= 3; pl++) - { - if (table1->resTable[suit][pl] != table2->resTable[suit][pl]) - return false; - } - } - return true; -} - - -bool compare_PAR( - parResults * par1, - parResults * par2) -{ - if (strcmp(par1->parScore[0], par2->parScore[0])) return false; - if (strcmp(par1->parScore[1], par2->parScore[1])) return false; - - if (strcmp(par1->parContractsString[0], - par2->parContractsString[0])) - return false; - if (strcmp(par1->parContractsString[1], - par2->parContractsString[1])) - return false; - return true; -} - - -bool compare_DEALERPAR( - parResultsDealer * par1, - parResultsDealer * par2) -{ - if (par1->score != par2->score) return false; - - for (int i = 0; i < par1->number; i++) - { - if (strcmp(par1->contracts[i], par2->contracts[i])) - return false; - } - return true; -} - - -bool compare_TRACE( - solvedPlay * trace1, - solvedPlay * trace2) -{ - // In a buglet, Trace returned trace1 == -3 if there is - // no input at all (trace2 is then 0). - if (trace1->number != trace2->number && - trace2->number > 0) - { - printf("number %d != %d\n", trace1->number, trace2->number); - return false; - } - - // Once that was fixed, the input file had length 0, not 1. - if (trace1->number == 1 && trace2->number == 0) - return true; - - for (int i = 0; i < trace1->number; i++) - { - if (trace1->tricks[i] != trace2->tricks[i]) - { - printf("i %d: %d != %d\n", i, trace1->tricks[i], - trace2->tricks[i]); - return false; - } - } - return true; -} - - bool print_PBN(dealPBN * dl) { printf("%10s %d\n", "trump", dl->trump); @@ -633,7 +509,7 @@ void loop_solve( for (int j = 0; j < count; j++) { - if (! compare_FUT(&solvedbdp->solvedBoard[j], &fut_list[i + j])) + if (! compare_FUT(solvedbdp->solvedBoard[j], fut_list[i + j])) printf("loop_solve i %d, j %d: Difference\n", i, j); } } @@ -683,7 +559,7 @@ bool loop_calc( #endif for (int j = 0; j < count; j++) - if (! compare_TABLE(&resp->results[j], &table_list[i + j])) + if (! compare_TABLE(resp->results[j], table_list[i + j])) { printf("loop_calc table i %d, j %d: Difference\n", i, j); print_TABLE( &resp->results[j] ); @@ -724,7 +600,7 @@ bool loop_par( } } - if (! compare_PAR(&presp, &par_list[i])) + if (! compare_PAR(presp, par_list[i])) printf("loop_par i %d: Difference\n", i); } @@ -759,7 +635,7 @@ bool loop_dealerpar( } } - if (! compare_DEALERPAR(&presp, &dealerpar_list[i])) + if (! compare_DEALERPAR(presp, dealerpar_list[i])) { printf("loop_dealerpar i %d: Difference\n", i); } @@ -820,7 +696,7 @@ bool loop_play( for (int j = 0; j < count; j++) { - if (! compare_TRACE(&solvedplp->solved[j], &trace_list[i + j])) + if (! compare_TRACE(solvedplp->solved[j], trace_list[i + j])) { printf("loop_play i %d, j %d: Difference\n", i, j); print_double_TRACE(&solvedplp->solved[j], &trace_list[i+j]); From 298aa8ffdc3ed4ace97371b6f3b7ae32cbc98664 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Mon, 2 Apr 2018 19:52:55 +0200 Subject: [PATCH 122/132] Split out print.cpp --- test/Makefiles/own_sources.txt | 1 + test/parse.cpp | 1 + test/print.cpp | 159 ++++++++++++++++++++++++++++ test/print.h | 42 ++++++++ test/testcommon.cpp | 182 ++------------------------------- 5 files changed, 211 insertions(+), 174 deletions(-) create mode 100644 test/print.cpp create mode 100644 test/print.h diff --git a/test/Makefiles/own_sources.txt b/test/Makefiles/own_sources.txt index 81533e2a..78de66a8 100644 --- a/test/Makefiles/own_sources.txt +++ b/test/Makefiles/own_sources.txt @@ -2,5 +2,6 @@ DTEST_SOURCE_FILES = \ args.cpp \ compare.cpp \ parse.cpp \ + print.cpp \ testcommon.cpp \ TestTimer.cpp diff --git a/test/parse.cpp b/test/parse.cpp index e47420ad..492bbcc1 100644 --- a/test/parse.cpp +++ b/test/parse.cpp @@ -88,6 +88,7 @@ bool str2int( int& res); +#include "print.h" bool read_file( const string& fname, int& number, diff --git a/test/print.cpp b/test/print.cpp new file mode 100644 index 00000000..0ed1ff6c --- /dev/null +++ b/test/print.cpp @@ -0,0 +1,159 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#include +#include +#include + +#include "print.h" +#include "cst.h" + + +extern unsigned short dbitMapRank[16]; +extern unsigned char dcardRank[16]; +extern unsigned char dcardSuit[5]; + +string equals_to_string(const int equals); + + +void print_PBN(const dealPBN& dl) +{ + cout << setw(10) << left << "trump" << dl.trump << "\n"; + cout << setw(10) << "first" << dl.first << "\n"; + cout << setw(10) << "cards" << dl.remainCards << "\n"; +} + + +void print_FUT(const futureTricks& fut) +{ + cout << setw(6) << left << "cards" << fut.cards << "\n"; + cout << setw(6) << right << "No." << + setw(7) << "suit" << + setw(7) << "rank" << + setw(7) << "equals" << + setw(7) << "score" << "\n"; + + for (int i = 0; i < fut.cards; i++) + { + cout << setw(6) << right << i << + setw(7) << dcardSuit[ fut.suit[i] ] << + setw(7) << dcardRank[ fut.rank[i] ] << + setw(7) << equals_to_string(fut.equals[i]) << + setw(7) << fut.score[i] << "\n"; + } +} + + +string equals_to_string(const int equals) +{ + string st = ""; + for (int i = 15; i >= 2; i--) + { + if (equals & dbitMapRank[i]) + st += dcardRank[i]; + } + return (st == "" ? "-" : st); +} + + +void print_TABLE(const ddTableResults& table) +{ + cout << setw(5) << right << "" << + setw(6) << "North" << + setw(6) << "South" << + setw(6) << "East" << + setw(6) << "West" << "\n"; + + cout << setw(5) << right << "NT" << + setw(6) << table.resTable[4][0] << + setw(6) << table.resTable[4][2] << + setw(6) << table.resTable[4][1] << + setw(6) << table.resTable[4][3] << "\n"; + + for (int suit = 0; suit <= 3; suit++) + { + cout << setw(5) << right << dcardSuit[suit] << + setw(6) << table.resTable[suit][0] << + setw(6) << table.resTable[suit][2] << + setw(6) << table.resTable[suit][1] << + setw(6) << table.resTable[suit][3] << "\n"; + } +} + + +void print_PAR(const parResults& par) +{ + cout << setw(9) << left << "NS score" << par.parScore[0] << "\n"; + cout << setw(9) << "EW score" << par.parScore[1] << "\n"; + cout << setw(9) << "NS list" << par.parContractsString[0] << "\n"; + cout << setw(9) << "EW list" << par.parContractsString[1] << "\n"; +} + + +void print_DEALERPAR(const parResultsDealer& par) +{ + cout << setw(6) << left << "Score" << par.score << "\n"; + cout << setw(6) << left << "Pars" << par.number << "\n"; + + for (int i = 0; i < par.number; i++) + cout << left << "Par " << setw(2) << i << par.contracts[i] << "\n"; +} + + +void print_PLAY(const playTracePBN& play) +{ + cout << setw(6) << right << "Number" << + setw(5) << play.number << "\n"; + + for (int i = 0; i < play.number; i++) + cout << setw(6) << i << " " << + play.cards[2*i] << play.cards[2*i+1] << "\n"; +} + + +void print_TRACE(const solvedPlay& solved) +{ + cout << setw(6) << right << "Number" << + setw(5) << solved.number << "\n"; + + for (int i = 0; i < solved.number; i++) + cout << setw(6) << i << + setw(5) << solved.tricks[i] << "\n"; +} + + +void print_double_TRACE( + const solvedPlay& solved, + const solvedPlay& ref) +{ + cout << "Number solved vs ref: " << solved.number << " vs. " << + ref.number << "\n"; + + const int m = min(solved.number, ref.number); + for (int i = 0; i < m; i++) + { + cout << "Trick " << i << ": " << + solved.tricks[i] << " vs " << + ref.tricks[i] << + (solved.tricks[i] == ref.tricks[i] ? "" : " ERROR") << "\n"; + } + + if (solved.number > m) + { + for (int i = m; i < solved.number; i++) + cout << "Solved " << i << ": " << solved.tricks[i] << "\n"; + } + else if (ref.number > m) + { + for (int i = m; i < ref.number; i++) + cout << "Ref " << i << ": " << ref.tricks[i] << "\n"; + } +} + diff --git a/test/print.h b/test/print.h new file mode 100644 index 00000000..558749c3 --- /dev/null +++ b/test/print.h @@ -0,0 +1,42 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#ifndef DTEST_PRINT_H +#define DTEST_PRINT_H + +#include + +#include "../include/dll.h" + +using namespace std; + + +void print_PBN(const dealPBN& dl); + +void print_FUT(const futureTricks& fut); + +string equals_to_string(const int equals); + +void print_TABLE(const ddTableResults& table); + +void print_PAR(const parResults& par); + +void print_DEALERPAR(const parResultsDealer& par); + +void print_PLAY(const playTracePBN& play); + +void print_TRACE(const solvedPlay& solved); + +void print_double_TRACE( + const solvedPlay& solved, + const solvedPlay& ref); + +#endif + diff --git a/test/testcommon.cpp b/test/testcommon.cpp index 7bae4e3b..d2fb9d80 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -15,11 +15,13 @@ #include "../include/dll.h" #include "../include/portab.h" + +#include "testcommon.h" #include "TestTimer.h" #include "parse.h" #include "compare.h" +#include "print.h" #include "cst.h" -#include "testcommon.h" using namespace std; @@ -28,8 +30,7 @@ extern OptionsType options; TestTimer timer; -void print_rank_count(); -unsigned short int dbitMapRank[16]; +unsigned short dbitMapRank[16]; unsigned char dcardRank[16]; unsigned char dcardSuit[5]; @@ -37,31 +38,6 @@ void main_identify(); void set_constants(); -bool print_PBN( - struct dealPBN * dl); - -bool print_FUT( - struct futureTricks * fut); - -void equals_to_string( - int equals, - char * res); - -bool print_TABLE( - struct ddTableResults * table); - -bool print_PAR( - struct parResults * par); - -bool print_DEALERPAR( - struct parResultsDealer * par); - -bool print_PLAY( - struct playTracePBN * play); - -bool print_TRACE( - struct solvedPlay * solvedp); - void loop_solve( struct boardsPBN * bop, struct solvedBoards * solvedbdp, @@ -189,7 +165,7 @@ int realMain(int argc, char * argv[]) { if (GIBmode) { - printf("GIB file does not work with solve\n"); + printf("GIB file only works works with calc\n"); exit(0); } loop_solve(&bop, &solvedbdp, deal_list, fut_list, number); @@ -327,148 +303,6 @@ void set_constants() } -bool print_PBN(dealPBN * dl) -{ - printf("%10s %d\n", "trump", dl->trump); - printf("%10s %d\n", "first", dl->first); - printf("%10s %s\n", "cards", dl->remainCards); - return true; -} - - -bool print_FUT(futureTricks * fut) -{ - printf("%6s %d\n", "cards", fut->cards); - printf("%6s %-6s %-6s %-6s %-6s\n", - "", "suit", "rank", "equals", "score"); - - for (int i = 0; i < fut->cards; i++) - { - char res[15] = ""; - equals_to_string(fut->equals[i], res); - printf("%6d %-6c %-6c %-6s %-6d\n", - i, - dcardSuit[ fut->suit[i] ], - dcardRank[ fut->rank[i] ], - res, - fut->score[i]); - } - return true; -} - - -void equals_to_string(int equals, char * res) -{ - int p = 0; - for (int i = 15; i >= 2; i--) - { - if (equals & dbitMapRank[i]) - res[p++] = static_cast(dcardRank[i]); - } - res[p] = 0; -} - - -bool print_TABLE(ddTableResults * table) -{ - printf("%5s %-5s %-5s %-5s %-5s\n", - "", "North", "South", "East", "West"); - - printf("%5s %5d %5d %5d %5d\n", - "NT", - table->resTable[4][0], - table->resTable[4][2], - table->resTable[4][1], - table->resTable[4][3]); - - for (int suit = 0; suit <= 3; suit++) - { - printf("%5c %5d %5d %5d %5d\n", - dcardSuit[suit], - table->resTable[suit][0], - table->resTable[suit][2], - table->resTable[suit][1], - table->resTable[suit][3]); - } - return true; -} - - -bool print_PAR(parResults * par) -{ - printf("NS score: %s\n", par->parScore[0]); - printf("EW score: %s\n", par->parScore[1]); - printf("NS list : %s\n", par->parContractsString[0]); - printf("EW list : %s\n", par->parContractsString[1]); - return true; -} - - -bool print_DEALERPAR(parResultsDealer * par) -{ - printf("Score : %d\n", par->score); - printf("Pars : %d\n", par->number); - - for (int i = 0; i < par->number; i++) - { - printf("Par %d: %s\n", i, par->contracts[i]); - } - return true; -} - - -bool print_PLAY(playTracePBN * play) -{ - printf("Number : %d\n", play->number); - - for (int i = 0; i < play->number; i++) - { - printf("Play %d: %c%c\n", i, play->cards[2 * i], play->cards[2 * i + 1]); - } - return true; -} - - -bool print_TRACE(solvedPlay * solvedp) -{ - printf("Number : %d\n", solvedp->number); - - for (int i = 0; i < solvedp->number; i++) - { - printf("Trick %d: %d\n", i, solvedp->tricks[i]); - } - return true; -} - - -bool print_double_TRACE(solvedPlay * solvedp, solvedPlay * refp) -{ - printf("Number solved vs ref : %d vs %d\n", - solvedp->number, refp->number); - - const int m = min(solvedp->number, refp->number); - for (int i = 0; i < m;i++) - { - printf("Trick %d: %d vs %d %s\n", - i, solvedp->tricks[i], refp->tricks[i], - (solvedp->tricks[i] == refp->tricks[i] ? "" : "ERROR")); - } - - if (solvedp->number > m) - { - for (int i = m; i < solvedp->number; i++) - printf("Solved %d: %d\n", i, solvedp->tricks[i]); - } - else if (refp->number > m) - { - for (int i = m; i < solvedp->number; i++) - printf("Ref %d: %d\n", i, refp->tricks[i]); - } - - return true; -} - - void loop_solve( boardsPBN * bop, solvedBoards * solvedbdp, @@ -562,8 +396,8 @@ bool loop_calc( if (! compare_TABLE(resp->results[j], table_list[i + j])) { printf("loop_calc table i %d, j %d: Difference\n", i, j); - print_TABLE( &resp->results[j] ); - print_TABLE( &table_list[i + j]) ; + print_TABLE(resp->results[j] ); + print_TABLE(table_list[i + j]) ; } } @@ -699,7 +533,7 @@ bool loop_play( if (! compare_TRACE(solvedplp->solved[j], trace_list[i + j])) { printf("loop_play i %d, j %d: Difference\n", i, j); - print_double_TRACE(&solvedplp->solved[j], &trace_list[i+j]); + print_double_TRACE(solvedplp->solved[j], trace_list[i+j]); } } } From 86a1caa14c6aa5c4ae511a1a86a8c518bbe63721 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Mon, 2 Apr 2018 19:56:12 +0200 Subject: [PATCH 123/132] Moved set_constants to print.cpp --- test/print.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++--- test/print.h | 2 ++ test/testcommon.cpp | 46 ------------------------------------------- 3 files changed, 47 insertions(+), 49 deletions(-) diff --git a/test/print.cpp b/test/print.cpp index 0ed1ff6c..644ae34a 100644 --- a/test/print.cpp +++ b/test/print.cpp @@ -16,13 +16,55 @@ #include "cst.h" -extern unsigned short dbitMapRank[16]; -extern unsigned char dcardRank[16]; -extern unsigned char dcardSuit[5]; +static unsigned short dbitMapRank[16]; +static unsigned char dcardRank[16]; +static unsigned char dcardSuit[5]; string equals_to_string(const int equals); +void set_constants() +{ + dbitMapRank[15] = 0x2000; + dbitMapRank[14] = 0x1000; + dbitMapRank[13] = 0x0800; + dbitMapRank[12] = 0x0400; + dbitMapRank[11] = 0x0200; + dbitMapRank[10] = 0x0100; + dbitMapRank[ 9] = 0x0080; + dbitMapRank[ 8] = 0x0040; + dbitMapRank[ 7] = 0x0020; + dbitMapRank[ 6] = 0x0010; + dbitMapRank[ 5] = 0x0008; + dbitMapRank[ 4] = 0x0004; + dbitMapRank[ 3] = 0x0002; + dbitMapRank[ 2] = 0x0001; + dbitMapRank[ 1] = 0; + dbitMapRank[ 0] = 0; + + dcardRank[ 2] = '2'; + dcardRank[ 3] = '3'; + dcardRank[ 4] = '4'; + dcardRank[ 5] = '5'; + dcardRank[ 6] = '6'; + dcardRank[ 7] = '7'; + dcardRank[ 8] = '8'; + dcardRank[ 9] = '9'; + dcardRank[10] = 'T'; + dcardRank[11] = 'J'; + dcardRank[12] = 'Q'; + dcardRank[13] = 'K'; + dcardRank[14] = 'A'; + dcardRank[15] = '-'; + + dcardSuit[0] = 'S'; + dcardSuit[1] = 'H'; + dcardSuit[2] = 'D'; + dcardSuit[3] = 'C'; + dcardSuit[4] = 'N'; +} + + void print_PBN(const dealPBN& dl) { cout << setw(10) << left << "trump" << dl.trump << "\n"; diff --git a/test/print.h b/test/print.h index 558749c3..c3ef4ff2 100644 --- a/test/print.h +++ b/test/print.h @@ -18,6 +18,8 @@ using namespace std; +void set_constants(); + void print_PBN(const dealPBN& dl); void print_FUT(const futureTricks& fut); diff --git a/test/testcommon.cpp b/test/testcommon.cpp index d2fb9d80..84709147 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -30,10 +30,6 @@ extern OptionsType options; TestTimer timer; -unsigned short dbitMapRank[16]; -unsigned char dcardRank[16]; -unsigned char dcardSuit[5]; - void main_identify(); void set_constants(); @@ -261,48 +257,6 @@ void main_identify() } -void set_constants() -{ - dbitMapRank[15] = 0x2000; - dbitMapRank[14] = 0x1000; - dbitMapRank[13] = 0x0800; - dbitMapRank[12] = 0x0400; - dbitMapRank[11] = 0x0200; - dbitMapRank[10] = 0x0100; - dbitMapRank[ 9] = 0x0080; - dbitMapRank[ 8] = 0x0040; - dbitMapRank[ 7] = 0x0020; - dbitMapRank[ 6] = 0x0010; - dbitMapRank[ 5] = 0x0008; - dbitMapRank[ 4] = 0x0004; - dbitMapRank[ 3] = 0x0002; - dbitMapRank[ 2] = 0x0001; - dbitMapRank[ 1] = 0; - dbitMapRank[ 0] = 0; - - dcardRank[ 2] = '2'; - dcardRank[ 3] = '3'; - dcardRank[ 4] = '4'; - dcardRank[ 5] = '5'; - dcardRank[ 6] = '6'; - dcardRank[ 7] = '7'; - dcardRank[ 8] = '8'; - dcardRank[ 9] = '9'; - dcardRank[10] = 'T'; - dcardRank[11] = 'J'; - dcardRank[12] = 'Q'; - dcardRank[13] = 'K'; - dcardRank[14] = 'A'; - dcardRank[15] = '-'; - - dcardSuit[0] = 'S'; - dcardSuit[1] = 'H'; - dcardSuit[2] = 'D'; - dcardSuit[3] = 'C'; - dcardSuit[4] = 'N'; -} - - void loop_solve( boardsPBN * bop, solvedBoards * solvedbdp, From 752545e9d9968a47c77fc07096a39a8778717423 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Mon, 2 Apr 2018 20:25:29 +0200 Subject: [PATCH 124/132] Split out loop.cpp --- test/Makefiles/own_sources.txt | 1 + test/compare.cpp | 2 +- test/compare.h | 3 + test/loop.cpp | 296 ++++++++++++++++++++++++++++ test/loop.h | 59 ++++++ test/parse.cpp | 2 +- test/parse.h | 2 - test/testcommon.cpp | 344 ++------------------------------- 8 files changed, 376 insertions(+), 333 deletions(-) create mode 100644 test/loop.cpp create mode 100644 test/loop.h diff --git a/test/Makefiles/own_sources.txt b/test/Makefiles/own_sources.txt index 78de66a8..5b9e6072 100644 --- a/test/Makefiles/own_sources.txt +++ b/test/Makefiles/own_sources.txt @@ -1,6 +1,7 @@ DTEST_SOURCE_FILES = \ args.cpp \ compare.cpp \ + loop.cpp \ parse.cpp \ print.cpp \ testcommon.cpp \ diff --git a/test/compare.cpp b/test/compare.cpp index dd0d5336..c5ed23c6 100644 --- a/test/compare.cpp +++ b/test/compare.cpp @@ -10,7 +10,7 @@ #include -#include "../include/dll.h" +#include "compare.h" using namespace std; diff --git a/test/compare.h b/test/compare.h index 88b8fdc7..7e8bc3dc 100644 --- a/test/compare.h +++ b/test/compare.h @@ -10,6 +10,9 @@ #ifndef DTEST_COMPARE_H #define DTEST_COMPARE_H +#include "../include/dll.h" + + bool compare_PBN( const dealPBN& dl1, const dealPBN& dl2); diff --git a/test/loop.cpp b/test/loop.cpp new file mode 100644 index 00000000..3e7e35f5 --- /dev/null +++ b/test/loop.cpp @@ -0,0 +1,296 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#include +#include + +#include "loop.h" +#include "TestTimer.h" +#include "compare.h" +#include "print.h" + +using namespace std; + +#define BATCHTIMES + +extern TestTimer timer; + + +void loop_solve( + boardsPBN * bop, + solvedBoards * solvedbdp, + dealPBN * deal_list, + futureTricks * fut_list, + const int number, + const int stepsize) +{ +#ifdef BATCHTIMES + cout << setw(8) << left << "Hand no." << setw(25) << "Time" << "\n"; +#endif + + for (int i = 0; i < number; i += stepsize) + { + int count = (i + stepsize > number ? number - i : stepsize); + + bop->noOfBoards = count; + for (int j = 0; j < count; j++) + { + bop->deals[j] = deal_list[i + j]; + bop->target[j] = -1; + bop->solutions[j] = 3; + bop->mode[j] = 1; + } + + timer.start(count); + int ret; + if ((ret = SolveAllChunks(bop, solvedbdp, 1)) != RETURN_NO_FAULT) + { + cout << "loop_solve: i " << i << ", return " << ret << "\n"; + exit(0); + } + timer.end(); + +#ifdef BATCHTIMES + timer.printRunning(i+count, number); +#endif + + for (int j = 0; j < count; j++) + { + if (compare_FUT(solvedbdp->solvedBoard[j], fut_list[i + j])) + continue; + + cout << "loop_solve: i " << i << ", j " << j << ": " << + "Difference\n\n"; + print_FUT(solvedbdp->solvedBoard[j]); + cout << "\n"; + print_FUT(fut_list[i+j]); + cout << "\n"; + } + } + +#ifdef BATCHTIMES + cout << "\n"; +#endif + +} + + +bool loop_calc( + ddTableDealsPBN * dealsp, + ddTablesRes * resp, + allParResults * parp, + dealPBN * deal_list, + ddTableResults * table_list, + const int number, + const int stepsize) +{ +#ifdef BATCHTIMES + cout << setw(8) << left << "Hand no." << setw(25) << "Time" << "\n"; +#endif + + int filter[5] = {0, 0, 0, 0, 0}; + + for (int i = 0; i < number; i += stepsize) + { + int count = (i + stepsize > number ? number - i : stepsize); + dealsp->noOfTables = count; + for (int j = 0; j < count; j++) + strcpy(dealsp->deals[j].cards, deal_list[i+j].remainCards); + + timer.start(count); + int ret; + if ((ret = CalcAllTablesPBN(dealsp, -1, filter, resp, parp)) + != RETURN_NO_FAULT) + { + cout << "loop_calc: i " << i << ", return " << ret << "\n"; + exit(0); + } + timer.end(); + +#ifdef BATCHTIMES + timer.printRunning(i+count, number); +#endif + + for (int j = 0; j < count; j++) + { + if (compare_TABLE(resp->results[j], table_list[i + j])) + continue; + + cout << "loop_calc: i " << i << ", j " << j << ": " << + "Difference\n\n"; + print_TABLE(resp->results[j] ); + cout << "\n"; + print_TABLE(table_list[i + j]) ; + cout << "\n"; + } + } + +#ifdef BATCHTIMES + cout << "\n"; +#endif + + return true; +} + + + +bool loop_par( + int * vul_list, + ddTableResults * table_list, + parResults * par_list, + const int number, + const int stepsize) +{ + // This is so fast that there is no batch or multi-threaded + // version. We run it many times just to get meaningful times. + + parResults presp; + + for (int i = 0; i < number; i++) + { + for (int j = 0; j < stepsize; j++) + { + int ret; + if ((ret = Par(&table_list[i], &presp, vul_list[i])) + != RETURN_NO_FAULT) + { + cout << "loop_par: i " << i << ", j " << j << ": " << + "return " << ret << "\n"; + exit(0); + } + } + + if (compare_PAR(presp, par_list[i])) + continue; + + cout << "loop_par i " << i << ": Difference\n\n"; + print_PAR(presp); + cout << "\n"; + print_PAR(par_list[i]); + cout << "\n"; + } + + return true; +} + + +bool loop_dealerpar( + int * dealer_list, + int * vul_list, + ddTableResults * table_list, + parResultsDealer * dealerpar_list, + const int number, + const int stepsize) +{ + // This is so fast that there is no batch or multi-threaded + // version. We run it many times just to get meaningful times. + + parResultsDealer presp; + + timer.start(number); + for (int i = 0; i < number; i++) + { + for (int j = 0; j < stepsize; j++) + { + int ret; + if ((ret = DealerPar(&table_list[i], &presp, + dealer_list[i], vul_list[i])) != RETURN_NO_FAULT) + { + cout << "loop_dealerpar: i " << i << ", j " << j << ": " << + "return " << ret << "\n"; + exit(0); + } + } + + if (compare_DEALERPAR(presp, dealerpar_list[i])) + continue; + + cout << "loop_dealerpar i " << i << ": Difference\n\n"; + print_DEALERPAR(presp); + cout << "\n"; + print_DEALERPAR(dealerpar_list[i]); + cout << "\n"; + } + timer.end(); + +#ifdef BATCHTIMES + timer.printRunning(number, number); +#endif + + return true; +} + + +bool loop_play( + boardsPBN * bop, + playTracesPBN * playsp, + solvedPlays * solvedplp, + dealPBN * deal_list, + playTracePBN * play_list, + solvedPlay * trace_list, + const int number, + const int stepsize) +{ +#ifdef BATCHTIMES + cout << setw(8) << left << "Hand no." << setw(25) << "Time" << "\n"; +#endif + + for (int i = 0; i < number; i += stepsize) + { + int count = (i + stepsize > number ? number - i : stepsize); + + bop->noOfBoards = count; + playsp->noOfBoards = count; + + for (int j = 0; j < count; j++) + { + bop->deals[j] = deal_list[i + j]; + bop->target[j] = 0; + bop->solutions[j] = 3; + bop->mode[j] = 1; + + playsp->plays[j] = play_list[i + j]; + } + + timer.start(count); + int ret; + if ((ret = AnalyseAllPlaysPBN(bop, playsp, solvedplp, 1)) + != RETURN_NO_FAULT) + { + printf("loop_play i %i: Return %d\n", i, ret); + cout << "loop_play: i " << i << ": " << "return " << ret << "\n"; + exit(0); + } + timer.end(); + +#ifdef BATCHTIMES + timer.printRunning(i+count, number); +#endif + + for (int j = 0; j < count; j++) + { + if (compare_TRACE(solvedplp->solved[j], trace_list[i+j])) + continue; + + printf("loop_play i %d, j %d: Difference\n", i, j); + cout << "loop_play: i " << i << ", j " << j << ": " << + "Difference\n\n"; + print_double_TRACE(solvedplp->solved[j], trace_list[i+j]); + cout << "\n"; + } + } + +#ifdef BATCHTIMES + printf("\n"); +#endif + + return true; +} + diff --git a/test/loop.h b/test/loop.h new file mode 100644 index 00000000..f69ba019 --- /dev/null +++ b/test/loop.h @@ -0,0 +1,59 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DTEST_LOOP_H +#define DTEST_LOOP_H + +#include "../include/dll.h" + + +void loop_solve( + boardsPBN * bop, + solvedBoards * solvedbdp, + dealPBN * deal_list, + futureTricks * fut_list, + const int number, + const int stepsize); + +bool loop_calc( + ddTableDealsPBN * dealsp, + ddTablesRes * resp, + allParResults * parp, + dealPBN * deal_list, + ddTableResults * table_list, + const int number, + const int stepsize); + +bool loop_par( + int * vul_list, + ddTableResults * table_list, + parResults * par_list, + const int number, + const int stepsize); + +bool loop_dealerpar( + int * dealer_list, + int * vul_list, + ddTableResults * table_list, + parResultsDealer * dealerpar_list, + const int number, + const int stepsize); + +bool loop_play( + boardsPBN * bop, + playTracesPBN * playsp, + solvedPlays * solvedplp, + dealPBN * deal_list, + playTracePBN * play_list, + solvedPlay * trace_list, + const int number, + const int stepsize); + +#endif + diff --git a/test/parse.cpp b/test/parse.cpp index 492bbcc1..9a4969c2 100644 --- a/test/parse.cpp +++ b/test/parse.cpp @@ -11,8 +11,8 @@ #include #include -#include "parse.h" #include "../include/portab.h" +#include "parse.h" using namespace std; diff --git a/test/parse.h b/test/parse.h index a849dd16..3512faa2 100644 --- a/test/parse.h +++ b/test/parse.h @@ -10,8 +10,6 @@ #ifndef DTEST_PARSE_H #define DTEST_PARSE_H -#include - #include "../include/dll.h" using namespace std; diff --git a/test/testcommon.cpp b/test/testcommon.cpp index 84709147..c9b02e44 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -8,17 +8,13 @@ */ -#include -#include -#include -#include - #include "../include/dll.h" #include "../include/portab.h" #include "testcommon.h" #include "TestTimer.h" #include "parse.h" +#include "loop.h" #include "compare.h" #include "print.h" #include "cst.h" @@ -26,106 +22,39 @@ using namespace std; extern OptionsType options; - TestTimer timer; void main_identify(); -void set_constants(); - -void loop_solve( - struct boardsPBN * bop, - struct solvedBoards * solvedbdp, - struct dealPBN * deal_list, - struct futureTricks * fut_list, - int number); - -bool loop_calc( - struct ddTableDealsPBN * dealsp, - struct ddTablesRes * resp, - struct allParResults * parp, - struct dealPBN * deal_list, - struct ddTableResults * table_list, - int number); - -bool loop_par( - int * vul_list, - struct ddTableResults * table_list, - struct parResults * par_list, - int number); - -bool loop_dealerpar( - int * dealer_list, - int * vul_list, - struct ddTableResults * table_list, - struct parResultsDealer * dealerpar_list, - int number); - -bool loop_play( - struct boardsPBN * bop, - struct playTracesPBN * playsp, - struct solvedPlays * solvedplp, - struct dealPBN * deal_list, - struct playTracePBN * play_list, - struct solvedPlay * trace_list, - int number); - -void print_times( - int number); - -#ifndef _WIN32 -int timeval_diff( - timeval x, - timeval y); -#endif - -void timer_start(); - -int timer_end(); - - - #define SOLVE_SIZE MAXNOOFBOARDS #define BOARD_SIZE MAXNOOFTABLES #define TRACE_SIZE MAXNOOFBOARDS #define PAR_REPEAT 1 -int input_number; - - -// #define DEBUG -#define BATCHTIMES -#define ZERO (static_cast('0')) -#define NINE (static_cast('9')) -#define SPACE (static_cast(' ')) -#define QUOTE (static_cast('"')) - - -int realMain(int argc, char * argv[]); int realMain(int argc, char * argv[]) { UNUSED(argc); UNUSED(argv); - input_number = 0; timer.reset(); timer.setname("Hand stats"); bool GIBmode = false; // TODO: Make one. + int stepsize = 0; if (options.solver == DTEST_SOLVER_SOLVE) - input_number = SOLVE_SIZE; + stepsize = SOLVE_SIZE; else if (options.solver == DTEST_SOLVER_CALC) - input_number = BOARD_SIZE; + stepsize = BOARD_SIZE; else if (options.solver == DTEST_SOLVER_PLAY) - input_number = TRACE_SIZE; + stepsize = TRACE_SIZE; else if (options.solver == DTEST_SOLVER_PAR) - input_number = PAR_REPEAT; + stepsize = PAR_REPEAT; else if (options.solver == DTEST_SOLVER_DEALERPAR) - input_number = PAR_REPEAT; + stepsize = PAR_REPEAT; set_constants(); main_identify(); @@ -164,12 +93,12 @@ int realMain(int argc, char * argv[]) printf("GIB file only works works with calc\n"); exit(0); } - loop_solve(&bop, &solvedbdp, deal_list, fut_list, number); + loop_solve(&bop, &solvedbdp, deal_list, fut_list, number, stepsize); } else if (options.solver == DTEST_SOLVER_CALC) { - loop_calc(&dealsp, &resp, &parp, - deal_list, table_list, number); + loop_calc(&dealsp, &resp, &parp, deal_list, table_list, + number, stepsize); } else if (options.solver == DTEST_SOLVER_PLAY) { @@ -178,8 +107,8 @@ int realMain(int argc, char * argv[]) printf("GIB file does not work with solve\n"); exit(0); } - loop_play(&bop, &playsp, &solvedplp, - deal_list, play_list, trace_list, number); + loop_play(&bop, &playsp, &solvedplp, deal_list, play_list, trace_list, + number, stepsize); } else if (options.solver == DTEST_SOLVER_PAR) { @@ -188,7 +117,7 @@ int realMain(int argc, char * argv[]) printf("GIB file does not work with solve\n"); exit(0); } - loop_par(vul_list, table_list, par_list, number); + loop_par(vul_list, table_list, par_list, number, stepsize); } else if (options.solver == DTEST_SOLVER_DEALERPAR) { @@ -197,8 +126,8 @@ int realMain(int argc, char * argv[]) printf("GIB file does not work with solve\n"); exit(0); } - loop_dealerpar(dealer_list, vul_list, table_list, - dealerpar_list, number); + loop_dealerpar(dealer_list, vul_list, table_list, dealerpar_list, + number, stepsize); } else { @@ -256,246 +185,3 @@ void main_identify() printf("\n"); } - -void loop_solve( - boardsPBN * bop, - solvedBoards * solvedbdp, - dealPBN * deal_list, - futureTricks * fut_list, - int number) -{ -#ifdef BATCHTIMES - printf("%8s %24s\n", "Hand no.", "Time"); -#endif - - for (int i = 0; i < number; i += input_number) - { - int count = (i + input_number > number ? number - i : input_number); - - bop->noOfBoards = count; - for (int j = 0; j < count; j++) - { - bop->deals[j] = deal_list[i + j]; - bop->target[j] = -1; - bop->solutions[j] = 3; - bop->mode[j] = 1; - } - - timer.start(count); - int ret; - if ((ret = SolveAllChunks(bop, solvedbdp, 1)) - != RETURN_NO_FAULT) - { - printf("loop_solve i %i: Return %d\n", i, ret); - exit(0); - } - timer.end(); - -#ifdef BATCHTIMES - timer.printRunning(i+count, number); -#endif - - for (int j = 0; j < count; j++) - { - if (! compare_FUT(solvedbdp->solvedBoard[j], fut_list[i + j])) - printf("loop_solve i %d, j %d: Difference\n", i, j); - } - } - -#ifdef BATCHTIMES - printf("\n"); -#endif - -} - - -bool loop_calc( - ddTableDealsPBN * dealsp, - ddTablesRes * resp, - allParResults * parp, - dealPBN * deal_list, - ddTableResults * table_list, - int number) -{ -#ifdef BATCHTIMES - printf("%8s %24s\n", "Hand no.", "Time"); -#endif - - int filter[5] = {0, 0, 0, 0, 0}; - - for (int i = 0; i < number; i += input_number) - { - int count = (i + input_number > number ? number - i : input_number); - dealsp->noOfTables = count; - for (int j = 0; j < count; j++) - { - strcpy(dealsp->deals[j].cards, deal_list[i + j].remainCards); - } - - timer.start(count); - int ret; - if ((ret = CalcAllTablesPBN(dealsp, -1, filter, resp, parp)) - != RETURN_NO_FAULT) - { - printf("loop_solve i %i: Return %d\n", i, ret); - exit(0); - } - timer.end(); - -#ifdef BATCHTIMES - timer.printRunning(i+count, number); -#endif - - for (int j = 0; j < count; j++) - if (! compare_TABLE(resp->results[j], table_list[i + j])) - { - printf("loop_calc table i %d, j %d: Difference\n", i, j); - print_TABLE(resp->results[j] ); - print_TABLE(table_list[i + j]) ; - } - } - -#ifdef BATCHTIMES - printf("\n"); -#endif - - return true; -} - - - -bool loop_par( - int * vul_list, - ddTableResults * table_list, - parResults * par_list, - int number) -{ - /* This is so fast that there is no batch or multi-threaded - version. We run it many times just to get meaningful times. */ - - parResults presp; - - for (int i = 0; i < number; i++) - { - for (int j = 0; j < input_number; j++) - { - int ret; - if ((ret = Par(&table_list[i], &presp, vul_list[i])) - != RETURN_NO_FAULT) - { - printf("loop_par i %i, j %d: Return %d\n", i, j, ret); - exit(0); - } - } - - if (! compare_PAR(presp, par_list[i])) - printf("loop_par i %d: Difference\n", i); - } - - return true; -} - - -bool loop_dealerpar( - int * dealer_list, - int * vul_list, - ddTableResults * table_list, - parResultsDealer * dealerpar_list, - int number) -{ - /* This is so fast that there is no batch or multi-threaded - version. We run it many times just to get meaningful times. */ - - parResultsDealer presp; - - timer.start(number); - for (int i = 0; i < number; i++) - { - for (int j = 0; j < input_number; j++) - { - int ret; - if ((ret = DealerPar(&table_list[i], &presp, - dealer_list[i], vul_list[i])) - != RETURN_NO_FAULT) - { - printf("loop_dealerpar i %i, j %d: Return %d\n", i, j, ret); - exit(0); - } - } - - if (! compare_DEALERPAR(presp, dealerpar_list[i])) - { - printf("loop_dealerpar i %d: Difference\n", i); - } - } - timer.end(); - -#ifdef BATCHTIMES - timer.printRunning(number, number); -#endif - - return true; -} - - -bool loop_play( - boardsPBN * bop, - playTracesPBN * playsp, - solvedPlays * solvedplp, - dealPBN * deal_list, - playTracePBN * play_list, - solvedPlay * trace_list, - int number) -{ -#ifdef BATCHTIMES - printf("%8s %24s\n", "Hand no.", "Time"); -#endif - - for (int i = 0; i < number; i += input_number) - { - int count = (i + input_number > number ? number - i : input_number); - - bop->noOfBoards = count; - playsp->noOfBoards = count; - - for (int j = 0; j < count; j++) - { - bop->deals[j] = deal_list[i + j]; - bop->target[j] = 0; - bop->solutions[j] = 3; - bop->mode[j] = 1; - - playsp->plays[j] = play_list[i + j]; - } - - timer.start(count); - int ret; - if ((ret = AnalyseAllPlaysPBN(bop, playsp, solvedplp, 1)) - != RETURN_NO_FAULT) - { - printf("loop_play i %i: Return %d\n", i, ret); - exit(0); - } - timer.end(); - -#ifdef BATCHTIMES - timer.printRunning(i+count, number); -#endif - - for (int j = 0; j < count; j++) - { - if (! compare_TRACE(solvedplp->solved[j], trace_list[i + j])) - { - printf("loop_play i %d, j %d: Difference\n", i, j); - print_double_TRACE(solvedplp->solved[j], trace_list[i+j]); - } - } - } - -#ifdef BATCHTIMES - printf("\n"); -#endif - - return true; -} - From c624096496d5e52694cc40d375ba3bb0e286a343 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Mon, 2 Apr 2018 20:40:09 +0200 Subject: [PATCH 125/132] Test program more or less done --- test/testcommon.cpp | 180 +++++++++++++++++++++++++++----------------- 1 file changed, 111 insertions(+), 69 deletions(-) diff --git a/test/testcommon.cpp b/test/testcommon.cpp index c9b02e44..37fa3ee2 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -8,6 +8,10 @@ */ +#include +#include +#include + #include "../include/dll.h" #include "../include/portab.h" @@ -21,6 +25,26 @@ using namespace std; + +const vector DDS_SYSTEM_PLATFORM = +{ + "", + "Windows", + "Cygwin", + "Linux", + "Apple" +}; + +const vector DDS_SYSTEM_COMPILER = +{ + "", + "Microsoft Visual C++", + "MinGW", + "GNU g++", + "clang" +}; + + extern OptionsType options; TestTimer timer; @@ -28,45 +52,28 @@ TestTimer timer; void main_identify(); -#define SOLVE_SIZE MAXNOOFBOARDS -#define BOARD_SIZE MAXNOOFTABLES -#define TRACE_SIZE MAXNOOFBOARDS -#define PAR_REPEAT 1 - - int realMain(int argc, char * argv[]) { UNUSED(argc); UNUSED(argv); - timer.reset(); - timer.setname("Hand stats"); - bool GIBmode = false; - // TODO: Make one. int stepsize = 0; if (options.solver == DTEST_SOLVER_SOLVE) - stepsize = SOLVE_SIZE; + stepsize = MAXNOOFBOARDS; else if (options.solver == DTEST_SOLVER_CALC) - stepsize = BOARD_SIZE; + stepsize = MAXNOOFTABLES; else if (options.solver == DTEST_SOLVER_PLAY) - stepsize = TRACE_SIZE; + stepsize = MAXNOOFBOARDS; else if (options.solver == DTEST_SOLVER_PAR) - stepsize = PAR_REPEAT; + stepsize = 1; else if (options.solver == DTEST_SOLVER_DEALERPAR) - stepsize = PAR_REPEAT; + stepsize = 1; set_constants(); main_identify(); - boardsPBN bop; - solvedBoards solvedbdp; - ddTableDealsPBN dealsp; - ddTablesRes resp; - allParResults parp; - playTracesPBN playsp; - solvedPlays solvedplp; - + int number; int * dealer_list; int * vul_list; dealPBN * deal_list; @@ -76,23 +83,33 @@ int realMain(int argc, char * argv[]) parResultsDealer * dealerpar_list; playTracePBN * play_list; solvedPlay * trace_list; - int number; - if (read_file(options.fname, number, GIBmode, &dealer_list, &vul_list, &deal_list, &fut_list, &table_list, &par_list, &dealerpar_list, &play_list, &trace_list) == false) { - printf("read_file failed.\n"); + cout << "read_file failed\n"; + exit(0); + } + + if (GIBmode && options.solver != DTEST_SOLVER_CALC) + { + cout << "GIB file only works works with calc\n"; exit(0); } + timer.reset(); + timer.setname("Hand stats"); + + boardsPBN bop; + solvedBoards solvedbdp; + ddTableDealsPBN dealsp; + ddTablesRes resp; + allParResults parp; + playTracesPBN playsp; + solvedPlays solvedplp; + if (options.solver == DTEST_SOLVER_SOLVE) { - if (GIBmode) - { - printf("GIB file only works works with calc\n"); - exit(0); - } loop_solve(&bop, &solvedbdp, deal_list, fut_list, number, stepsize); } else if (options.solver == DTEST_SOLVER_CALC) @@ -102,36 +119,21 @@ int realMain(int argc, char * argv[]) } else if (options.solver == DTEST_SOLVER_PLAY) { - if (GIBmode) - { - printf("GIB file does not work with solve\n"); - exit(0); - } loop_play(&bop, &playsp, &solvedplp, deal_list, play_list, trace_list, number, stepsize); } else if (options.solver == DTEST_SOLVER_PAR) { - if (GIBmode) - { - printf("GIB file does not work with solve\n"); - exit(0); - } loop_par(vul_list, table_list, par_list, number, stepsize); } else if (options.solver == DTEST_SOLVER_DEALERPAR) { - if (GIBmode) - { - printf("GIB file does not work with solve\n"); - exit(0); - } loop_dealerpar(dealer_list, vul_list, table_list, dealerpar_list, number, stepsize); } else { - printf("Unknown type %d\n", options.solver); + cout << "Unknown type " << options.solver << "\n"; exit(0); } @@ -151,37 +153,77 @@ int realMain(int argc, char * argv[]) } -void main_identify() +////////////////////////////////////////////////////////////////////// +// Self-identification // +////////////////////////////////////////////////////////////////////// + +string GetSystem() +{ + unsigned sys; +#if defined(_WIN32) + sys = 1; +#elif defined(__CYGWIN__) + sys = 2; +#elif defined(__linux) + sys = 3; +#elif defined(__APPLE__) + sys = 4; +#else + sys = 0; +#endif + + return DDS_SYSTEM_PLATFORM[sys]; +} + + +string GetBits() { - printf("dtest main\n----------\n"); + if (sizeof(void *) == 4) + return "32 bits"; + else if (sizeof(void *) == 8) + return "64 bits"; + else + return "unknown"; +} -#if defined(_WIN32) || defined(__CYGWIN__) - printf("%-12s %20s\n", "System", "Windows"); + +string GetCompiler() +{ + unsigned comp; #if defined(_MSC_VER) - printf("%-12s %20s\n", "Compiler", "Microsoft Visual C++"); + comp = 1; #elif defined(__MINGW32__) - printf("%-12s %20s\n", "Compiler", "MinGW"); + comp = 2; +#elif defined(__clang__) + comp = 4; // Out-of-order on purpose +#elif defined(__GNUC__) + comp = 3; #else - printf("%-12s %20s\n", "Compiler", "GNU g++"); + comp = 0; #endif -#elif defined(__linux) - printf("%-12s %20s\n", "System", "Linux"); - printf("%-12s %20s\n", "Compiler", "GNU g++"); + return DDS_SYSTEM_COMPILER[comp]; +} -#elif defined(__APPLE__) - printf("%-12s %20s\n", "System", "Apple"); -#if defined(__clang__) - printf("%-12s %20s\n", "Compiler", "clang"); -#else - printf("%-12s %20s\n", "Compiler", "GNU g++"); -#endif -#endif -#if defined(__cplusplus) - printf("%-12s %20ld\n", "Dialect", __cplusplus); -#endif +void main_identify() +{ + cout << "test program\n"; + cout << string(13, '-') << "\n"; + + const string strSystem = GetSystem(); + cout << left << setw(13) << "System" << + setw(20) << right << strSystem << "\n"; - printf("\n"); + const string strBits = GetBits(); + cout << left << setw(13) << "Word size" << + setw(20) << right << strBits << "\n"; + + const string strCompiler = GetCompiler(); + cout << left << setw(13) << "Compiler" << + setw(20) << right << strCompiler << "\n\n"; } + + + From 5be85684f26e0dbb9d2e06d95a309e70fbcce016 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Mon, 2 Apr 2018 22:22:48 +0200 Subject: [PATCH 126/132] Now Visual and Cygwin work (dtest and itest) --- src/CalcTables.cpp | 7 +- src/CalcTables.h | 2 + src/DealerPar.cpp | 10 +- src/Makefiles/Makefile_cygwin | 18 ++- src/Makefiles/depends_o.txt | 122 +++++++++----------- src/Makefiles/depends_obj.txt | 57 +++++----- src/Par.cpp | 3 + src/PlayAnalyser.cpp | 7 +- src/Scheduler.cpp | 21 ++-- src/SolveBoard.cpp | 9 +- src/SolverIF.cpp | 7 -- src/System.cpp | 23 +++- src/TransTableL.cpp | 40 ++++--- src/TransTableS.cpp | 2 +- src/dump.cpp | 12 +- test/Makefiles/Makefile_Visual | 8 +- test/Makefiles/dds_sources.txt | 5 +- test/Makefiles/depends_o.txt | 202 +++++++++++++++------------------ test/Makefiles/depends_obj.txt | 44 ++++--- test/args.cpp | 10 +- test/itest.cpp | 6 +- test/loop.cpp | 1 + test/parse.cpp | 78 +++++++++---- test/print.cpp | 4 +- test/print.h | 2 - test/testcommon.cpp | 7 +- 26 files changed, 381 insertions(+), 326 deletions(-) diff --git a/src/CalcTables.cpp b/src/CalcTables.cpp index 6a514430..4763c934 100644 --- a/src/CalcTables.cpp +++ b/src/CalcTables.cpp @@ -8,6 +8,7 @@ */ +#include "CalcTables.h" #include "SolverIF.h" #include "SolveBoard.h" #include "System.h" @@ -22,6 +23,10 @@ extern System sysdep; extern Memory memory; extern Scheduler scheduler; +int CalcAllBoardsN( + boards * bop, + solvedBoards * solvedp); + void CalcSingleCommon( const int thrId, @@ -87,7 +92,7 @@ void CalcChunkCommon( { // Solves each deal and strain for all four declarers. vector fut; - fut.resize(cparam.noOfBoards); + fut.resize(static_cast(cparam.noOfBoards)); int index; schedType st; diff --git a/src/CalcTables.h b/src/CalcTables.h index 084bad6b..47d11537 100644 --- a/src/CalcTables.h +++ b/src/CalcTables.h @@ -10,6 +10,8 @@ #ifndef DDS_CALCTABLES_H #define DDS_CALCTABLES_H +#include + #include "dds.h" using namespace std; diff --git a/src/DealerPar.cpp b/src/DealerPar.cpp index a2fded86..c767fc5c 100644 --- a/src/DealerPar.cpp +++ b/src/DealerPar.cpp @@ -616,10 +616,10 @@ string contract_as_text( const int tb = t[side + 2]; const int t_max = (ta > tb ? ta : tb); - return NUMBER_TO_CONTRACT[no] + + return NUMBER_TO_CONTRACT[static_cast(no)] + (delta < 0 ? "*-" : "-") + - (ta == t_max ? NUMBER_TO_PLAYER[side] : "") + - (tb == t_max ? NUMBER_TO_PLAYER[side + 2] : "") + + (ta == t_max ? NUMBER_TO_PLAYER[static_cast(side)] : "") + + (tb == t_max ? NUMBER_TO_PLAYER[static_cast(side + 2)] : "") + (delta > 0 ? "+" : "") + (delta == 0 ? "" : to_string(delta)); } @@ -630,7 +630,7 @@ string sacrifice_as_text( const int pno, const int down) { - return NUMBER_TO_CONTRACT[no] + "-" + - NUMBER_TO_PLAYER[pno] + "-" + + return NUMBER_TO_CONTRACT[static_cast(no)] + "-" + + NUMBER_TO_PLAYER[static_cast(pno)] + "-" + to_string(down); } diff --git a/src/Makefiles/Makefile_cygwin b/src/Makefiles/Makefile_cygwin index 68be98e6..6df619a4 100644 --- a/src/Makefiles/Makefile_cygwin +++ b/src/Makefiles/Makefile_cygwin @@ -19,11 +19,14 @@ # CC_THREADING. # GCD doesn't work on Windows. -THR_BOOST = -DDDS_THREADS_BOOST -THR_GCD = -DDDS_THREADS_GCD -THR_OPENMP = -DDDS_THREADS_OPENMP THR_WINAPI = -DDDS_THREADS_WINAPI +THR_OPENMP = -DDDS_THREADS_OPENMP +THR_GCD = -DDDS_THREADS_GCD +THR_BOOST = -DDDS_THREADS_BOOST THR_STL = -DDDS_THREADS_STL +THR_TBB = -DDDS_THREADS_TBB +THR_STLIMPL = -DDDS_THREADS_STLIMPL +THR_PPLIMPL = -DDDS_THREADS_PPLIMPL THREADING = $(THR_BOOST) $(THR_OPENMP) $(THR_WINAPI) $(THR_STL) @@ -35,12 +38,7 @@ CC_BOOST_LINK = -lboost_system -lboost_thread THREAD_COMPILE = -fopenmp THREAD_LINK = $(CC_BOOST_LINK) -# 2. The small memory option, which causes DDS to consume a lot less -# memory and to run somewhat more slowly. - -SMALL_MEMORY = -DSMALL_MEMORY_OPTION - -# 3. Debugging options. (There are more granular options in debug.h.) +# 2. Debugging options. (There are more granular options in debug.h.) DEBUG_ALL = -DDDS_DEBUG_ALL TIMING = -DDDS_TIMING @@ -58,7 +56,7 @@ DDS_BEHAVIOR = # get it to compile. INCL_SOURCE = Makefiles/sources.txt -INCL_DEPENDS = Makefiles/depends_obj.txt +INCL_DEPENDS = Makefiles/depends_o.txt # If your compiler name is not given here, change it. CC = g++ diff --git a/src/Makefiles/depends_o.txt b/src/Makefiles/depends_o.txt index 8f52e7cf..f705666f 100644 --- a/src/Makefiles/depends_o.txt +++ b/src/Makefiles/depends_o.txt @@ -1,66 +1,56 @@ -dds.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -dds.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -dds.o: TimeStatList.h TimeStat.h Init.h -ABsearch.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABsearch.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -ABsearch.o: TimeStatList.h TimeStat.h QuickTricks.h LaterTricks.h -ABsearch.o: ABsearch.h -ABstats.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -ABstats.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -ABstats.o: TimeStatList.h TimeStat.h -CalcTables.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -CalcTables.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -CalcTables.o: TimeStatList.h TimeStat.h SolveBoard.h PBN.h -DealerPar.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -DealerPar.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -DealerPar.o: TimeStatList.h TimeStat.h -Init.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Init.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -Init.o: TimeStatList.h TimeStat.h Init.h ABsearch.h System.h -LaterTricks.o: dds.h debug.h ../include/portab.h TransTable.h -LaterTricks.o: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -LaterTricks.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h -LaterTricks.o: LaterTricks.h -Moves.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Moves.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -Moves.o: TimeStatList.h TimeStat.h ABsearch.h -Par.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -Par.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -Par.o: TimeStatList.h TimeStat.h -PlayAnalyser.o: dds.h debug.h ../include/portab.h TransTable.h -PlayAnalyser.o: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -PlayAnalyser.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h -PlayAnalyser.o: SolverIF.h System.h PBN.h -PBN.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -PBN.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -PBN.o: TimeStatList.h TimeStat.h PBN.h -QuickTricks.o: dds.h debug.h ../include/portab.h TransTable.h -QuickTricks.o: ../include/dll.h TimerList.h TimerGroup.h Timer.h ABstats.h -QuickTricks.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h -QuickTricks.o: QuickTricks.h -Scheduler.o: Scheduler.h TimeStatList.h TimeStat.h dds.h debug.h -Scheduler.o: ../include/portab.h TransTable.h ../include/dll.h TimerList.h -Scheduler.o: TimerGroup.h Timer.h ABstats.h Moves.h -SolveBoard.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolveBoard.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -SolveBoard.o: TimeStatList.h TimeStat.h SolverIF.h SolveBoard.h -SolveBoard.o: System.h PBN.h -SolverIF.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -SolverIF.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -SolverIF.o: TimeStatList.h TimeStat.h Init.h ABsearch.h -SolverIF.o: SolverIF.h -System.o: ../include/dll.h dds.h debug.h ../include/portab.h TransTable.h -System.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -System.o: TimeStatList.h TimeStat.h System.h SolveBoard.h PlayAnalyser.h -Timer.o: Timer.h ../include/portab.h -TimerGroup.o: TimerGroup.h Timer.h dds.h debug.h ../include/portab.h -TimerGroup.o: TransTable.h ../include/dll.h TimerList.h ABstats.h Moves.h -TimerGroup.o: Scheduler.h TimeStatList.h TimeStat.h -TimerList.o: TimerList.h TimerGroup.h Timer.h dds.h debug.h -TimerList.o: ../include/portab.h TransTable.h ../include/dll.h ABstats.h -TimerList.o: Moves.h Scheduler.h TimeStatList.h TimeStat.h -TimeStat.o: ../include/portab.h TimeStat.h -TimeStatList.o: TimeStatList.h TimeStat.h ../include/portab.h -TransTable.o: dds.h debug.h ../include/portab.h TransTable.h ../include/dll.h -TransTable.o: TimerList.h TimerGroup.h Timer.h ABstats.h Moves.h Scheduler.h -TransTable.o: TimeStatList.h TimeStat.h +dds.o: ../include/dll.h Init.h dds.h ../include/portab.h Memory.h +dds.o: TransTable.h TransTableS.h TransTableL.h Moves.h File.h debug.h +dump.o: dump.h dds.h ../include/portab.h ../include/dll.h Moves.h Memory.h +dump.o: TransTable.h TransTableS.h TransTableL.h File.h debug.h +ABsearch.o: TransTable.h dds.h ../include/portab.h ../include/dll.h Moves.h +ABsearch.o: QuickTricks.h Memory.h TransTableS.h TransTableL.h File.h debug.h +ABsearch.o: LaterTricks.h ABsearch.h ABstats.h TimerList.h TimerGroup.h +ABsearch.o: Timer.h dump.h +ABstats.o: ABstats.h debug.h +CalcTables.o: CalcTables.h dds.h ../include/portab.h ../include/dll.h +CalcTables.o: SolverIF.h Memory.h TransTable.h TransTableS.h TransTableL.h +CalcTables.o: Moves.h File.h debug.h SolveBoard.h System.h Scheduler.h +CalcTables.o: TimeStatList.h TimeStat.h Timer.h PBN.h +DealerPar.o: dds.h ../include/portab.h ../include/dll.h +File.o: File.h +Init.o: Init.h dds.h ../include/portab.h ../include/dll.h Memory.h +Init.o: TransTable.h TransTableS.h TransTableL.h Moves.h File.h debug.h +Init.o: System.h Scheduler.h TimeStatList.h TimeStat.h Timer.h +LaterTricks.o: LaterTricks.h dds.h ../include/portab.h ../include/dll.h +LaterTricks.o: Memory.h TransTable.h TransTableS.h TransTableL.h Moves.h +LaterTricks.o: File.h debug.h +Memory.o: Memory.h TransTable.h dds.h ../include/portab.h ../include/dll.h +Memory.o: TransTableS.h TransTableL.h Moves.h File.h debug.h +Moves.o: Moves.h dds.h ../include/portab.h ../include/dll.h debug.h +Par.o: dds.h ../include/portab.h ../include/dll.h PBN.h +PlayAnalyser.o: PlayAnalyser.h dds.h ../include/portab.h ../include/dll.h +PlayAnalyser.o: SolverIF.h Memory.h TransTable.h TransTableS.h TransTableL.h +PlayAnalyser.o: Moves.h File.h debug.h System.h Scheduler.h TimeStatList.h +PlayAnalyser.o: TimeStat.h Timer.h PBN.h +PBN.o: dds.h ../include/portab.h ../include/dll.h PBN.h +QuickTricks.o: QuickTricks.h dds.h ../include/portab.h ../include/dll.h +QuickTricks.o: Memory.h TransTable.h TransTableS.h TransTableL.h Moves.h +QuickTricks.o: File.h debug.h +Scheduler.o: Scheduler.h dds.h ../include/portab.h ../include/dll.h +Scheduler.o: TimeStatList.h TimeStat.h Timer.h +SolveBoard.o: SolverIF.h dds.h ../include/portab.h ../include/dll.h Memory.h +SolveBoard.o: TransTable.h TransTableS.h TransTableL.h Moves.h File.h debug.h +SolveBoard.o: SolveBoard.h System.h Scheduler.h TimeStatList.h TimeStat.h +SolveBoard.o: Timer.h PBN.h +SolverIF.o: SolverIF.h dds.h ../include/portab.h ../include/dll.h Memory.h +SolverIF.o: TransTable.h TransTableS.h TransTableL.h Moves.h File.h debug.h +SolverIF.o: Init.h ABsearch.h TimerList.h TimerGroup.h Timer.h System.h +SolverIF.o: Scheduler.h TimeStatList.h TimeStat.h dump.h +System.o: SolveBoard.h dds.h ../include/portab.h ../include/dll.h +System.o: CalcTables.h PlayAnalyser.h parallel.h System.h Memory.h +System.o: TransTable.h TransTableS.h TransTableL.h Moves.h File.h debug.h +System.o: Scheduler.h TimeStatList.h TimeStat.h Timer.h +Timer.o: Timer.h +TimerGroup.o: TimerGroup.h Timer.h +TimerList.o: TimerList.h TimerGroup.h Timer.h debug.h +TimeStat.o: TimeStat.h +TimeStatList.o: TimeStatList.h TimeStat.h +TransTableS.o: TransTableS.h TransTable.h dds.h ../include/portab.h +TransTableS.o: ../include/dll.h debug.h +TransTableL.o: TransTableL.h ../include/dll.h dds.h ../include/portab.h +TransTableL.o: TransTable.h debug.h diff --git a/src/Makefiles/depends_obj.txt b/src/Makefiles/depends_obj.txt index 8e34439b..67df28f7 100644 --- a/src/Makefiles/depends_obj.txt +++ b/src/Makefiles/depends_obj.txt @@ -1,47 +1,50 @@ dds.obj: ../include/dll.h Init.h dds.h ../include/portab.h Memory.h -dds.obj: TransTable.h TransTableL.h Moves.h File.h debug.h +dds.obj: TransTable.h TransTableS.h TransTableL.h Moves.h File.h debug.h dump.obj: dump.h dds.h ../include/portab.h ../include/dll.h Moves.h Memory.h -dump.obj: TransTable.h TransTableL.h File.h debug.h -ABsearch.obj: dds.h ../include/portab.h ../include/dll.h TransTableL.h -ABsearch.obj: TransTable.h Moves.h QuickTricks.h Memory.h File.h debug.h -ABsearch.obj: LaterTricks.h ABsearch.h ABstats.h TimerList.h TimerGroup.h -ABsearch.obj: Timer.h dump.h +dump.obj: TransTable.h TransTableS.h TransTableL.h File.h debug.h +ABsearch.obj: TransTable.h dds.h ../include/portab.h ../include/dll.h Moves.h +ABsearch.obj: QuickTricks.h Memory.h TransTableS.h TransTableL.h File.h +ABsearch.obj: debug.h LaterTricks.h ABsearch.h ABstats.h TimerList.h +ABsearch.obj: TimerGroup.h Timer.h dump.h ABstats.obj: ABstats.h debug.h -CalcTables.obj: SolverIF.h dds.h ../include/portab.h ../include/dll.h -CalcTables.obj: Memory.h TransTable.h TransTableL.h Moves.h File.h debug.h -CalcTables.obj: SolveBoard.h System.h Scheduler.h TimeStatList.h TimeStat.h -CalcTables.obj: Timer.h PBN.h +CalcTables.obj: CalcTables.h dds.h ../include/portab.h ../include/dll.h +CalcTables.obj: SolverIF.h Memory.h TransTable.h TransTableS.h TransTableL.h +CalcTables.obj: Moves.h File.h debug.h SolveBoard.h System.h Scheduler.h +CalcTables.obj: TimeStatList.h TimeStat.h Timer.h PBN.h DealerPar.obj: dds.h ../include/portab.h ../include/dll.h File.obj: File.h Init.obj: Init.h dds.h ../include/portab.h ../include/dll.h Memory.h -Init.obj: TransTable.h TransTableL.h Moves.h File.h debug.h System.h -Init.obj: Scheduler.h TimeStatList.h TimeStat.h Timer.h +Init.obj: TransTable.h TransTableS.h TransTableL.h Moves.h File.h debug.h +Init.obj: System.h Scheduler.h TimeStatList.h TimeStat.h Timer.h LaterTricks.obj: LaterTricks.h dds.h ../include/portab.h ../include/dll.h -LaterTricks.obj: Memory.h TransTable.h TransTableL.h Moves.h File.h debug.h +LaterTricks.obj: Memory.h TransTable.h TransTableS.h TransTableL.h Moves.h +LaterTricks.obj: File.h debug.h Memory.obj: Memory.h TransTable.h dds.h ../include/portab.h ../include/dll.h -Memory.obj: TransTableL.h Moves.h File.h debug.h +Memory.obj: TransTableS.h TransTableL.h Moves.h File.h debug.h Moves.obj: Moves.h dds.h ../include/portab.h ../include/dll.h debug.h Par.obj: dds.h ../include/portab.h ../include/dll.h PBN.h -PlayAnalyser.obj: SolverIF.h dds.h ../include/portab.h ../include/dll.h -PlayAnalyser.obj: Memory.h TransTable.h TransTableL.h Moves.h File.h debug.h -PlayAnalyser.obj: System.h Scheduler.h TimeStatList.h TimeStat.h Timer.h -PlayAnalyser.obj: PBN.h +PlayAnalyser.obj: PlayAnalyser.h dds.h ../include/portab.h ../include/dll.h +PlayAnalyser.obj: SolverIF.h Memory.h TransTable.h TransTableS.h +PlayAnalyser.obj: TransTableL.h Moves.h File.h debug.h System.h Scheduler.h +PlayAnalyser.obj: TimeStatList.h TimeStat.h Timer.h PBN.h PBN.obj: dds.h ../include/portab.h ../include/dll.h PBN.h QuickTricks.obj: QuickTricks.h dds.h ../include/portab.h ../include/dll.h -QuickTricks.obj: Memory.h TransTable.h TransTableL.h Moves.h File.h debug.h +QuickTricks.obj: Memory.h TransTable.h TransTableS.h TransTableL.h Moves.h +QuickTricks.obj: File.h debug.h Scheduler.obj: Scheduler.h dds.h ../include/portab.h ../include/dll.h Scheduler.obj: TimeStatList.h TimeStat.h Timer.h SolveBoard.obj: SolverIF.h dds.h ../include/portab.h ../include/dll.h -SolveBoard.obj: Memory.h TransTable.h TransTableL.h Moves.h File.h debug.h -SolveBoard.obj: SolveBoard.h System.h Scheduler.h TimeStatList.h TimeStat.h -SolveBoard.obj: Timer.h PBN.h -SolverIF.obj: dds.h ../include/portab.h ../include/dll.h Init.h Memory.h -SolverIF.obj: TransTable.h TransTableL.h Moves.h File.h debug.h ABsearch.h -SolverIF.obj: SolverIF.h TimerList.h TimerGroup.h Timer.h System.h +SolveBoard.obj: Memory.h TransTable.h TransTableS.h TransTableL.h Moves.h +SolveBoard.obj: File.h debug.h SolveBoard.h System.h Scheduler.h +SolveBoard.obj: TimeStatList.h TimeStat.h Timer.h PBN.h +SolverIF.obj: SolverIF.h dds.h ../include/portab.h ../include/dll.h Memory.h +SolverIF.obj: TransTable.h TransTableS.h TransTableL.h Moves.h File.h debug.h +SolverIF.obj: Init.h ABsearch.h TimerList.h TimerGroup.h Timer.h System.h SolverIF.obj: Scheduler.h TimeStatList.h TimeStat.h dump.h System.obj: SolveBoard.h dds.h ../include/portab.h ../include/dll.h -System.obj: CalcTables.h PlayAnalyser.h parallel.h System.h Scheduler.h -System.obj: TimeStatList.h TimeStat.h Timer.h +System.obj: CalcTables.h PlayAnalyser.h parallel.h System.h Memory.h +System.obj: TransTable.h TransTableS.h TransTableL.h Moves.h File.h debug.h +System.obj: Scheduler.h TimeStatList.h TimeStat.h Timer.h Timer.obj: Timer.h TimerGroup.obj: TimerGroup.h Timer.h TimerList.obj: TimerList.h TimerGroup.h Timer.h debug.h diff --git a/src/Par.cpp b/src/Par.cpp index 4cc8f923..59bcf47a 100644 --- a/src/Par.cpp +++ b/src/Par.cpp @@ -14,6 +14,9 @@ #include "dds.h" #include "PBN.h" +using namespace std; + + struct par_suits_type { int suit; diff --git a/src/PlayAnalyser.cpp b/src/PlayAnalyser.cpp index e9eb9e52..a7de381a 100644 --- a/src/PlayAnalyser.cpp +++ b/src/PlayAnalyser.cpp @@ -7,6 +7,7 @@ See LICENSE and README. */ +#include "PlayAnalyser.h" #include "SolverIF.h" #include "System.h" #include "Memory.h" @@ -402,11 +403,11 @@ void DetectPlayDuplicates( // as it is highly unlikely that the play went identically at // two tables. - uniques.resize(bds.noOfBoards); - crossrefs.resize(bds.noOfBoards); + uniques.resize(static_cast(bds.noOfBoards)); + crossrefs.resize(static_cast(bds.noOfBoards)); for (unsigned i = 0; i < uniques.size(); i++) { - uniques[i] = i; + uniques[i] = static_cast(i); crossrefs[i] = -1; } } diff --git a/src/Scheduler.cpp b/src/Scheduler.cpp index 96154de2..b3d58b41 100644 --- a/src/Scheduler.cpp +++ b/src/Scheduler.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include "Scheduler.h" @@ -102,7 +103,7 @@ void Scheduler::Reset() for (int key = 0; key < HASH_MAX; key++) list[strain][key].first = -1; - for (int t = 0; t < numThreads; t++) + for (unsigned t = 0; t < static_cast(numThreads); t++) { threadGroup[t] = -1; threadCurrGroup[t] = -1; @@ -119,9 +120,10 @@ void Scheduler::RegisterThreads( return; numThreads = n; - threadGroup.resize(numThreads); - threadCurrGroup.resize(numThreads); - threadToHand.resize(numThreads); + const unsigned nu = static_cast(n); + threadGroup.resize(nu); + threadCurrGroup.resize(nu); + threadToHand.resize(nu); #ifdef DDS_SCHEDULER timeThread.Init("Threads", numThreads); @@ -718,7 +720,8 @@ int Scheduler::Fanout(const deal& dl) const schedType Scheduler::GetNumber(const int thrId) { - int g = threadGroup[thrId]; + const unsigned tu = static_cast(thrId); + int g = threadGroup[tu]; listType * lp; schedType st; @@ -749,8 +752,8 @@ schedType Scheduler::GetNumber(const int thrId) // A bit inelegant to duplicate this, but seems better than // the alternative, as threadGroup must get set to -1 in some // cases. - threadGroup[thrId] = g; - threadCurrGroup[thrId] = g; + threadGroup[tu] = g; + threadCurrGroup[tu] = g; group[g].repeatNo = 0; group[g].actual = 0; } @@ -788,10 +791,10 @@ schedType Scheduler::GetNumber(const int thrId) hands[st.number].repeatNo = group[g].repeatNo++; - threadToHand[thrId] = st.number; + threadToHand[tu] = st.number; if (lp->first == -1) - threadGroup[thrId] = -1; + threadGroup[tu] = -1; return st; } diff --git a/src/SolveBoard.cpp b/src/SolveBoard.cpp index 7e2eb3cb..0a60ed8f 100644 --- a/src/SolveBoard.cpp +++ b/src/SolveBoard.cpp @@ -248,10 +248,11 @@ void DetectSolveDuplicates( vector& uniques, vector& crossrefs) { + const unsigned nu = static_cast(bds.noOfBoards); + uniques.clear(); - crossrefs.resize(bds.noOfBoards); + crossrefs.resize(nu); - const unsigned nu = static_cast(bds.noOfBoards); for (unsigned i = 0; i < nu; i++) crossrefs[i] = -1; @@ -260,12 +261,12 @@ void DetectSolveDuplicates( if (crossrefs[i] != -1) continue; - uniques.push_back(i); + uniques.push_back(static_cast(i)); for (unsigned index = i+1; index < nu; index++) { if (SameBoard(bds, i, index)) - crossrefs[index] = i; + crossrefs[index] = static_cast(i); } } } diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index eee5b8cd..92d9e438 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -47,13 +47,6 @@ void LastTrickWinner( int& leadSuit, int& leadSideWins); -int DumpInput( - const int errCode, - const deal& dl, - const int target, - const int solutions, - const int mode); - bool (* AB_ptr_list[DDS_HANDS])( pos * posPoint, const int target, diff --git a/src/System.cpp b/src/System.cpp index bcd1085d..b21280af 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -338,7 +338,7 @@ int System::RunThreadsWinAPI() { #ifdef DDS_THREADS_WINAPI HANDLE * solveAllEvents = static_cast( - malloc(numThreads * sizeof(HANDLE))); + malloc(static_cast(numThreads) * sizeof(HANDLE))); for (int k = 0; k < numThreads; k++) { @@ -640,21 +640,32 @@ string System::GetSystem(int& sys) const string System::GetBits(int& bits) const { - if constexpr (sizeof(void *) == 4) +#ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable: 4127) +#endif + + string st; + if (sizeof(void *) == 4) { bits = 32; - return "32 bits"; + st = "32 bits"; } - else if constexpr (sizeof(void *) == 8) + else if (sizeof(void *) == 8) { bits = 64; - return "64 bits"; + st = "64 bits"; } else { bits = 0; - return "unknown"; + st = "unknown"; } +#ifdef _MSC_VER + #pragma warning(pop) +#endif + + return st; } diff --git a/src/TransTableL.cpp b/src/TransTableL.cpp index 9da61abf..1fccfe95 100644 --- a/src/TransTableL.cpp +++ b/src/TransTableL.cpp @@ -81,6 +81,7 @@ #include #include +#include #include "TransTableL.h" #include "debug.h" @@ -999,7 +1000,7 @@ void TransTableL::PrintMatch( { vector> hands; hands.resize(DDS_HANDS); - for (int i = 0; i < DDS_HANDS; i++) + for (unsigned i = 0; i < DDS_HANDS; i++) hands[i].resize(DDS_SUITS); TransTableL::SetToPartialHands(wp.topSet1, wp.topMask1, 14, 4, hands); @@ -1052,13 +1053,13 @@ void TransTableL::DumpHands( const vector>& hands, const unsigned char lengths[][DDS_SUITS]) const { - for (int i = 0; i < DDS_SUITS; i++) + for (unsigned i = 0; i < DDS_SUITS; i++) { fout << setw(16) << "" << TransTableL::MakeHolding(hands[0][i], lengths[0][i]) << "\n"; } - for (int i = 0; i < DDS_SUITS; i++) + for (unsigned i = 0; i < DDS_SUITS; i++) { fout << setw(16) << left << TransTableL::MakeHolding(hands[3][i], lengths[3][i]) << @@ -1067,7 +1068,7 @@ void TransTableL::DumpHands( TransTableL::MakeHolding(hands[1][i], lengths[1][i]) << "\n"; } - for (int i = 0; i < DDS_SUITS; i++) + for (unsigned i = 0; i < DDS_SUITS; i++) { fout << setw(16) << "" << TransTableL::MakeHolding(hands[2][i], lengths[2][i]) << "\n"; @@ -1083,11 +1084,11 @@ void TransTableL::SetToPartialHands( const int numRanks, vector>& hands) const { - for (int s = 0; s < DDS_SUITS; s++) + for (unsigned s = 0; s < DDS_SUITS; s++) { for (int rank = maxRank; rank > maxRank - numRanks; rank--) { - int shift = 8 * (3 - s) + 2 * (rank - maxRank + 3); + int shift = 8 * static_cast(3 - s) + 2 * (rank - maxRank + 3); unsigned maskCard = mask >> shift; if (maskCard & 3) @@ -1129,8 +1130,10 @@ void TransTableL::DistToLengths( string TransTableL::SingleLenToStr(const unsigned char len[]) const { - return to_string(len[0]) + "=" + to_string(len[1]) + "=" + - to_string(len[2]) + "=" + to_string(len[3]); + return to_string(static_cast(len[0])) + "=" + + to_string(static_cast(len[1])) + "=" + + to_string(static_cast(len[2])) + "=" + + to_string(static_cast(len[3])); } @@ -1190,7 +1193,8 @@ void TransTableL::PrintAllSuits(ofstream& fout) const { for (int hand = 0; hand < DDS_HANDS; hand++) { - fout << "Trick " << trick << ", hand " << players[hand] << "\n"; + fout << "Trick " << trick << ", hand " << + players[static_cast(hand)] << "\n"; fout << string(20, '=') << "\n\n"; TransTableL::PrintSuits(fout, trick, hand); @@ -1350,7 +1354,7 @@ void TransTableL::PrintSuitStats( TransTableL::UpdateSuitHist(trick, hand, hist, num_wraps); fout << "Suit histogram for trick " << trick << ", hand " << - players[hand] << "\n"; + players[static_cast(hand)] << "\n"; TransTableL::PrintHist(fout, hist, num_wraps, DISTS_PER_ENTRY); } @@ -1375,7 +1379,7 @@ void TransTableL::PrintAllSuitStats(ofstream& fout) const num_wraps, suitWraps); fout << "Suit histogram for trick " << trick << ", hand " << - players[hand] << "\n"; + players[static_cast(hand)] << "\n"; TransTableL::PrintHist(fout, hist, num_wraps, DISTS_PER_ENTRY); } } @@ -1425,7 +1429,7 @@ void TransTableL::PrintSummarySuitStats(ofstream& fout) const TT_PERCENTILE * count, DISTS_PER_ENTRY); fout << setw(5) << right << trick << - setw(7) << players[hand] << + setw(7) << players[static_cast(hand)] << setw(8) << count << setw(8) << num_wraps; @@ -1514,7 +1518,7 @@ void TransTableL::PrintEntriesDistAndCards( TransTableL::DistToLengths(trick, handDist, len); fout << "Looking up entry for trick " << trick << ", hand " << - players[hand] << "\n"; + players[static_cast(hand)] << "\n"; fout << TransTableL::LenToStr(len) << "\n\n"; if (! bp) @@ -1583,7 +1587,7 @@ void TransTableL::PrintEntriesDist( if (! bp) { fout << "Entry not found: Trick " << trick << ", hand " << - players[hand] << "\n"; + players[static_cast(hand)] << "\n"; fout << TransTableL::LenToStr(len) << "\n\n"; return; } @@ -1624,7 +1628,7 @@ void TransTableL::PrintAllEntries(ofstream& fout) const for (int hand = 0; hand < DDS_HANDS; hand++) { const string st = "Entries, trick " + to_string(trick) + - ", hand " + players[hand]; + ", hand " + players[static_cast(hand)]; fout << st << "\n"; fout << string(st.size(), '=') << "\n\n"; TransTableL::PrintEntries(fout, trick, hand); @@ -1705,7 +1709,7 @@ void TransTableL::PrintEntryStats( TransTableL::UpdateEntryHist(trick, hand, hist, num_wraps); fout << "Entry histogram for trick " << trick << ", hands " << - players[hand] << "\n"; + players[static_cast(hand)] << "\n"; TransTableL::PrintHist(fout, hist, num_wraps, BLOCKS_PER_ENTRY); } @@ -1728,7 +1732,7 @@ void TransTableL::PrintAllEntryStats(ofstream& fout) const num_wraps, suitWraps); fout << "Entry histogram for trick " << trick << ", hands " << - players[hand] << "\n"; + players[static_cast(hand)] << "\n"; TransTableL::PrintHist(fout, hist, num_wraps, BLOCKS_PER_ENTRY); } } @@ -1807,7 +1811,7 @@ void TransTableL::PrintSummaryEntryStats(ofstream& fout) const TT_PERCENTILE * count, BLOCKS_PER_ENTRY); fout << setw(5) << right << trick << - setw(7) << players[hand] << + setw(7) << players[static_cast(hand)] << setw(8) << count << setw(8) << num_wraps << setw(8) << mean << diff --git a/src/TransTableS.cpp b/src/TransTableS.cpp index 306aa439..8f99fdde 100644 --- a/src/TransTableS.cpp +++ b/src/TransTableS.cpp @@ -939,7 +939,7 @@ void TransTableS::PrintResetStats(ofstream& fout) const fout << setw(18) << left << "Reason" << setw(6) << right << "Count" << "\n"; - for (int k = 0; k < TT_RESET_SIZE; k++) + for (unsigned k = 0; k < TT_RESET_SIZE; k++) fout << setw(18) << left << resetText[k] << setw(6) << right << statsResets.aggrResets[k] << "\n"; } diff --git a/src/dump.cpp b/src/dump.cpp index 01233a27..10ee266b 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -22,10 +22,10 @@ string PrintSuit( string PrintDeal( const unsigned short ranks[][DDS_SUITS], - const unsigned spacing); + const int spacing); -void RankToDiagrams( - unsigned short ranks[DDS_HANDS][DDS_SUITS], +string RankToDiagrams( + const unsigned short ranks[DDS_HANDS][DDS_SUITS], const nodeCardsType& node); string WinnersToText(const unsigned short winRanks[]); @@ -59,7 +59,7 @@ string PrintSuit(const unsigned short suitCode) string st; for (int r = 14; r >= 2; r--) if ((suitCode & bitMapRank[r])) - st += cardRank[r]; + st += static_cast(cardRank[r]); return st; } @@ -77,7 +77,7 @@ string PrintSuit( if ((suitCode & bitMapRank[r])) { if (r >= 15 - leastWin) - st += cardRank[r]; + st += static_cast(cardRank[r]); else st += "x"; } @@ -88,7 +88,7 @@ string PrintSuit( string PrintDeal( const unsigned short ranks[][DDS_SUITS], - const unsigned spacing) + const int spacing) { stringstream ss; for (int s = 0; s < DDS_SUITS; s++) diff --git a/test/Makefiles/Makefile_Visual b/test/Makefiles/Makefile_Visual index fb492e8b..08aeb834 100644 --- a/test/Makefiles/Makefile_Visual +++ b/test/Makefiles/Makefile_Visual @@ -15,8 +15,8 @@ # If you need to add something for the threading system, this is # the place. -BOOST32_PATH1 = \User\sheins\boost_1_66_0_x32 -BOOST32_LIB1 = $(BOOST32_PATH1)\lib32-msvc-14.0 +BOOST32_PATH1 = \User\sheins\boost_1_66_0_x32_new +BOOST32_LIB1 = $(BOOST32_PATH1)\lib32-msvc-14.1 BOOST32_PATH2 = \Users\s.hein\Documents\Programs\boost_1_66_0_x32_14_1 BOOST32_LIB2 = $(BOOST32_PATH2)\lib32-msvc-14.1 @@ -53,6 +53,7 @@ WARN_FLAGS = \ /wd4530 \ /wd4555 \ /wd4577 \ + /wd4592 \ /wd4625 \ /wd4626 \ /wd4668 \ @@ -96,7 +97,7 @@ ITEST_SOURCE_FILES = \ $(DTEST_SOURCE_FILES) \ itest.cpp -ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) +ITEST_OBJ_FILES = $(subst .cpp,.obj,$(ITEST_SOURCE_FILES)) dtest: $(DTEST_OBJ_FILES) link $(LINK1_FLAGS) $(DTEST_OBJ_FILES) $(DLIB) \ @@ -119,4 +120,3 @@ clean: # If you don't have a Linux-like setup, use "del" instead of "rm". include $(INCL_DEPENDS) - diff --git a/test/Makefiles/dds_sources.txt b/test/Makefiles/dds_sources.txt index 9c15befb..51c4b447 100644 --- a/test/Makefiles/dds_sources.txt +++ b/test/Makefiles/dds_sources.txt @@ -1,9 +1,11 @@ DDS_SOURCE_FILES = \ ../src/dds.cpp \ + ../src/dump.cpp \ ../src/ABsearch.cpp \ ../src/ABstats.cpp \ ../src/CalcTables.cpp \ ../src/DealerPar.cpp \ + ../src/File.cpp \ ../src/Init.cpp \ ../src/LaterTricks.cpp \ ../src/Memory.cpp \ @@ -21,4 +23,5 @@ DDS_SOURCE_FILES = \ ../src/TimerList.cpp \ ../src/TimeStat.cpp \ ../src/TimeStatList.cpp \ - ../src/TransTable.cpp + ../src/TransTableS.cpp \ + ../src/TransTableL.cpp diff --git a/test/Makefiles/depends_o.txt b/test/Makefiles/depends_o.txt index b879804a..06db08a2 100644 --- a/test/Makefiles/depends_o.txt +++ b/test/Makefiles/depends_o.txt @@ -1,114 +1,96 @@ -../src/dds.o: ../include/dll.h ../src/dds.h ../src/debug.h -../src/dds.o: ../include/portab.h ../src/TransTable.h ../src/TimerList.h -../src/dds.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/dds.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/dds.o: ../src/TimeStat.h ../src/Init.h -../src/ABsearch.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABsearch.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/ABsearch.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/ABsearch.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/ABsearch.o: ../src/TimeStat.h ../src/threadmem.h ../src/QuickTricks.h -../src/ABsearch.o: ../src/LaterTricks.h ../src/ABsearch.h -../src/ABstats.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABstats.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/ABstats.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/ABstats.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/ABstats.o: ../src/TimeStat.h -../src/CalcTables.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/CalcTables.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/CalcTables.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/CalcTables.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/CalcTables.o: ../src/TimeStat.h ../src/SolveBoard.h ../src/PBN.h -../src/DealerPar.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/DealerPar.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/DealerPar.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/DealerPar.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/DealerPar.o: ../src/TimeStat.h -../src/Init.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Init.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/Init.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/Init.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/Init.o: ../src/TimeStat.h ../src/threadmem.h ../src/Init.h -../src/Init.o: ../src/ABsearch.h ../src/System.h -../src/LaterTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/LaterTricks.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/LaterTricks.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/LaterTricks.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/LaterTricks.o: ../src/TimeStat.h ../src/threadmem.h -../src/LaterTricks.o: ../src/LaterTricks.h -../src/Moves.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Moves.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/Moves.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/Moves.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/Moves.o: ../src/TimeStat.h ../src/ABsearch.h -../src/Par.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Par.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/Par.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/Par.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/Par.o: ../src/TimeStat.h -../src/PlayAnalyser.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PlayAnalyser.o: ../src/TransTable.h ../include/dll.h -../src/PlayAnalyser.o: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h -../src/PlayAnalyser.o: ../src/ABstats.h ../src/Moves.h ../src/Scheduler.h -../src/PlayAnalyser.o: ../src/TimeStatList.h ../src/TimeStat.h -../src/PlayAnalyser.o: ../src/threadmem.h ../src/SolverIF.h ../src/System.h +../src/dds.o: ../include/dll.h ../src/Init.h ../src/dds.h ../include/portab.h +../src/dds.o: ../src/Memory.h ../src/TransTable.h ../src/TransTableS.h +../src/dds.o: ../src/TransTableL.h ../src/Moves.h ../src/File.h +../src/dds.o: ../src/debug.h +../src/dump.o: ../src/dump.h ../src/dds.h ../include/portab.h +../src/dump.o: ../include/dll.h ../src/Moves.h ../src/Memory.h +../src/dump.o: ../src/TransTable.h ../src/TransTableS.h ../src/TransTableL.h +../src/dump.o: ../src/File.h ../src/debug.h +../src/ABsearch.o: ../src/TransTable.h ../src/dds.h ../include/portab.h +../src/ABsearch.o: ../include/dll.h ../src/Moves.h ../src/QuickTricks.h +../src/ABsearch.o: ../src/Memory.h ../src/TransTableS.h ../src/TransTableL.h +../src/ABsearch.o: ../src/File.h ../src/debug.h ../src/LaterTricks.h +../src/ABsearch.o: ../src/ABsearch.h ../src/ABstats.h ../src/TimerList.h +../src/ABsearch.o: ../src/TimerGroup.h ../src/Timer.h ../src/dump.h +../src/ABstats.o: ../src/ABstats.h ../src/debug.h +../src/CalcTables.o: ../src/CalcTables.h ../src/dds.h ../include/portab.h +../src/CalcTables.o: ../include/dll.h ../src/SolverIF.h ../src/Memory.h +../src/CalcTables.o: ../src/TransTable.h ../src/TransTableS.h +../src/CalcTables.o: ../src/TransTableL.h ../src/Moves.h ../src/File.h +../src/CalcTables.o: ../src/debug.h ../src/SolveBoard.h ../src/System.h +../src/CalcTables.o: ../src/Scheduler.h ../src/TimeStatList.h +../src/CalcTables.o: ../src/TimeStat.h ../src/Timer.h ../src/PBN.h +../src/DealerPar.o: ../src/dds.h ../include/portab.h ../include/dll.h +../src/File.o: ../src/File.h +../src/Init.o: ../src/Init.h ../src/dds.h ../include/portab.h +../src/Init.o: ../include/dll.h ../src/Memory.h ../src/TransTable.h +../src/Init.o: ../src/TransTableS.h ../src/TransTableL.h ../src/Moves.h +../src/Init.o: ../src/File.h ../src/debug.h ../src/System.h +../src/Init.o: ../src/Scheduler.h ../src/TimeStatList.h ../src/TimeStat.h +../src/Init.o: ../src/Timer.h +../src/LaterTricks.o: ../src/LaterTricks.h ../src/dds.h ../include/portab.h +../src/LaterTricks.o: ../include/dll.h ../src/Memory.h ../src/TransTable.h +../src/LaterTricks.o: ../src/TransTableS.h ../src/TransTableL.h +../src/LaterTricks.o: ../src/Moves.h ../src/File.h ../src/debug.h +../src/Memory.o: ../src/Memory.h ../src/TransTable.h ../src/dds.h +../src/Memory.o: ../include/portab.h ../include/dll.h ../src/TransTableS.h +../src/Memory.o: ../src/TransTableL.h ../src/Moves.h ../src/File.h +../src/Memory.o: ../src/debug.h +../src/Moves.o: ../src/Moves.h ../src/dds.h ../include/portab.h +../src/Moves.o: ../include/dll.h ../src/debug.h +../src/Par.o: ../src/dds.h ../include/portab.h ../include/dll.h ../src/PBN.h +../src/PlayAnalyser.o: ../src/PlayAnalyser.h ../src/dds.h ../include/portab.h +../src/PlayAnalyser.o: ../include/dll.h ../src/SolverIF.h ../src/Memory.h +../src/PlayAnalyser.o: ../src/TransTable.h ../src/TransTableS.h +../src/PlayAnalyser.o: ../src/TransTableL.h ../src/Moves.h ../src/File.h +../src/PlayAnalyser.o: ../src/debug.h ../src/System.h ../src/Scheduler.h +../src/PlayAnalyser.o: ../src/TimeStatList.h ../src/TimeStat.h ../src/Timer.h ../src/PlayAnalyser.o: ../src/PBN.h -../src/PBN.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PBN.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/PBN.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/PBN.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/PBN.o: ../src/TimeStat.h ../src/PBN.h -../src/QuickTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/QuickTricks.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/QuickTricks.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/QuickTricks.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/QuickTricks.o: ../src/TimeStat.h ../src/threadmem.h -../src/QuickTricks.o: ../src/QuickTricks.h -../src/Scheduler.o: ../src/Scheduler.h ../src/TimeStatList.h -../src/Scheduler.o: ../src/TimeStat.h ../src/dds.h ../src/debug.h -../src/Scheduler.o: ../include/portab.h ../src/TransTable.h ../include/dll.h -../src/Scheduler.o: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h -../src/Scheduler.o: ../src/ABstats.h ../src/Moves.h -../src/SolveBoard.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/SolveBoard.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/SolveBoard.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/SolveBoard.o: ../src/TimeStat.h ../src/threadmem.h ../src/SolverIF.h -../src/SolveBoard.o: ../src/SolveBoard.h ../src/System.h ../src/PBN.h -../src/SolverIF.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolverIF.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/SolverIF.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/SolverIF.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/SolverIF.o: ../src/TimeStat.h ../src/Init.h ../src/threadmem.h -../src/SolverIF.o: ../src/ABsearch.h ../src/SolverIF.h -../src/System.o: ../include/dll.h ../src/dds.h ../src/debug.h -../src/System.o: ../include/portab.h ../src/TransTable.h ../src/TimerList.h -../src/System.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/System.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/System.o: ../src/TimeStat.h ../src/System.h ../src/SolveBoard.h -../src/System.o: ../src/PlayAnalyser.h -../src/Timer.o: ../src/Timer.h ../include/portab.h -../src/TimerGroup.o: ../src/TimerGroup.h ../src/Timer.h ../src/dds.h -../src/TimerGroup.o: ../src/debug.h ../include/portab.h ../src/TransTable.h -../src/TimerGroup.o: ../include/dll.h ../src/TimerList.h ../src/ABstats.h -../src/TimerGroup.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/TimerGroup.o: ../src/TimeStat.h +../src/PBN.o: ../src/dds.h ../include/portab.h ../include/dll.h ../src/PBN.h +../src/QuickTricks.o: ../src/QuickTricks.h ../src/dds.h ../include/portab.h +../src/QuickTricks.o: ../include/dll.h ../src/Memory.h ../src/TransTable.h +../src/QuickTricks.o: ../src/TransTableS.h ../src/TransTableL.h +../src/QuickTricks.o: ../src/Moves.h ../src/File.h ../src/debug.h +../src/Scheduler.o: ../src/Scheduler.h ../src/dds.h ../include/portab.h +../src/Scheduler.o: ../include/dll.h ../src/TimeStatList.h ../src/TimeStat.h +../src/Scheduler.o: ../src/Timer.h +../src/SolveBoard.o: ../src/SolverIF.h ../src/dds.h ../include/portab.h +../src/SolveBoard.o: ../include/dll.h ../src/Memory.h ../src/TransTable.h +../src/SolveBoard.o: ../src/TransTableS.h ../src/TransTableL.h ../src/Moves.h +../src/SolveBoard.o: ../src/File.h ../src/debug.h ../src/SolveBoard.h +../src/SolveBoard.o: ../src/System.h ../src/Scheduler.h ../src/TimeStatList.h +../src/SolveBoard.o: ../src/TimeStat.h ../src/Timer.h ../src/PBN.h +../src/SolverIF.o: ../src/SolverIF.h ../src/dds.h ../include/portab.h +../src/SolverIF.o: ../include/dll.h ../src/Memory.h ../src/TransTable.h +../src/SolverIF.o: ../src/TransTableS.h ../src/TransTableL.h ../src/Moves.h +../src/SolverIF.o: ../src/File.h ../src/debug.h ../src/Init.h +../src/SolverIF.o: ../src/ABsearch.h ../src/TimerList.h ../src/TimerGroup.h +../src/SolverIF.o: ../src/Timer.h ../src/System.h ../src/Scheduler.h +../src/SolverIF.o: ../src/TimeStatList.h ../src/TimeStat.h ../src/dump.h +../src/System.o: ../src/SolveBoard.h ../src/dds.h ../include/portab.h +../src/System.o: ../include/dll.h ../src/CalcTables.h ../src/PlayAnalyser.h +../src/System.o: ../src/parallel.h ../src/System.h ../src/Memory.h +../src/System.o: ../src/TransTable.h ../src/TransTableS.h +../src/System.o: ../src/TransTableL.h ../src/Moves.h ../src/File.h +../src/System.o: ../src/debug.h ../src/Scheduler.h ../src/TimeStatList.h +../src/System.o: ../src/TimeStat.h ../src/Timer.h +../src/Timer.o: ../src/Timer.h +../src/TimerGroup.o: ../src/TimerGroup.h ../src/Timer.h ../src/TimerList.o: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h -../src/TimerList.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/TimerList.o: ../src/TransTable.h ../include/dll.h ../src/ABstats.h -../src/TimerList.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/TimerList.o: ../src/TimeStat.h -../src/TimeStat.o: ../include/portab.h ../src/TimeStat.h +../src/TimerList.o: ../src/debug.h +../src/TimeStat.o: ../src/TimeStat.h ../src/TimeStatList.o: ../src/TimeStatList.h ../src/TimeStat.h -../src/TimeStatList.o: ../include/portab.h -../src/TransTable.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/TransTable.o: ../src/TransTable.h ../include/dll.h ../src/TimerList.h -../src/TransTable.o: ../src/TimerGroup.h ../src/Timer.h ../src/ABstats.h -../src/TransTable.o: ../src/Moves.h ../src/Scheduler.h ../src/TimeStatList.h -../src/TransTable.o: ../src/TimeStat.h -testcommon.o: ../include/dll.h ../include/portab.h testStats.h TestTimer.h -testcommon.o: dtest.h +../src/TransTableS.o: ../src/TransTableS.h ../src/TransTable.h ../src/dds.h +../src/TransTableS.o: ../include/portab.h ../include/dll.h ../src/debug.h +../src/TransTableL.o: ../src/TransTableL.h ../include/dll.h ../src/dds.h +../src/TransTableL.o: ../include/portab.h ../src/TransTable.h ../src/debug.h +args.o: args.h cst.h +compare.o: compare.h ../include/dll.h +loop.o: loop.h ../include/dll.h TestTimer.h compare.h print.h +parse.o: ../include/portab.h parse.h ../include/dll.h +print.o: print.h ../include/dll.h cst.h +testcommon.o: ../include/dll.h ../include/portab.h testcommon.h TestTimer.h +testcommon.o: parse.h loop.h compare.h print.h cst.h TestTimer.o: TestTimer.h -testStats.o: ../include/portab.h testStats.h -itest.o: ../include/dll.h testcommon.h -dtest.o: ../include/dll.h testcommon.h +itest.o: ../include/dll.h testcommon.h args.h cst.h +dtest.o: ../include/dll.h testcommon.h args.h cst.h diff --git a/test/Makefiles/depends_obj.txt b/test/Makefiles/depends_obj.txt index 9b721e81..6b696a68 100644 --- a/test/Makefiles/depends_obj.txt +++ b/test/Makefiles/depends_obj.txt @@ -2,6 +2,10 @@ ../src/dds.obj: ../include/portab.h ../src/Memory.h ../src/TransTable.h ../src/dds.obj: ../src/TransTableS.h ../src/TransTableL.h ../src/Moves.h ../src/dds.obj: ../src/File.h ../src/debug.h +../src/dump.obj: ../src/dump.h ../src/dds.h ../include/portab.h +../src/dump.obj: ../include/dll.h ../src/Moves.h ../src/Memory.h +../src/dump.obj: ../src/TransTable.h ../src/TransTableS.h +../src/dump.obj: ../src/TransTableL.h ../src/File.h ../src/debug.h ../src/ABsearch.obj: ../src/TransTable.h ../src/dds.h ../include/portab.h ../src/ABsearch.obj: ../include/dll.h ../src/Moves.h ../src/QuickTricks.h ../src/ABsearch.obj: ../src/Memory.h ../src/TransTableS.h @@ -10,14 +14,15 @@ ../src/ABsearch.obj: ../src/TimerList.h ../src/TimerGroup.h ../src/Timer.h ../src/ABsearch.obj: ../src/dump.h ../src/ABstats.obj: ../src/ABstats.h ../src/debug.h -../src/CalcTables.obj: ../src/SolverIF.h ../src/dds.h ../include/portab.h -../src/CalcTables.obj: ../include/dll.h ../src/Memory.h ../src/TransTable.h -../src/CalcTables.obj: ../src/TransTableS.h ../src/TransTableL.h -../src/CalcTables.obj: ../src/Moves.h ../src/File.h ../src/debug.h -../src/CalcTables.obj: ../src/SolveBoard.h ../src/System.h ../src/Scheduler.h -../src/CalcTables.obj: ../src/TimeStatList.h ../src/TimeStat.h ../src/Timer.h -../src/CalcTables.obj: ../src/PBN.h +../src/CalcTables.obj: ../src/CalcTables.h ../src/dds.h ../include/portab.h +../src/CalcTables.obj: ../include/dll.h ../src/SolverIF.h ../src/Memory.h +../src/CalcTables.obj: ../src/TransTable.h ../src/TransTableS.h +../src/CalcTables.obj: ../src/TransTableL.h ../src/Moves.h ../src/File.h +../src/CalcTables.obj: ../src/debug.h ../src/SolveBoard.h ../src/System.h +../src/CalcTables.obj: ../src/Scheduler.h ../src/TimeStatList.h +../src/CalcTables.obj: ../src/TimeStat.h ../src/Timer.h ../src/PBN.h ../src/DealerPar.obj: ../src/dds.h ../include/portab.h ../include/dll.h +../src/File.obj: ../src/File.h ../src/Init.obj: ../src/Init.h ../src/dds.h ../include/portab.h ../src/Init.obj: ../include/dll.h ../src/Memory.h ../src/TransTable.h ../src/Init.obj: ../src/TransTableS.h ../src/TransTableL.h ../src/Moves.h @@ -36,11 +41,12 @@ ../src/Moves.obj: ../include/dll.h ../src/debug.h ../src/Par.obj: ../src/dds.h ../include/portab.h ../include/dll.h ../src/Par.obj: ../src/PBN.h -../src/PlayAnalyser.obj: ../src/SolverIF.h ../src/dds.h ../include/portab.h -../src/PlayAnalyser.obj: ../include/dll.h ../src/Memory.h ../src/TransTable.h -../src/PlayAnalyser.obj: ../src/TransTableS.h ../src/TransTableL.h -../src/PlayAnalyser.obj: ../src/Moves.h ../src/File.h ../src/debug.h -../src/PlayAnalyser.obj: ../src/System.h ../src/Scheduler.h +../src/PlayAnalyser.obj: ../src/PlayAnalyser.h ../src/dds.h +../src/PlayAnalyser.obj: ../include/portab.h ../include/dll.h +../src/PlayAnalyser.obj: ../src/SolverIF.h ../src/Memory.h +../src/PlayAnalyser.obj: ../src/TransTable.h ../src/TransTableS.h +../src/PlayAnalyser.obj: ../src/TransTableL.h ../src/Moves.h ../src/File.h +../src/PlayAnalyser.obj: ../src/debug.h ../src/System.h ../src/Scheduler.h ../src/PlayAnalyser.obj: ../src/TimeStatList.h ../src/TimeStat.h ../src/PlayAnalyser.obj: ../src/Timer.h ../src/PBN.h ../src/PBN.obj: ../src/dds.h ../include/portab.h ../include/dll.h @@ -79,10 +85,18 @@ ../src/TimerList.obj: ../src/debug.h ../src/TimeStat.obj: ../src/TimeStat.h ../src/TimeStatList.obj: ../src/TimeStatList.h ../src/TimeStat.h +../src/TransTableS.obj: ../src/TransTableS.h ../src/TransTable.h ../src/dds.h +../src/TransTableS.obj: ../include/portab.h ../include/dll.h ../src/debug.h +../src/TransTableL.obj: ../src/TransTableL.h ../include/dll.h ../src/dds.h +../src/TransTableL.obj: ../include/portab.h ../src/TransTable.h +../src/TransTableL.obj: ../src/debug.h args.obj: args.h cst.h -parse.obj: ../include/dll.h parse.h -testcommon.obj: ../include/dll.h ../include/portab.h TestTimer.h parse.h -testcommon.obj: cst.h testcommon.h +compare.obj: compare.h ../include/dll.h +loop.obj: loop.h ../include/dll.h TestTimer.h compare.h print.h +parse.obj: ../include/portab.h parse.h ../include/dll.h +print.obj: print.h ../include/dll.h cst.h +testcommon.obj: ../include/dll.h ../include/portab.h testcommon.h TestTimer.h +testcommon.obj: parse.h loop.h compare.h print.h cst.h TestTimer.obj: TestTimer.h itest.obj: ../include/dll.h testcommon.h args.h cst.h dtest.obj: ../include/dll.h testcommon.h args.h cst.h diff --git a/test/args.cpp b/test/args.cpp index 506c5f2c..ff33b67a 100644 --- a/test/args.cpp +++ b/test/args.cpp @@ -209,7 +209,7 @@ void ReadArgs( SetDefaults(); - int c, m; + int c, m = 0; bool errFlag = false, matchFlag; string stmp; char * ctmp; @@ -250,7 +250,7 @@ void ReadArgs( transform(s.begin(), s.end(), s.begin(), ::tolower); if (stmp == s) { - m = i; + m = static_cast(i); matchFlag = true; } } @@ -276,7 +276,7 @@ void ReadArgs( transform(s.begin(), s.end(), s.begin(), ::tolower); if (stmp == s) { - m = i; + m = static_cast(i); matchFlag = true; } } @@ -299,7 +299,7 @@ void ReadArgs( nextToken -= 2; errFlag = true; } - options.numThreads = static_cast(m); + options.numThreads = m; break; case 'm': @@ -310,7 +310,7 @@ void ReadArgs( nextToken -= 2; errFlag = true; } - options.memoryMB = static_cast(m); + options.memoryMB = m; break; default: diff --git a/test/itest.cpp b/test/itest.cpp index cb5ead27..386a96a1 100644 --- a/test/itest.cpp +++ b/test/itest.cpp @@ -17,6 +17,10 @@ #include "args.h" #include "cst.h" +using namespace std; + +OptionsType options; + int main(int argc, char * argv[]) { @@ -25,7 +29,7 @@ int main(int argc, char * argv[]) if (options.threading != DTEST_THREADING_DEFAULT) SetThreading(static_cast(options.threading)); - SetResources(options.memory.MB, options.numThreads); + SetResources(options.memoryMB, options.numThreads); DDSInfo info; GetDDSInfo(&info); diff --git a/test/loop.cpp b/test/loop.cpp index 3e7e35f5..cded8333 100644 --- a/test/loop.cpp +++ b/test/loop.cpp @@ -10,6 +10,7 @@ #include #include +#include #include "loop.h" #include "TestTimer.h" diff --git a/test/parse.cpp b/test/parse.cpp index 9a4969c2..4560499a 100644 --- a/test/parse.cpp +++ b/test/parse.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include "../include/portab.h" #include "parse.h" @@ -79,6 +80,10 @@ bool strip_quotes( int& res, const string& errtag); +string trimTrailing( + const string& st, + const char c); + void splitIntoWords( const string& text, vector& words); @@ -88,7 +93,6 @@ bool str2int( int& res); -#include "print.h" bool read_file( const string& fname, int& number, @@ -114,6 +118,7 @@ bool read_file( } vector list; + list.clear(); splitIntoWords(line, list); if (list.size() == 2 && get_head_element(list[0], "NUMBER")) @@ -311,20 +316,21 @@ bool parse_FUT( } const int n = fut->cards; - for (int c = 0; c < n; c++) + const unsigned nu = static_cast(fut->cards); + for (unsigned c = 0; c < nu; c++) if (! get_int_element(list[c+2], fut->suit[c], "FUT suit")) return false; - for (int c = 0; c < n; c++) - if (! get_int_element(list[c+n+2], fut->rank[c], "FUT rank")) + for (unsigned c = 0; c < nu; c++) + if (! get_int_element(list[c+nu+2], fut->rank[c], "FUT rank")) return false; - for (int c = 0; c < n; c++) - if (! get_int_element(list[c+2*n+2], fut->equals[c], "FUT equals")) + for (unsigned c = 0; c < nu; c++) + if (! get_int_element(list[c+2*nu+2], fut->equals[c], "FUT equals")) return false; - for (int c = 0; c < n; c++) - if (! get_int_element(list[c+3*n+2], fut->score[c], "FUT score")) + for (unsigned c = 0; c < nu; c++) + if (! get_int_element(list[c+3*nu+2], fut->score[c], "FUT score")) return false; return true; @@ -344,9 +350,9 @@ bool parse_TABLE( if (! get_head_element(list[0], "TABLE")) return false; - for (int suit = 0; suit < DDS_STRAINS; suit++) + for (unsigned suit = 0; suit < DDS_STRAINS; suit++) { - for (int pl = 0; pl < DDS_HANDS; pl++) + for (unsigned pl = 0; pl < DDS_HANDS; pl++) { if (! get_int_element(list[DDS_HANDS * suit + pl + 1], table->resTable[suit][pl], "TABLE entry")) @@ -412,9 +418,10 @@ bool parse_DEALERPAR( const vector& list, parResultsDealer * par) { - if (list.size() < 3) + const unsigned l = list.size(); + if (l < 3) { - cout << "PAR2 list does not have 3+ elements: " << list.size() << endl; + cout << "PAR2 list does not have 3+ elements: " << l << endl; return false; } @@ -424,15 +431,15 @@ bool parse_DEALERPAR( if (! strip_quotes(list[1], par->score, "PBN string")) return false; - int no = 0; - while (1) + unsigned no = 0; + while (no+2 < l) { if (! strip_quotes(list[no+2], par->contracts[no], "PAR2 contract")) break; no++; } - par->number = no; + par->number = static_cast(no); return true; } @@ -476,7 +483,7 @@ bool parse_TRACE( if (! get_int_element(list[1], solvedp->number, "TRACE number")) return false; - for (int i = 0; i < solvedp->number; i++) + for (unsigned i = 0; i < static_cast(solvedp->number); i++) if (! get_int_element(list[2+i], solvedp->tricks[i], "TRACE element")) return false; @@ -509,10 +516,11 @@ bool parse_GIB( for (int s = 0; s < DDS_STRAINS; s++) { dds_strain = (s == 0 ? 4 : s - 1); - for (int h = 0; h < DDS_HANDS; h++) + for (unsigned h = 0; h < DDS_HANDS; h++) { dds_hand = GIB_TO_DDS[h]; - char const c = (line.substr(68 + 4*s + h, 1).c_str())[0]; + char const c = (line.substr( + 68 + 4*static_cast(s) + h, 1).c_str())[0]; int d; if (c >= 48 && c <= 57) // 0, 9 d = c-48; @@ -620,6 +628,21 @@ bool strip_quotes( } +string trimTrailing( + const string& text, + const char c) +{ + unsigned pos = static_cast(text.length()); + while (pos >= 1 && text.at(pos-1) == c) + pos--; + + if (pos == 0) + return ""; + else + return text.substr(0, pos); +} + + void splitIntoWords( const string& text, vector& words) @@ -628,15 +651,26 @@ void splitIntoWords( unsigned pos = 0; unsigned startPos = 0; bool isSpace = true; - const unsigned l = static_cast(text.length()); + + // It seems compilers have different ideas about files. + const unsigned tl = text.length(); + string ttext; + if (text.back() == ' ') + ttext = text.substr(0, tl-1); + else if (text.at(tl-2) == ' ') + ttext = text.substr(0, tl-2); + else + ttext = text; + + const unsigned l = static_cast(ttext.length()); while (pos < l) { - if (text.at(pos) == ' ') + if (ttext.at(pos) == ' ') { if (! isSpace) { - words.push_back(text.substr(startPos, pos-startPos)); + words.push_back(ttext.substr(startPos, pos-startPos)); isSpace = true; } } @@ -649,7 +683,7 @@ void splitIntoWords( } if (! isSpace) - words.push_back(text.substr(startPos, pos-startPos)); + words.push_back(ttext.substr(startPos, pos-startPos)); } diff --git a/test/print.cpp b/test/print.cpp index 644ae34a..fcaccb03 100644 --- a/test/print.cpp +++ b/test/print.cpp @@ -96,10 +96,10 @@ void print_FUT(const futureTricks& fut) string equals_to_string(const int equals) { string st = ""; - for (int i = 15; i >= 2; i--) + for (unsigned i = 15; i >= 2; i--) { if (equals & dbitMapRank[i]) - st += dcardRank[i]; + st += static_cast(dcardRank[i]); } return (st == "" ? "-" : st); } diff --git a/test/print.h b/test/print.h index c3ef4ff2..98ccc154 100644 --- a/test/print.h +++ b/test/print.h @@ -24,8 +24,6 @@ void print_PBN(const dealPBN& dl); void print_FUT(const futureTricks& fut); -string equals_to_string(const int equals); - void print_TABLE(const ddTableResults& table); void print_PAR(const parResults& par); diff --git a/test/testcommon.cpp b/test/testcommon.cpp index 37fa3ee2..18b3a3ef 100644 --- a/test/testcommon.cpp +++ b/test/testcommon.cpp @@ -25,6 +25,10 @@ using namespace std; +string GetSystem(); +string GetBits(); +string GetCompiler(); + const vector DDS_SYSTEM_PLATFORM = { @@ -133,7 +137,8 @@ int realMain(int argc, char * argv[]) } else { - cout << "Unknown type " << options.solver << "\n"; + cout << "Unknown type " << + static_cast(options.solver) << "\n"; exit(0); } From d54f2d042f8573372974138b4851ac19b1ed7cd7 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Mon, 2 Apr 2018 22:34:01 +0200 Subject: [PATCH 127/132] Works on mings (dtest and itest) --- src/Makefiles/Makefile_mingw | 7 +------ test/Makefiles/Makefile_mingw | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Makefiles/Makefile_mingw b/src/Makefiles/Makefile_mingw index 0352937f..0ab02d08 100644 --- a/src/Makefiles/Makefile_mingw +++ b/src/Makefiles/Makefile_mingw @@ -35,12 +35,7 @@ CC_BOOST_LINK = -lboost_system -lboost_thread THREAD_COMPILE = -fopenmp THREAD_LINK = -lgomp $(CC_BOOST_LINK) -# 2. The small memory option, which causes DDS to consume a lot less -# memory and to run somewhat more slowly. - -SMALL_MEMORY = -DSMALL_MEMORY_OPTION - -# 3. Debugging options. (There are more granular options in debug.h.) +# 2. Debugging options. (There are more granular options in debug.h.) DEBUG_ALL = -DDDS_DEBUG_ALL TIMING = -DDDS_TIMING diff --git a/test/Makefiles/Makefile_mingw b/test/Makefiles/Makefile_mingw index 4db4601c..8738dc6e 100644 --- a/test/Makefiles/Makefile_mingw +++ b/test/Makefiles/Makefile_mingw @@ -15,7 +15,7 @@ # If you need to add something for the threading system, this is # the place. -THREAD_LINK = +THREAD_LINK = -lboost_system -lboost_thread -lgomp # ----------------------- OFTEN OK ------------------------------ From 5ec191080dce419d96957a9957599dd798ee0519 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Mon, 2 Apr 2018 22:41:05 +0200 Subject: [PATCH 128/132] Small doc updates --- ChangeLog | 10 +++++++++- INSTALL | 12 ++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index e279fbd4..7f73551b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,12 +10,20 @@ Included code for a number of multi-threading systems: - STLIMPL (new, don't use) - PPLIMPL (new, don't use) +Tested combinations include: +- Visual C++ with Windows API, OpenMP, Boost, STL +- Cygwin g++ with Windows API, OpenMP, Boost, STL +- mingw g++ with OpenMP, Boost, STL +- Linux g++ with OpenMP, Boost, STL +- MacOS clang with GCD, Boost, STL (static and shared library) +- MacOS GNU g++ with OpenMP, Boost, STL + The number of threads is now unlimited in principle, although the DLL will not let you go beyond 1.5 * the number of processor cores. Enabled the transposition-table code for both the large and the small versions in the same DLL. Therefore there is only a single DLL -distributed now for both. +distributed now for both. The SMALL_MEMORY compile switch is gone. Enabled the DLL to pick the best combination of large and small transposition tables for a given resource set-up consisting of diff --git a/INSTALL b/INSTALL index 96aa7cd2..fdee6044 100644 --- a/INSTALL +++ b/INSTALL @@ -195,17 +195,9 @@ You can invoke the program as ./dtest.exe which should just give a brief usage message. If that works, then -you can invoke the program like this: +you can invoke the program like this, for example: -./dtest.exe file.txt mode [number of threads] - -file.txt has to be the name of a file EITHER in the current -directory OR in ../hands. The program checks first in the current -directory. A good starting example is list100.txt. - -[TODO UPDATE] - -mode has to be one of solve, calc, play, par and dealerpar. +./dtest.exe -f ../hands/list100.txt -s solve -n 4 -m 1000 The number of threads is optional. If it is not supplied, DDS figures one out itself. If it is supplied, then it is passed to From 47a474bc8e79ae9be0b65c8d328ee3221aa24c12 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Mon, 2 Apr 2018 23:53:07 +0200 Subject: [PATCH 129/132] Might now work with Visual C++, cygwin, mingw, Linux, Mac (clang/g++) shared and static... --- src/DealerPar.cpp | 1 + src/Init.cpp | 1 + src/Makefiles/Makefile_Mac_clang_shared | 7 +- src/Makefiles/Makefile_Mac_clang_static | 7 +- src/Makefiles/Makefile_linux_shared | 7 +- src/Par.cpp | 4 +- src/System.cpp | 1 + src/TransTable.h | 18 +++ test/Makefiles/Makefile_Mac_clang | 183 +++++++---------------- test/Makefiles/Makefile_Mac_clang_new | 114 --------------- test/Makefiles/Makefile_Mac_gcc | 185 ++++++----------------- test/Makefiles/Makefile_Mac_gcc_new | 115 --------------- test/Makefiles/Makefile_linux | 186 ++++++------------------ test/Makefiles/Makefile_linux_new | 115 --------------- test/args.cpp | 2 +- test/compare.cpp | 1 + test/loop.cpp | 9 +- test/parse.cpp | 2 + 18 files changed, 183 insertions(+), 775 deletions(-) delete mode 100644 test/Makefiles/Makefile_Mac_clang_new delete mode 100644 test/Makefiles/Makefile_Mac_gcc_new delete mode 100644 test/Makefiles/Makefile_linux_new diff --git a/src/DealerPar.cpp b/src/DealerPar.cpp index c767fc5c..46facd7c 100644 --- a/src/DealerPar.cpp +++ b/src/DealerPar.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include "dds.h" diff --git a/src/Init.cpp b/src/Init.cpp index 68d53aff..0820bfc7 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -9,6 +9,7 @@ #include +#include #include "Init.h" #include "System.h" diff --git a/src/Makefiles/Makefile_Mac_clang_shared b/src/Makefiles/Makefile_Mac_clang_shared index f93cd28d..f3b44543 100644 --- a/src/Makefiles/Makefile_Mac_clang_shared +++ b/src/Makefiles/Makefile_Mac_clang_shared @@ -32,12 +32,7 @@ CC_BOOST_LINK = -L$(CC_BOOST)/lib -lboost_system -lboost_thread-mt THREAD_COMPILE = THREAD_LINK = $(CC_BOOST_LINK) -# 2. The small memory option, which causes DDS to consume a lot less -# memory and to run somewhat more slowly. - -SMALL_MEMORY = -DSMALL_MEMORY_OPTION - -# 3. Debugging options. (There are more granular options in debug.h.) +# 2. Debugging options. (There are more granular options in debug.h.) DEBUG_ALL = -DDDS_DEBUG_ALL TIMING = -DDDS_TIMING diff --git a/src/Makefiles/Makefile_Mac_clang_static b/src/Makefiles/Makefile_Mac_clang_static index 20b80206..911ed4cc 100644 --- a/src/Makefiles/Makefile_Mac_clang_static +++ b/src/Makefiles/Makefile_Mac_clang_static @@ -32,12 +32,7 @@ CC_BOOST_LINK = -L$(CC_BOOST)/lib -lboost_system -lboost_thread-mt THREAD_COMPILE = THREAD_LINK = $(CC_BOOST_LINK) -# 2. The small memory option, which causes DDS to consume a lot less -# memory and to run somewhat more slowly. - -SMALL_MEMORY = -DSMALL_MEMORY_OPTION - -# 3. Debugging options. (There are more granular options in debug.h.) +# 2. Debugging options. (There are more granular options in debug.h.) DEBUG_ALL = -DDDS_DEBUG_ALL TIMING = -DDDS_TIMING diff --git a/src/Makefiles/Makefile_linux_shared b/src/Makefiles/Makefile_linux_shared index 8336fd78..ec4a2c8a 100644 --- a/src/Makefiles/Makefile_linux_shared +++ b/src/Makefiles/Makefile_linux_shared @@ -30,12 +30,7 @@ CC_BOOST_LINK = -lboost_system -lboost_thread THREAD_COMPILE = -fopenmp THREAD_LINK = -fopenmp $(CC_BOOST_LINK) -# 2. The small memory option, which causes DDS to consume a lot less -# memory and to run somewhat more slowly. - -SMALL_MEMORY = -DSMALL_MEMORY_OPTION - -# 3. Debugging options. (There are more granular options in debug.h.) +# 2. Debugging options. (There are more granular options in debug.h.) DEBUG_ALL = -DDDS_DEBUG_ALL TIMING = -DDDS_TIMING diff --git a/src/Par.cpp b/src/Par.cpp index 59bcf47a..89dbe032 100644 --- a/src/Par.cpp +++ b/src/Par.cpp @@ -10,6 +10,7 @@ #include #include +#include #include "dds.h" #include "PBN.h" @@ -523,7 +524,8 @@ int STDCALL SidesParBin( checked that the lowered contract still gets the score bonus points that is present in par score.*/ - sc2 = abs(best_par_score[i]); + sc2 = (best_par_score[i] >= 0 ? + best_par_score[i] : -best_par_score[i]); /* Score for making the tentative lower par contract. */ while (max_lower > 0) { diff --git a/src/System.cpp b/src/System.cpp index b21280af..184ca0c0 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include "SolveBoard.h" #include "CalcTables.h" diff --git a/src/TransTable.h b/src/TransTable.h index e65cce96..ab97f3f5 100644 --- a/src/TransTable.h +++ b/src/TransTable.h @@ -51,6 +51,16 @@ struct nodeCardsType // 8 bytes #pragma warning(disable: 4100) #endif +#ifdef __APPLE__ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wunused-parameter" +#endif + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + class TransTable { public: @@ -144,4 +154,12 @@ class TransTable #pragma warning(pop) #endif +#ifdef __APPLE__ + #pragma clang diagnostic pop +#endif + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif + #endif diff --git a/test/Makefiles/Makefile_Mac_clang b/test/Makefiles/Makefile_Mac_clang index e99ad913..a07fa370 100644 --- a/test/Makefiles/Makefile_Mac_clang +++ b/test/Makefiles/Makefile_Mac_clang @@ -1,9 +1,10 @@ -# This is a Makefile for the dtest test program, -# for Mac and the clang compiler. +# --------------------- INFORMATION -------------------------------- -# It does assume a Unix-like setup for some commands, -# but if you only want to call "make" with the default target, -# you should be OK. +# This the test Makefile for MacOS and the clang compiler. +# It assumes a Unix-like setup for some commands. + +# The dtest program itself does not use multi-threading, +# but the library might, depending on how it was compiled. # The Makefile also allows an "un-official" and ugly, but # sometimes practical compilation of a directly integrated @@ -11,15 +12,32 @@ # uses the source and object files in the src directory... # Use "make itest" at your own risk. +# If you need to add something for the threading system, this is +# the place. + +# This is only necessary for the .a static library, actually. + +CC_BOOST = /usr/local/Cellar/boost/1.56.0 +CC_BOOST_LINK = -L$(CC_BOOST)/lib -lboost_system -lboost_thread-mt + +THREAD_LINK = $(CC_BOOST_LINK) + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_DDS_SOURCE = Makefiles/dds_sources.txt +INCL_OWN_SOURCE = Makefiles/own_sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt # If your compiler name is not given here, change it. CC = g++ -# Use this one to get single-threading -CC_FLAGS = -O3 -flto -mtune=generic +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... -# These flags are not turned on by default, but DDS should pass them. -# Turn them on below. WARN_FLAGS = \ -Wshadow \ -Wsign-conversion \ @@ -43,154 +61,55 @@ WARN_FLAGS = \ -Wno-long-long \ -Wno-format -# Here you can turn on warnings. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -DTEST = dtest -ITEST = itest +COMPILE_FLAGS = -O3 -flto -mtune=generic \ + $(WARN_FLAGS) -std=c++11 DLLBASE = dds STATIC_LIB = lib$(DLLBASE).a DLIB = $(DLLBASE).lib -# This is in addition to $(DTEST).cpp -DTEST_SOURCE_FILES = \ - testcommon.cpp \ - testStats.cpp +LINK1_FLAGS = +LINK2_FLAGS = $(THREAD_LINK) \ + -L. -l$(DLLBASE) +LINK3_FLAGS = $(THREAD_LINK) -# TODO: This is only for the .a static library. -CC_BOOST = /usr/local/Cellar/boost/1.56.0 -CC_BOOST_LINK = -L$(CC_BOOST)/lib -lboost_system -lboost_thread-mt +# This is in addition to $(DTEST).cpp -LIB_FLAGS = -L. -l$(DLLBASE) $(CC_BOOST_LINK) +include $(INCL_OWN_SOURCE) DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o +DTEST = dtest +ITEST = itest + # These are the files that we steal from the src directory. -SRC = ../src -STOLEN_SOURCE_FILES = \ - $(SRC)/dds.cpp \ - $(SRC)/ABsearch.cpp \ - $(SRC)/ABstats.cpp \ - $(SRC)/CalcTables.cpp \ - $(SRC)/DealerPar.cpp \ - $(SRC)/Init.cpp \ - $(SRC)/LaterTricks.cpp \ - $(SRC)/Moves.cpp \ - $(SRC)/Par.cpp \ - $(SRC)/PlayAnalyser.cpp \ - $(SRC)/PBN.cpp \ - $(SRC)/QuickTricks.cpp \ - $(SRC)/Scheduler.cpp \ - $(SRC)/SolveBoard.cpp \ - $(SRC)/SolverIF.cpp \ - $(SRC)/Stats.cpp \ - $(SRC)/Timer.cpp \ - $(SRC)/TransTable.cpp + +include $(INCL_DDS_SOURCE) ITEST_SOURCE_FILES = \ - $(STOLEN_SOURCE_FILES) \ + $(DDS_SOURCE_FILES) \ $(DTEST_SOURCE_FILES) \ itest.cpp ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) dtest: $(DTEST_OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(DTEST_OBJ_FILES) $(LIB_FLAGS) -o $(DTEST) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(DTEST_OBJ_FILES) \ + $(LINK2_FLAGS) -o $(DTEST) itest: $(ITEST_OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(ITEST_OBJ_FILES) -o $(ITEST) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(ITEST_OBJ_FILES) \ + $(LINK3_FLAGS) -o $(ITEST) %.o: %.cpp - $(CC) $(CC_FULL_FLAGS) -c $< -o $*.o + $(CC) $(COMPILE_FLAGS) -c $< -o $*.o depend: makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp clean: - rm -f $(ITEST_OBJ_FILES) $(DTEST).o $(DTEST) $(ITEST) $(STATIC_LIB) - - -# DO NOT DELETE - -../src/dds.o: ../include/dll.h ../src/dds.h ../src/debug.h ../include/portab.h -../src/dds.o: ../src/TransTable.h ../src/Timer.h ../src/ABstats.h -../src/dds.o: ../src/Moves.h ../src/Stats.h ../src/Scheduler.h ../src/Init.h -../src/ABsearch.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABsearch.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABsearch.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABsearch.o: ../src/Scheduler.h ../src/threadmem.h ../src/QuickTricks.h -../src/ABsearch.o: ../src/LaterTricks.h ../src/ABsearch.h -../src/ABstats.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABstats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABstats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABstats.o: ../src/Scheduler.h -../src/CalcTables.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/CalcTables.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/CalcTables.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/CalcTables.o: ../src/Scheduler.h ../src/SolveBoard.h ../src/PBN.h -../src/DealerPar.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/DealerPar.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/DealerPar.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/DealerPar.o: ../src/Scheduler.h -../src/Init.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Init.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Init.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Init.o: ../src/Scheduler.h ../src/threadmem.h ../src/Init.h -../src/Init.o: ../src/ABsearch.h -../src/LaterTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/LaterTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/LaterTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/LaterTricks.o: ../src/Scheduler.h ../src/threadmem.h -../src/LaterTricks.o: ../src/LaterTricks.h -../src/Moves.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Moves.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Moves.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Moves.o: ../src/Scheduler.h ../src/ABsearch.h -../src/Par.o: ../src/dds.h ../src/debug.h ../include/portab.h ../src/TransTable.h -../src/Par.o: ../include/dll.h ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/Par.o: ../src/Stats.h ../src/Scheduler.h -../src/PlayAnalyser.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PlayAnalyser.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PlayAnalyser.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PlayAnalyser.o: ../src/Scheduler.h ../src/threadmem.h -../src/PlayAnalyser.o: ../src/SolverIF.h ../src/PBN.h -../src/PBN.o: ../src/dds.h ../src/debug.h ../include/portab.h ../src/TransTable.h -../src/PBN.o: ../include/dll.h ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/PBN.o: ../src/Stats.h ../src/Scheduler.h ../src/PBN.h -../src/QuickTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/QuickTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/QuickTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/QuickTricks.o: ../src/Scheduler.h ../src/threadmem.h -../src/QuickTricks.o: ../src/QuickTricks.h -../src/Scheduler.o: ../src/Scheduler.h ../src/dds.h ../src/debug.h -../src/Scheduler.o: ../include/portab.h ../src/TransTable.h ../include/dll.h -../src/Scheduler.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/Scheduler.o: ../src/Stats.h -../src/SolveBoard.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolveBoard.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolveBoard.o: ../src/Scheduler.h ../src/threadmem.h ../src/SolverIF.h -../src/SolveBoard.o: ../src/SolveBoard.h ../src/PBN.h -../src/SolverIF.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolverIF.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolverIF.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolverIF.o: ../src/Scheduler.h ../src/Init.h ../src/threadmem.h -../src/SolverIF.o: ../src/ABsearch.h ../src/SolverIF.h -../src/Stats.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Stats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Stats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Stats.o: ../src/Scheduler.h -../src/Timer.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Timer.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Timer.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Timer.o: ../src/Scheduler.h -../src/TransTable.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/TransTable.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/TransTable.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/TransTable.o: ../src/Scheduler.h -testcommon.o: ../include/dll.h ../include/portab.h testStats.h dtest.h -testStats.o: ../include/portab.h testStats.h -itest.o: ../include/dll.h testcommon.h -dtest.o: ../include/dll.h testcommon.h + rm -f $(ITEST_OBJ_FILES) $(DTEST).o \ + $(DTEST) $(ITEST) $(STATIC_LIB) + +include $(INCL_DEPENDS) + diff --git a/test/Makefiles/Makefile_Mac_clang_new b/test/Makefiles/Makefile_Mac_clang_new deleted file mode 100644 index 43a90195..00000000 --- a/test/Makefiles/Makefile_Mac_clang_new +++ /dev/null @@ -1,114 +0,0 @@ -# --------------------- INFORMATION -------------------------------- - -# This the test Makefile for MacOS and the clang compiler. -# It assumes a Unix-like setup for some commands. - -# The dtest program itself does not use multi-threading, -# but the library might, depending on how it was compiled. - -# The Makefile also allows an "un-official" and ugly, but -# sometimes practical compilation of a directly integrated -# executable (i.e. not using the DLL). For this the Makefile -# uses the source and object files in the src directory... -# Use "make itest" at your own risk. - -# If you need to add something for the threading system, this is -# the place. - -# This is only necessary for the .a static library, actually. - -CC_BOOST = /usr/local/Cellar/boost/1.56.0 -CC_BOOST_LINK = -L$(CC_BOOST)/lib -lboost_system -lboost_thread-mt - -THREAD_LINK = $(CC_BOOST_LINK) - -# ----------------------- OFTEN OK ------------------------------ - -# From here on you you don't have to change anything to CONFIGURE -# the compilation. But you may well have to change something to -# get it to compile. - -INCL_DDS_SOURCE = Makefiles/dds_sources.txt -INCL_OWN_SOURCE = Makefiles/own_sources.txt -INCL_DEPENDS = Makefiles/depends_o.txt - -# If your compiler name is not given here, change it. -CC = g++ - -# We compile with aggressive warnings, but we have to turn off some -# of them as they appear in libraries in great numbers... - -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wcomment \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wredundant-decls \ - -Wsign-promo \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -COMPILE_FLAGS = -O3 -flto -mtune=generic \ - $(WARN_FLAGS) - -DLLBASE = dds -STATIC_LIB = lib$(DLLBASE).a -DLIB = $(DLLBASE).lib - -LINK1_FLAGS = -LINK2_FLAGS = - $(THREAD_LINK) \ - -L. -l$(DLLBASE) - -# This is in addition to $(DTEST).cpp - -include $(INCL_OWN_SOURCE) - -DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o - -DTEST = dtest -ITEST = itest - -# These are the files that we steal from the src directory. - -include $(INCL_DDS_SOURCE) - -ITEST_SOURCE_FILES = \ - $(DDS_SOURCE_FILES) \ - $(DTEST_SOURCE_FILES) \ - itest.cpp - -ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) - -dtest: $(DTEST_OBJ_FILES) - $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(DTEST_OBJ_FILES) \ - $(LINK2_FLAGS)) -o $(DTEST) - -itest: $(ITEST_OBJ_FILES) - $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(ITEST_OBJ_FILES) \ - $(LINK2_FLAGS) -o $(ITEST) - -%.o: %.cpp - $(CC) $(COMPILE_FLAGS) -c $< -o $*.o - -depend: - makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp - -clean: - rm -f $(ITEST_OBJ_FILES) $(DTEST).o \ - $(DTEST) $(ITEST) $(STATIC_LIB) - -include $(INCL_DEPENDS) - diff --git a/test/Makefiles/Makefile_Mac_gcc b/test/Makefiles/Makefile_Mac_gcc index 12fc4a62..835f8a9c 100644 --- a/test/Makefiles/Makefile_Mac_gcc +++ b/test/Makefiles/Makefile_Mac_gcc @@ -1,12 +1,10 @@ -# This is a Makefile for the dtest test program, -# for Mac and the GNU g++ compiler. +# --------------------- INFORMATION -------------------------------- -# It does assume a Unix-like setup for some commands, -# but if you only want to call "make" with the default target, -# you should be OK. +# This the test Makefile for MacOS and the GNU g++ compiler. +# It assumes a Unix-like setup for some commands. -# The test program itself does not use multi-threading, -# but the DLL might, depending on how it was compiled. +# The dtest program itself does not use multi-threading, +# but the library might, depending on how it was compiled. # The Makefile also allows an "un-official" and ugly, but # sometimes practical compilation of a directly integrated @@ -14,17 +12,30 @@ # uses the source and object files in the src directory... # Use "make itest" at your own risk. +# If you need to add something for the threading system, this is +# the place. + +CC_BOOST = /usr/local/Cellar/boost/1.56.0 +CC_BOOST_LINK = -L$(CC_BOOST)/lib -lboost_system -lboost_thread-mt + +THREAD_LINK = $(CC_BOOST_LINK) + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_DDS_SOURCE = Makefiles/dds_sources.txt +INCL_OWN_SOURCE = Makefiles/own_sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt # If your compiler name is not given here, change it. CC = gcc-4.9 -# Use this one to get single-threading -# CC_FLAGS = -O3 -flto -mtune=generic -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -fopenmp -mtune=generic +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... -# These flags are not turned on by default, but DDS should pass them. -# Turn them on below. WARN_FLAGS = \ -Wshadow \ -Wsign-conversion \ @@ -50,155 +61,55 @@ WARN_FLAGS = \ -Wno-long-long \ -Wno-format -# Here you can turn on warnings. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -DTEST = dtest -ITEST = itest +COMPILE_FLAGS = -O3 -flto -fopenmp -mtune=generic \ + $(WARN_FLAGS) -std=c++11 DLLBASE = dds STATIC_LIB = lib$(DLLBASE).a +SHARED_LIB = lib$(DLLBASE).so DLIB = $(DLLBASE).lib -# This is in addition to $(DTEST).cpp -DTEST_SOURCE_FILES = \ - testcommon.cpp \ - testStats.cpp +LINK1_FLAGS = +LINK2_FLAGS = $(THREAD_LINK) \ + -L. -l$(DLLBASE) \ + -lgomp -lstdc++ -#TODO: This is only for the .a static library. -CC_BOOST = /usr/local/Cellar/boost/1.56.0 -CC_BOOST_LINK = -L$(CC_BOOST)/lib -lboost_system -lboost_thread-mt +# This is in addition to $(DTEST).cpp -LIB_FLAGS = -L. -l$(DLLBASE) $(CC_BOOST_LINK) -LD_FLAGS = -lgomp -lstdc++ +include $(INCL_OWN_SOURCE) DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o +DTEST = dtest +ITEST = itest + # These are the files that we steal from the src directory. -SRC = ../src -STOLEN_SOURCE_FILES = \ - $(SRC)/dds.cpp \ - $(SRC)/ABsearch.cpp \ - $(SRC)/ABstats.cpp \ - $(SRC)/CalcTables.cpp \ - $(SRC)/DealerPar.cpp \ - $(SRC)/Init.cpp \ - $(SRC)/LaterTricks.cpp \ - $(SRC)/Moves.cpp \ - $(SRC)/Par.cpp \ - $(SRC)/PlayAnalyser.cpp \ - $(SRC)/PBN.cpp \ - $(SRC)/QuickTricks.cpp \ - $(SRC)/Scheduler.cpp \ - $(SRC)/SolveBoard.cpp \ - $(SRC)/SolverIF.cpp \ - $(SRC)/Stats.cpp \ - $(SRC)/Timer.cpp \ - $(SRC)/TransTable.cpp + +include $(INCL_DDS_SOURCE) ITEST_SOURCE_FILES = \ - $(STOLEN_SOURCE_FILES) \ + $(DDS_SOURCE_FILES) \ $(DTEST_SOURCE_FILES) \ itest.cpp ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) dtest: $(DTEST_OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(DTEST_OBJ_FILES) $(LIB_FLAGS) $(LD_FLAGS) -o $(DTEST) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(DTEST_OBJ_FILES) \ + $(LINK2_FLAGS) -o $(DTEST) itest: $(ITEST_OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(ITEST_OBJ_FILES) $(LD_FLAGS) -o $(ITEST) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(ITEST_OBJ_FILES) \ + $(LINK2_FLAGS) -o $(ITEST) %.o: %.cpp - $(CC) $(CC_FULL_FLAGS) -c $< -o $*.o + $(CC) $(COMPILE_FLAGS) -c $< -o $*.o depend: makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp clean: - rm -f *.o $(DTEST) $(ITEST) $(STATIC_LIB) - - -# DO NOT DELETE - -../src/dds.o: ../include/dll.h ../src/dds.h ../src/debug.h ../include/portab.h -../src/dds.o: ../src/TransTable.h ../src/Timer.h ../src/ABstats.h -../src/dds.o: ../src/Moves.h ../src/Stats.h ../src/Scheduler.h ../src/Init.h -../src/ABsearch.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABsearch.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABsearch.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABsearch.o: ../src/Scheduler.h ../src/threadmem.h ../src/QuickTricks.h -../src/ABsearch.o: ../src/LaterTricks.h ../src/ABsearch.h -../src/ABstats.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABstats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABstats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABstats.o: ../src/Scheduler.h -../src/CalcTables.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/CalcTables.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/CalcTables.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/CalcTables.o: ../src/Scheduler.h ../src/SolveBoard.h ../src/PBN.h -../src/DealerPar.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/DealerPar.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/DealerPar.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/DealerPar.o: ../src/Scheduler.h -../src/Init.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Init.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Init.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Init.o: ../src/Scheduler.h ../src/threadmem.h ../src/Init.h -../src/Init.o: ../src/ABsearch.h -../src/LaterTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/LaterTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/LaterTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/LaterTricks.o: ../src/Scheduler.h ../src/threadmem.h -../src/LaterTricks.o: ../src/LaterTricks.h -../src/Moves.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Moves.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Moves.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Moves.o: ../src/Scheduler.h ../src/ABsearch.h -../src/Par.o: ../src/dds.h ../src/debug.h ../include/portab.h ../src/TransTable.h -../src/Par.o: ../include/dll.h ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/Par.o: ../src/Stats.h ../src/Scheduler.h -../src/PlayAnalyser.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PlayAnalyser.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PlayAnalyser.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PlayAnalyser.o: ../src/Scheduler.h ../src/threadmem.h -../src/PlayAnalyser.o: ../src/SolverIF.h ../src/PBN.h -../src/PBN.o: ../src/dds.h ../src/debug.h ../include/portab.h ../src/TransTable.h -../src/PBN.o: ../include/dll.h ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/PBN.o: ../src/Stats.h ../src/Scheduler.h ../src/PBN.h -../src/QuickTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/QuickTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/QuickTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/QuickTricks.o: ../src/Scheduler.h ../src/threadmem.h -../src/QuickTricks.o: ../src/QuickTricks.h -../src/Scheduler.o: ../src/Scheduler.h ../src/dds.h ../src/debug.h -../src/Scheduler.o: ../include/portab.h ../src/TransTable.h ../include/dll.h -../src/Scheduler.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/Scheduler.o: ../src/Stats.h -../src/SolveBoard.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolveBoard.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolveBoard.o: ../src/Scheduler.h ../src/threadmem.h ../src/SolverIF.h -../src/SolveBoard.o: ../src/SolveBoard.h ../src/PBN.h -../src/SolverIF.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolverIF.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolverIF.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolverIF.o: ../src/Scheduler.h ../src/Init.h ../src/threadmem.h -../src/SolverIF.o: ../src/ABsearch.h ../src/SolverIF.h -../src/Stats.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Stats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Stats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Stats.o: ../src/Scheduler.h -../src/Timer.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Timer.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Timer.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Timer.o: ../src/Scheduler.h -../src/TransTable.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/TransTable.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/TransTable.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/TransTable.o: ../src/Scheduler.h -testcommon.o: ../include/dll.h ../include/portab.h testStats.h dtest.h -testStats.o: ../include/portab.h testStats.h -itest.o: ../include/dll.h testcommon.h -dtest.o: ../include/dll.h testcommon.h + rm -f *.o $(DTEST) $(ITEST) $(STATIC_LIB) $(SHARED_LIB) + +include $(INCL_DEPENDS) + diff --git a/test/Makefiles/Makefile_Mac_gcc_new b/test/Makefiles/Makefile_Mac_gcc_new deleted file mode 100644 index fb505c6e..00000000 --- a/test/Makefiles/Makefile_Mac_gcc_new +++ /dev/null @@ -1,115 +0,0 @@ -# --------------------- INFORMATION -------------------------------- - -# This the test Makefile for MacOS and the GNU g++ compiler. -# It assumes a Unix-like setup for some commands. - -# The dtest program itself does not use multi-threading, -# but the library might, depending on how it was compiled. - -# The Makefile also allows an "un-official" and ugly, but -# sometimes practical compilation of a directly integrated -# executable (i.e. not using the DLL). For this the Makefile -# uses the source and object files in the src directory... -# Use "make itest" at your own risk. - -# If you need to add something for the threading system, this is -# the place. - -CC_BOOST = /usr/local/Cellar/boost/1.56.0 -CC_BOOST_LINK = -L$(CC_BOOST)/lib -lboost_system -lboost_thread-mt - -THREAD_LINK = $(CC_BOOST_LINK) - -# ----------------------- OFTEN OK ------------------------------ - -# From here on you you don't have to change anything to CONFIGURE -# the compilation. But you may well have to change something to -# get it to compile. - -INCL_DDS_SOURCE = Makefiles/dds_sources.txt -INCL_OWN_SOURCE = Makefiles/own_sources.txt -INCL_DEPENDS = Makefiles/depends_o.txt - -# If your compiler name is not given here, change it. -CC = gcc-4.9 - -# We compile with aggressive warnings, but we have to turn off some -# of them as they appear in libraries in great numbers... - -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wnoexcept \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wredundant-decls \ - -Wsign-promo \ - -Wstrict-null-sentinel \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-format - -COMPILE_FLAGS = -O3 -flto -fopenmp -mtune=generic \ - $(WARN_FLAGS) - -DLLBASE = dds -STATIC_LIB = lib$(DLLBASE).a -SHARED_LIB = lib$(DLLBASE).so -DLIB = $(DLLBASE).lib - -LINK1_FLAGS = -LINK2_FLAGS = - $(THREAD_LINK) \ - -L. -l$(DLLBASE) \ - -lgomp -lstdc++ - -# This is in addition to $(DTEST).cpp - -include $(INCL_OWN_SOURCE) - -DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o - -DTEST = dtest -ITEST = itest - -# These are the files that we steal from the src directory. - -include $(INCL_DDS_SOURCE) - -ITEST_SOURCE_FILES = \ - $(DDS_SOURCE_FILES) \ - $(DTEST_SOURCE_FILES) \ - itest.cpp - -ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) - -dtest: $(DTEST_OBJ_FILES) - $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(DTEST_OBJ_FILES) \ - $(LINK2_FLAGS) -o $(DTEST) - -itest: $(ITEST_OBJ_FILES) - $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(ITEST_OBJ_FILES) \ - $(LINK2_FLAGS) -o $(ITEST) - -%.o: %.cpp - $(CC) $(COMPILE_FLAGS) -c $< -o $*.o - -depend: - makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp - -clean: - rm -f *.o $(DTEST) $(ITEST) $(STATIC_LIB) $(SHARED_LIB) - -include $(INCL_DEPENDS) - diff --git a/test/Makefiles/Makefile_linux b/test/Makefiles/Makefile_linux index 3e77c522..55f42cd4 100644 --- a/test/Makefiles/Makefile_linux +++ b/test/Makefiles/Makefile_linux @@ -1,12 +1,10 @@ -# This is a Makefile for the dtest test program, -# for Linux and the GNU g++ compiler. +# --------------------- INFORMATION -------------------------------- -# It does assume a Unix-like setup for some commands, -# but if you only want to call "make" with the default target, -# you should be OK. +# This the test Makefile for Linux and the GNU g++ compiler. +# It assumes a Unix-like setup for some commands. -# The test program itself does not use multi-threading, -# but the DLL might, depending on how it was compiled. +# The dtest program itself does not use multi-threading, +# but the library might, depending on how it was compiled. # The Makefile also allows an "un-official" and ugly, but # sometimes practical compilation of a directly integrated @@ -14,17 +12,29 @@ # uses the source and object files in the src directory... # Use "make itest" at your own risk. +# If you need to add something for the threading system, this is +# the place. + +CC_BOOST_LINK = -lboost_system -lboost_thread + +THREAD_LINK = $(CC_BOOST_LINK) + +# ----------------------- OFTEN OK ------------------------------ + +# From here on you you don't have to change anything to CONFIGURE +# the compilation. But you may well have to change something to +# get it to compile. + +INCL_DDS_SOURCE = Makefiles/dds_sources.txt +INCL_OWN_SOURCE = Makefiles/own_sources.txt +INCL_DEPENDS = Makefiles/depends_o.txt # If your compiler name is not given here, change it. CC = g++ -# Use this one to get single-threading -# CC_FLAGS = -O3 -flto -mtune=generic -# Use this one to get OpenMP multi-threading -CC_FLAGS = -O3 -flto -fopenmp -mtune=generic +# We compile with aggressive warnings, but we have to turn off some +# of them as they appear in libraries in great numbers... -# These flags are not turned on by default, but DDS should pass them. -# Turn them on below. WARN_FLAGS = \ -Wshadow \ -Wsign-conversion \ @@ -51,159 +61,57 @@ WARN_FLAGS = \ -Wno-odr \ -Wno-format -# Here you can turn on warnings. -# CC_FULL_FLAGS = $(CC_FLAGS) -CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS) - -DTEST = dtest -ITEST = itest +COMPILE_FLAGS = -O3 -flto -fopenmp -mtune=generic \ + $(WARN_FLAGS) DLLBASE = dds STATIC_LIB = lib$(DLLBASE).a DLIB = $(DLLBASE).lib -# This is in addition to $(DTEST).cpp -DTEST_SOURCE_FILES = \ - testcommon.cpp \ - testStats.cpp +LINK1_FLAGS = +LINK2_FLAGS = -Wl,-rpath=. \ + $(THREAD_LINK) \ + -L. -l$(DLLBASE) +LINK3_FLAGS = -Wl,-rpath=. \ + $(THREAD_LINK) -LD_FLAGS = +# This is in addition to $(DTEST).cpp -THREAD_LINK = -lboost_system -lboost_thread - -LIB_FLAGS = -Wl,-rpath=. -L. -l$(DLLBASE) $(THREAD_LINK) +include $(INCL_OWN_SOURCE) DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o +DTEST = dtest +ITEST = itest + # These are the files that we steal from the src directory. -SRC = ../src -STOLEN_SOURCE_FILES = \ - $(SRC)/dds.cpp \ - $(SRC)/ABsearch.cpp \ - $(SRC)/ABstats.cpp \ - $(SRC)/CalcTables.cpp \ - $(SRC)/DealerPar.cpp \ - $(SRC)/Init.cpp \ - $(SRC)/LaterTricks.cpp \ - $(SRC)/Moves.cpp \ - $(SRC)/Par.cpp \ - $(SRC)/PlayAnalyser.cpp \ - $(SRC)/PBN.cpp \ - $(SRC)/QuickTricks.cpp \ - $(SRC)/Scheduler.cpp \ - $(SRC)/SolveBoard.cpp \ - $(SRC)/SolverIF.cpp \ - $(SRC)/Stats.cpp \ - $(SRC)/Timer.cpp \ - $(SRC)/TransTable.cpp + +include $(INCL_DDS_SOURCE) ITEST_SOURCE_FILES = \ - $(STOLEN_SOURCE_FILES) \ + $(DDS_SOURCE_FILES) \ $(DTEST_SOURCE_FILES) \ itest.cpp ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) dtest: $(DTEST_OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(DTEST_OBJ_FILES) $(LD_FLAGS) $(LIB_FLAGS) -o $(DTEST) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(DTEST_OBJ_FILES) \ + $(LINK2_FLAGS) -o $(DTEST) itest: $(ITEST_OBJ_FILES) - $(CC) $(CC_FULL_FLAGS) $(ITEST_OBJ_FILES) $(LD_FLAGS) -o $(ITEST) + $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(ITEST_OBJ_FILES) \ + $(LINK3_FLAGS) -o $(ITEST) %.o: %.cpp - $(CC) $(CC_FULL_FLAGS) -c $< -o $*.o + $(CC) $(COMPILE_FLAGS) -c $< -o $*.o depend: makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp clean: - rm -f $(ITEST_OBJ_FILES) $(DTEST).o $(DTEST) $(ITEST) $(STATIC_LIB) - - -# DO NOT DELETE - -../src/dds.o: ../include/dll.h ../src/dds.h ../src/debug.h -../src/dds.o: ../include/portab.h ../src/TransTable.h ../src/Timer.h -../src/dds.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/dds.o: ../src/Scheduler.h ../src/Init.h -../src/ABsearch.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABsearch.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABsearch.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABsearch.o: ../src/Scheduler.h ../src/threadmem.h ../src/QuickTricks.h -../src/ABsearch.o: ../src/LaterTricks.h ../src/ABsearch.h -../src/ABstats.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/ABstats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/ABstats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/ABstats.o: ../src/Scheduler.h -../src/CalcTables.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/CalcTables.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/CalcTables.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/CalcTables.o: ../src/Scheduler.h ../src/SolveBoard.h ../src/PBN.h -../src/DealerPar.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/DealerPar.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/DealerPar.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/DealerPar.o: ../src/Scheduler.h -../src/Init.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Init.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Init.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Init.o: ../src/Scheduler.h ../src/threadmem.h ../src/Init.h -../src/Init.o: ../src/ABsearch.h -../src/LaterTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/LaterTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/LaterTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/LaterTricks.o: ../src/Scheduler.h ../src/threadmem.h -../src/LaterTricks.o: ../src/LaterTricks.h -../src/Moves.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Moves.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Moves.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Moves.o: ../src/Scheduler.h ../src/ABsearch.h -../src/Par.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Par.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Par.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Par.o: ../src/Scheduler.h -../src/PlayAnalyser.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PlayAnalyser.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PlayAnalyser.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PlayAnalyser.o: ../src/Scheduler.h ../src/threadmem.h -../src/PlayAnalyser.o: ../src/SolverIF.h ../src/PBN.h -../src/PBN.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/PBN.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/PBN.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/PBN.o: ../src/Scheduler.h ../src/PBN.h -../src/QuickTricks.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/QuickTricks.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/QuickTricks.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/QuickTricks.o: ../src/Scheduler.h ../src/threadmem.h -../src/QuickTricks.o: ../src/QuickTricks.h -../src/Scheduler.o: ../src/Scheduler.h ../src/dds.h ../src/debug.h -../src/Scheduler.o: ../include/portab.h ../src/TransTable.h ../include/dll.h -../src/Scheduler.o: ../src/Timer.h ../src/ABstats.h ../src/Moves.h -../src/Scheduler.o: ../src/Stats.h -../src/SolveBoard.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolveBoard.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolveBoard.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolveBoard.o: ../src/Scheduler.h ../src/threadmem.h ../src/SolverIF.h -../src/SolveBoard.o: ../src/SolveBoard.h ../src/PBN.h -../src/SolverIF.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/SolverIF.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/SolverIF.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/SolverIF.o: ../src/Scheduler.h ../src/Init.h ../src/threadmem.h -../src/SolverIF.o: ../src/ABsearch.h ../src/SolverIF.h -../src/Stats.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Stats.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Stats.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Stats.o: ../src/Scheduler.h -../src/Timer.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/Timer.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/Timer.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/Timer.o: ../src/Scheduler.h -../src/TransTable.o: ../src/dds.h ../src/debug.h ../include/portab.h -../src/TransTable.o: ../src/TransTable.h ../include/dll.h ../src/Timer.h -../src/TransTable.o: ../src/ABstats.h ../src/Moves.h ../src/Stats.h -../src/TransTable.o: ../src/Scheduler.h -testcommon.o: ../include/dll.h ../include/portab.h testStats.h dtest.h -testStats.o: ../include/portab.h testStats.h -itest.o: ../include/dll.h testcommon.h -dtest.o: ../include/dll.h testcommon.h + rm -f $(ITEST_OBJ_FILES) $(DTEST).o \ + $(DTEST) $(ITEST) $(STATIC_LIB) +include $(INCL_DEPENDS) diff --git a/test/Makefiles/Makefile_linux_new b/test/Makefiles/Makefile_linux_new deleted file mode 100644 index 8a8f9edd..00000000 --- a/test/Makefiles/Makefile_linux_new +++ /dev/null @@ -1,115 +0,0 @@ -# --------------------- INFORMATION -------------------------------- - -# This the test Makefile for Linux and the GNU g++ compiler. -# It assumes a Unix-like setup for some commands. - -# The dtest program itself does not use multi-threading, -# but the library might, depending on how it was compiled. - -# The Makefile also allows an "un-official" and ugly, but -# sometimes practical compilation of a directly integrated -# executable (i.e. not using the DLL). For this the Makefile -# uses the source and object files in the src directory... -# Use "make itest" at your own risk. - -# If you need to add something for the threading system, this is -# the place. - -CC_BOOST_LINK = -lboost_system -lboost_thread - -THREAD_LINK = $(CC_BOOST_LINK) - -# ----------------------- OFTEN OK ------------------------------ - -# From here on you you don't have to change anything to CONFIGURE -# the compilation. But you may well have to change something to -# get it to compile. - -INCL_DDS_SOURCE = Makefiles/dds_sources.txt -INCL_OWN_SOURCE = Makefiles/own_sources.txt -INCL_DEPENDS = Makefiles/depends_o.txt - -# If your compiler name is not given here, change it. -CC = g++ - -# We compile with aggressive warnings, but we have to turn off some -# of them as they appear in libraries in great numbers... - -WARN_FLAGS = \ - -Wshadow \ - -Wsign-conversion \ - -pedantic -Wall -Wextra \ - -Wcast-align -Wcast-qual \ - -Wctor-dtor-privacy \ - -Wdisabled-optimization \ - -Winit-self \ - -Wlogical-op \ - -Wmissing-declarations \ - -Wmissing-include-dirs \ - -Wnoexcept \ - -Wold-style-cast \ - -Woverloaded-virtual \ - -Wredundant-decls \ - -Wsign-promo \ - -Wstrict-null-sentinel \ - -Wstrict-overflow=1 \ - -Wswitch-default -Wundef \ - -Werror \ - -Wno-unused \ - -Wno-unknown-pragmas \ - -Wno-long-long \ - -Wno-odr \ - -Wno-format - -COMPILE_FLAGS = -O3 -flto -fopenmp -mtune=generic \ - $(WARN_FLAGS) - -DLLBASE = dds -STATIC_LIB = lib$(DLLBASE).a -DLIB = $(DLLBASE).lib - -LINK1_FLAGS = -LINK2_FLAGS = -Wl,-rpath=. \ - $(THREAD_LINK) \ - -L. -l$(DLLBASE) - -# This is in addition to $(DTEST).cpp - -include $(INCL_OWN_SOURCE) - -DTEST_OBJ_FILES = $(subst .cpp,.o,$(DTEST_SOURCE_FILES)) $(DTEST).o - -DTEST = dtest -ITEST = itest - -# These are the files that we steal from the src directory. - -include $(INCL_DDS_SOURCE) - -ITEST_SOURCE_FILES = \ - $(DDS_SOURCE_FILES) \ - $(DTEST_SOURCE_FILES) \ - itest.cpp - -ITEST_OBJ_FILES = $(subst .cpp,.o,$(ITEST_SOURCE_FILES)) - -dtest: $(DTEST_OBJ_FILES) - $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(DTEST_OBJ_FILES) \ - $(LINK2_FLAGS) -o $(DTEST) - -itest: $(ITEST_OBJ_FILES) - $(CC) $(COMPILE_FLAGS) $(LINK1_FLAGS) $(ITEST_OBJ_FILES) \ - $(LINK2_FLAGS) -o $(ITEST) - -%.o: %.cpp - $(CC) $(COMPILE_FLAGS) -c $< -o $*.o - -depend: - makedepend -Y -- $(ITEST_SOURCE_FILES) $(DTEST).cpp - -clean: - rm -f $(ITEST_OBJ_FILES) $(DTEST).o \ - $(DTEST) $(ITEST) $(STATIC_LIB) - -include $(INCL_DEPENDS) - diff --git a/test/args.cpp b/test/args.cpp index ff33b67a..5769cc14 100644 --- a/test/args.cpp +++ b/test/args.cpp @@ -67,7 +67,7 @@ const vector threadingList = "TBB", "STLIMPL", "PPLIMPL", - "default", + "default" }; string shortOptsAll, shortOptsWithArg; diff --git a/test/compare.cpp b/test/compare.cpp index c5ed23c6..e5e1d684 100644 --- a/test/compare.cpp +++ b/test/compare.cpp @@ -8,6 +8,7 @@ */ +#include #include #include "compare.h" diff --git a/test/loop.cpp b/test/loop.cpp index cded8333..e94ae6cd 100644 --- a/test/loop.cpp +++ b/test/loop.cpp @@ -33,7 +33,8 @@ void loop_solve( const int stepsize) { #ifdef BATCHTIMES - cout << setw(8) << left << "Hand no." << setw(25) << "Time" << "\n"; + cout << setw(8) << left << "Hand no." << + setw(25) << right << "Time" << "\n"; #endif for (int i = 0; i < number; i += stepsize) @@ -93,7 +94,8 @@ bool loop_calc( const int stepsize) { #ifdef BATCHTIMES - cout << setw(8) << left << "Hand no." << setw(25) << "Time" << "\n"; + cout << setw(8) << left << "Hand no." << + setw(25) << right << "Time" << "\n"; #endif int filter[5] = {0, 0, 0, 0, 0}; @@ -240,7 +242,8 @@ bool loop_play( const int stepsize) { #ifdef BATCHTIMES - cout << setw(8) << left << "Hand no." << setw(25) << "Time" << "\n"; + cout << setw(8) << left << "Hand no." << + setw(25) << right << "Time" << "\n"; #endif for (int i = 0; i < number; i += stepsize) diff --git a/test/parse.cpp b/test/parse.cpp index 4560499a..d119f9f8 100644 --- a/test/parse.cpp +++ b/test/parse.cpp @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include "../include/portab.h" #include "parse.h" From af8c984b004102f759df017048bfba9d95f49a4b Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Tue, 22 May 2018 08:16:09 +0200 Subject: [PATCH 130/132] Added ThreadMgr and fixed bug in STLIMPL/PPLIMPL (static int) --- src/Init.cpp | 4 + src/Makefiles/sources.txt | 1 + src/Memory.cpp | 11 +++ src/Memory.h | 2 + src/System.cpp | 51 +++++++++---- src/ThreadMgr.cpp | 155 ++++++++++++++++++++++++++++++++++++++ src/ThreadMgr.h | 44 +++++++++++ 7 files changed, 253 insertions(+), 15 deletions(-) create mode 100644 src/ThreadMgr.cpp create mode 100644 src/ThreadMgr.h diff --git a/src/Init.cpp b/src/Init.cpp index 0820bfc7..8eee5a3e 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -14,12 +14,14 @@ #include "Init.h" #include "System.h" #include "Scheduler.h" +#include "ThreadMgr.h" #include "debug.h" System sysdep; Memory memory; Scheduler scheduler; +ThreadMgr threadMgr; void InitConstants(); @@ -167,6 +169,8 @@ void STDCALL SetResources( memory.Resize(static_cast(noOfThreads), DDS_TT_SMALL, THREADMEM_SMALL_DEF_MB, THREADMEM_SMALL_MAX_MB); + threadMgr.Reset(noOfThreads); + InitDebugFiles(); if (! _initialized) diff --git a/src/Makefiles/sources.txt b/src/Makefiles/sources.txt index 575501a3..566a0584 100644 --- a/src/Makefiles/sources.txt +++ b/src/Makefiles/sources.txt @@ -18,6 +18,7 @@ SOURCE_FILES = \ SolveBoard.cpp \ SolverIF.cpp \ System.cpp \ + ThreadMgr.cpp \ Timer.cpp \ TimerGroup.cpp \ TimerList.cpp \ diff --git a/src/Memory.cpp b/src/Memory.cpp index dd6c38f0..f333d01f 100644 --- a/src/Memory.cpp +++ b/src/Memory.cpp @@ -93,8 +93,19 @@ void Memory::Resize( } +int Memory::NumThreads() const +{ + return static_cast(nThreads); +} + + ThreadData * Memory::GetPtr(const unsigned thrId) { + if (thrId >= nThreads) + { + cout << "Memory::GetPtr: " << thrId << " vs. " << nThreads << endl; + exit(1); + } return memory[thrId]; } diff --git a/src/Memory.h b/src/Memory.h index 98a38284..3f86fa35 100644 --- a/src/Memory.h +++ b/src/Memory.h @@ -139,6 +139,8 @@ class Memory const int memDefault_MB, const int memMaximum_MB); + int NumThreads() const; + ThreadData * GetPtr(const unsigned thrId); double MemoryInUseMB(const unsigned thrId) const; diff --git a/src/System.cpp b/src/System.cpp index 184ca0c0..2b3ed372 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -20,9 +20,11 @@ #include "System.h" #include "Memory.h" #include "Scheduler.h" +#include "ThreadMgr.h" extern Scheduler scheduler; extern Memory memory; +extern ThreadMgr threadMgr; const vector DDS_SYSTEM_PLATFORM = @@ -492,25 +494,35 @@ int System::RunThreadsSTLIMPL() vector crossrefs; (* CallbackDuplList[runCat])(* bop, uniques, crossrefs); - atomic thrIdNext = 0; - thread_local int thrId = -1; + static atomic thrIdNext = 0; bool err = false; + threadMgr.Reset(numThreads); + for_each(std::execution::par, uniques.begin(), uniques.end(), [&](int &bno) { + thread_local int thrId = -1; + thread_local int realThrId; if (thrId == -1) - { thrId = thrIdNext++; - if (thrId >= numThreads) - err = true; - } - (* CallbackSingleList[runCat])(thrId, bno); + realThrId = threadMgr.Occupy(thrId); + + if (realThrId == -1) + err = true; + else + (* CallbackSingleList[runCat])(realThrId, bno); + + if (! threadMgr.Release(thrId)) + err = true; }); if (err) + { + cout << "Too many threads, numThreads " << numThreads << endl; return RETURN_THREAD_INDEX; + } (* CallbackCopyList[runCat])(crossrefs); #endif @@ -557,11 +569,11 @@ int System::RunThreadsPPLIMPL() vector crossrefs; (* CallbackDuplList[runCat])(* bop, uniques, crossrefs); - atomic thrIdNext = 0; - thread_local int thrId = -1; + static atomic thrIdNext = 0; bool err = false; - // Not sure this actually works... + threadMgr.Reset(numThreads); + using namespace Concurrency; Concurrency::Scheduler * sched = Concurrency::Scheduler::Create( SchedulerPolicy(1, MaxConcurrency, numThreads)); @@ -570,21 +582,30 @@ int System::RunThreadsPPLIMPL() Concurrency::parallel_for_each(uniques.begin(), uniques.end(), [&](int &bno) { + thread_local int thrId = -1; + thread_local int realThrId; if (thrId == -1) - { thrId = thrIdNext++; - if (thrId >= numThreads) - err = true; - } - (* CallbackSingleList[runCat])(thrId, bno); + realThrId = threadMgr.Occupy(thrId); + + if (realThrId == -1) + err = true; + else + (* CallbackSingleList[runCat])(realThrId, bno); + + if (! threadMgr.Release(thrId)) + err = true; }); CurrentScheduler::Detach(); sched->Release(); if (err) + { + cout << "Too many threads, numThreads " << numThreads << endl; return RETURN_THREAD_INDEX; + } (* CallbackCopyList[runCat])(crossrefs); #endif diff --git a/src/ThreadMgr.cpp b/src/ThreadMgr.cpp new file mode 100644 index 00000000..d922ad23 --- /dev/null +++ b/src/ThreadMgr.cpp @@ -0,0 +1,155 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + + +#include +#include +#include +#include +#include +#include +#include + +#include "ThreadMgr.h" + +mutex mtx; +mutex mtxPrint; + + +ThreadMgr::ThreadMgr() +{ + numRealThreads = 0; + numMachineThreads = 0; +} + + +ThreadMgr::~ThreadMgr() +{ +} + + +void ThreadMgr::Reset(const int nThreads) +{ + if (nThreads > numRealThreads) + { + realThreads.resize(nThreads); + for (int t = numRealThreads; t < nThreads; t++) + realThreads[t] = false; + numRealThreads = nThreads; + } + + if (nThreads > numMachineThreads) + { + machineThreads.resize(nThreads); + for (int t = numMachineThreads; t < nThreads; t++) + machineThreads[t] = -1; + numMachineThreads = nThreads; + } +} + + +int ThreadMgr::Occupy(const int machineId) +{ + if (machineId >= numMachineThreads) + { + numMachineThreads = machineId + 1; + machineThreads.resize(numMachineThreads); + for (int t = machineId; t < numMachineThreads; t++) + machineThreads[t] = -1; + } + + if (machineThreads[machineId] != -1) + { + // Error: Already in use. + return -1; + } + + int res = -1; + + do + { + mtx.lock(); + for (int t = 0; t < numRealThreads; t++) + { + if (realThreads[t] == false) + { + realThreads[t] = true; + machineThreads[machineId] = t; + res = t; + break; + } + } + // ThreadMgr::Print("thr.txt", "In Occupy " + + // to_string(machineId) + " " + to_string(res)); + mtx.unlock(); + + if (res == -1) + { + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + } + while (res == -1); + + return res; +} + + +bool ThreadMgr::Release(const int machineId) +{ + const int r = machineThreads[machineId]; + if (r == -1) + { + // Error: Not in use. + return false; + } + + if (! realThreads[r]) + { + // Error: Refers to a real thread that is not in use. + return false; + } + + mtx.lock(); + realThreads[r] = false; + machineThreads[machineId] = -1; + mtx.unlock(); + return true; +} + + +void ThreadMgr::Print( + const string& fname, + const string& tag) const +{ + mtxPrint.lock(); + ofstream fo; + fo.open(fname, std::ios_base::app); + + fo << tag << + ": Real threads occupied (out of " << numRealThreads << "):\n"; + for (int t = 0; t < numRealThreads; t++) + { + if (realThreads[t]) + fo << t << endl; + } + fo << endl; + + fo << "Machine threads overview:\n"; + for (int t = 0; t < numMachineThreads; t++) + { + if (machineThreads[t] != -1) + { + fo << setw(4) << left << t << machineThreads[t] << endl; + } + } + fo << endl; + fo.close(); + mtxPrint.unlock(); +} + diff --git a/src/ThreadMgr.h b/src/ThreadMgr.h new file mode 100644 index 00000000..f9c595ff --- /dev/null +++ b/src/ThreadMgr.h @@ -0,0 +1,44 @@ +/* + DDS, a bridge double dummy solver. + + Copyright (C) 2006-2014 by Bo Haglund / + 2014-2018 by Bo Haglund & Soren Hein. + + See LICENSE and README. +*/ + +#ifndef DDS_THREADMGR_H +#define DDS_THREADMGR_H + +#include + +using namespace std; + + +class ThreadMgr +{ + private: + + vector realThreads; + vector machineThreads; + int numRealThreads; + int numMachineThreads; + + public: + + ThreadMgr(); + + ~ThreadMgr(); + + void Reset(const int nThreads); + + int Occupy(const int MachineThrId); + + bool Release(const int MachineThrId); + + void Print( + const string& fname, + const string& tag) const; +}; + +#endif From d2466cb7c82c8719b4e9b51dfc2ac7e98e135d4f Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Tue, 22 May 2018 08:19:59 +0200 Subject: [PATCH 131/132] Limited IMPL threads to number of cores --- src/Init.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Init.cpp b/src/Init.cpp index 8eee5a3e..5c2fff0c 100644 --- a/src/Init.cpp +++ b/src/Init.cpp @@ -111,18 +111,17 @@ void STDCALL SetResources( // The number of threads will be limited by: // - If threading set as single-threaded or compiled only // single-threaded: 1 - // - If threading set as one of the IMPL variants: 1.5 * ncores + // - If threading set as one of the IMPL variants: ncores // whatever the user says (as we currently don't have control) - // - Otherwise the lower of maxThreads and 1.5 * ncores (for test - // purpose, later one 1 * ncores) + // - Otherwise the lower of maxThreads and ncores int thrMax; if (sysdep.IsSingleThreaded()) thrMax = 1; else if (sysdep.IsIMPL() || maxThreadsIn <= 0) - thrMax = static_cast(1.51 * ncores); + thrMax = ncores; else - thrMax = min(maxThreadsIn, static_cast(1.51 * ncores)); + thrMax = min(maxThreadsIn, ncores); // For simplicity we won't vary the amount of memory per thread // in the small and large versions. From 3fc1a75b1c17bf5ef037f47a2f3ba9555e600e95 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Tue, 22 May 2018 08:45:35 +0200 Subject: [PATCH 132/132] Changed documentation to 2.9.0 beta and May 2018 --- ChangeLog | 10 +++++----- INSTALL | 9 +++++++-- README.md | 4 ++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f73551b..933f94ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,5 @@ -Release Notes DDS 2.9.0 ------------------------ +Release Notes DDS 2.9.0 beta +---------------------------- Included code for a number of multi-threading systems: - Windows API (was already there) - OpenMP (was already there) @@ -7,8 +7,8 @@ Included code for a number of multi-threading systems: - Boost (new, works on many systems, but you may have to install it) - STL (new, should work on most systems with a modern compiler) - TBB (new, not so broadly available, but portable in principle) -- STLIMPL (new, don't use) -- PPLIMPL (new, don't use) +- STLIMPL (new, experimental) +- PPLIMPL (new, experimental) Tested combinations include: - Visual C++ with Windows API, OpenMP, Boost, STL @@ -19,7 +19,7 @@ Tested combinations include: - MacOS GNU g++ with OpenMP, Boost, STL The number of threads is now unlimited in principle, although the -DLL will not let you go beyond 1.5 * the number of processor cores. +DLL will not let you go beyond the number of processor cores. Enabled the transposition-table code for both the large and the small versions in the same DLL. Therefore there is only a single DLL diff --git a/INSTALL b/INSTALL index fdee6044..a61b4253 100644 --- a/INSTALL +++ b/INSTALL @@ -156,8 +156,13 @@ well use STL if you have it, as this is probably the most portable. If you don't have a C++17 compiler, you will not get STLIMPL or PPLIMPL. -The *IMPL versions let the system handle threads autonomously, -whereas the others are handled by DDS internally. +The *IMPL versions let the system handle threads autonomously +(up to the number of threads set by the user), whereas the others +are handled by DDS internally. The *IMPL version are similar in +speed, except if there is some near-duplication in the input hands +(say, instances of the same distribution played in the same +denomination from different side). The non-IMPL version handle +this more efficiently. Testing diff --git a/README.md b/README.md index b5d3e1c1..aec6bdce 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ DDS offers a wide range of functions, including par-score calculations. Please refer to the [home page](http://privat.bahnhof.se/wb758135) for details. -The current version is DDS 2.9.0 released in April 2018 and licensed under the Apache 2.0 license in the LICENSE FILE. +The current version is DDS 2.9.0 beta, released in May 2018 and licensed under the Apache 2.0 license in the LICENSE FILE. Release notes are in the ChangeLog file. @@ -88,7 +88,7 @@ The DDS library interface is documented. You find the docs, including a Markdown Bugs ==== -Version 2.9.0 has no known bugs. +Version 2.9.0 beta has no known bugs. Please report bugs to bo.haglund@bahnhof.se and soren.hein@gmail.com.