I have a C++ program which uses the NTL and GMP mathematical libraries for multiplication and modular arithmetic using arbitrary length integers and polynomials. I currently use the terminal instruction below to compile it in line with the suggestion in the NTL documentation:
g++ -g -O2 -std=c++11 -pthread -march=native directory/filename.cpp -o directory/filename.out -lntl -lgmp -lm
Having modified it (successfully I think) to run on a GPU, I would now like to compile the program to include the same libraries as that in the C++ version. My CUDA program includes the same headers in the preamble as the C++ program.
I am very new to CUDA so my question really is whether anybody here knows if I can/would need to use the same flags as above in the standard nvcc compilation instructions, or, more generally, how I could go about compiling my CUDA program to include the NTL and GMP libraries?
nvcc directory/filename.cu -o directory/filename.out
If it's not possible, are there alternative CUDA libraries that would be the closest equivalent to either of those or suit applications using arbitrary length integer and polynomial arithmetic?
Thank you kindly in advance, any help is much appreciated.