|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
#include <stdbool.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <time.h>#include "lmmp/lmmp.h"#include "lmmp/mprand.h"#include "lmmp/numth.h"#include <windows.h>结构体 | |
| struct | bench_options |
宏定义 | |
| #define | ARRAY_SIZE(a) |
| Copyright (C) 2026 HJimmyK (Jericho Knox) | |
| #define | BENCH_MEASURE(result, options, ...) |
枚举 | |
| enum | bench_aggregation { BENCH_MIN , BENCH_MEDIAN , BENCH_MEAN } |
函数 | |
| static mp_ptr | alloc_limbs (mp_size_t n) |
| static double | bench_aggregate (double *samples, unsigned n, bench_aggregation agg) |
| static double | bench_clock (void) |
| static int | bench_compare_times (const void *lhs, const void *rhs) |
| static void | fill_random (mp_ptr p, mp_size_t n, mp_limb_t seed) |
| static void | report (const char *name, double us, double bytes) |
| static void | report_ab (const char *name, mp_size_t a, mp_size_t b, double us, double bytes) |
| static void | report_bits (const char *name, uint bits, double us) |
| static void | report_n (const char *name, mp_size_t n, double us, double bytes) |
变量 | |
| static const bench_options | bench_default = {BENCH_MIN, 5, 0.02, 0.05, 1ull << 26} |
| static volatile mp_limb_t | bench_sink |
| struct bench_options |
| 成员变量 | ||
|---|---|---|
| bench_aggregation | agg | |
| mp_size_t | max_iters | |
| unsigned | max_samples | |
| double | min_block_sec | |
| double | slow_block_sec | |
| #define ARRAY_SIZE | ( | a | ) |
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
被这些函数引用 main(), proth_certified(), ref_is_prime64(), run_even(), run_even2(), run_factorial(), run_fft(), run_fib(), run_hgcd(), run_is_prime_2(), run_is_prime_2_notrial(), run_is_prime_n(), run_is_prime_n_notrial(), run_is_prime_n_prime(), run_is_prime_n_tier(), run_is_prime_ulong(), run_lehmer(), run_limb_sizes(), run_mersenne(), run_mul(), run_mul_n(), run_mullo(), run_narrow(), run_notrial(), run_odd(), run_powlo(), run_proth(), run_sqr(), run_sqrt(), run_square(), run_strong_lucas(), run_toom(), run_wide(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE() , 以及 TEST_CASE().
| #define BENCH_MEASURE | ( | result, | |
| options, | |||
| ... ) |
被这些函数引用 bench_add_n(), bench_add_nc(), bench_addmul_1(), bench_addshl1_n(), bench_div(), bench_div_1(), bench_div_1_s(), bench_div_2(), bench_div_2_s(), bench_div_3_2(), bench_divexact(), bench_factorial(), bench_fib(), bench_gcd_hgcd(), bench_gcd_lehmer(), bench_inv_1(), bench_inv_2_1(), bench_is_prime_2(), bench_is_prime_2_notrial(), bench_is_prime_n(), bench_is_prime_n_notrial(), bench_is_prime_n_proth(), bench_is_prime_ulong(), bench_is_prime_ulong_notrial(), bench_is_prothprime(), bench_is_strong_lucas(), bench_mod_1(), bench_mod_2(), bench_mul(), bench_mul_1(), bench_mul_basecase(), bench_mul_fft(), bench_mul_mersenne_dc(), bench_mul_mersenne_fft(), bench_mul_n(), bench_mul_toom22(), bench_mul_toom33(), bench_mul_toom44(), bench_mullo(), bench_mullo_basecase(), bench_mullo_dc(), bench_mullo_fft(), bench_not(), bench_powlo(), bench_powmod_even(), bench_powmod_odd(), bench_shl(), bench_shlnot(), bench_shr(), bench_shr1add_n(), bench_shr1sub_n(), bench_sqr(), bench_sqr_basecase(), bench_sqrt(), bench_sub_n(), bench_sub_nc(), bench_submul_1(), bench_subshl1_n() , 以及 measure_sqr().
| enum bench_aggregation |
|
inlinestatic |
引用了 bench_compare_times(), BENCH_MEAN, BENCH_MEDIAN , 以及 n.
|
inlinestatic |
引用了 bench_clock().
被这些函数引用 bench_clock().
|
inlinestatic |
被这些函数引用 bench_aggregate() , 以及 bench_compare_times().
引用了 lmmp_seed_random_() , 以及 n.
|
inlinestatic |
被这些函数引用 report_ab(), report_bits() , 以及 report_n().
|
inlinestatic |
|
inlinestatic |
|
static |