diff --git a/Cargo.toml b/Cargo.toml index eee2d1f..2423425 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "monarch-butterfly" -version = "0.4.0" +version = "0.4.1" edition = "2021" description = "Proc-Macro unrolled FFTs" license = "MIT" @@ -10,11 +10,12 @@ repository = "https://github.com/michaelciraci/Monarch-Butterfly" rust-version = "1.63" keywords = ["fft", "dft", "discrete", "fourier", "no_std"] categories = ["algorithms", "science"] +exclude = ["assets/", ".*"] [dependencies] monarch-derive = { path = "crates/monarch-derive" } -num-complex = "0.4" -num-traits = { version = "0.2", default-features = false } +num-complex = { version = "0.4", default-features = false, features = ["libm"] } +num-traits = { version = "0.2", default-features = false, features = ["libm"] } [dev-dependencies] rustfft = "6.2.0" diff --git a/README.md b/README.md index ce9b705..8437648 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ This library will use all SIMD features your CPU has, assuming `rustc` can compi The larger the FFT sizes, the larger speed boost this library will give you. As an example of AVX512 instructions, here is an example on just an FFT -of size 128: https://godbolt.org/z/Y58eh1x5a (`Ctrl+F` for "zmm" instructions) +of size 128: (`Ctrl+F` for "zmm" instructions) The FFTs before unrolling are heavily inspired from [RustFFT](https://github.com/ejmahler/RustFFT). Credit is given to Elliott Mahler as the RustFFT original author. diff --git a/crates/monarch-derive/Cargo.toml b/crates/monarch-derive/Cargo.toml index fb6464a..d164fa1 100644 --- a/crates/monarch-derive/Cargo.toml +++ b/crates/monarch-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "monarch-derive" -version = "0.4.0" +version = "0.4.1" edition = "2021" description = "Proc-Macro unrolled FFTs" license = "MIT" @@ -15,6 +15,6 @@ proc-macro = true [dependencies] quote = "1.0.40" syn = "2.0.100" -num-complex = "0.4" -num-traits = "0.2" +num-complex = { version = "0.4", default-features = false, features = ["libm"] } +num-traits = { version = "0.2", default-features = false, features = ["libm"] } num-integer = "0.1" diff --git a/src/lib.rs b/src/lib.rs index 466cafb..47e2feb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,51 +1,4 @@ -//! [![Build](https://github.com/michaelciraci/Monarch-Butterfly/actions/workflows/rust.yml/badge.svg)](https://github.com/michaelciraci/Monarch-Butterfly/actions/workflows/rust.yml) -//! [![unsafe forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/) -//! [![](https://img.shields.io/crates/v/monarch-butterfly)](https://img.shields.io/crates/v/monarch-butterfly) -//! [![](https://docs.rs/monarch-butterfly/badge.svg)](https://docs.rs/monarch-butterfly/) -//! -//! # Monarch Butterfly -//! -//! Experimental FFT library where all FFTs are proc-macro generated const-evaluation functions. -//! The one requirement is you must know the size of the FFT at compile-time. Knowing the FFT size at -//! compile time gives immense gains, as the compiler is able unroll the call stack and optimize for -//! SIMD throughput through function calls. -//! -//! This library implements FFTs for both `f32` and `f64` sizes `1-200`. The FFTs are -//! auto-generated so this limit could be increased above 200 at the expense of compile time. -//! -//! ## Features -//! -//! - All functions are auto-generated with proc-macros with unrolled loops -//! - Zero `unsafe` code -//! - Completely portable -//! - Const-evaluation functions -//! -//! ## Limitations -//! -//! - FFT size must be known at compile time -//! - By default, only FFTs up to size 200 are generated -//! -//! ## Usage -//! -//! The top level functions are [`fft`] and [`ifft`]. -//! -//! ``` -//! use monarch_butterfly::*; -//! use num_complex::Complex; -//! -//! let input: Vec<_> = (0..8).map(|i| Complex::new(i as f32, 0.0)).collect(); -//! let output = fft::<8, _, _>(input); -//! ``` -//! This library will use all SIMD features your CPU has available including AVX512, -//! assuming you compile with those features (`RUSTFLAGS="-C target-cpu=native" cargo build`). -//! -//! The larger the FFT sizes, the larger speed boost this library will give you. -//! -//! As an example of AVX512 instructions, here is an example on just an FFT -//! of size 128: (`Ctrl+F` for "zmm" instructions) -//! -//! The FFTs before unrolling are heavily inspired from [`RustFFT`](). -//! Credit is given to Elliott Mahler as the RustFFT original author. +#![doc = include_str!("../README.md")] #![allow(clippy::excessive_precision)] #![forbid(unsafe_code)]