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

浏览该文件的源代码.

函数

static double bench_addmul_1 (mp_size_t n, const bench_options *o)
static double bench_mul_1 (mp_size_t n, const bench_options *o)
 Copyright (C) 2026 HJimmyK (Jericho Knox)
static double bench_submul_1 (mp_size_t n, const bench_options *o)
int main (void)

函数说明

◆ bench_addmul_1()

double bench_addmul_1 ( mp_size_t n,
const bench_options * o )
static

在文件 mul_1.c 第 36 行定义.

36 {
37 mp_ptr a = alloc_limbs(n), d = alloc_limbs(n + 1);
38 fill_random(a, n, 0x1112131415161718ull + n);
39 fill_random(d, n, 0x2122232425262728ull + n);
40 mp_limb_t x = 0x9e3779b97f4a7c15ull;
41 double us;
42 BENCH_MEASURE(us, o, bench_sink += lmmp_addmul_1_(d, a, n, x););
43 lmmp_free(a);
44 lmmp_free(d);
45 return us;
46}
mp_limb_t * mp_ptr
定义 lmmp.h:96
void lmmp_free(void *ptr)
内存释放函数(调用lmmp_heap_free_fn)
uint64_t mp_limb_t
定义 lmmp.h:92
mp_limb_t lmmp_addmul_1_(mp_ptr numa, mp_srcptr numb, mp_size_t n, mp_limb_t b)
乘以单limb并累加操作 [numa,n] += [numb,n] * b
定义 mul_1.c:76
#define n
#define BENCH_MEASURE(result, options,...)
定义 perf.h:93

引用了 bench_addmul_1(), BENCH_MEASURE, lmmp_addmul_1_(), lmmp_free() , 以及 n.

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

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

◆ bench_mul_1()

double bench_mul_1 ( mp_size_t n,
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

在文件 mul_1.c 第 25 行定义.

25 {
26 mp_ptr a = alloc_limbs(n), d = alloc_limbs(n + 1);
27 fill_random(a, n, 0x0a0b0c0d0e0f0102ull + n);
28 mp_limb_t x = 0x9e3779b97f4a7c15ull;
29 double us;
30 BENCH_MEASURE(us, o, bench_sink += lmmp_mul_1_(d, a, n, x););
31 lmmp_free(a);
32 lmmp_free(d);
33 return us;
34}
mp_limb_t lmmp_mul_1_(mp_ptr dst, mp_srcptr numa, mp_size_t na, mp_limb_t x)
乘以单limb操作 [dst,na] = [numa,na] * x
定义 mul_1.c:27

引用了 BENCH_MEASURE, bench_mul_1(), lmmp_free(), lmmp_mul_1_() , 以及 n.

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

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

◆ bench_submul_1()

double bench_submul_1 ( mp_size_t n,
const bench_options * o )
static

在文件 mul_1.c 第 48 行定义.

48 {
49 mp_ptr a = alloc_limbs(n), d = alloc_limbs(n + 1);
50 fill_random(a, n, 0x3132333435363738ull + n);
51 fill_random(d, n, 0x4142434445464748ull + n);
52 mp_limb_t x = 0x9e3779b97f4a7c15ull;
53 double us;
54 BENCH_MEASURE(us, o, bench_sink += lmmp_submul_1_(d, a, n, x););
55 lmmp_free(a);
56 lmmp_free(d);
57 return us;
58}
mp_limb_t lmmp_submul_1_(mp_ptr numa, mp_srcptr numb, mp_size_t n, mp_limb_t b)
乘以单limb并累减操作 [numa,n] -= [numb,n] * b

引用了 BENCH_MEASURE, bench_submul_1(), lmmp_free(), lmmp_submul_1_() , 以及 n.

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

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

◆ main()

int main ( void )

在文件 mul_1.c 第 60 行定义.

60 {
61 setvbuf(stdout, NULL, _IONBF, 0);
63 puts("[lmmpn/mul_1]");
64 run_limb_sizes("mul_1", bench_mul_1);
65 run_limb_sizes("addmul_1", bench_addmul_1);
66 run_limb_sizes("submul_1", bench_submul_1);
68 return 0;
69}
void lmmp_global_init(void)
全局初始化函数(线程局部的)
void lmmp_global_deinit(void)
全局释放函数(线程局部的)
static double bench_addmul_1(mp_size_t n, const bench_options *o)
定义 mul_1.c:36
static double bench_mul_1(mp_size_t n, const bench_options *o)
Copyright (C) 2026 HJimmyK (Jericho Knox)
定义 mul_1.c:25
static double bench_submul_1(mp_size_t n, const bench_options *o)
定义 mul_1.c:48

引用了 bench_addmul_1(), bench_mul_1(), bench_submul_1(), lmmp_global_deinit(), lmmp_global_init() , 以及 main().

函数调用图: