@@ -17,7 +17,7 @@ Random.seed!(1234)
1717# Load example plan implementation.
1818include (" TestPlans.jl" )
1919
20- # Run interface tests for TestPlans
20+ # Run interface tests for TestPlans
2121AbstractFFTs. TestUtils. test_complex_ffts (Array)
2222AbstractFFTs. TestUtils. test_real_ffts (Array)
2323
@@ -180,17 +180,17 @@ end
180180 p0 = plan_fft (zeros (ComplexF64, 3 ))
181181 p = TestPlans. WrapperTestPlan (p0)
182182 u = rand (ComplexF64, 3 )
183- @test p' * u ≈ p0' * u
183+ @test p' * u ≈ p0' * u
184184 # rfft
185185 p0 = plan_rfft (zeros (3 ))
186186 p = TestPlans. WrapperTestPlan (p0)
187187 u = rand (ComplexF64, 2 )
188- @test p' * u ≈ p0' * u
188+ @test p' * u ≈ p0' * u
189189 # brfft
190190 p0 = plan_brfft (zeros (ComplexF64, 3 ), 5 )
191191 p = TestPlans. WrapperTestPlan (p0)
192192 u = rand (Float64, 5 )
193- @test p' * u ≈ p0' * u
193+ @test p' * u ≈ p0' * u
194194end
195195
196196@testset " ChainRules" begin
238238 test_frule (f, complex_x, dims)
239239 test_rrule (f, complex_x, dims)
240240 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!))
242242 test_frule (* , pf (x, dims), x)
243243 test_rrule (* , pf (x, dims), x)
244244 test_frule (* , pf (complex_x, dims), complex_x)
248248 @test_throws ArgumentError ChainRulesCore. rrule (* , pf! (complex_x, dims), complex_x)
249249 end
250250
251- # rfft
251+ # rfft
252252 test_frule (rfft, x, dims)
253253 test_rrule (rfft, x, dims)
254254 test_frule (* , plan_rfft (x, dims), x)
@@ -266,12 +266,14 @@ end
266266 for pf in (plan_irfft, plan_brfft)
267267 for d in (2 * size (x, first (dims)) - 1 , 2 * size (x, first (dims)) - 2 )
268268 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)
270270 end
271271 end
272272 end
273273 end
274274 end
275275end
276-
277- include (" abstractfftsforwarddiff.jl" )
276+
277+ if isdefined (Base, :get_extension )
278+ include (" abstractfftsforwarddiff.jl" )
279+ end
0 commit comments