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);
__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_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.
__device__ void fp_sub(fp_t &z, const fp_t &x, const fp_t &y)
Calculates the difference of two residues modulo p and stores it into z.
__managed__ testval_t testval[TESTVALS]
__global__ void FpTestSub(testval_t *testval)
Test for subtraction in Fp.