|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
#include "lmmpn/fft_ssa.h"函数 | |
| void | lmmp_fft_bfy_fused_ (mp_ptr numc, mp_ptr numa, mp_ptr numb, mp_size_t l, mp_size_t w, mp_size_t shl, mp_limb_t *out) |
| fft 蝶形数据面融合内核(两段扫描 + 中点 ch 分解,单次调用完成) | |
| mp_limb_t | lmmp_ifft_bfy_fused_ (mp_ptr numc, mp_ptr numa, mp_ptr numb, mp_size_t l, mp_size_t w, mp_size_t shr) |
| Copyright (C) 2026 HJimmyK (Jericho Knox) | |
| void lmmp_fft_bfy_fused_ | ( | mp_ptr | numc, |
| mp_ptr | numa, | ||
| mp_ptr | numb, | ||
| mp_size_t | l, | ||
| mp_size_t | w, | ||
| mp_size_t | shl, | ||
| mp_limb_t * | out ) |
fft 蝶形数据面融合内核(两段扫描 + 中点 ch 分解,单次调用完成)
扫描1(j∈[0,l-w)):D = numa[j] - numb[j] (-scyo 链,起点0) numc[w+j] = (D << shl) 接 shl 移位链(起点0) numa[j] = numa[j] + numb[j] (+acyo 链,起点0) 中点:ch = shlcy1 - (scyo1 << shl) 分解为 chp/chn(scyo1/shlcy1 为扫描1终值) 扫描2(j∈[0,w)):D2 = numb[l-w+j] - numa[l-w+j] (-scyo 链重置0) numc[j] = (D2 << shl) 接 shl 链(重置0) numa[l-w+j] += numb[l-w+j] (+acyo 链续)
| numc | 蝶形输出系数指针(temp_coef) |
| numa | 系数 a 指针(原地加) |
| numb | 系数 b 指针(只读) |
| l | 系数长度(ms->lenw) |
| w | 机器字级移位量(0<=w<=l) |
| shl | 比特级左移量 |
| out | 输出数组(至少 4 个 limb):out[0]=chp, out[1]=chn, out[2]=shlcy2(扫描2 shl 链移出位),out[3]=(acy_final<<1)|scyo_final |
在文件 fft_fuse.c 第 86 行定义.
引用了 LIMB_BITS, lmmp_fft_bfy_fused_(), numb , 以及 s.
被这些函数引用 lmmp_fft_bfy_() , 以及 lmmp_fft_bfy_fused_().
| mp_limb_t lmmp_ifft_bfy_fused_ | ( | mp_ptr | numc, |
| mp_ptr | numa, | ||
| mp_ptr | numb, | ||
| mp_size_t | l, | ||
| mp_size_t | w, | ||
| mp_size_t | shr ) |
Copyright (C) 2026 HJimmyK (Jericho Knox)
ifft 蝶形数据面融合内核(两段扫描 + 连续进位链,单次调用完成)
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)
以 t_i = [numb]>>shr 的逐 limb 流水线(numb 全程只读,不回写移位结果): 扫描1(i∈[0,w)):numc[l-w+i] = numa[l-w+i] + t_i (+bcy 链) numa[l-w+i] -= t_i (+acy 链) 扫描2(i∈[0,l-w)):numc[i] = numa[i] - t'_i (+bcy 链续) numa[i] += t'_i (+acy 链续),t'_i 从 numb[w] 起算 两段扫描的顶 limb 分别从 numb[w]、numb[l] 取高 shr 位(内核自行加载)
| numc | 蝶形输出系数指针(temp_coef) |
| numa | 系数 a 指针(原地加减) |
| numb | 系数 b 指针(只读,须有 l+1 个 limb 可读) |
| l | 系数长度(ms->lenw) |
| w | 机器字级移位量(0<=w<=l) |
| shr | 比特级右移量 |
在文件 fft_fuse.c 第 35 行定义.
引用了 k, LIMB_BITS, lmmp_ifft_bfy_fused_(), numb, s , 以及 t.
被这些函数引用 lmmp_ifft_bfy_() , 以及 lmmp_ifft_bfy_fused_().