arnaucube
arnaucube/poulpyPublic Self-hosted repository
poulpy/poulpy-backend/README.md
poulpy-backend/README.mdRaw
 1# 🐙 Poulpy-Backend
 2
 3**Poulpy-Backend** is a Rust crate that provides concrete implementations of **`poulpy-hal`**. This crate is used to instantiate projects implemented with **`poulpy-hal`**, **`poulpy-core`** and/or **`poulpy-schemes`**.
 4
 5## Backends
 6
 7### cpu-spqlios
 8
 9This module provides a CPU AVX2 accelerated backend through C bindings over [**spqlios-arithmetic**](https://github.com/tfhe/spqlios-arithmetic).
10
11- Currently supported: `FFT64` backend  
12- Planned: `NTT120` backend
13
14### Build Notes
15
16This backend is built and compiled automatically and has been tested on wsl/ubuntu.
17
18- `cmake` is invoked automatically by the build script (`build.rs`) when compiling the crate.  
19- No manual setup is required beyond having a standard Rust toolchain. 
20- Build options can be changed in `/build/cpu_spqlios.rs`
21- Automatic build of cpu-spqlios/spqlios-arithmetic can be disabled in `build.rs`.
22
23Spqlios-arithmetic is windows/mac compatible but building for those platforms is slightly different (see [spqlios-arithmetic/wiki/build](https://github.com/tfhe/spqlios-arithmetic/wiki/build)) and has not been tested in Poulpy.
24
25### Example
26
27```rust
28use poulpy_backend::cpu_spqlios::FFT64;
29use poulpy_hal::{api::ModuleNew, layouts::Module};
30
31let log_n: usize = 10;
32let module = Module<FFT64> = Module<FFT64>::new(1<<log_n);
33```
34
35## Contributors
36
37To add a backend, implement the open extension traits from **`poulpy-hal/oep`** for a struct that implements the `Backend` trait.  
38This will automatically make your backend compatible with the API of **`poulpy-hal`**, **`poulpy-core`** and **`poulpy-schemes`**.