|
LAMMP 4.2.0
Lamina High-Precision Arithmetic Library
|
#include "../../../include/lammp/impl/base_table.h"#include "../../../include/lammp/impl/inlines.h"#include "../../../include/lammp/impl/mparam.h"#include "../../../include/lammp/impl/tmp_alloc.h"#include "../../../include/lammp/lmmpn.h"
from_str.c 的引用(Include)关系图:函数 | |
| mp_size_t | lmmp_from_str_ (mp_ptr dst, const mp_byte_t *src, mp_size_t len, int base) |
| 字符串转大数操作 [src,len,base] to [dst,return value,B] | |
| static mp_size_t | lmmp_from_str_basecase_ (mp_ptr dst, const mp_byte_t *src, mp_size_t len, int base) |
| 将字符串转换为mp_limb_t数组 | |
| static mp_size_t | lmmp_from_str_divide_ (mp_ptr restrict dst, const mp_byte_t *src, mp_size_t len, mp_basepow_t *pow, mp_ptr restrict tp) |
| 将字符串转换为mp_limb_t数组 | |
| mp_size_t | lmmp_from_str_len_ (const mp_byte_t *src, mp_size_t len, int base) |
| Copyright (C) 2026 HJimmyK(Jericho Knox) | |
字符串转大数操作 [src,len,base] to [dst,return value,B]
| dst | 大数结果输出指针 |
| src | 字符串源指针 |
| len | 字符串长度 |
| base | 字符串的进制基数 |
在文件 from_str.c 第 154 行定义.
引用了 BALLOC_TYPE, mp_base_t::digits_in_limb, FROM_STR_BASEPOW_THRESHOLD, mp_base_t::large_base, LIMB_BITS, lmmp_bases_table, lmmp_copy, lmmp_from_str_basecase_(), lmmp_from_str_divide_(), lmmp_from_str_len_(), lmmp_limb_bits_, lmmp_mul_1_(), lmmp_param_assert, LMMP_POW2_Q, lmmp_sqr_, lmmp_tailing_zeros_, n, TEMP_DECL, TEMP_FREE , 以及 tp.
函数调用图:
|
static |
将字符串转换为mp_limb_t数组
| dst | 输出数组 |
| src | 输入字符串 |
| len | 字符串长度 |
| base | 转换基数 |
在文件 from_str.c 第 44 行定义.
引用了 mp_base_t::digits_in_limb, mp_base_t::large_base, lmmp_add_1_(), lmmp_bases_table, lmmp_mul_1_(), lmmp_param_assert , 以及 n.
被这些函数引用 lmmp_from_str_() , 以及 lmmp_from_str_divide_().
函数调用图:
这是这个函数的调用关系图:
|
static |
将字符串转换为mp_limb_t数组
| dst | 输出数组 |
| src | 输入字符串 |
| len | 字符串长度 |
| pow | 指数表 |
| tp | 临时数组 |
在文件 from_str.c 第 95 行定义.
引用了 FROM_STR_DIVIDE_THRESHOLD, lmmp_add_n_(), lmmp_copy, lmmp_from_str_basecase_(), lmmp_from_str_divide_(), lmmp_from_str_len_(), lmmp_inc, lmmp_mul_(), lmmp_param_assert, lmmp_zero, n , 以及 tp.
被这些函数引用 lmmp_from_str_() , 以及 lmmp_from_str_divide_().
函数调用图:
这是这个函数的调用关系图:Copyright (C) 2026 HJimmyK(Jericho Knox)
计算字符串转大数所需的 limb 缓冲区长度
This file is part of LAMMP.
LAMMP is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed WITHOUT ANY WARRANTY.
See https://www.gnu.org/licenses/.
在文件 from_str.c 第 23 行定义.
引用了 lmmp_bases_table, lmmp_mulh_, lmmp_param_assert , 以及 n.
被这些函数引用 lmmp_from_str_(), lmmp_from_str_divide_() , 以及 lmmp_to_str_().
这是这个函数的调用关系图: