ejmahler / RustFFT

RustFFT is a high-performance FFT library written in pure Rust.
Apache License 2.0
700 stars 49 forks source link

Even more generic data types #109

Closed prehner closed 1 year ago

prehner commented 1 year ago

Currently FFT can be performed for structs that implement the FftNum trait. We encounter some situations in which it would be beneficial to have separate data structures for the planner and the in- and outputs. To be more specific: in our application, the data type for the planner/coefficients would always be f64 but we would like to reuse the same initialized Fft struct with other datatypes like dual numbers or e.g. [f64; 3] wrapped in some struct that implements the necessary arithmetic operations.

I realize that this would be a major refactor. Is it something that you would be interested in?

Also without this enhancement this nice package is a core ingredient in our research code. So thank you a lot for your work! If you are interested: the application is in thermodynamics and has found its way in modeling processes like carbon capture and adsorption chillers.

ejmahler commented 1 year ago

Thinking through this - on one hand, I'm very interested in supporting additional use cases like this. But on the other hand, I suspect this would require changing pretty much every file in the project, and adding a significant amount of complication. If maintaining this project was my full time job, I'd be interested. But unfortunately, I'm just working on it in my free time, and thus I have to say this feature is out of scope. Sorry!