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

#include <bernstein_yang_inverse_wasm.hpp>

Public Member Functions

 Wasm9x29 () noexcept
 
 Wasm9x29 (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 Wasm9x29 &p) noexcept
 

Static Public Member Functions

static Wasm9x29 one () noexcept
 
static DivstepMatrix compute_divstep_matrix (i64 &delta, u64 f_lo, u64 g_lo) noexcept
 
static void apply_divstep_matrix (const DivstepMatrix &m, Wasm9x29 &f, Wasm9x29 &g, Wasm9x29 &d, Wasm9x29 &e, const Wasm9x29 &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 = 58
 
static constexpr int NUM_ITERATIONS = 13
 
static constexpr int REDUCE_INTERVAL = 4
 
static constexpr int REDUCE_TO_CANONICAL_MAX_ITERS = 36
 

Private Member Functions

void normalise () noexcept
 
void add_inplace (const Wasm9x29 &b) noexcept
 
void sub_inplace (const Wasm9x29 &b) noexcept
 

Private Attributes

i64 l [N]
 

Static Private Attributes

static constexpr int N = 9
 
static constexpr int LIMB_BITS = 29
 
static constexpr u64 LIMB_MASK = (1ULL << LIMB_BITS) - 1
 

Detailed Description

Definition at line 19 of file bernstein_yang_inverse_wasm.hpp.

Constructor & Destructor Documentation

◆ Wasm9x29() [1/2]

bb::bernstein_yang::Wasm9x29::Wasm9x29 ( )
inlinenoexcept

Definition at line 43 of file bernstein_yang_inverse_wasm.hpp.

◆ Wasm9x29() [2/2]

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

Definition at line 46 of file bernstein_yang_inverse_wasm.hpp.

Member Function Documentation

◆ add_inplace()

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

Definition at line 125 of file bernstein_yang_inverse_wasm.hpp.

◆ apply_divstep_matrix()

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

Definition at line 205 of file bernstein_yang_inverse_wasm.hpp.

◆ compute_divstep_matrix()

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

Definition at line 165 of file bernstein_yang_inverse_wasm.hpp.

◆ is_negative()

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

Definition at line 82 of file bernstein_yang_inverse_wasm.hpp.

◆ is_zero()

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

Definition at line 74 of file bernstein_yang_inverse_wasm.hpp.

◆ low_64()

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

Definition at line 73 of file bernstein_yang_inverse_wasm.hpp.

◆ neg()

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

Definition at line 83 of file bernstein_yang_inverse_wasm.hpp.

◆ normalise()

void bb::bernstein_yang::Wasm9x29::normalise ( )
inlineprivatenoexcept

Definition at line 115 of file bernstein_yang_inverse_wasm.hpp.

◆ one()

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

Definition at line 59 of file bernstein_yang_inverse_wasm.hpp.

◆ p_inv_mod_2k_from_montgomery_r_inv()

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

Definition at line 103 of file bernstein_yang_inverse_wasm.hpp.

◆ reduce_to_canonical()

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

Definition at line 143 of file bernstein_yang_inverse_wasm.hpp.

◆ sub_inplace()

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

Definition at line 132 of file bernstein_yang_inverse_wasm.hpp.

◆ to_uint256()

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

Definition at line 66 of file bernstein_yang_inverse_wasm.hpp.

Member Data Documentation

◆ BATCH

constexpr int bb::bernstein_yang::Wasm9x29::BATCH = 58
staticconstexpr

Definition at line 24 of file bernstein_yang_inverse_wasm.hpp.

◆ l

i64 bb::bernstein_yang::Wasm9x29::l[N]
private

Definition at line 113 of file bernstein_yang_inverse_wasm.hpp.

◆ LIMB_BITS

constexpr int bb::bernstein_yang::Wasm9x29::LIMB_BITS = 29
staticconstexprprivate

Definition at line 111 of file bernstein_yang_inverse_wasm.hpp.

◆ LIMB_MASK

constexpr u64 bb::bernstein_yang::Wasm9x29::LIMB_MASK = (1ULL << LIMB_BITS) - 1
staticconstexprprivate

Definition at line 112 of file bernstein_yang_inverse_wasm.hpp.

◆ N

constexpr int bb::bernstein_yang::Wasm9x29::N = 9
staticconstexprprivate

Definition at line 110 of file bernstein_yang_inverse_wasm.hpp.

◆ NUM_ITERATIONS

constexpr int bb::bernstein_yang::Wasm9x29::NUM_ITERATIONS = 13
staticconstexpr

Definition at line 28 of file bernstein_yang_inverse_wasm.hpp.

◆ REDUCE_INTERVAL

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

Definition at line 34 of file bernstein_yang_inverse_wasm.hpp.

◆ REDUCE_TO_CANONICAL_MAX_ITERS

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

Definition at line 39 of file bernstein_yang_inverse_wasm.hpp.


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