# FFT with @view

**URL:** <https://discourse.julialang.org/t/fft-with-view/123137>\
**Category:** General Usage\
**Tags:** question, fftw, linearalgebra\
**Created:** [November 27, 2024, 1:52am UTC](https://discourse.julialang.org/t/fft-with-view/123137 "2024-11-27T01:52:22Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![roflmaostc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roflmaostc/32/30123_2.png) [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Post date:** [November 27, 2024, 8:38am UTC](https://discourse.julialang.org/t/fft-with-view/123137/4 "2024-11-27T08:38:08Z")

</div>

maybe you are using `plan_rfft` and you see something similar to

> [@\`plan\_rfft\` together used with \`mul!\` and \`@view\` complains about wrong-strides-output](https://discourse.julialang.org/t/plan-rfft-together-used-with-mul-and-view-complains-about-wrong-strides-output/58215):
>
> Hey, initially I wanted to have rfft! but since it doesn’t exist, I tried the workaround mentioned [in this discourse discussion](https://discourse.julialang.org/t/in-place-rfft-with-padded-arrays/3340). However, mul! complains when used with a plan\_rfft generated matrix: using LinearAlgebra, FFTW function main() # array we want to process x = randn((60,40)) y = rfft(randn((80,60))) # just create a view storage y2 = view(y, 1:31, 1:40) p = plan\_rfft(x) @time y2 .= p \* x; # this still allocates memory because of p \* x @t…

---

_[View the full topic](https://discourse.julialang.org/t/fft-with-view/123137)._
