17 printf(
"=== RUN %s\n", __func__);
35 printf(
"%d,%d: FAILED: inconsistent result\n", i, j);
44 printf(
"%ld tests\n", count);
58 printf(
"=== RUN %s\n", __func__);
81 printf(
"%d,%d,%d: FAILED: inconsistent result\n", i, j, k);
92 printf(
"%ld tests\n", count);
__managed__ testval_t testval[TESTVALS]
__device__ void fr_print(const char *s, const fr_t &x)
prints the canonical representation of x to STDOUT.
__device__ bool fr_neq(const fr_t &x, const fr_t &y)
Compares two fr_t residues.
uint64_t fr_t[4]
Subgroup element stored as a 256-bit array (a 4-element little-endian array of uint64_t)....
__device__ __host__ void fr_cpy(fr_t &z, const fr_t &x)
Copy from x into z.
__device__ void fr_mul(fr_t &z, const fr_t &x)
Multiply two residues module r z and x, stores back into z.
__global__ void FrTestAssociativeMul(testval_t *testval)
Test of the associative property of multiplication (x*y)*z == x*(y*z)
__global__ void FrTestCommutativeMul(testval_t *testval)
Test of the commutative property of multiplication x*y == y*x.