@@ -83,13 +83,13 @@ function test_fft_backend(ArrayType=Array; test_real=true, test_inplace=true)
83
83
end
84
84
# test plan_fft and also inv and plan_inv of plan_ifft, which should all give
85
85
# functionally identical plans
86
- plans_to_test = [ plan_fft (x, dims), inv (plan_ifft (x, dims)),
87
- AbstractFFTs. plan_inv (plan_ifft (x, dims))]
86
+ plans_to_test = ( plan_fft (x, dims), inv (plan_ifft (x, dims)),
87
+ AbstractFFTs. plan_inv (plan_ifft (x, dims)))
88
88
for P in plans_to_test
89
89
@test mul! (similar (y), P, copy (x_complexfloat)) ≈ fftw_fft
90
90
end
91
91
if test_inplace
92
- push! (plans_to_test, plan_fft! (similar (x_complexfloat), dims))
92
+ plans_to_test = (plans_to_test... , plan_fft! (similar (x_complexfloat), dims))
93
93
end
94
94
for P in plans_to_test
95
95
@test eltype (P) <: Complex
@@ -124,13 +124,13 @@ function test_fft_backend(ArrayType=Array; test_real=true, test_inplace=true)
124
124
if test_inplace
125
125
@test AbstractFFTs. ifft! (copy (y), dims) ≈ fftw_ifft
126
126
end
127
- plans_to_test = [ plan_ifft (x, dims), inv (plan_fft (x, dims)),
128
- AbstractFFTs. plan_inv (plan_fft (x, dims))]
127
+ plans_to_test = ( plan_ifft (x, dims), inv (plan_fft (x, dims)),
128
+ AbstractFFTs. plan_inv (plan_fft (x, dims)))
129
129
for P in plans_to_test
130
130
@test mul! (similar (x_complexfloat), P, copy (y)) ≈ fftw_ifft
131
131
end
132
132
if test_inplace
133
- push! (plans_to_test, plan_ifft! (similar (x_complexfloat), dims))
133
+ plans_to_test = (plans_to_test... , plan_ifft! (similar (x_complexfloat), dims))
134
134
end
135
135
for P in plans_to_test
136
136
@test eltype (P) <: Complex
@@ -145,8 +145,8 @@ function test_fft_backend(ArrayType=Array; test_real=true, test_inplace=true)
145
145
fftw_rfft = selectdim (fftw_fft, first (dims), 1 : (size (fftw_fft, first (dims)) ÷ 2 + 1 ))
146
146
ry = AbstractFFTs. rfft (x_real, dims)
147
147
@test ry ≈ fftw_rfft
148
- for P in [ plan_rfft (similar (x_real), dims), inv (plan_irfft (similar (ry), size (x, first (dims)), dims)),
149
- AbstractFFTs. plan_inv (plan_irfft (similar (ry), size (x, first (dims)), dims))]
148
+ for P in ( plan_rfft (similar (x_real), dims), inv (plan_irfft (similar (ry), size (x, first (dims)), dims)),
149
+ AbstractFFTs. plan_inv (plan_irfft (similar (ry), size (x, first (dims)), dims)))
150
150
@test eltype (P) <: Real
151
151
@test P * x_real ≈ fftw_rfft
152
152
@test mul! (similar (ry), P, copy (x_real)) ≈ fftw_rfft
@@ -166,8 +166,8 @@ function test_fft_backend(ArrayType=Array; test_real=true, test_inplace=true)
166
166
# IRFFT
167
167
fftw_irfft = x_real
168
168
@test AbstractFFTs. irfft (ry, size (x, first (dims)), dims) ≈ fftw_irfft
169
- for P in [ plan_irfft (similar (ry), size (x, first (dims)), dims), inv (plan_rfft (similar (x_real), dims)),
170
- AbstractFFTs. plan_inv (plan_rfft (similar (x_real), dims))]
169
+ for P in ( plan_irfft (similar (ry), size (x, first (dims)), dims), inv (plan_rfft (similar (x_real), dims)),
170
+ AbstractFFTs. plan_inv (plan_rfft (similar (x_real), dims)))
171
171
@test P * ry ≈ fftw_irfft
172
172
@test mul! (similar (x_real), P, copy (ry)) ≈ fftw_irfft
173
173
@test P \ (P * ry) ≈ ry
0 commit comments