Skip to content

Commit

Permalink
fix alignment check (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj authored Jul 24, 2019
1 parent 0c4e743 commit 55f33ae
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,11 @@ let A = rand(Float32, 35), Ac = rand(Complex{Float32}, 35)
@test Yc[io] fft(Ac[ii])
end
end
@test_throws ArgumentError plan_rfft(Array{Float32}(undef, 32)) * view(A, 2:33)
@test_throws ArgumentError plan_fft(Array{Complex{Float32}}(undef, 32)) * view(Ac, 2:33)

# check whether FFTW on this architecture has nontrivial alignment requirements
nontrivial_alignment = FFTW.fftw_vendor == :fftw && ccall((:fftwf_alignment_of, FFTW.libfftw3f), Int32, (Int,), 8) != 0
if nontrivial_alignment
@test_throws ArgumentError plan_rfft(Array{Float32}(undef, 32)) * view(A, 2:33)
@test_throws ArgumentError plan_fft(Array{Complex{Float32}}(undef, 32)) * view(Ac, 2:33)
end
end

2 comments on commit 55f33ae

@stevengj
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/2267

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.0 -m "<description of version>" 55f33ae64f18e08d7dbd22a239f82845fb1c3780
git push origin v0.3.0

Please sign in to comment.