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 fr_print(const char *s, const fr_t &x)
prints the canonical representation of x to STDOUT.
__device__ __host__ void fr_one(fr_t &z)
Sets the value of z to one.
__device__ void fr_sub(fr_t &z, const fr_t &x)
Calculates the difference of two residues modulo p and stores it into z.
__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__ bool fr_isone(const fr_t &x)
Checks if the residue x modulo f is congruent to one.
__device__ void fr_add(fr_t &z, const fr_t &x)
Computes the sum of two residues x and z modulo r and stores it in z. Device only function.
__global__ void FrTestFibonacci(testval_t *)
Test addition and subtraction in Fr using a fibonacci sequence (chain dependency) from 1 to ITERATION...