Skip to content

Commit

Permalink
only use fillOneNodeReal in single threaded case.
Browse files Browse the repository at this point in the history
  • Loading branch information
tknopp committed Mar 24, 2022
1 parent 66d6335 commit 0257f23
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "NFFT"
uuid = "efe261a4-0d2b-5849-be55-fc731d526b0d"
authors = ["Tobias Knopp <[email protected]>"]
version = "0.12.0"
version = "0.12.1"

[deps]
AbstractNFFTs = "7f219486-4aa7-41d6-80a7-e08ef20ceed7"
Expand Down
2 changes: 1 addition & 1 deletion src/implementation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Base.@kwdef mutable struct NFFTParams{T}
m::Int = 4
σ::T = 2.0
reltol::T = 1e-9
reltol::T = 1e-7
window::Symbol = :kaiser_bessel
LUTSize::Int64 = 0
precompute::PrecomputeFlags = POLYNOMIAL
Expand Down
3 changes: 2 additions & 1 deletion src/multidimensional.jl
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ end

@noinline function fillBlock!(p::NFFTPlan{T,D,1}, fHat, block, nodesInBlock, off, L::Val{Z}, scale,
idxInBlock, winTensor, winPoly) where {T,D,Z}
if (D >= 3 && Z >= 10) || (D == 2 && Z >= 16) # magic
if (Threads.nthreads() == 1 || !NFFT._use_threads[]) &&
(D >= 3 && Z >= 10) || (D == 2 && Z >= 16) # magic
for (kLocal,k) in enumerate(nodesInBlock)
fillOneNodeReal!(p, fHat, block, off, L, scale, k, kLocal, idxInBlock, winTensor, winPoly)
end
Expand Down

2 comments on commit 0257f23

@tknopp
Copy link
Member Author

@tknopp tknopp commented on 0257f23 Mar 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/57212

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.12.1 -m "<description of version>" 0257f23903faaad28a3efa9fa9309094a1e01c44
git push origin v0.12.1

Please sign in to comment.