Skip to content

Commit 7ee5239

Browse files
Close #163 & #141
strictly speaking, this expands the API and doesn't change it, so all good with versioning the multi-d conveniences are added. i suppose it's possible to add conveniences for ultra2cheb, but i'll let someone file an issue before deciding what that should be
1 parent 6bad0ea commit 7ee5239

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "FastTransforms"
22
uuid = "057dd010-8810-581a-b7be-e3fc3b93f78c"
3-
version = "0.13.4"
3+
version = "0.13.5"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
@@ -25,7 +25,7 @@ BinaryProvider = "0.5"
2525
DSP = "0.6, 0.7"
2626
FFTW = "1"
2727
FastGaussQuadrature = "0.4"
28-
FastTransforms_jll = "0.5.3"
28+
FastTransforms_jll = "0.5.4"
2929
FillArrays = "0.9, 0.10, 0.11, 0.12"
3030
Reexport = "0.2, 1.0"
3131
SpecialFunctions = "0.10, 1, 2"

src/libfasttransforms.jl

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,17 @@ function plan_spinsph2fourier(::Type{Complex{Float64}}, n::Integer, s::Integer)
619619
return FTPlan{Complex{Float64}, 2, SPINSPHERE}(plan, n)
620620
end
621621

622+
plan_disk2cxf(::Type{Float64}, n::Integer, α) = plan_disk2cxf(Float64, n, α, 0)
623+
plan_disk2cxf(::Type{Float64}, n::Integer) = plan_disk2cxf(Float64, n, 0)
624+
plan_rectdisk2cheb(::Type{Float64}, n::Integer) = plan_rectdisk2cheb(Float64, n, 0)
625+
plan_tri2cheb(::Type{Float64}, n::Integer, α, β) = plan_tri2cheb(Float64, n, α, β, 0)
626+
plan_tri2cheb(::Type{Float64}, n::Integer, α) = plan_tri2cheb(Float64, n, α, 0)
627+
plan_tri2cheb(::Type{Float64}, n::Integer) = plan_tri2cheb(Float64, n, 0)
628+
plan_tet2cheb(::Type{Float64}, n::Integer, α, β, γ) = plan_tet2cheb(Float64, n, α, β, γ, 0)
629+
plan_tet2cheb(::Type{Float64}, n::Integer, α, β) = plan_tet2cheb(Float64, n, α, β, 0)
630+
plan_tet2cheb(::Type{Float64}, n::Integer, α) = plan_tet2cheb(Float64, n, α, 0)
631+
plan_tet2cheb(::Type{Float64}, n::Integer) = plan_tet2cheb(Float64, n, 0)
632+
622633
for (fJ, fadJ, fC, fE, K) in ((:plan_sph_synthesis, :plan_sph_analysis, :ft_plan_sph_synthesis, :ft_execute_sph_synthesis, SPHERESYNTHESIS),
623634
(:plan_sph_analysis, :plan_sph_synthesis, :ft_plan_sph_analysis, :ft_execute_sph_analysis, SPHEREANALYSIS),
624635
(:plan_sphv_synthesis, :plan_sphv_analysis, :ft_plan_sphv_synthesis, :ft_execute_sphv_synthesis, SPHEREVSYNTHESIS),
@@ -630,10 +641,10 @@ for (fJ, fadJ, fC, fE, K) in ((:plan_sph_synthesis, :plan_sph_analysis, :ft_plan
630641
(:plan_tri_synthesis, :plan_tri_analysis, :ft_plan_tri_synthesis, :ft_execute_tri_synthesis, TRIANGLESYNTHESIS),
631642
(:plan_tri_analysis, :plan_tri_synthesis, :ft_plan_tri_analysis, :ft_execute_tri_analysis, TRIANGLEANALYSIS))
632643
@eval begin
633-
$fJ(x::Matrix{T}) where T = $fJ(T, size(x, 1), size(x, 2))
634-
$fJ(::Type{Complex{T}}, x...) where T <: Real = $fJ(T, x...)
635-
function $fJ(::Type{Float64}, n::Integer, m::Integer)
636-
plan = ccall(($(string(fC)), libfasttransforms), Ptr{ft_plan_struct}, (Cint, Cint), n, m)
644+
$fJ(x::Matrix{T}; y...) where T = $fJ(T, size(x, 1), size(x, 2); y...)
645+
$fJ(::Type{Complex{T}}, x...; y...) where T <: Real = $fJ(T, x...; y...)
646+
function $fJ(::Type{Float64}, n::Integer, m::Integer; flags::Integer=FFTW.ESTIMATE)
647+
plan = ccall(($(string(fC)), libfasttransforms), Ptr{ft_plan_struct}, (Cint, Cint, Cuint), n, m, flags)
637648
return FTPlan{Float64, 2, $K}(plan, n, m)
638649
end
639650
adjoint(p::FTPlan{T, 2, $K}) where T = AdjointFTPlan(p, $fadJ(T, p.n, p.m))
@@ -659,10 +670,10 @@ end
659670
for (fJ, fadJ, fC, fE, K) in ((:plan_tet_synthesis, :plan_tet_analysis, :ft_plan_tet_synthesis, :ft_execute_tet_synthesis, TETRAHEDRONSYNTHESIS),
660671
(:plan_tet_analysis, :plan_tet_synthesis, :ft_plan_tet_analysis, :ft_execute_tet_analysis, TETRAHEDRONANALYSIS))
661672
@eval begin
662-
$fJ(x::Array{T, 3}) where T = $fJ(T, size(x, 1), size(x, 2), size(x, 3))
663-
$fJ(::Type{Complex{T}}, x...) where T <: Real = $fJ(T, x...)
664-
function $fJ(::Type{Float64}, n::Integer, l::Integer, m::Integer)
665-
plan = ccall(($(string(fC)), libfasttransforms), Ptr{ft_plan_struct}, (Cint, Cint, Cint), n, l, m)
673+
$fJ(x::Array{T, 3}; y...) where T = $fJ(T, size(x, 1), size(x, 2), size(x, 3); y...)
674+
$fJ(::Type{Complex{T}}, x...; y...) where T <: Real = $fJ(T, x...; y...)
675+
function $fJ(::Type{Float64}, n::Integer, l::Integer, m::Integer; flags::Integer=FFTW.ESTIMATE)
676+
plan = ccall(($(string(fC)), libfasttransforms), Ptr{ft_plan_struct}, (Cint, Cint, Cint, Cuint), n, l, m, flags)
666677
return FTPlan{Float64, 3, $K}(plan, n, l, m)
667678
end
668679
adjoint(p::FTPlan{T, 3, $K}) where T = AdjointFTPlan(p, $fadJ(T, p.n, p.l, p.m))
@@ -688,9 +699,9 @@ end
688699
for (fJ, fadJ, fC, fE, K) in ((:plan_spinsph_synthesis, :plan_spinsph_analysis, :ft_plan_spinsph_synthesis, :ft_execute_spinsph_synthesis, SPINSPHERESYNTHESIS),
689700
(:plan_spinsph_analysis, :plan_spinsph_synthesis, :ft_plan_spinsph_analysis, :ft_execute_spinsph_analysis, SPINSPHEREANALYSIS))
690701
@eval begin
691-
$fJ(x::Matrix{T}, s::Integer) where T = $fJ(T, size(x, 1), size(x, 2), s)
692-
function $fJ(::Type{Complex{Float64}}, n::Integer, m::Integer, s::Integer)
693-
plan = ccall(($(string(fC)), libfasttransforms), Ptr{ft_plan_struct}, (Cint, Cint, Cint), n, m, s)
702+
$fJ(x::Matrix{T}, s::Integer; y...) where T = $fJ(T, size(x, 1), size(x, 2), s; y...)
703+
function $fJ(::Type{Complex{Float64}}, n::Integer, m::Integer, s::Integer; flags::Integer=FFTW.ESTIMATE)
704+
plan = ccall(($(string(fC)), libfasttransforms), Ptr{ft_plan_struct}, (Cint, Cint, Cint, Cuint), n, m, s, flags)
694705
return FTPlan{Complex{Float64}, 2, $K}(plan, n, m)
695706
end
696707
get_spin(p::FTPlan{T, 2, $K}) where T = ccall((:ft_get_spin_spinsphere_fftw_plan, libfasttransforms), Cint, (Ptr{ft_plan_struct},), p)

0 commit comments

Comments
 (0)