Skip to content

Commit 82a99dc

Browse files
authored
remove tuple specialization of fix_kinds (#266)
1 parent 2dacf71 commit 82a99dc

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "FFTW"
22
uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
3-
version = "1.6.0"
3+
version = "1.6.1"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/fft.jl

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -603,12 +603,6 @@ function fix_kinds(region, kinds)
603603
end
604604
return k
605605
end
606-
fix_kinds(region::Tuple, kinds::Integer) = ntuple(_->Int32(kinds), length(region))
607-
fix_kinds(region::Tuple, kinds::Tuple{Integer}) = fix_kinds(region, kinds[1])
608-
609-
# Potentially avoid an extra `collect`
610-
_collect(T, x) = collect(T, x)
611-
_collect(::Type{T}, x::AbstractVector) where {T} = convert(Vector{T}, x)
612606

613607
# low-level FFTWPlan creation (for internal use in FFTW module)
614608
for (Tr,Tc,fftw,lib) in ((:Float64,:(Complex{Float64}),"fftw",:libfftw3),
@@ -687,7 +681,7 @@ for (Tr,Tc,fftw,lib) in ((:Float64,:(Complex{Float64}),"fftw",:libfftw3),
687681
(Int32, Ptr{Int}, Int32, Ptr{Int},
688682
Ptr{$Tr}, Ptr{$Tr}, Ptr{Int32}, UInt32),
689683
size(dims,2), dims, size(howmany,2), howmany,
690-
X, Y, _collect(Int32, knd), flags)
684+
X, Y, knd, flags)
691685
unsafe_set_timelimit($Tr, NO_TIMELIMIT)
692686
if plan == C_NULL
693687
error("FFTW could not create plan") # shouldn't normally happen
@@ -713,7 +707,7 @@ for (Tr,Tc,fftw,lib) in ((:Float64,:(Complex{Float64}),"fftw",:libfftw3),
713707
(Int32, Ptr{Int}, Int32, Ptr{Int},
714708
Ptr{$Tc}, Ptr{$Tc}, Ptr{Int32}, UInt32),
715709
size(dims,2), dims, size(howmany,2), howmany,
716-
X, Y, _collect(Int32, knd), flags)
710+
X, Y, knd, flags)
717711
unsafe_set_timelimit($Tr, NO_TIMELIMIT)
718712
if plan == C_NULL
719713
error("FFTW could not create plan") # shouldn't normally happen

0 commit comments

Comments
 (0)