-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Boot::multiprecision as a DGtal::BigInteger model #1749
base: master
Are you sure you want to change the base?
Conversation
… DGtal::BigInteger (that fails for now)
Hi @rolanddenis , I may need your help with this PR (cc @JacquesOlivierLachaud ) This PR aims to include I'm fixing a few issues related to WITH_GMP usages and I'm facing a problem in On this PR, if you have a look to DGtal/tests/kernel/testPointVector.cpp Line 136 in 4d040fa
operator-() is not defined for DGtal::BigInteger . It seems to be related to ArithmeticConversionTraits you wrote a while ago.
Could you please help us here? thx |
Hey @dcoeurjo I spent some time trying to fix things here but things gets very complicated with Boost. Fixing code for GMP
This is the easy part. Fixing code for Boost
Boost BigIntegers are not meant to be combined with anything other than integers. And the operation listed above barely makes sense; I am quite surprised it works with GMP to be honest. The hardest part is that the tests do not cover everything. For example, only mixed BigInt/float crossProducts are actually checked in PointVector (due to the test you introduced in this PR). So missing any case could result in the error popping up at any time during further development. Fixing code for everyone at onceThe only stable solution I have is to code our own BigInteger which is a wrapper around either GMP or Boost depending on the compile options. This allows us to make sure everything works properly and overload the necessary operators and conversions as needed (and hopefully we won't miss any of them :) ). Your thoughts ? PS: To check this PR, do not forget to disable the -WITH_GMP (or DGTAL_WITH_GMP if merged with main2.0) in the github actions, otherwise it won't check against boost. |
PR Description
Adding boost::multiprecision for
DGtal::BigInteger
.Checklist