18 printf(
"=== RUN %s\n", __func__);
27 for (
int i=0; pass && i<
TESTVALS; i++) {
38 printf(
"%d: FAILED\n", i);
46 printf(
"%ld tests\n", count);
61 printf(
"=== RUN %s\n", __func__);
79 printf(
"%d,%d: FAILED: inconsistent result\n", i, j);
88 printf(
"%ld tests\n", count);
103 printf(
"=== RUN %s\n", __func__);
126 printf(
"%d,%d,%d: FAILED: inconsistent result\n", i, j, k);
137 printf(
"%ld tests\n", count);
__device__ void fp_print(const char *s, const fp_t &x)
Prints the canonical representation of x to STDOUT.
__device__ bool fp_neq(const fp_t &x, const fp_t &y)
Compares two fp_t residues.
__device__ void fp_add(fp_t &z, const fp_t &x, const fp_t &y)
Computes the sum of two residues x and y modulo p and stores it in z. Device only function.
__device__ void fp_x2(fp_t &z, const fp_t &x)
Multiplies x by 2 and stores the result into z.
uint64_t fp_t[6]
Residue modulo p. Any 384-bit representative of each residue is allowed, and stored as a 6-element li...
__device__ __host__ void fp_cpy(fp_t &z, const fp_t &x)
Copy from x into z.
__device__ void fp_x3(fp_t &z, const fp_t &x)
Multiplies x by 3 and stores the result into z.
__managed__ testval_t testval[TESTVALS]
__global__ void FpTestAssociativeAdd(testval_t *testval)
Test for the associative property of addition in Fp.
__global__ void FpTestAdd(testval_t *testval)
Test for addition in Fp.
__global__ void FpTestCommutativeAdd(testval_t *testval)
Test for the commutative property of addition in Fp.