Skip to content

Commit f3ac607

Browse files
authored
Change lmul! to rmul! in _block_muladd! (#324)
* Change lmul to rmul in _block_muladd * Bump version to v0.16.39
1 parent cb0495f commit f3ac607

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "BlockArrays"
22
uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
3-
version = "0.16.38"
3+
version = "0.16.39"
44

55
[deps]
66
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"

src/BlockArrays.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import Base: (:), IteratorSize, iterate, axes1, strides, isempty
3939
import Base.Broadcast: broadcasted, DefaultArrayStyle, AbstractArrayStyle, Broadcasted, broadcastable
4040
import LinearAlgebra: lmul!, rmul!, AbstractTriangular, HermOrSym, AdjOrTrans,
4141
StructuredMatrixStyle, cholesky, cholesky!, cholcopy, RealHermSymComplexHerm
42-
import ArrayLayouts: _fill_lmul!, MatMulVecAdd, MatMulMatAdd, MatLmulVec, MatLdivVec,
42+
import ArrayLayouts: zero!, MatMulVecAdd, MatMulMatAdd, MatLmulVec, MatLdivVec,
4343
materialize!, MemoryLayout, sublayout, transposelayout, conjlayout,
4444
triangularlayout, triangulardata, _inv, _copyto!, axes_print_matrix_row,
4545
colsupport, rowsupport, sub_materialize, sub_materialize_axes, zero!

src/blocklinalg.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,16 +202,18 @@ end
202202
# BLAS overrides
203203
#############
204204

205+
_fill_rmul!(A::AbstractArray, β) = iszero(β) ? zero!(A) : rmul!(A, β)
206+
205207
@inline function _block_muladd!(α, A, X::AbstractVector, β, Y::AbstractVector)
206-
_fill_lmul!(β, Y)
208+
_fill_rmul!(Y, β)
207209
for N = blockcolsupport(X), K = blockcolsupport(A,N)
208210
mul!(view(Y,K), view(A,K,N), view(X,N), α, one(β))
209211
end
210212
Y
211213
end
212214

213215
@inline function _block_muladd!(α, A, X, β, Y)
214-
_fill_lmul!(β, Y)
216+
_fill_rmul!(Y, β)
215217
for J = blockaxes(X,2), N = blockcolsupport(X,J), K = blockcolsupport(A,N)
216218
mul!(view(Y,K,J), view(A,K,N), view(X,N,J), α, one(α))
217219
end

0 commit comments

Comments
 (0)