Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build for WASM #4

Open
calebzulawski opened this issue Jan 21, 2020 · 5 comments
Open

Build for WASM #4

calebzulawski opened this issue Jan 21, 2020 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@calebzulawski
Copy link
Owner

I'm not a web guy, so I'm not sure what an idiomatic JavaScript/TypeScript interface should look like, but I imagine there's a desire for fast web FFTs and I imagine it should be reasonably easy to build for wasm32-unknown-unknown.

@ADMoreau
Copy link

Just so no one else starts working on this or you discard plans for it, I'm working on building a wasm fourier package

@ADMoreau
Copy link

Sorry if it's obvious but just so I know for my implementation, what is the complex input for the Bluestein algorithm? I've only ever used the fft for real number values.

@calebzulawski
Copy link
Owner Author

I've only implemented complex-to-complex transforms (no real-to-complex or real-to-real, see #5), so both the inputs and outputs are Complex<f32> or Complex<f64>. In memory, each complex number is just equal to two adjacent real values, something like this:

#[repr(C)]
struct Complex<T> {
    real: T,
    imag: T,
}

That shouldn't be specific to Bluestein's algorithm either. I'd recommend working with the fourier crate directly rather than the fourier-algorithms crate.

@ADMoreau
Copy link

Ahh, thank you. I guess what I am asking is what is this array in real life? Like is it a sine wave that has been processed or what goes into creating this input vector in the real world?

@ADMoreau
Copy link

Never mind I figured it out

@calebzulawski calebzulawski added enhancement New feature or request help wanted Extra attention is needed labels Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants