Skip to content

Commit

Permalink
Test adjoint plans with float32's
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav-arya committed Oct 21, 2023
1 parent 3ae5023 commit b2ffd6f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,21 @@ end
end
end

@testset "Adjoint plan on single-precision" begin
# fft
p = plan_fft(zeros(ComplexF32, 3))
u = rand(ComplexF32, 3)
@test eltype(p' * (p * u)) == eltype(u)
# rfft
p = plan_rfft(zeros(Float32, 3))
u = rand(Float32, 3)
@test eltype(p' * (p * u)) == eltype(u)
# brfft
p = plan_brfft(zeros(ComplexF32, 3), 5)
u = rand(ComplexF32, 3)
@test eltype(p' * (p * u)) == eltype(u)
end

@testset "ChainRules" begin
@testset "shift functions" begin
for x in (randn(3), randn(3, 4), randn(3, 4, 5))
Expand Down

0 comments on commit b2ffd6f

Please sign in to comment.