Skip to content

Commit c08737e

Browse files
fix a potential bounds error (#148)
Truly, very minor. I happened upon this when searching for @turbo uses.
1 parent ad7f099 commit c08737e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/matmul.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,13 @@ Otherwise, based on the array's size, whether they are transposed, and whether t
203203
end # function
204204

205205
function matmul_only_β!(C::AbstractMatrix{T}, β::StaticInt{0}) where T
206-
@turbo for i=1:length(C)
206+
@turbo for i=eachindex(C)
207207
C[i] = zero(T)
208208
end
209209
end
210210

211211
function matmul_only_β!(C::AbstractMatrix{T}, β) where T
212-
@turbo for i=1:length(C)
212+
@turbo for i=eachindex(C)
213213
C[i] = β * C[i]
214214
end
215215
end

0 commit comments

Comments
 (0)