cuElim/README.md
2024-10-22 10:56:24 +08:00

46 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# cuElim
使用统一内存实现gf2^8域和素域上的矩阵乘法和高斯消元无需考虑显存大小.
## 使用说明
### 在现有项目中使用
1.`include`文件夹中的所有头文件添加到现有项目中.
2. 在需要使用gpu函数的地方引用`cuelim.cuh`
### 使用当前项目
1. 安装依赖
1. `C++ CUDA CMake ...`
2. [`GoogleTest`](https://github.com/google/googletest)
3. [`GoogleBenchmark`](https://github.com/google/benchmark)
2. 构建项目
```sh
mkdir build && cd build
cmake ..
make -j # 同时编译多个目标
ctest # 或make test 执行所有测试
```
3. 运行可执行文件
```sh
./cuelim # 执行主程序
./test/target # 执行特定测试
./benchmark/target # 执行特定性能测试
```
## 功能简介
- `gf256::MatGF256`存储GF2^8矩阵数据结构已经改为与m4rie一致从低位到高位排列
- `gf256::ElimResult`:存储高斯消元的结果,包含秩、主元行(进行行交换前的位置)、主元列
- `gf256::ElimResult gf256::MatGF256::gpu_elim(const gf256::GF256 &gf)`:进行高斯消元
- `gfp::MatGFP`储存GF65521矩阵使用32位存储一个元素
- `gfp::ElimResult gfp::MatGFP::gpu_elim()`:进行高斯消元