16 for (
int i=0; i<6; i++)
28 for (
int i=1; i<6; i++)
45 printf(
"%016lX%016lX%016lX%016lX%016lX%016lX\n",
47 t[5], t[4], t[3], t[2], t[1], t[0]);
__device__ void fp_toUint64(uint64_t *z, const fp_t &x)
Converts from residue modulo p (fp_t) to uint64_t[6]. The converted value is in canonical form.
__device__ void fp_print(const char *s, const fp_t &x)
Prints the canonical representation of x to STDOUT.
__device__ __host__ void fp_zero(fp_t &z)
Sets z to zero.
__device__ __host__ void fp_one(fp_t &z)
Sets z to one.
__device__ __host__ void fp_fromUint64(fp_t &z, const uint64_t *x)
Converts uint64_t[6] to fp_t. After this operation, z represents x mod p.
__device__ void fp_reduce6(fp_t &z)
Narrow reduction of a residue modulo p, reducing to the canonical representation.
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.