Skip to content

Commit d5ad44e

Browse files
committed
Try to fix test plan errors on julia 1
1 parent 780f206 commit d5ad44e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

test/TestPlans.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ mutable struct TestPlan{T,N,inplace} <: Plan{T}
1212
return new{T,N,inplace}(region, sz)
1313
end
1414
end
15-
TestPlan{T}(region, sz) where {T} = TestPlan{T,false}(region, sz)
15+
TestPlan{T}(region, sz) where {T} = TestPlan{T,0}(region, sz)
1616

1717
mutable struct InverseTestPlan{T,N,inplace} <: Plan{T}
1818
region
@@ -22,7 +22,7 @@ mutable struct InverseTestPlan{T,N,inplace} <: Plan{T}
2222
return new{T,N,inplace}(region, sz)
2323
end
2424
end
25-
InverseTestPlan{T}(region, sz) where {T} = InverseTestPlan{T,false}(region, sz)
25+
InverseTestPlan{T}(region, sz) where {T} = InverseTestPlan{T,0}(region, sz)
2626

2727
Base.size(p::TestPlan) = p.sz
2828
Base.ndims(::TestPlan{T,N}) where {T,N} = N
@@ -37,10 +37,10 @@ function AbstractFFTs.plan_bfft(x::AbstractArray{T}, region; kwargs...) where {T
3737
end
3838

3939
function AbstractFFTs.plan_fft!(x::AbstractArray{T}, region; kwargs...) where {T}
40-
return TestPlan{T,true}(region, size(x))
40+
return TestPlan{T,1}(region, size(x))
4141
end
4242
function AbstractFFTs.plan_bfft!(x::AbstractArray{T}, region; kwargs...) where {T}
43-
return InverseTestPlan{T,true}(region, size(x))
43+
return InverseTestPlan{T,1}(region, size(x))
4444
end
4545

4646
function AbstractFFTs.plan_inv(p::TestPlan{T,N,inplace}) where {T,N,inplace}
@@ -89,23 +89,23 @@ function dft!(
8989
end
9090

9191
function mul!(
92-
y::AbstractArray{<:Complex,N}, p::TestPlan{T,N,false}, x::AbstractArray{<:Union{Complex,Real},N}
92+
y::AbstractArray{<:Complex,N}, p::TestPlan{T,N,0}, x::AbstractArray{<:Union{Complex,Real},N}
9393
) where {T,N}
9494
size(y) == size(p) == size(x) || throw(DimensionMismatch())
9595
dft!(y, x, p.region, -1)
9696
end
9797
function mul!(
98-
y::AbstractArray{<:Complex,N}, p::InverseTestPlan{T,N,false}, x::AbstractArray{<:Union{Complex,Real},N}
98+
y::AbstractArray{<:Complex,N}, p::InverseTestPlan{T,N,0}, x::AbstractArray{<:Union{Complex,Real},N}
9999
) where {T,N}
100100
size(y) == size(p) == size(x) || throw(DimensionMismatch())
101101
dft!(y, x, p.region, 1)
102102
end
103103

104-
Base.:*(p::TestPlan{T,N,false}, x::AbstractArray) where {T,N} = mul!(similar(x, complex(float(eltype(x)))), p, x)
105-
Base.:*(p::InverseTestPlan{T,N,false}, x::AbstractArray) where {T,N} = mul!(similar(x, complex(float(eltype(x)))), p, x)
104+
Base.:*(p::TestPlan{T,N,0}, x::AbstractArray) where {T,N} = mul!(similar(x, complex(float(eltype(x)))), p, x)
105+
Base.:*(p::InverseTestPlan{T,N,0}, x::AbstractArray) where {T,N} = mul!(similar(x, complex(float(eltype(x)))), p, x)
106106

107-
Base.:*(p::TestPlan{T,N,true}, x::AbstractArray) where {T,N} = copy!(x, dft!(similar(x), x, p.region, -1))
108-
Base.:*(p::InverseTestPlan{T,N,true}, x::AbstractArray) where {T,N} = copy!(x, dft!(similar(x), x, p.region, 1))
107+
Base.:*(p::TestPlan{T,N,1}, x::AbstractArray) where {T,N} = copy!(x, dft!(similar(x), x, p.region, -1))
108+
Base.:*(p::InverseTestPlan{T,N,1}, x::AbstractArray) where {T,N} = copy!(x, dft!(similar(x), x, p.region, 1))
109109

110110
mutable struct TestRPlan{T,N} <: Plan{T}
111111
region

0 commit comments

Comments
 (0)