diff options
author | Antoine Brodin <antoine@FreeBSD.org> | 2021-01-01 10:11:34 +0000 |
---|---|---|
committer | Antoine Brodin <antoine@FreeBSD.org> | 2021-01-01 10:11:34 +0000 |
commit | 26b4c8f71f91d22e081b27814782686edde0c90a (patch) | |
tree | 1c321c39372c25d8634e75b5c8e08edc676b296d /chinese/sunpinyin/files/patch-src_slm_thread_slmthread.cpp | |
parent | New port: math/py-optuna: A hyperparameter optimization framework (diff) |
Revert r559792 to unbreak INDEX and bulk -a
It seems a lot of reverse dependencies were missed
With hat: portmgr
Diffstat (limited to 'chinese/sunpinyin/files/patch-src_slm_thread_slmthread.cpp')
-rw-r--r-- | chinese/sunpinyin/files/patch-src_slm_thread_slmthread.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chinese/sunpinyin/files/patch-src_slm_thread_slmthread.cpp b/chinese/sunpinyin/files/patch-src_slm_thread_slmthread.cpp new file mode 100644 index 000000000000..723c45843d74 --- /dev/null +++ b/chinese/sunpinyin/files/patch-src_slm_thread_slmthread.cpp @@ -0,0 +1,17 @@ +--- src/slm/thread/slmthread.cpp.orig 2014-11-14 14:17:48 UTC ++++ src/slm/thread/slmthread.cpp +@@ -250,10 +250,10 @@ main(int argc, char* argv[]) + + bool usingLogPr = slm.isUseLogPr(); + +- #define EffectivePr(a) (float((usingLogPr) ? ((a) / log(2.0)) : (-log2((a))))) +- #define OriginalPr(b) (float((usingLogPr) ? ((b) * log(2.0)) : (exp2(-(b))))) +- #define EffectiveBow(a) (float((usingLogPr) ? (exp(-(a))) : ((a)))) +- #define OriginalBow(b) (float((usingLogPr) ? (-log((b))) : ((b)))) ++ #define EffectivePr(a) (float((usingLogPr) ? ((a) / logf(2.0f)) : (-log2f((a))))) ++ #define OriginalPr(b) (float((usingLogPr) ? ((b) * logf(2.0f)) : (exp2f(-(b))))) ++ #define EffectiveBow(a) (float((usingLogPr) ? (expf(-(a))) : ((a)))) ++ #define OriginalBow(b) (float((usingLogPr) ? (-logf((b))) : ((b)))) + + printf("\nfirst pass..."); fflush(stdout); + for (int lvl = 0; lvl <= slm.getN(); ++lvl) { |