You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@b may execute the expression being benchmarked many times to get more reliable timings. In this case, when you call lmul!(D,M), all the elements of M are doubled. When @b does this repeatedly, eventually they overflow to Inf.
You can see a similar behavior with this
using LinearAlgebra
M =rand(3,3)
D =Diagonal(2ones(3))
for _ in1:2000lmul!(D,M)
end
M # M is filled with Infs
And you can avoid that behavior by resetting the contents of M each iteration
using LinearAlgebra, Chairmarks
M =rand(3,3)
M0 =copy(M)
D =Diagonal(2ones(3))
@blmul!(D,copyto!(M, M0))
M # M is not filled with Infs
Hi there,
I might just be using the
@b
macro wrongly. But i was confused that in the following codethe M gets filled with Infs.
The text was updated successfully, but these errors were encountered: