Skip to content

Commit

Permalink
Updated code indents.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maatman committed Nov 1, 2024
1 parent 7a424e3 commit 285a40f
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions src/NFFTNormalOpBasisFunc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,22 +113,23 @@ function calculateToeplitzKernelBasis(img_shape_os, trj::AbstractVector{<:Abstra

for ic2 axes(Λ, 2), ic1 axes(Λ, 1)
if ic2 >= ic1 # eval. only upper triangular matrix
t = @elapsed begin
@simd for it axes(U,1)
idx1 = sum(trj_l[1:it-1]) + 1
idx2 = sum(trj_l[1:it])
@inbounds S[idx1:idx2] .= conj(U[it,ic1]) * U[it,ic2]
t = @elapsed begin
@simd for it axes(U,1)
idx1 = sum(trj_l[1:it-1]) + 1
idx2 = sum(trj_l[1:it])
@inbounds S[idx1:idx2] .= conj(U[it,ic1]) * U[it,ic2]
end

mul!(λ, adjoint(nfftplan), vec(S))
fftshift!(λ2, λ)
mul!(λ, fftplan, λ2)

Threads.@threads for it eachindex(kmask_indcs)
@inbounds Λ[ic2,ic1,it] = conj.(λ[kmask_indcs[it]])
@inbounds Λ[ic1,ic2,it] = λ[kmask_indcs[it]]
end
end

mul!(λ, adjoint(nfftplan), vec(S))
fftshift!(λ2, λ)
mul!(λ, fftplan, λ2)

Threads.@threads for it eachindex(kmask_indcs)
@inbounds Λ[ic2,ic1,it] = conj.(λ[kmask_indcs[it]])
@inbounds Λ[ic1,ic2,it] = λ[kmask_indcs[it]]
end
verbose && println("ic = ($ic1, $ic2): t = $t s"); flush(stdout)
verbose && println("ic = ($ic1, $ic2): t = $t s"); flush(stdout)
end
end

Expand Down

0 comments on commit 285a40f

Please sign in to comment.