简体   繁体   中英

C++ number theory library (thread-safe, cross-platform)

I'm looking for an optimized, cross-platform and thread-safe C/C++ library that supports long integers and polynomial arithmetic.

Functionality of NTL and Lidia is enough, but they are not thread-safe.

I'm not sure about Flint , it seems not to be cross-platform.

Can anybody help?

This is a bit old, but I'll answer in case it helps anyone in the future. Linbox has created a thread safe version of NTL. I have used some of the functionality from this version (namely GF2, GF2X, GF2E and GF2EX) successfully in the past by merging changes from this version into NTL version 5.5.2

http://linalg.org/projects/linalg/log/trunk/ntl/doc/multithreading.txt?rev=20

NTL is thread safe, you just need to compile it in a thread-safe manner. Configure before installing using the following command and it works fine:

./configure NTL_THREADS=on NTL_GMP_LIP=on

You'll need GMP installed in order to proceed though.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM