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

浏览该文件的源代码.

函数

void lmmp_fill (mp_ptr begin, mp_ptr end, mp_limb_t val)
 Copyright (C) 2026 HJimmyK (Jericho Knox)
void lmmp_fill_n (mp_ptr dst, mp_size_t len, mp_limb_t val)
 填充从dst开始的长度为len的数组,值为val

函数说明

◆ lmmp_fill()

void lmmp_fill ( mp_ptr begin,
mp_ptr end,
mp_limb_t val )

Copyright (C) 2026 HJimmyK (Jericho Knox)

填充[begin,end)内的数组,值为val

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)

参数
begin起始指针(含)
end终止指针(不含)
val填充值
警告
begin!=NULL, end!=NULL
注解
如果begin>=end,将不会进行操作

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

26 {
27 lmmp_param_assert(begin != NULL && end != NULL);
28 for (mp_ptr p = begin; p < end; p++) {
29 *p = val;
30 }
31}
mp_limb_t * mp_ptr
定义 lmmp.h:96
#define lmmp_param_assert(x)
定义 lmmp.h:509

引用了 lmmp_fill() , 以及 lmmp_param_assert.

被这些函数引用 lmmp_fill().

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

◆ lmmp_fill_n()

void lmmp_fill_n ( mp_ptr dst,
mp_size_t len,
mp_limb_t val )

填充从dst开始的长度为len的数组,值为val

参数
dst目标数组
len填充长度
val填充值
警告
dst!=NULL
注解
如果len==0,将不会进行操作

在文件 fill.c 第 33 行定义.

33 {
34 lmmp_param_assert(dst != NULL);
35 for (mp_size_t i = 0; i < len; i++) {
36 dst[i] = val;
37 }
38}
uint64_t mp_size_t
定义 lmmp.h:93

引用了 lmmp_fill_n() , 以及 lmmp_param_assert.

被这些函数引用 lmmp_cbrt_divide_(), lmmp_fill_n() , 以及 lmmp_sqrt_divide_().

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