JuliaMath / JuliaMath/FFTW.jl

Expose full guru interface API

Open
#31 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
300
Forks
61
PR merge metrics
No merged PRs in 30d

Description

The current `plan_*` API does not expose the full functionality that the C FFTW API has, namely the ability to specify a custom stride pattern and the number of transforms to perform.

In my use case I have dense arrays of a custom number type `VarNum{T}`, wrapping two `T`s, and need to perform transforms on the `x` and `y` components separately. For instance, consider:
```julia
struct VarNum{T<:Number} <: Number
x::T
y::T
end

# arrays
u = Matrix{VarNum{Float64}}(10, 10)
U = Matrix{VarNum{Complex{Float64}}}(10, 6)

# create and apply plan
p = plan_rftt(u, [2, 1])
A_mul_B!(U, p, U)
```

I have somehow hacked into `FFTW.jl` code as much as needed to achieve what I want. This required doubling the strides of `VarNum` arrays, doubling the `howmany` parameter, and defining appropriate methods for `VarNum` arrays. I feel, though, that such functionality might be useful to many other people and it would be good to have it in the package.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.