Skip to content

Commit 7b2526e

Browse files
committed
Convert Diagonal to Matrix
1 parent ddf8007 commit 7b2526e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/matmul.jl

+12-2
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,14 @@ else
507507
_getrounding() = ccall(:fegetround, Cint, ())
508508
end
509509

510-
function _call_gem_openblas_upward!(C, A::AbstractMatrix{Float64}, B::AbstractMatrix{Float64})
510+
_2mat(A::LinearAlgebra.Diagonal) = Matrix(A)
511+
512+
_2mat(A) = A
513+
514+
function _call_gem_openblas_upward!(C, A_::AbstractMatrix{Float64}, B_::AbstractMatrix{Float64})
515+
A = _2mat(A_)
516+
B = _2mat(B_)
517+
511518
m, k = size(A)
512519
n = size(B, 2)
513520

@@ -536,7 +543,10 @@ function _call_gem_openblas_upward!(C, A::AbstractMatrix{Float64}, B::AbstractMa
536543
end
537544
end
538545

539-
function _call_gem_openblas_upward!(C, A::AbstractMatrix{Float64}, B::AbstractVector{Float64})
546+
function _call_gem_openblas_upward!(C, A_::AbstractMatrix{Float64}, B_::AbstractVector{Float64})
547+
A = _2mat(A_)
548+
B = _2mat(B_)
549+
540550
m, k = size(A)
541551

542552
α = 1.0

0 commit comments

Comments
 (0)