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

浏览该文件的源代码.

函数

void lmmp_not_ (mp_ptr dst, mp_srcptr numa, mp_size_t na)
 Copyright (C) 2026 HJimmyK (Jericho Knox)
mp_limb_t lmmp_shlnot_ (mp_ptr restrict dst, mp_srcptr restrict numa, mp_size_t na, mp_size_t shl)

函数说明

◆ lmmp_not_()

void lmmp_not_ ( mp_ptr dst,
mp_srcptr numa,
mp_size_t na )

Copyright (C) 2026 HJimmyK (Jericho Knox)

按位取反操作 [dst,na] = ~[numa,na] (对每个limb执行按位非操作)

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

Copyright (C) 2026 HJimmyK (Jericho Knox)

参数
dst结果输出指针
numa源操作数指针
nalimb长度
警告
na>0, eqsep(dst,numa), dst!=NULL, numa!=NULL

在文件 not.c 第 26 行定义.

26 {
27 for (mp_size_t i = 0; i < na; i++) {
28 dst[i] = ~numa[i];
29 }
30}
uint64_t mp_size_t
定义 lmmp.h:93

引用了 lmmp_not_().

被这些函数引用 bench_not(), lmmp_binvert_n_dc_(), lmmp_binvert_unbalance_(), lmmp_fft_shl_coef_(), lmmp_inv_basecase_(), lmmp_invappr_newton_(), lmmp_invcbrt_newton_(), lmmp_invsqrt_newton_(), lmmp_mont_init_(), lmmp_mont_redc_(), lmmp_mullh_(), lmmp_not_(), lmmp_redc_(), lmmp_shlnot_(), mrs_neg_(), TEST_CASE(), TEST_CASE() , 以及 TEST_CASE().

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

◆ lmmp_shlnot_()

mp_limb_t lmmp_shlnot_ ( mp_ptr restrict dst,
mp_srcptr restrict numa,
mp_size_t na,
mp_size_t shl )

在文件 not.c 第 32 行定义.

32 {
33 if (shl == 0) {
34 lmmp_not_(dst, numa, na);
35 return 0;
36 } else if (dst == numa) {
37 mp_limb_t t, m, n;
38 t = dst[0] << shl;
39 m = dst[0] >> (LIMB_BITS - shl);
40 dst[0] = ~t;
41 for (mp_size_t i = 1; i < na; i++) {
42 t = dst[i] << shl;
43 n = dst[i] >> (LIMB_BITS - shl);
44 dst[i] = ~(t | m);
45 m = n;
46 }
47 return m;
48 } else {
49 /* seq(dst,numa) */
50 mp_limb_t t, m, n;
51 t = numa[0] << shl;
52 m = numa[0] >> (LIMB_BITS - shl);
53 dst[0] = ~t;
54 for (mp_size_t i = 1; i < na; i++) {
55 t = numa[i] << shl;
56 n = numa[i] >> (LIMB_BITS - shl);
57 dst[i] = ~(t | m);
58 m = n;
59 }
60 return m;
61 }
62}
uint64_t mp_limb_t
定义 lmmp.h:92
#define LIMB_BITS
定义 lmmp.h:102
void lmmp_not_(mp_ptr dst, mp_srcptr numa, mp_size_t na)
按位取反操作 [dst,na] = ~[numa,na] (对每个limb执行按位非操作)
定义 not.c:26
#define t
#define n

引用了 LIMB_BITS, lmmp_not_(), lmmp_shlnot_(), n, restrict , 以及 t.

函数调用图: