#include <stdio.h>
#include "fp.cuh"
Go to the source code of this file.
|
| __device__ __host__ void | fp_zero (fp_t &z) |
| | Sets z to zero. More...
|
| |
| __device__ __host__ void | fp_one (fp_t &z) |
| | Sets z to one. More...
|
| |
| __device__ void | fp_print (const char *s, const fp_t &x) |
| | Prints the canonical representation of x to STDOUT. More...
|
| |
| __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. More...
|
| |
| __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. More...
|
| |
◆ fp_fromUint64()
| __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.
- Parameters
-
| [out] | z | Residue modulo p |
| [in] | x | Array of uint64_t |
- Returns
- void
Definition at line 58 of file fp.cu.
◆ fp_one()
| __device__ __host__ void fp_one |
( |
fp_t & |
z | ) |
|
Sets z to one.
- Parameters
-
- Returns
- void
Definition at line 26 of file fp.cu.
◆ fp_print()
| __device__ void fp_print |
( |
const char * |
s, |
|
|
const fp_t & |
x |
|
) |
| |
Prints the canonical representation of x to STDOUT.
- Parameters
-
| [in] | s | Description string |
| [in] | x | Residue modulo p |
- Returns
- void
Definition at line 39 of file fp.cu.
◆ fp_toUint64()
| __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.
- Parameters
-
- Returns
- void
Definition at line 75 of file fp.cu.
◆ fp_zero()
| __device__ __host__ void fp_zero |
( |
fp_t & |
z | ) |
|
Sets z to zero.
- Parameters
-
- Returns
- void
Definition at line 15 of file fp.cu.