pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/stockfish stockfish: avoid ambiguous math functions



details:   https://anonhg.NetBSD.org/pkgsrc/rev/798e52adf21a
branches:  trunk
changeset: 377950:798e52adf21a
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Mon Apr 25 15:24:31 2022 +0000

description:
stockfish: avoid ambiguous math functions

diffstat:

 games/stockfish/distinfo                 |   5 +++--
 games/stockfish/patches/patch-pawns.cpp  |   5 ++++-
 games/stockfish/patches/patch-search.cpp |  15 +++++++++++++++
 3 files changed, 22 insertions(+), 3 deletions(-)

diffs (44 lines):

diff -r 6493b0545a8a -r 798e52adf21a games/stockfish/distinfo
--- a/games/stockfish/distinfo  Mon Apr 25 15:19:48 2022 +0000
+++ b/games/stockfish/distinfo  Mon Apr 25 15:24:31 2022 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.4 2021/10/26 10:44:26 nia Exp $
+$NetBSD: distinfo,v 1.5 2022/04/25 15:24:31 tnn Exp $
 
 BLAKE2s (stockfish-9-src.zip) = 2111e5b15cb1cfa80eb6608e9f0b1b230f0d43a64743911113d7bb8c8558b95c
 SHA512 (stockfish-9-src.zip) = 47b5dfea9e015dd68e33c8b1a131ed83710e4e5d67abe0c278a423f2940b07c7a5d661ce27915257ae3dad83fc2bb8e50d3d28bfa11a7c4cdf396d0378cd80f8
 Size (stockfish-9-src.zip) = 171925 bytes
-SHA1 (patch-pawns.cpp) = d643c725310a723151e2af3d5dd6eaae0dddf105
+SHA1 (patch-pawns.cpp) = 47a718339211576dfac414bc0ef3bcaad1f41ef8
+SHA1 (patch-search.cpp) = e54b0feab40a13d3dcdcd1a4a66bac54109ddf78
diff -r 6493b0545a8a -r 798e52adf21a games/stockfish/patches/patch-pawns.cpp
--- a/games/stockfish/patches/patch-pawns.cpp   Mon Apr 25 15:19:48 2022 +0000
+++ b/games/stockfish/patches/patch-pawns.cpp   Mon Apr 25 15:24:31 2022 +0000
@@ -1,4 +1,7 @@
-$NetBSD: patch-pawns.cpp,v 1.1 2019/12/20 00:00:55 joerg Exp $
+$NetBSD: patch-pawns.cpp,v 1.2 2022/04/25 15:24:31 tnn Exp $
+
+date: 2019-12-20 01:00:55 +0100;  author: joerg;  state: Exp;  commitid: QhSAW31NXzINnnPB;
+Fix popcount conflict on NetBSD. Avoid LTO and 32bit binaries on NetBSD.
 
 --- pawns.cpp.orig     2019-12-19 22:50:55.102229747 +0000
 +++ pawns.cpp
diff -r 6493b0545a8a -r 798e52adf21a games/stockfish/patches/patch-search.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/stockfish/patches/patch-search.cpp  Mon Apr 25 15:24:31 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-search.cpp,v 1.1 2022/04/25 15:24:31 tnn Exp $
+
+avoid ambiguous math functions
+
+--- search.cpp.orig    2018-01-31 10:41:09.000000000 +0000
++++ search.cpp
+@@ -146,7 +146,7 @@ void Search::init() {
+       for (int d = 1; d < 64; ++d)
+           for (int mc = 1; mc < 64; ++mc)
+           {
+-              double r = log(d) * log(mc) / 1.95;
++              double r = std::log(d) * std::log(mc) / 1.95;
+ 
+               Reductions[NonPV][imp][d][mc] = int(std::round(r));
+               Reductions[PV][imp][d][mc] = std::max(Reductions[NonPV][imp][d][mc] - 1, 0);



Home | Main Index | Thread Index | Old Index