| Crates.io | poulpy-cpu-ref |
| lib.rs | poulpy-cpu-ref |
| version | 0.1.1 |
| created_at | 2025-11-19 16:15:50.136404+00 |
| updated_at | 2025-11-21 16:37:14.231299+00 |
| description | The providing concrete implementations of poulpy-hal through its open extension points and reference cpu code |
| homepage | https://github.com/phantomzone-org/poulpy |
| repository | https://github.com/phantomzone-org/poulpy |
| max_upload_size | |
| id | 1940370 |
| size | 87,086 |
Poulpy-CPU-REF is the reference (portable) CPU backend for Poulpy.
It implements the Poulpy HAL extension traits without requiring SIMD or specialized CPU instructions, making it suitable for:
x86_64, aarch64, arm, riscv64, โฆ)This backend integrates transparently with:
poulpy-halpoulpy-corepoulpy-schemespoulpy-cpu-ref is always available and requires no compilation flags and no CPU features.
It is automatically selected when:
No additional configuration is required to use it.
use poulpy_cpu_ref::FFT64Ref;
use poulpy_hal::{api::ModuleNew, layouts::Module};
let log_n: usize = 10;
let module: Module<FFT64Ref> = Module::<FFT64Ref>::new(1 << log_n);
This works on all supported platforms and architectures.
poulpy-cpu-ref prioritizes:
For maximum performance on x86_64 CPUs with AVX2 + FMA support, consider enabling the optional optimized backend:
poulpy-cpu-avx (feature: enable-avx)
Benchmarks and applications can freely switch between backends without changing source code โ backend selection can be handled with feature flags, for example
#[cfg(all(feature = "enable-avx", target_arch = "x86_64", target_feature = "avx2", target_feature = "fma"))]
use poulpy_cpu_avx::FFT64Avx as BackendImpl;
#[cfg(not(all(feature = "enable-avx", target_arch = "x86_64", target_feature = "avx2", target_feature = "fma")))]
use poulpy_cpu_ref::FFT64Ref as BackendImpl;
To implement your own backend (SIMD or accelerator):
poulpy-hal/oepBackend traitYour backend will automatically integrate with:
poulpy-halpoulpy-corepoulpy-schemesNo modifications to those crates are necessary โ the HAL provides the extension points.
For questions or guidance, feel free to open an issue or discussion in the repository.