Skip to content

Commit

Permalink
Merge pull request #60 from sorenhein/master
Browse files Browse the repository at this point in the history
Cumulative update to v2.8.4
  • Loading branch information
sorenhein committed Mar 20, 2016
2 parents f42ba59 + c8503f1 commit cad2410
Show file tree
Hide file tree
Showing 20 changed files with 1,983 additions and 399 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
Release Notes DDS 2.8.4
-----------------------
Added a lower-memory DLL version with a compile flag. This is about
11-14% slower, but uses a lot less memory. For example, for a
single thread on one PC, the memory usage was 24 MB rather than 110 MB.
For 12 threads, the numbers were 89 MB rather than 1.1 GB.

Added TDC 32-bit and 64-bit Makefiles contributed by Sergio Polini.

Made the SolveAllChunks functions aliases to SolveAllBoards.


Release Notes DDS 2.8.3
-----------------------
Fixed bug in Scheduler that caused a crash in case 200 very similar
Expand Down
3 changes: 3 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,14 @@ Microsoft Visual C++ (Windows-like, so no "mV", different "make")
Makefile: Makefile_Visual_Windows
Compiler: cl


Mingw
-----
Makefile: Makefile_mingw
Compiler: i686-w64-mingw32-g++

32-bit and 64-bit variants for the tdc compiler are available.


Cygwin
------
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.8.3 released in January 2016 and licensed under the Apache 2.0 license in the LICENSE FILE.
The current version is DDS 2.8.4 released in March 2016 and licensed under the Apache 2.0 license in the LICENSE FILE.

Release notes are in the ChangeLog file.

Expand Down Expand Up @@ -86,7 +86,7 @@ The DDS library interface is very well documented. You find the docs, including

Bugs
====
Version 2.8.3 has no known bugs.
Version 2.8.4 has no known bugs.

Please report bugs to bo.haglund@bahnhof.se and soren.hein@gmail.com.

Binary file modified doc/DLL-dds_x.pdf
Binary file not shown.
622 changes: 316 additions & 306 deletions doc/DLL-dds_x.rtf

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions include/dll.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#define EXTERN_C
#endif

/* Version 2.8.2. Allowing for 2 digit minor versions */
#define DDS_VERSION 20803
/* Version 2.8.4. Allowing for 2 digit minor versions */
#define DDS_VERSION 20804


#define DDS_HANDS 4
Expand Down
2 changes: 1 addition & 1 deletion src/Init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ void FreeThreadMem()
{
for (int k = 0; k < noOfThreads; k++)
{
localVar[k].transTable.ResetMemory();
localVar[k].transTable.ResetMemory(FREE_THREAD_MEM);
localVar[k].memUsed = localVar[k].transTable.MemoryInUse() +
ThreadMemoryUsed();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Makefiles/Makefile_Visual
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ WARN_FLAGS = \
/wd4996 \
/WX

# Here you can turn on warnings.
# Here you can turn on warnings and add /DSMALL_MEMORY_OPTION.
# CC_FULL_FLAGS = $(CC_FLAGS)
CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS)

Expand Down
2 changes: 1 addition & 1 deletion src/Makefiles/Makefile_cygwin
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ WARN_FLAGS = \
-Wno-unknown-pragmas \
-Wno-long-long

# Here you can turn on warnings.
# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION
# CC_FULL_FLAGS = $(CC_FLAGS)
CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS)

Expand Down
2 changes: 1 addition & 1 deletion src/Makefiles/Makefile_mingw
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ WARN_FLAGS = \
-Wno-long-long \
-Wno-format

# Here you can turn on warnings.
# Here you can turn on warnings and add -DSMALL_MEMORY_OPTION
# CC_FULL_FLAGS = $(CC_FLAGS)
CC_FULL_FLAGS = $(CC_FLAGS) $(WARN_FLAGS)

Expand Down
167 changes: 167 additions & 0 deletions src/Makefiles/Makefile_mingw_tdc32
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
# 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
Loading

0 comments on commit cad2410

Please sign in to comment.