@@ -17,7 +17,7 @@ Random.seed!(1234)
17
17
# Load example plan implementation.
18
18
include (" TestPlans.jl" )
19
19
20
- # Run interface tests for TestPlans
20
+ # Run interface tests for TestPlans
21
21
AbstractFFTs. TestUtils. test_complex_ffts (Array)
22
22
AbstractFFTs. TestUtils. test_real_ffts (Array)
23
23
@@ -180,17 +180,17 @@ end
180
180
p0 = plan_fft (zeros (ComplexF64, 3 ))
181
181
p = TestPlans. WrapperTestPlan (p0)
182
182
u = rand (ComplexF64, 3 )
183
- @test p' * u ≈ p0' * u
183
+ @test p' * u ≈ p0' * u
184
184
# rfft
185
185
p0 = plan_rfft (zeros (3 ))
186
186
p = TestPlans. WrapperTestPlan (p0)
187
187
u = rand (ComplexF64, 2 )
188
- @test p' * u ≈ p0' * u
188
+ @test p' * u ≈ p0' * u
189
189
# brfft
190
190
p0 = plan_brfft (zeros (ComplexF64, 3 ), 5 )
191
191
p = TestPlans. WrapperTestPlan (p0)
192
192
u = rand (Float64, 5 )
193
- @test p' * u ≈ p0' * u
193
+ @test p' * u ≈ p0' * u
194
194
end
195
195
196
196
@testset " ChainRules" begin
238
238
test_frule (f, complex_x, dims)
239
239
test_rrule (f, complex_x, dims)
240
240
end
241
- for (pf, pf!) in ((plan_fft, plan_fft!), (plan_ifft, plan_ifft!), (plan_bfft, plan_bfft!))
241
+ for (pf, pf!) in ((plan_fft, plan_fft!), (plan_ifft, plan_ifft!), (plan_bfft, plan_bfft!))
242
242
test_frule (* , pf (x, dims), x)
243
243
test_rrule (* , pf (x, dims), x)
244
244
test_frule (* , pf (complex_x, dims), complex_x)
248
248
@test_throws ArgumentError ChainRulesCore. rrule (* , pf! (complex_x, dims), complex_x)
249
249
end
250
250
251
- # rfft
251
+ # rfft
252
252
test_frule (rfft, x, dims)
253
253
test_rrule (rfft, x, dims)
254
254
test_frule (* , plan_rfft (x, dims), x)
@@ -266,12 +266,14 @@ end
266
266
for pf in (plan_irfft, plan_brfft)
267
267
for d in (2 * size (x, first (dims)) - 1 , 2 * size (x, first (dims)) - 2 )
268
268
test_frule (* , pf (complex_x, d, dims), complex_x)
269
- test_rrule (* , pf (complex_x, d, dims), complex_x)
269
+ test_rrule (* , pf (complex_x, d, dims), complex_x)
270
270
end
271
271
end
272
272
end
273
273
end
274
274
end
275
275
end
276
-
277
- include (" abstractfftsforwarddiff.jl" )
276
+
277
+ if isdefined (Base, :get_extension )
278
+ include (" abstractfftsforwarddiff.jl" )
279
+ end
0 commit comments