From e1c28e7b1c6b411062ff069396ef3ef4b4facd32 Mon Sep 17 00:00:00 2001 From: Jakob Asslaender Date: Fri, 7 Oct 2022 22:37:39 -0400 Subject: [PATCH] implement reshape hack so that ESPIRIT is compatible with the MKL backend of FFTW. --- src/Tools/CoilSensitivity.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Tools/CoilSensitivity.jl b/src/Tools/CoilSensitivity.jl index 4c0837b0..106dbba1 100644 --- a/src/Tools/CoilSensitivity.jl +++ b/src/Tools/CoilSensitivity.jl @@ -204,13 +204,14 @@ function kernelEig(kernel::Array{T}, imsize::Tuple, nmaps=1; use_poweriterations end end end - fft!(kern2_, 3:ndims(kern2_)) + # resize is neccessary for compatibility with MKL + reshape(fft!(reshape(kern2_, nc^2, sizePadded...), 2:ndims(kern2_)-1), nc, nc, sizePadded...) kern2 = zeros(T, nc, nc, imsize...) idx_center = CartesianIndices(sizePadded) .- CartesianIndex(sizePadded .÷ 2) .+ CartesianIndex(imsize .÷ 2) @views ifftshift!(kern2[:,:,idx_center], kern2_, 3:ndims(kern2_)) - ifft!(kern2, 3:ndims(kern2)) + reshape(ifft!(reshape(kern2, nc^2, imsize...), 2:ndims(kern2)-1), nc, nc, imsize...) kern2 .*= prod(imsize) / prod(sizePadded) / prod(ksize)