Created
December 29, 2019 15:26
-
-
Save antoine-levitt/3495f47c99676f26824df1fbe9462040 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FFTW | |
n = 128 | |
m = 5 | |
X = randn(ComplexF64, n, n, n, m) | |
p = plan_fft!(X, (1, 2, 3)) | |
Y = copy(X) | |
GC.gc() | |
GC.enable(false) | |
@time mul!(X, p, X) | |
@time mul!(X, p, X) | |
@time mul!(X, p, X) | |
println() | |
@time copy(X) | |
@time copy(X) | |
@time copy(X) | |
println() | |
@time zero(X) | |
@time zero(X) | |
@time zero(X) | |
println() | |
@time (Y = similar(X); fill!(Y, 0)) | |
@time (Y = similar(X); fill!(Y, 0)) | |
@time (Y = similar(X); fill!(Y, 0)) | |
println() | |
@time copy!(Y, X) | |
@time copy!(Y, X) | |
@time copy!(Y, X) | |
println() | |
@time fill!(Y, 0) | |
@time fill!(Y, 0) | |
@time fill!(Y, 0) | |
GC.enable(true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment