Skip to content

Commit f6e5db2

Browse files
pepijndevosPepijn de Vos
andauthored
fix vector indexing (#1143)
* fix vector indexing * add test * bump --------- Co-authored-by: Pepijn de Vos <pepijn.devos@juliahub.com> Co-authored-by: Pepijn de Vos <pepijn.devos@juliacomputing.com>
1 parent afaead0 commit f6e5db2

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "StaticArrays"
22
uuid = "90137ffa-7385-5640-81b9-e52037218182"
3-
version = "1.5.19"
3+
version = "1.5.20"
44

55
[deps]
66
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

src/indexing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ end
5959
else
6060
ind_expr = :($ind_expr + $stride * (inds[$i] - 1))
6161
end
62-
stride *= S[i]
62+
stride *= Size(S)[i]
6363
end
6464
return quote
6565
@_propagate_inbounds_meta

test/matrix_multiply.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,5 +436,7 @@ mul_wrappers = [
436436
outvec2f = Vector{Float64}(undef, 2)
437437
mul!(outvec2f, mf, vf2)
438438
@test outvec2f [10.0, 22.0]
439+
440+
@test mul!(@MArray([0.0]), Diagonal([1]), @MArray([2.0])) == @MArray([2.0])
439441
end
440442
end

0 commit comments

Comments
 (0)