Skip to content

Commit

Permalink
Reduce precompilation times
Browse files Browse the repository at this point in the history
(Precompile less things.)
  • Loading branch information
jipolanco committed Jun 12, 2024
1 parent acccfdd commit 9c7c3d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "NonuniformFFTs"
uuid = "cd96f58b-6017-4a02-bb9e-f4d81626177f"
authors = ["Juan Ignacio Polanco <[email protected]>"]
version = "0.3.13"
version = "0.3.14"

[deps]
Bessels = "0e736298-9ec6-45e8-9647-e4fc86a2fe38"
Expand Down
11 changes: 6 additions & 5 deletions src/NonuniformFFTs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,14 @@ function copy_deconvolve_to_oversampled!(
ûs_all
end

# Precompilation
# Precompile a small subset of possible static parameter combinations (m, kernel, T, ndims,
# ntransforms), to avoid huge precompilation times.
@setup_workload let
kernels = [default_kernel()] # only precompile for default kernel
ndims_all = 1:3
ms = map(HalfSupport, 2:2:8)
ndims_all = (1, 2, 3)
ms = map(HalfSupport, (4, 8))
# Ts = [Float32, Float64, ComplexF32, ComplexF64]
Ts = [Float64, ComplexF64]
Ts = (Float64,)
σ = 1.25
for kernel kernels, m ms, T Ts, ndims ndims_all
dims = ntuple(_ -> 13, ndims) # floor(σN) = 16
Expand All @@ -370,7 +371,7 @@ end
(i == 1 && T <: Real) ? ((N + 2) >> 1) : N
end
C = complex(T)
for ntrans (1, ndims) # number of simultaneous transforms
for ntrans (1,) # number of simultaneous transforms
ntransforms = Val(ntrans)
qs = ntuple(_ -> randn(T, Np), ntransforms)
uhat = ntuple(_ -> Array{C}(undef, Ns), ntransforms)
Expand Down

2 comments on commit 9c7c3d1

@jipolanco
Copy link
Owner Author

Choose a reason for hiding this comment

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

@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/108804

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

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.3.14 -m "<description of version>" 9c7c3d112a1041ec045b2102cb6beefb3c5da0d6
git push origin v0.3.14

Please sign in to comment.