1 #ifndef _ECM_GPU_H 2 #define _ECM_GPU_H 1 3 4 #ifndef _DO_NOT_INCLUDE_ECM_IMPL_H 5 #include "ecm-impl.h" 6 #endif 7 8 #ifdef WITH_GPU 9 10 #ifndef ECM_GPU_NB_DIGITS 11 #define ECM_GPU_NB_DIGITS 32 //by default 12 #endif 13 14 #ifndef ECM_GPU_DIGITS 15 #define ECM_GPU_DIGITS 0 16 #endif 17 18 #if (ECM_GPU_DIGITS==0) 19 #define ECM_GPU_SIZE_DIGIT 32 20 typedef unsigned int digit_t; 21 typedef int carry_t; 22 #endif 23 24 #define VOL volatile 25 //#define VOL 26 27 #define ECM_GPU_CURVES_BY_BLOCK 32 28 29 #define ECM_GPU_MAX_BITS ECM_GPU_SIZE_DIGIT * ECM_GPU_NB_DIGITS 30 typedef digit_t VOL biguint_t[ECM_GPU_NB_DIGITS]; 31 typedef carry_t VOL bigint_t[ECM_GPU_NB_DIGITS]; 32 33 /* Uncomment the next line to print the number of remaining iterations. */ 34 //#define PRINT_REMAINING_ITER 35 #endif 36 37 #ifndef _DO_NOT_INCLUDE_ECM_IMPL_H 38 39 /* cudawrapper.c */ 40 #define gpu_ecm __ECM(gpu_ecm) 41 #ifdef WITH_GPU 42 int gpu_ecm (mpz_t, mpz_t, int*, mpz_t, mpz_t, mpz_t, double *, double, mpz_t, 43 mpz_t, unsigned long, const int, int, int, int, int, int, 44 FILE*, FILE*, char*, char *, double, int (*)(void), mpz_t, 45 double *, int, int*, unsigned int*); 46 #else 47 int gpu_ecm (); 48 #endif 49 #define gpu_ecm_stage1 __ECM(gpu_ecm_stage1) 50 int gpu_ecm_stage1 (mpz_t *, int *, mpz_t, mpz_t, unsigned int, unsigned int, 51 float *, int); 52 53 #endif 54 55 #endif /* _ECM_GPU_H */ 56