From c437bebcac5337d929f6d9de82e719f08f8e6344 Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Thu, 10 Apr 2025 11:58:50 +0530 Subject: [PATCH 1/2] Test for empty `Symmetric` and `BlasFlag.NONE` --- test/matmul.jl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/matmul.jl b/test/matmul.jl index 938fc3b7..6c42d3d0 100644 --- a/test/matmul.jl +++ b/test/matmul.jl @@ -1193,4 +1193,20 @@ end @test all(iszero, w) end +@testset "zero-size matmul" begin + A = zeros(0,2) + S = Symmetric(zeros(0,0)) + @test S * A == A + @test A' * S == A' + S = Symmetric(zeros(2,2)) + @test S * A' == A' + @test A * S == A +end + +@testset "BlasFlag.NONE => generic_matmatmul!" begin + A = ones(2,2) + S = Symmetric(ones(2,2)) + @test mul!(similar(A), S, A, big(1), big(0)) ≈ S * A +end + end # module TestMatmul From 4a8fc62d15daa498938710619cd7efe8d0bf1e2b Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Thu, 10 Apr 2025 12:00:35 +0530 Subject: [PATCH 2/2] Test for 5-arg `mul!` --- test/matmul.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/matmul.jl b/test/matmul.jl index 6c42d3d0..ff32b34c 100644 --- a/test/matmul.jl +++ b/test/matmul.jl @@ -1207,6 +1207,9 @@ end A = ones(2,2) S = Symmetric(ones(2,2)) @test mul!(similar(A), S, A, big(1), big(0)) ≈ S * A + C1 = mul!(similar(A), S, A, big(2), big(1)) + C2 = mul!(similar(A), S, A, 2, 1) + @test C1 ≈ C2 end end # module TestMatmul