X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=src%2Fmodinteger%2Fcl_MI_pow2.h;h=248968f1a2a281fd8bab605868eab144794784a9;hb=251c2a8ca169c9dad1cdef582953311460ecb4c0;hp=195726b171a443057f384b96a8feb64119278c52;hpb=dd9e0f894eec7e2a8cf85078330ddc0a6639090b;p=cln.git diff --git a/src/modinteger/cl_MI_pow2.h b/src/modinteger/cl_MI_pow2.h index 195726b..248968f 100644 --- a/src/modinteger/cl_MI_pow2.h +++ b/src/modinteger/cl_MI_pow2.h @@ -1,5 +1,7 @@ // m > 0, m = 2^m1 +namespace cln { + class cl_heap_modint_ring_pow2 : public cl_heap_modint_ring { SUBCLASS_cl_heap_modint_ring() public: @@ -11,11 +13,7 @@ public: uintL m1; }; -static -#if !(defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ <= 90)) // workaround g++-2.7.2 and egcs-1.0.2-prerelease bug -inline -#endif -const cl_I pow2_reduce_modulo (cl_heap_modint_ring* _R, const cl_I& x) +static inline const cl_I pow2_reduce_modulo (cl_heap_modint_ring* _R, const cl_I& x) { var cl_heap_modint_ring_pow2* R = (cl_heap_modint_ring_pow2*)_R; return ldb(x,cl_byte(R->m1,0)); @@ -142,3 +140,5 @@ static cl_modint_mulops pow2_mulops = { // Constructor. inline cl_heap_modint_ring_pow2::cl_heap_modint_ring_pow2 (const cl_I& m, uintL _m1) : cl_heap_modint_ring (m, &std_setops, &pow2_addops, &pow2_mulops), m1 (_m1) {} + +} // namespace cln