Skip to content

Commit db90ac0

Browse files
committed
Add simd annotation to generic_scale!
Ref: #13686 (comment) #13681 (comment)
1 parent e08d979 commit db90ac0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/linalg/generic.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ scale(s::Number, X::AbstractArray) = s*X
88
# For better performance when input and output are the same array
99
# See https://github.com/JuliaLang/julia/issues/8415#issuecomment-56608729
1010
function generic_scale!(X::AbstractArray, s::Number)
11-
for I in eachindex(X)
11+
@simd for I in eachindex(X)
1212
@inbounds X[I] *= s
1313
end
1414
X

0 commit comments

Comments
 (0)