Skip to content

Commit

Permalink
Add simd annotation to generic_scale!
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahao authored and bjarthur committed Oct 27, 2015
1 parent a5a41b9 commit 261460b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/linalg/generic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ scale(s::Number, X::AbstractArray) = s*X
# For better performance when input and output are the same array
# See https://github.com/JuliaLang/julia/issues/8415#issuecomment-56608729
function generic_scale!(X::AbstractArray, s::Number)
for I in eachindex(X)
@simd for I in eachindex(X)
@inbounds X[I] *= s
end
X
Expand Down

0 comments on commit 261460b

Please sign in to comment.