WIP: Add boost::multiprecision::float128 support#45
Open
Ablinne wants to merge 4 commits intoblitzpp:mainfrom
Open
WIP: Add boost::multiprecision::float128 support#45Ablinne wants to merge 4 commits intoblitzpp:mainfrom
Ablinne wants to merge 4 commits intoblitzpp:mainfrom
Conversation
Member
|
Thank you! (by https://sourceforge.net/u/sunday87 created: 2013-11-21) diff -Naur -x Makefile -x config.h blitz-0.10/blitz/compiler.h blitz-0.10-bmp/blitz/compiler.h
--- blitz-0.10/blitz/compiler.h 2012-05-11 22:11:13.000000000 +0200
+++ blitz-0.10-bmp/blitz/compiler.h 2013-11-21 15:53:17.910333000 +0100
@@ -120,13 +120,7 @@
#error In <blitz/config.h>: Your compiler does not support enum computations. You may have to rerun compiler/bzconfig.
#endif
-#if defined(BZ_MATH_FN_IN_NAMESPACE_STD)
- #define BZ_MATHFN_SCOPE(x) std::x
-#elif defined(BZ_HAVE_NAMESPACES)
- #define BZ_MATHFN_SCOPE(x) ::x
-#else
- #define BZ_MATHFN_SCOPE(x) x
-#endif
+#define BZ_MATHFN_SCOPE(x) x
#if defined(BZ_MATH_ABSINT_IN_NAMESPACE_STD)
#include <cstdlib>
@@ -134,21 +128,9 @@
#include <stdlib.h>
#endif
-#if defined(BZ_MATH_ABSINT_IN_NAMESPACE_STD)
- #define BZ_MATHABSINT_SCOPE(x) std::x
-#elif defined(BZ_HAVE_NAMESPACES)
- #define BZ_MATHABSINT_SCOPE(x) ::x
-#else
- #define BZ_MATHABSINT_SCOPE(x) x
-#endif
+#define BZ_MATHABSINT_SCOPE(x) x
-#if defined(BZ_HAVE_COMPLEX_MATH_IN_NAMESPACE_STD)
- #define BZ_CMATHFN_SCOPE(x) std::x
-#elif defined(BZ_HAVE_NAMESPACES)
- #define BZ_CMATHFN_SCOPE(x) ::x
-#else
- #define BZ_CMATHFN_SCOPE(x) x
-#endif
+#define BZ_CMATHFN_SCOPE(x) x
#if defined(BZ_HAVE_NAMESPACES)
#define BZ_IEEEMATHFN_SCOPE(x) ::x
diff -Naur -x Makefile -x config.h blitz-0.10/blitz/funcs.h blitz-0.10-bmp/blitz/funcs.h
--- blitz-0.10/blitz/funcs.h 2012-05-11 22:11:13.000000000 +0200
+++ blitz-0.10-bmp/blitz/funcs.h 2013-11-21 15:39:37.254381000 +0100
@@ -37,6 +37,11 @@
#include <blitz/prettyprint.h>
#include <cstdlib>
+#include <boost/multiprecision/float128.hpp>
+#include <boost/multiprecision/mpfr.hpp>
+
+using namespace std;
+using namespace boost::multiprecision;
BZ_NAMESPACE(blitz) |
Author
|
Actually I am sunday87 over at sourceforge.net. I did not remember that I posted this already there almost 5 years ago... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi folks,
I have hacked this modification a few years ago while blitz development seemed quite dead to add support for the
boost::multiprecision::float128datatype.The changes were since then sitting around in my own copy if the old
hgrepo on github (https://github.com/Ablinne/blitz.old). I used this for a while, but did not look into it for years. I don't even use blitz in any of my current projects...I have now only rebased them from the hg copy onto the corresponding commit in this repository, but did not even check if it compiles. So please view this MR just as a pitch and try to see if it's worth investing more time into this enhancement.
If you do not think that blitz would benefit from something like this, just close the MR.
Best,
Alex