Features:
-
dot
andmul!
implementation using SIMD.jl. For supported types, it can have up to 2x speedup. -
Arbitrary vector types can be used to represent non-zero values and indices (see JuliaLang/julia#30173). This allows a better composition with MappedArrays.jl, LazyArrays.jl, FillArrays.jl, etc.
-
Optimized fused addition and multiplication:
Y = Y β + D S' X
Y = Y β + S D X
Y = Y β + D₁ S₁' X₁ + ... + Dₙ Sₙ' Xₙ
[*1]Y = Y β + (D₁ S₁' + ... + Dₙ Sₙ') X
[*1]Yᵢ = Yᵢ βᵢ + Dᵢ Sᵢ' Xᵢ
[*1]Yᵢ = Yᵢ βᵢ + Dᵢ Sᵢ' X
[*1]
where:
X
: matrix or a vectorS
: sparse matrix (or a vector for right-most argument)D
:Diagonal
,UniformScaling
, or aNumber
[*1]: when sparse matrices share the sparse structure