Skip to content

Commit d88a5d8

Browse files
committed
Add a check for blocksquarity
1 parent ac30196 commit d88a5d8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/linalg/factorizations.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ function MatrixAlgebraKit.zero!(A::BlockBlasMat)
1616
end
1717

1818
function MatrixAlgebraKit.one!(A::BlockBlasMat)
19+
mb, nb = blocksize(A)
20+
mb == nb || throw(DimensionMismatch("A is not block-square. Number of row-blocks ($mb) does not match number of column-blocks ($nb)"))
1921
for bj in blockaxes(A, 2), bi in blockaxes(A, 1)
2022
a = view(A, bi, bj)
2123
bi == bj ? MAK.one!(a) : MAK.zero!(a)

0 commit comments

Comments
 (0)