Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <https://godbolt.org/z/Y58eh1x5a> (`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.
6 changes: 3 additions & 3 deletions crates/monarch-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
49 changes: 1 addition & 48 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -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: <https://godbolt.org/z/Y58eh1x5a>(`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.
#![doc = include_str!("../README.md")]

#![allow(clippy::excessive_precision)]
#![forbid(unsafe_code)]
Expand Down