1 #include <nfl.hpp>
2 #include "test_binary_op.h"
3
4 template <class P>
test_op()5 bool test_op()
6 {
7 using T = typename P::value_type;
8 using greater_value_type = typename P::greater_value_type;
9
10 return test_binary_op<P>(
11 [](T a, T b, T m) { return ((greater_value_type)a*b) % m; },
12 [](P const& a, P const& b) { return a*b; }
13 );
14 }
15
16 template<size_t degree, size_t modulus, class T>
run()17 bool run()
18 {
19 using poly_t = nfl::poly_from_modulus<T, degree, modulus>;
20 using poly_p_t = nfl::poly_p_from_modulus<T, degree, modulus>;
21
22 return test_op<poly_t>() and test_op<poly_p_t>();
23 }
24
main(int argc,char const * argv[])25 int main(int argc, char const* argv[]) {
26 return not run<CONFIG>() ;
27 }
28