You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DimensionMismatch("Vectors and matrix have different dimensions, x has a length $(length(x)), y has a length $(length(y)), D has side dimension $(length(d))")
658
+
)
659
+
end
660
+
nzvals =nonzeros(x)
661
+
nzinds =nonzeroinds(x)
662
+
s =zero(typeof(dot(first(x), first(D), first(y))))
663
+
@inboundsfor nzidx ineachindex(nzvals)
664
+
s +=dot(nzvals[nzidx], d[nzinds[nzidx]], y[nzinds[nzidx]])
DimensionMismatch("Vectors and matrix have different dimensions, x has a length $(length(x)), y has a length $(length(y)), Q has side dimension $(length(d))")
676
+
)
677
+
end
678
+
xnzind =nonzeroinds(x)
679
+
ynzind =nonzeroinds(y)
680
+
xnzval =nonzeros(x)
681
+
ynzval =nonzeros(y)
682
+
s =zero(typeof(dot(first(x), first(D), first(y))))
683
+
ifisempty(xnzind) ||isempty(ynzind)
684
+
return s
685
+
end
686
+
687
+
x_idx =1
688
+
y_idx =1
689
+
x_idx_last =length(xnzind)
690
+
y_idx_last =length(ynzind)
691
+
692
+
# go through the nonzero indices of a and b simultaneously
0 commit comments