FK20 CUDA
fp.cu File Reference
#include <stdio.h>
#include "fp.cuh"
Include dependency graph for fp.cu:

Go to the source code of this file.

Functions

__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...
 

Function Documentation

◆ 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]zResidue modulo p
[in]xArray of uint64_t
Returns
void

Definition at line 58 of file fp.cu.

Here is the caller graph for this function:

◆ fp_one()

__device__ __host__ void fp_one ( fp_t z)

Sets z to one.

Parameters
[in,out]z
Returns
void

Definition at line 26 of file fp.cu.

Here is the caller graph for this function:

◆ fp_print()

__device__ void fp_print ( const char *  s,
const fp_t x 
)

Prints the canonical representation of x to STDOUT.

Parameters
[in]sDescription string
[in]xResidue modulo p
Returns
void

Definition at line 39 of file fp.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
[out]z
[in]x
Returns
void

Definition at line 75 of file fp.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fp_zero()

__device__ __host__ void fp_zero ( fp_t z)

Sets z to zero.

Parameters
[out]z
Returns
void

Definition at line 15 of file fp.cu.

Here is the caller graph for this function: