Skip to content
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

GMP dependency #55

Open
cesss opened this issue Mar 1, 2023 · 2 comments
Open

GMP dependency #55

cesss opened this issue Mar 1, 2023 · 2 comments

Comments

@cesss
Copy link

cesss commented Mar 1, 2023

Is GMP used only by Rational.h ? If affirmative, I believe it should be possible to remove the GMP dependency (which is LGPL) and use for example Boost.Multiprecision (which has Boost license).

Would Rational.h be the only file to modify, or more parts in the code would need to be rewritten?

Thanks!

@Yixin-Hu
Copy link
Collaborator

Hi,

Yes, gmp.h is only included in Rational.h. I think you can try to replace it with other multi-precision libraries as long as you overload the operators in Rational.h

@nonbasketless
Copy link

I want to share my experience detangling GMP. I'll spare you the why, if you're here you know ;)

First of all, the ONLY part of fTetWild that actually needs GMP as of this writing is floatTetWild::AMIPS_energy in LocalOperations.cpp. There are other references, but they're dead. Remove and/or comment out.

Comment out the block in floatTetWild::AMIPS_energy that uses triwild::Rational, replace it with return res;, just to make sure it builds/runs. Good? Remove that, proceed.

Copy the commented out block and replace triwild::Rational with your alternative of choice. I went with a new library: https://github.com/tuwien-cms/libxprec, highly recommend. Pretty easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants