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 committed Oct 21, 2015
1 parent e08d979 commit db90ac0
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 db90ac0

Please sign in to comment.