|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
#include "lmmp/lmmpn.h"结构体 | |
| struct | lmmp_mat22_t |
| Copyright (C) 2026 HJimmyK (Jericho Knox) 更多... | |
函数 | |
| void | lmmp_mat22_mul_ (lmmp_mat22_t *dst, const lmmp_mat22_t *a, const lmmp_mat22_t *b, mp_ptr tp) |
| 计算 D <- A*B(2x2 非负矩阵乘法) | |
| void | lmmp_mat22_sqr_ (lmmp_mat22_t *dst, const lmmp_mat22_t *a, mp_ptr tp) |
| 计算 D <- A*A(2x2 非负矩阵平方) | |
| struct lmmp_mat22_t |
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
在文件 mat22_mul.h 第 44 行定义.
| 成员变量 | ||
|---|---|---|
| mp_size_t | n[2][2] | |
| mp_ptr | p[2][2] | |
| void lmmp_mat22_mul_ | ( | lmmp_mat22_t * | dst, |
| const lmmp_mat22_t * | a, | ||
| const lmmp_mat22_t * | b, | ||
| mp_ptr | tp ) |
计算 D <- A*B(2x2 非负矩阵乘法)
| dst | 结果矩阵,各个元素结果写入 dst->p 中的数组,对应实际长度被写入到 dst->n 中 |
| a | 左矩阵(元素长度为 a->n[i][j],可与 dst 别名,即支持 D <- D*B) |
| b | 右矩阵(元素长度为 b->n[i][j],不可与 dst 别名) |
| tp | 临时空间(8*(mx(a)+mx(b))+16 个limb) |
在文件 mat22_mul.c 第 496 行定义.
引用了 lmmp_mat22_mul_(), lmmp_param_assert, mat22_all_big_(), mat22_mul_basecase_(), mat22_mul_strassen_(), MAT22_MUL_STRASSEN_THRESHOLD , 以及 tp.
被这些函数引用 lmmp_hgcd_matrix_mul_() , 以及 lmmp_mat22_mul_().
| void lmmp_mat22_sqr_ | ( | lmmp_mat22_t * | dst, |
| const lmmp_mat22_t * | a, | ||
| mp_ptr | tp ) |
计算 D <- A*A(2x2 非负矩阵平方)
| dst | 结果矩阵,各个元素结果写入 dst->p 中的数组,对应实际长度被写入到 dst->n 中 |
| a | 源矩阵(元素长度为 a->n[i][j],可与 dst 别名) |
| tp | 临时空间(15*mx(a)+14 个limb) |
在文件 mat22_mul.c 第 505 行定义.
引用了 lmmp_mat22_sqr_(), lmmp_param_assert, mat22_all_big_(), mat22_sqr_basecase_(), mat22_sqr_strassen_(), MAT22_SQR_STRASSEN_THRESHOLD , 以及 tp.
被这些函数引用 lmmp_mat22_sqr_().