JuliaMath / JuliaMath/FFTW.jl

mul!(A,FFT_plan,B) modifies the input B

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

Description

```julia
using FFTW, LinearAlgebra

A = rand(Float32, 16, 16)
p = plan_rfft(data)
pinv = plan_irfft(p * A, size(data, 1))
B = p * A
B0 = copy(B)

# This should NOT modify B but does
mul!(similar(A), pinv, B)

# Check
println("Buffer modified: ", !(B ≈ B0))
```

I guess this occurs for performance reasons, but this unexpected corruption prevents from reusing B (without a new allocation).

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.