Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
Functions | |
void | basecase_mul (mp_word_t z[], size_t z_size, const mp_word_t x[], size_t x_size, const mp_word_t y[], size_t y_size) noexcept |
mp_word_t | bigint_add2 (mp_word_t x[], size_t x_size, const mp_word_t y[], size_t y_size) noexcept |
Two operand addition with carry out. More... | |
void | bigint_add3 (mp_word_t z[], const mp_word_t x[], size_t x_size, const mp_word_t y[], size_t y_size) noexcept |
Three operand addition. More... | |
mp_word_t | bigint_add3_nc (mp_word_t z[], const mp_word_t x[], size_t x_size, const mp_word_t y[], size_t y_size) noexcept |
Three operand addition with carry out. More... | |
int | bigint_cmp (const mp_word_t x[], size_t x_size, const mp_word_t y[], size_t y_size) noexcept |
Compare unsigned x and y mp_word_t. More... | |
CT::Mask< mp_word_t > | bigint_ct_is_eq (const mp_word_t x[], size_t x_size, const mp_word_t y[], size_t y_size) noexcept |
CT::Mask< mp_word_t > | bigint_ct_is_lt (const mp_word_t x[], size_t x_size, const mp_word_t y[], size_t y_size, bool lt_or_equal=false) noexcept |
Compare x and y Return ~0 if x[0:x_size] < y[0:y_size] or 0 otherwise If lt_or_equal is true, returns ~0 also for x == y. More... | |
mp_word_t | bigint_divop (mp_word_t n1, mp_word_t n0, mp_word_t d) |
Computes ((n1<<bits) + n0) / d. More... | |
mp_word_t | bigint_linmul2 (mp_word_t x[], size_t x_size, mp_word_t y) noexcept |
void | bigint_linmul3 (mp_word_t z[], const mp_word_t x[], size_t x_size, mp_word_t y) noexcept |
mp_word_t | bigint_modop (mp_word_t n1, mp_word_t n0, mp_word_t d) |
Compute ((n1<<bits) + n0) % d. More... | |
void | bigint_shl1 (mp_word_t x[], size_t x_size, size_t x_words, size_t word_shift, size_t bit_shift) noexcept |
void | bigint_shl2 (mp_word_t y[], const mp_word_t x[], size_t x_size, size_t word_shift, size_t bit_shift) noexcept |
void | bigint_shr1 (mp_word_t x[], size_t x_size, size_t word_shift, size_t bit_shift) noexcept |
void | bigint_shr2 (mp_word_t y[], const mp_word_t x[], size_t x_size, size_t word_shift, size_t bit_shift) noexcept |
mp_word_t | bigint_sub2 (mp_word_t x[], size_t x_size, const mp_word_t y[], size_t y_size) noexcept |
Two operand subtraction. More... | |
void | bigint_sub2_rev (mp_word_t x[], const mp_word_t y[], size_t y_size) noexcept |
Two operand subtraction, x = y - x; assumes y >= x. More... | |
mp_word_t | bigint_sub3 (mp_word_t z[], const mp_word_t x[], size_t x_size, const mp_word_t y[], size_t y_size) noexcept |
Three operand subtraction. More... | |
int32_t | bigint_sub_abs (mp_word_t z[], const mp_word_t x[], size_t x_size, const mp_word_t y[], size_t y_size) noexcept |
Set z to abs(x-y), ie if x >= y, then compute z = x - y Otherwise compute z = y - x No borrow is possible since the result is always >= 0. More... | |
void | mul64x64_128 (const uint64_t a, const uint64_t b, uint64_t &lo, uint64_t &hi) noexcept |
64x64->128 bit multiplication More... | |
mp_word_t | word8_add2 (mp_word_t x[8], const mp_word_t y[8], mp_word_t carry) noexcept |
mp_word_t | word8_add3 (mp_word_t z[8], const mp_word_t x[8], const mp_word_t y[8], mp_word_t carry) noexcept |
mp_word_t | word8_linmul2 (mp_word_t x[8], mp_word_t y, mp_word_t carry) noexcept |
mp_word_t | word8_linmul3 (mp_word_t z[8], const mp_word_t x[8], mp_word_t y, mp_word_t carry) noexcept |
mp_word_t | word8_madd3 (mp_word_t z[8], const mp_word_t x[8], mp_word_t y, mp_word_t carry) noexcept |
mp_word_t | word8_sub2 (mp_word_t x[8], const mp_word_t y[8], mp_word_t carry) noexcept |
mp_word_t | word8_sub2_rev (mp_word_t x[8], const mp_word_t y[8], mp_word_t carry) noexcept |
mp_word_t | word8_sub3 (mp_word_t z[8], const mp_word_t x[8], const mp_word_t y[8], mp_word_t carry) noexcept |
mp_word_t | word_add (const mp_word_t x, const mp_word_t y, mp_word_t &carry) noexcept |
mp_word_t | word_madd2 (mp_word_t a, mp_word_t b, mp_word_t &c) noexcept |
Word Multiply/Add. More... | |
mp_word_t | word_madd3 (mp_word_t a, mp_word_t b, mp_word_t c, mp_word_t &d) noexcept |
Word Multiply/Add. More... | |
mp_word_t | word_sub (mp_word_t x, mp_word_t y, mp_word_t &carry) noexcept |
|
inlinenoexcept |
Compare unsigned x and y mp_word_t.
Returns
Definition at line 645 of file big_int_ops.hpp.
|
inlinenoexcept |
64x64->128 bit multiplication
Definition at line 145 of file big_int_ops.hpp.
Word Multiply/Add.
Definition at line 184 of file big_int_ops.hpp.
|
inlinenoexcept |
Word Multiply/Add.
Definition at line 206 of file big_int_ops.hpp.
|
inlinenoexcept |
Two operand addition with carry out.
Definition at line 276 of file big_int_ops.hpp.
|
inlinenoexcept |
Three operand addition with carry out.
Definition at line 296 of file big_int_ops.hpp.
|
inlinenoexcept |
Three operand addition.
Definition at line 316 of file big_int_ops.hpp.
|
inlinenoexcept |
Two operand subtraction.
Definition at line 322 of file big_int_ops.hpp.
|
inlinenoexcept |
Two operand subtraction, x = y - x; assumes y >= x.
Definition at line 342 of file big_int_ops.hpp.
|
inlinenoexcept |
Three operand subtraction.
Definition at line 357 of file big_int_ops.hpp.
|
inlinenoexcept |
Set z to abs(x-y), ie if x >= y, then compute z = x - y Otherwise compute z = y - x No borrow is possible since the result is always >= 0.
Return the relative size of x vs y (-1, 0, 1)
z | output array of max(x_size,y_size) words |
x | input param |
x_size | length of x |
y | input param |
y_size | length of y |
Definition at line 390 of file big_int_ops.hpp.
Definition at line 413 of file big_int_ops.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
Computes ((n1<<bits) + n0) / d.
Definition at line 534 of file big_int_ops.hpp.
Compute ((n1<<bits) + n0) % d.
Definition at line 561 of file big_int_ops.hpp.
|
inlinenoexcept |
Definition at line 576 of file big_int_ops.hpp.
|
inlinenoexcept |
Compare x and y Return ~0 if x[0:x_size] < y[0:y_size] or 0 otherwise If lt_or_equal is true, returns ~0 also for x == y.
Definition at line 604 of file big_int_ops.hpp.