|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
#include "impl/tmp_alloc.h"#include "impl/longlong.h"#include "numth/powmod.h"#include "lmmp/lmmpn.h"#include "lmmp/numth.h"宏定义 | |
| #define | getbit(p, bi) |
| Copyright (C) 2026 HJimmyK (Jericho Knox) | |
函数 | |
| static mp_bitcnt_t | count_bits (mp_srcptr p, mp_size_t n) |
| static mp_limb_t | getbits (const mp_limb_t *p, mp_bitcnt_t bi, mp_bitcnt_t nbits) |
| void | lmmp_powmod_2_ (mp_ptr restrict dst, mp_srcptr restrict bp, mp_srcptr restrict ep, mp_size_t en, mp_srcptr restrict mod) |
| static u128 | mont2_mul_2 (u128 a, u128 b, u128 n, u128 ninv) |
| static u128 | mont2_redc (u128 thi, u128 tlo, u128 n, u128 ninv) |
| static u128 | mont2_sqr (u128 a, u128 n, u128 ninv) |
| static void | mul_128 (u128 a, u128 b, u128 *hi, u128 *lo) |
| static void | sqr_128 (u128 a, u128 *hi, u128 *lo) |
| #define getbit | ( | p, | |
| bi ) |
Copyright (C) 2026 HJimmyK (Jericho Knox)
This file is part of LMMP.
LMMP is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library. If not, see https://www.gnu.org/licenses/.
SPDX-License-Identifier: LGPL-3.0-or-later
在文件 powmod_2.c 第 29 行定义.
|
inlinestatic |
在文件 powmod_2.c 第 50 行定义.
引用了 count_bits(), LIMB_BITS, lmmp_limb_bits_ , 以及 n.
|
inlinestatic |
在文件 powmod_2.c 第 31 行定义.
| void lmmp_powmod_2_ | ( | mp_ptr restrict | dst, |
| mp_srcptr restrict | bp, | ||
| mp_srcptr restrict | ep, | ||
| mp_size_t | en, | ||
| mp_srcptr restrict | mod ) |
在文件 powmod_2.c 第 159 行定义.
引用了 b2, count_bits(), ctz_shr_u64, getbit, getbits(), lmmp_binvert_2_(), lmmp_copy, lmmp_debug_assert, lmmp_div_(), LMMP_MIN, lmmp_param_assert, lmmp_powmod_2_(), lmmp_zero, mont2_mul_2(), mont2_redc(), mont2_sqr(), n, restrict, TALLOC_TYPE, TEMP_DECL , 以及 TEMP_FREE.
|
inlinestatic |
在文件 powmod_2.c 第 153 行定义.
引用了 mont2_mul_2(), mont2_redc(), mul_128() , 以及 n.
|
inlinestatic |
在文件 powmod_2.c 第 102 行定义.
引用了 c1, lo, mont2_redc(), mul_128() , 以及 n.
|
inlinestatic |
在文件 powmod_2.c 第 147 行定义.
引用了 mont2_redc(), mont2_sqr(), n , 以及 sqr_128().
|
inlinestatic |
在文件 powmod_2.c 第 56 行定义.
引用了 _umul128to256_(), a0, a1, b0, b1, lo , 以及 mul_128().
|
inlinestatic |
在文件 powmod_2.c 第 79 行定义.
引用了 _usqr128to256_(), a0, a1, lo , 以及 sqr_128().