Skip to content

Commit 30deb94

Browse files
Removing std dependencies from num-traits and num-complex (#3)
* Removing std dependencies from num-traits and num-complex * Ignore benchmarks images in .crate release * Using readme for cargo docs
1 parent 3e28b40 commit 30deb94

File tree

4 files changed

+9
-55
lines changed

4 files changed

+9
-55
lines changed

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "monarch-butterfly"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
edition = "2021"
55
description = "Proc-Macro unrolled FFTs"
66
license = "MIT"
@@ -10,11 +10,12 @@ repository = "https://github.com/michaelciraci/Monarch-Butterfly"
1010
rust-version = "1.63"
1111
keywords = ["fft", "dft", "discrete", "fourier", "no_std"]
1212
categories = ["algorithms", "science"]
13+
exclude = ["assets/", ".*"]
1314

1415
[dependencies]
1516
monarch-derive = { path = "crates/monarch-derive" }
16-
num-complex = "0.4"
17-
num-traits = { version = "0.2", default-features = false }
17+
num-complex = { version = "0.4", default-features = false, features = ["libm"] }
18+
num-traits = { version = "0.2", default-features = false, features = ["libm"] }
1819

1920
[dev-dependencies]
2021
rustfft = "6.2.0"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ This library will use all SIMD features your CPU has, assuming `rustc` can compi
4848
The larger the FFT sizes, the larger speed boost this library will give you.
4949

5050
As an example of AVX512 instructions, here is an example on just an FFT
51-
of size 128: https://godbolt.org/z/Y58eh1x5a (`Ctrl+F` for "zmm" instructions)
51+
of size 128: <https://godbolt.org/z/Y58eh1x5a> (`Ctrl+F` for "zmm" instructions)
5252

5353
The FFTs before unrolling are heavily inspired from [RustFFT](https://github.com/ejmahler/RustFFT).
5454
Credit is given to Elliott Mahler as the RustFFT original author.

crates/monarch-derive/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "monarch-derive"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
edition = "2021"
55
description = "Proc-Macro unrolled FFTs"
66
license = "MIT"
@@ -15,6 +15,6 @@ proc-macro = true
1515
[dependencies]
1616
quote = "1.0.40"
1717
syn = "2.0.100"
18-
num-complex = "0.4"
19-
num-traits = "0.2"
18+
num-complex = { version = "0.4", default-features = false, features = ["libm"] }
19+
num-traits = { version = "0.2", default-features = false, features = ["libm"] }
2020
num-integer = "0.1"

src/lib.rs

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,4 @@
1-
//! [![Build](https://github.com/michaelciraci/Monarch-Butterfly/actions/workflows/rust.yml/badge.svg)](https://github.com/michaelciraci/Monarch-Butterfly/actions/workflows/rust.yml)
2-
//! [![unsafe forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/)
3-
//! [![](https://img.shields.io/crates/v/monarch-butterfly)](https://img.shields.io/crates/v/monarch-butterfly)
4-
//! [![](https://docs.rs/monarch-butterfly/badge.svg)](https://docs.rs/monarch-butterfly/)
5-
//!
6-
//! # Monarch Butterfly
7-
//!
8-
//! Experimental FFT library where all FFTs are proc-macro generated const-evaluation functions.
9-
//! The one requirement is you must know the size of the FFT at compile-time. Knowing the FFT size at
10-
//! compile time gives immense gains, as the compiler is able unroll the call stack and optimize for
11-
//! SIMD throughput through function calls.
12-
//!
13-
//! This library implements FFTs for both `f32` and `f64` sizes `1-200`. The FFTs are
14-
//! auto-generated so this limit could be increased above 200 at the expense of compile time.
15-
//!
16-
//! ## Features
17-
//!
18-
//! - All functions are auto-generated with proc-macros with unrolled loops
19-
//! - Zero `unsafe` code
20-
//! - Completely portable
21-
//! - Const-evaluation functions
22-
//!
23-
//! ## Limitations
24-
//!
25-
//! - FFT size must be known at compile time
26-
//! - By default, only FFTs up to size 200 are generated
27-
//!
28-
//! ## Usage
29-
//!
30-
//! The top level functions are [`fft`] and [`ifft`].
31-
//!
32-
//! ```
33-
//! use monarch_butterfly::*;
34-
//! use num_complex::Complex;
35-
//!
36-
//! let input: Vec<_> = (0..8).map(|i| Complex::new(i as f32, 0.0)).collect();
37-
//! let output = fft::<8, _, _>(input);
38-
//! ```
39-
//! This library will use all SIMD features your CPU has available including AVX512,
40-
//! assuming you compile with those features (`RUSTFLAGS="-C target-cpu=native" cargo build`).
41-
//!
42-
//! The larger the FFT sizes, the larger speed boost this library will give you.
43-
//!
44-
//! As an example of AVX512 instructions, here is an example on just an FFT
45-
//! of size 128: <https://godbolt.org/z/Y58eh1x5a>(`Ctrl+F` for "zmm" instructions)
46-
//!
47-
//! The FFTs before unrolling are heavily inspired from [`RustFFT`](<https://github.com/ejmahler/RustFFT>).
48-
//! Credit is given to Elliott Mahler as the RustFFT original author.
1+
#![doc = include_str!("../README.md")]
492

503
#![allow(clippy::excessive_precision)]
514
#![forbid(unsafe_code)]

0 commit comments

Comments
 (0)