Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::bernstein_yang::Native5x64 Class Reference

#include <bernstein_yang_inverse.hpp>

Public Member Functions

 Native5x64 () noexcept
 
 Native5x64 (const uint256_t &x) noexcept
 
uint256_t to_uint256 () const noexcept
 
u64 low_64 () const noexcept
 
bool is_zero () const noexcept
 
bool is_negative () const noexcept
 
void neg () noexcept
 
void reduce_to_canonical (const Native5x64 &p) noexcept
 

Static Public Member Functions

static Native5x64 one () noexcept
 
static DivstepMatrix compute_divstep_matrix (i64 &delta, u64 f_lo, u64 g_lo) noexcept
 
static void apply_divstep_matrix (const DivstepMatrix &m, Native5x64 &f, Native5x64 &g, Native5x64 &d, Native5x64 &e, const Native5x64 &p, u64 p_inv_mod_2k) noexcept
 
static constexpr u64 p_inv_mod_2k_from_montgomery_r_inv (u64 r_inv) noexcept
 

Static Public Attributes

static constexpr int BATCH = 62
 
static constexpr int NUM_ITERATIONS = 12
 
static constexpr int REDUCE_INTERVAL = 4
 
static constexpr int REDUCE_TO_CANONICAL_MAX_ITERS = 36
 

Private Member Functions

void add_inplace (const Native5x64 &b) noexcept
 
void sub_inplace (const Native5x64 &b) noexcept
 
bool ge (const Native5x64 &b) const noexcept
 

Private Attributes

u64 l [N]
 

Static Private Attributes

static constexpr int N = 5
 

Friends

struct NativeMatrix
 

Detailed Description

Definition at line 44 of file bernstein_yang_inverse.hpp.

Constructor & Destructor Documentation

◆ Native5x64() [1/2]

bb::bernstein_yang::Native5x64::Native5x64 ( )
inlinenoexcept

Definition at line 80 of file bernstein_yang_inverse.hpp.

◆ Native5x64() [2/2]

bb::bernstein_yang::Native5x64::Native5x64 ( const uint256_t x)
inlineexplicitnoexcept

Definition at line 83 of file bernstein_yang_inverse.hpp.

Member Function Documentation

◆ add_inplace()

void bb::bernstein_yang::Native5x64::add_inplace ( const Native5x64 b)
inlineprivatenoexcept

Definition at line 147 of file bernstein_yang_inverse.hpp.

◆ apply_divstep_matrix()

void bb::bernstein_yang::Native5x64::apply_divstep_matrix ( const DivstepMatrix m,
Native5x64 f,
Native5x64 g,
Native5x64 d,
Native5x64 e,
const Native5x64 p,
u64  p_inv_mod_2k 
)
inlinestaticnoexcept

Definition at line 258 of file bernstein_yang_inverse.hpp.

◆ compute_divstep_matrix()

DivstepMatrix bb::bernstein_yang::Native5x64::compute_divstep_matrix ( i64 delta,
u64  f_lo,
u64  g_lo 
)
inlinestaticnoexcept

Definition at line 225 of file bernstein_yang_inverse.hpp.

◆ ge()

bool bb::bernstein_yang::Native5x64::ge ( const Native5x64 b) const
inlineprivatenoexcept

Definition at line 165 of file bernstein_yang_inverse.hpp.

◆ is_negative()

bool bb::bernstein_yang::Native5x64::is_negative ( ) const
inlinenoexcept

Definition at line 96 of file bernstein_yang_inverse.hpp.

◆ is_zero()

bool bb::bernstein_yang::Native5x64::is_zero ( ) const
inlinenoexcept

Definition at line 95 of file bernstein_yang_inverse.hpp.

◆ low_64()

u64 bb::bernstein_yang::Native5x64::low_64 ( ) const
inlinenoexcept

Definition at line 94 of file bernstein_yang_inverse.hpp.

◆ neg()

void bb::bernstein_yang::Native5x64::neg ( )
inlinenoexcept

Definition at line 97 of file bernstein_yang_inverse.hpp.

◆ one()

static Native5x64 bb::bernstein_yang::Native5x64::one ( )
inlinestaticnoexcept

Definition at line 86 of file bernstein_yang_inverse.hpp.

◆ p_inv_mod_2k_from_montgomery_r_inv()

static constexpr u64 bb::bernstein_yang::Native5x64::p_inv_mod_2k_from_montgomery_r_inv ( u64  r_inv)
inlinestaticconstexprnoexcept

Definition at line 137 of file bernstein_yang_inverse.hpp.

◆ reduce_to_canonical()

void bb::bernstein_yang::Native5x64::reduce_to_canonical ( const Native5x64 p)
inlinenoexcept

Definition at line 108 of file bernstein_yang_inverse.hpp.

◆ sub_inplace()

void bb::bernstein_yang::Native5x64::sub_inplace ( const Native5x64 b)
inlineprivatenoexcept

Definition at line 156 of file bernstein_yang_inverse.hpp.

◆ to_uint256()

uint256_t bb::bernstein_yang::Native5x64::to_uint256 ( ) const
inlinenoexcept

Definition at line 93 of file bernstein_yang_inverse.hpp.

Friends And Related Symbol Documentation

◆ NativeMatrix

friend struct NativeMatrix
friend

Definition at line 179 of file bernstein_yang_inverse.hpp.

Member Data Documentation

◆ BATCH

constexpr int bb::bernstein_yang::Native5x64::BATCH = 62
staticconstexpr

Definition at line 51 of file bernstein_yang_inverse.hpp.

◆ l

u64 bb::bernstein_yang::Native5x64::l[N]
private

Definition at line 145 of file bernstein_yang_inverse.hpp.

◆ N

constexpr int bb::bernstein_yang::Native5x64::N = 5
staticconstexprprivate

Definition at line 144 of file bernstein_yang_inverse.hpp.

◆ NUM_ITERATIONS

constexpr int bb::bernstein_yang::Native5x64::NUM_ITERATIONS = 12
staticconstexpr

Definition at line 59 of file bernstein_yang_inverse.hpp.

◆ REDUCE_INTERVAL

constexpr int bb::bernstein_yang::Native5x64::REDUCE_INTERVAL = 4
staticconstexpr

Definition at line 71 of file bernstein_yang_inverse.hpp.

◆ REDUCE_TO_CANONICAL_MAX_ITERS

constexpr int bb::bernstein_yang::Native5x64::REDUCE_TO_CANONICAL_MAX_ITERS = 36
staticconstexpr

Definition at line 76 of file bernstein_yang_inverse.hpp.


The documentation for this class was generated from the following file: