8 #define ITERATIONS 100000
18 printf(
"=== RUN %s\n", __func__);
71 printf(
"Reverse iteration failed\n");
79 printf(
"%ld tests passed\n", count);
__device__ void fp_print(const char *s, const fp_t &x)
Prints the canonical representation of x to STDOUT.
__device__ __host__ void fp_one(fp_t &z)
Sets z to one.
__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.
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__ bool fp_isone(const fp_t &x)
Checks if the residue x modulo p is congruent to one.
__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.
__global__ void FpTestFibonacci(testval_t *)
Test addition and subtraction in Fp using a fibonacci sequence (chain dependency) from 1 to ITERATION...