#![allow(clippy::similar_names)] #![allow(clippy::many_single_char_names)] #![allow(clippy::cast_precision_loss)] #![allow(clippy::cast_sign_loss)] #![allow(clippy::cast_possible_wrap)] #![allow(clippy::missing_panics_doc)] #![allow(clippy::must_use_candidate)] #![allow(clippy::missing_const_for_fn)] #![allow(clippy::doc_markdown)] #![allow(clippy::return_self_not_must_use)] #![allow(clippy::incompatible_msrv)] #![allow(clippy::assign_op_pattern)] #![allow(clippy::needless_range_loop)] #![allow(clippy::wildcard_imports)] #![allow(clippy::unused_self)] #![allow(clippy::too_many_arguments)] #![allow(clippy::redundant_closure_for_method_calls)] #![allow(clippy::ptr_as_ptr)] #![allow(clippy::fn_to_numeric_cast)] #![allow(clippy::suboptimal_flops)] #![allow(clippy::manual_is_power_of_two)] #![allow(clippy::if_then_some_else_none)] #![allow(clippy::imprecise_flops)] #![allow(clippy::not_unsafe_ptr_arg_deref)] #![allow(clippy::derivable_impls)] #![allow(clippy::ptr_eq)] #![allow(clippy::use_self)] #![allow(clippy::unnecessary_wraps)] #![allow(clippy::too_many_lines)] #![allow(clippy::trivially_copy_pass_by_ref)] #![allow(clippy::panic_in_result_fn)] #![allow(clippy::match_same_arms)] #![allow(clippy::suspicious_arithmetic_impl)] #![allow(clippy::only_used_in_recursion)] #![allow(clippy::manual_div_ceil)] #![allow(clippy::float_cmp)] #![allow(clippy::cast_possible_truncation)] #![allow(clippy::if_not_else)] #![allow(clippy::manual_assert)] #![allow(clippy::useless_let_if_seq)] #![allow(clippy::ptr_cast_constness)] #![allow(clippy::derive_partial_eq_without_eq)] #![allow(clippy::format_push_string)] #![allow(clippy::redundant_closure)] #![allow(clippy::significant_drop_tightening)] #![allow(clippy::explicit_iter_loop)] #![allow(clippy::unreadable_literal)] #![allow(clippy::missing_errors_doc)] #![allow(clippy::manual_let_else)] #![allow(clippy::type_complexity)] #![allow(clippy::needless_pass_by_value)] #![allow(clippy::option_if_let_else)] #![allow(clippy::struct_field_names)] #![allow(clippy::duplicate_mod)] #![allow(clippy::suspicious_operation_groupings)] #![allow(clippy::verbose_bit_mask)] #![allow(clippy::type_repetition_in_bounds)] #![allow(clippy::no_effect_underscore_binding)] #![allow(clippy::manual_clamp)] #![allow(clippy::used_underscore_binding)] #![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(feature = "portable_simd", feature(portable_simd))]
#[cfg(not(feature = "std"))]
extern crate alloc;
pub(crate) mod prelude;
pub mod api;
#[cfg(feature = "const-fft")]
pub mod const_fft;
pub mod dft;
#[cfg(any(feature = "gpu", feature = "cuda", feature = "metal"))]
pub mod gpu;
pub mod kernel;
#[cfg(feature = "mpi")]
pub mod mpi;
#[cfg(feature = "pruned")]
pub mod pruned;
pub mod rdft;
pub mod reodft;
#[cfg(feature = "signal")]
pub mod signal;
pub mod simd;
#[cfg(feature = "sparse")]
pub mod sparse;
#[cfg(feature = "streaming")]
pub mod streaming;
pub mod support;
pub mod threading;
#[cfg(feature = "wasm")]
pub mod wasm;
pub mod autodiff;
pub mod conv;
#[cfg(feature = "std")]
pub mod frft;
#[cfg(feature = "std")]
pub mod nufft;
pub use api::{
fft, fft2d, fft2d_split, fft3d_split, fft_batch, fft_nd, fft_nd_split, fft_split, ifft, ifft2d,
ifft2d_split, ifft3d_split, ifft_batch, ifft_nd, ifft_nd_split, ifft_split, irfft, irfft2d,
irfft3d, irfft_batch, irfft_nd, rfft, rfft2d, rfft3d, rfft_batch, rfft_nd, Direction, Flags,
GuruPlan, Plan, Plan2D, Plan3D, PlanND, R2rKind, R2rPlan, RealPlan, RealPlan2D, RealPlan3D,
RealPlanKind, RealPlanND, SplitPlan, SplitPlan2D, SplitPlan3D, SplitPlanND,
};
pub use kernel::{Complex, Float, IoDim, Tensor};
#[cfg(feature = "f128-support")]
pub use kernel::F128;
#[cfg(feature = "f16-support")]
pub use kernel::F16;
#[cfg(feature = "sparse")]
pub use sparse::{sparse_fft, sparse_ifft, SparsePlan, SparseResult};
#[cfg(feature = "pruned")]
pub use pruned::{
fft_pruned_input, fft_pruned_output, goertzel, goertzel_multi, PrunedPlan, PruningMode,
};
#[cfg(feature = "wasm")]
pub use wasm::{fft_f32, fft_f64, ifft_f32, ifft_f64, rfft_f64, WasmFft, WasmSimdF32, WasmSimdF64};
#[cfg(feature = "streaming")]
pub use streaming::{
blackman, build_mel_filterbank, cola_normalization, hamming, hann, istft, kaiser,
magnitude_spectrogram, mel_spectrogram, mfcc, phase_spectrogram, power_spectrogram,
rectangular, stft, MelConfig, RingBuffer, StreamingFft, WindowFunction,
};
#[cfg(feature = "const-fft")]
pub use const_fft::{
const_cos, const_sin, fft_fixed, fft_fixed_inplace, ifft_fixed, ifft_fixed_inplace,
twiddle_factor, ConstFft, ConstFftImpl,
};
#[cfg(any(feature = "gpu", feature = "cuda", feature = "metal"))]
pub use gpu::{
best_backend, is_gpu_available, query_capabilities, GpuBackend, GpuBuffer, GpuCapabilities,
GpuDirection, GpuError, GpuFft, GpuFftEngine, GpuPlan, GpuResult,
};
pub use dft::solvers::{
ct::{
fft_radix2, fft_radix2_inplace, ifft_radix2, ifft_radix2_inplace, ifft_radix2_normalized,
},
direct::{dft_direct, idft_direct, idft_direct_normalized},
nop::dft_nop,
};
pub use rdft::solvers::{dct1, dct2, dct3, dct4, dht, dst1, dst2, dst3, dst4};
pub use api::{
alloc_complex, alloc_complex_aligned, alloc_real, alloc_real_aligned, is_aligned,
AlignedBuffer, DEFAULT_ALIGNMENT,
};
#[cfg(feature = "std")]
pub use nufft::{
nufft_type1, nufft_type2, nufft_type3, Nufft, NufftError, NufftOptions, NufftResult, NufftType,
};
#[cfg(feature = "std")]
pub use frft::{frft, frft_checked, ifrft, ifrft_checked, Frft, FrftError, FrftResult};
pub use conv::{
convolve, convolve_circular, convolve_complex, convolve_complex_mode, convolve_mode,
convolve_with_mode, correlate, correlate_complex, correlate_complex_mode, correlate_mode,
polynomial_multiply, polynomial_multiply_complex, polynomial_power, ConvMode,
};
pub use autodiff::{
fft_dual, fft_jacobian, grad_fft, grad_ifft, jvp_fft, vjp_fft, DiffFftPlan, Dual, DualComplex,
};
#[cfg(feature = "signal")]
pub use signal::{
coherence, complex_cepstrum, cross_spectral_density, envelope, hilbert,
instantaneous_frequency, instantaneous_phase, minimum_phase, periodogram, real_cepstrum,
resample, resample_to, welch, SpectralWindow, WelchConfig,
};