NVlabs / CGBN

CGBN: CUDA Accelerated Multiple Precision Arithmetic (Big Num) using Cooperative Groups
Other
206 stars 55 forks source link

Is cgbn_cuda.h used? #21

Open QinbinLi opened 2 years ago

QinbinLi commented 2 years ago

Hi,

Thanks for providing the useful library! I found that cgbn.h uses macro __CUDA_ARCH__ to decide whether include cgbn_cuda.h or cgbn_mpz.h (lines 67-82 in cgbn.h). However, this macro is only defined in a device code (see here). Thus, I think cgbn_cuda.h never be included. I checked that with the provided samples and found that the samples always include cgbn_mpz.h during compilation. Is cgbn_cuda.h useful? Looking forward to your reply!