LMMP 4.3.0
Lamina High-Precision Arithmetic Library
载入中...
搜索中...
未找到
inv.c 文件参考
#include "support/perf.h"
#include "lmmp/lmmpn.h"
#include "mparam.h"
inv.c 的引用(Include)关系图:

浏览该文件的源代码.

函数

static double bench_inv_1 (const bench_options *o)
 Copyright (C) 2026 HJimmyK (Jericho Knox)
static double bench_inv_2_1 (const bench_options *o)
int main (void)

函数说明

◆ bench_inv_1()

double bench_inv_1 ( const bench_options * o)
static

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

在文件 inv.c 第 27 行定义.

27 {
28 mp_limb_t x = 0x9e3779b97f4a7c15ull | LIMB_B_2;
29 double us;
30 BENCH_MEASURE(us, o, bench_sink += lmmp_inv_1_(x););
31 return us;
32}
#define LIMB_B_2
uint64_t mp_limb_t
定义 lmmp.h:92
mp_limb_t lmmp_inv_1_(mp_limb_t x)
1阶逆元计算 (inv1)
定义 inv.c:124
#define BENCH_MEASURE(result, options,...)
定义 perf.h:93

引用了 bench_inv_1(), BENCH_MEASURE, LIMB_B_2 , 以及 lmmp_inv_1_().

被这些函数引用 bench_inv_1() , 以及 main().

函数调用图:
这是这个函数的调用关系图:

◆ bench_inv_2_1()

double bench_inv_2_1 ( const bench_options * o)
static

在文件 inv.c 第 34 行定义.

34 {
35 mp_limb_t xh = 0x9e3779b97f4a7c15ull | LIMB_B_2;
36 mp_limb_t xl = 0x3141592653589793ull;
37 double us;
38 BENCH_MEASURE(us, o, bench_sink += lmmp_inv_2_1_(xh, xl););
39 return us;
40}
mp_limb_t lmmp_inv_2_1_(mp_limb_t xh, mp_limb_t xl)
2-1阶逆元计算 (inv21)
定义 inv.c:27

引用了 bench_inv_2_1(), BENCH_MEASURE, LIMB_B_2 , 以及 lmmp_inv_2_1_().

被这些函数引用 bench_inv_2_1() , 以及 main().

函数调用图:
这是这个函数的调用关系图:

◆ main()

int main ( void )

在文件 inv.c 第 42 行定义.

42 {
43 setvbuf(stdout, NULL, _IONBF, 0);
45 puts("[lmmpn/inv]");
46 report("inv_1", bench_inv_1(&bench_default), 0);
47 report("inv_2_1", bench_inv_2_1(&bench_default), 0);
49 return 0;
50}
void lmmp_global_init(void)
全局初始化函数(线程局部的)
void lmmp_global_deinit(void)
全局释放函数(线程局部的)
static double bench_inv_2_1(const bench_options *o)
定义 inv.c:34
static double bench_inv_1(const bench_options *o)
Copyright (C) 2026 HJimmyK (Jericho Knox)
定义 inv.c:27

引用了 bench_inv_1(), bench_inv_2_1(), lmmp_global_deinit(), lmmp_global_init() , 以及 main().

函数调用图: