Skip to content

Commit

Permalink
Merge pull request #18 from NFFT/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
passscoed authored Jul 30, 2024
2 parents 48d149f + f2d5417 commit aaa4bf8
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.10.4"
manifest_format = "2.0"
project_hash = "36e187d43e77647e256f56fe9d041a485e8c6c7a"
project_hash = "6a0dbf49b9f181ea3bc8882243fdc78ded95cdb7"

[[deps.Aqua]]
deps = ["Compat", "Pkg", "Test"]
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "NFFT3"
uuid = "53104703-03e8-40a5-ab01-812303a44cae"
authors = ["Michael Schmischke <michael.schmischke@math.tu-chemnitz.de> for the julia package and other contributors for the NFFT (see nfft.org)"]
version = "1.2.0"
version = "1.2.1"

[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Expand All @@ -10,7 +10,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Aqua = "0.8"
Aqua = "0.5 - 0.8"
CpuId = "0.3"
LinearAlgebra = "1"
Test = "1"
Expand Down
21 changes: 20 additions & 1 deletion src/NFFT3.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,26 @@ include("NFMT.jl")
include("fastsum.jl")
include("flags.jl")


kernels = Dict(
"gaussian" => 1,
"multiquadric" => 1,
"inverse_multiquadric" => 1,
"logarithm" => 0,
"thinplate_spline" => 0,
"one_over_square" => 0,
"one_over_modulus" => 0,
"one_over_x" => 0,
"inverse_multiquadric3" => 1,
"sinc_kernel" => 1,
"cosc" => 1,
"kcot" => 1,
"one_over_cube" => 0,
"log_sin" => 1,
"laplacian_rbf" => 1,
"der_laplacian_rbf" => 1,
"xx_gaussian" => 1,
"absx" => 0,
)

# plan structures
export NFFT, NFCT, NFST, FASTSUM, NFMT
Expand Down
39 changes: 34 additions & 5 deletions src/fastsum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,45 @@ function FASTSUM(
N::Integer,
M::Integer,
kernel::String,
c::Real,
c::Vector{<:Real},
n::Integer = 256,
p::Integer = 8,
eps_I::Real = 8/256,
eps_B::Real = 1/16,
eps_I::Real = 8 / 256,
eps_B::Real = 1 / 16,
nn::Integer = 512,
m::Integer = 8,
)
cv = Vector{Float64}(undef, 1)
cv[1] = Float64(c)

if length(c) != kernels[kernel]
error("Kernel parameter vector has wrong length.")
end

FASTSUM(d, N, M, n, p, kernel, c, eps_I, eps_B, nn, nn, m, m, UInt32(0))
end #constructor

function FASTSUM(
d::Integer,
N::Integer,
M::Integer,
kernel::String,
c::Union{Real,UndefInitializer} = undef,
n::Integer = 256,
p::Integer = 8,
eps_I::Real = 8 / 256,
eps_B::Real = 1 / 16,
nn::Integer = 512,
m::Integer = 8,
)
if kernels[kernel] == 0 || c == undef
cv = Vector{Float64}() #Only compatibility will be removed in the next major upgrade
else
cv = Vector{Float64}(undef, 1)
cv[1] = Float64(c)
end

if length(cv) != kernels[kernel]
error("Kernel parameter vector has wrong length.")
end

FASTSUM(d, N, M, n, p, kernel, cv, eps_I, eps_B, nn, nn, m, m, UInt32(0))
end #constructor
Expand Down
Binary file modified src/lib/AVX/libfastsumjulia.dll
Binary file not shown.
Binary file modified src/lib/AVX/libfastsumjulia.dylib
Binary file not shown.
Binary file modified src/lib/AVX/libfastsumjulia.so
Binary file not shown.
Binary file modified src/lib/AVX2/libfastsumjulia.dll
Binary file not shown.
Binary file modified src/lib/AVX2/libfastsumjulia.dylib
Binary file not shown.
Binary file modified src/lib/AVX2/libfastsumjulia.so
Binary file not shown.
Binary file modified src/lib/SSE2/libfastsumjulia.dll
Binary file not shown.
Binary file modified src/lib/SSE2/libfastsumjulia.dylib
Binary file not shown.
Binary file modified src/lib/SSE2/libfastsumjulia.so
Binary file not shown.
14 changes: 7 additions & 7 deletions test/Manifest.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.10.0"
julia_version = "1.10.4"
manifest_format = "2.0"
project_hash = "4e0b3b0d2022a69f1ec1c6a13d6a85ccb16e5694"

[[deps.Aqua]]
deps = ["Compat", "Pkg", "Test"]
git-tree-sha1 = "497d933e5998358c2626f782c99a8d4b90af2dd0"
git-tree-sha1 = "12e575f31a6f233ba2485ed86b9325b85df37c61"
uuid = "4c88cf16-eb10-579e-8560-4a9242c79595"
version = "0.8.4"
version = "0.8.7"

[[deps.ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
Expand All @@ -22,9 +22,9 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[deps.Compat]]
deps = ["TOML", "UUIDs"]
git-tree-sha1 = "75bd5b6fc5089df449b5d35fa501c846c9b6549b"
git-tree-sha1 = "b1c55339b7c6c350ee89f2c1604299660525b248"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "4.12.0"
version = "4.15.0"
weakdeps = ["Dates", "LinearAlgebra"]

[deps.Compat.extensions]
Expand All @@ -33,7 +33,7 @@ weakdeps = ["Dates", "LinearAlgebra"]
[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "1.0.5+1"
version = "1.1.1+0"

[[deps.Dates]]
deps = ["Printf"]
Expand Down Expand Up @@ -105,7 +105,7 @@ version = "1.2.0"
[[deps.OpenBLAS_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
version = "0.3.23+2"
version = "0.3.23+4"

[[deps.Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
Expand Down

0 comments on commit aaa4bf8

Please sign in to comment.