Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test for 3- and 5-arg mul! with 2x2 and 3x3 matrices product #255

Merged
merged 2 commits into from
Feb 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/linalg/LinAlgBenchmarks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ typename(::Type{T}) where {T} = string(isa(T,DataType) ? T.name : Base.unwrap_un
typename(::Type{M}) where {M<:Matrix} = "Matrix"
typename(::Type{V}) where {V<:Vector} = "Vector"

const UPLO = :U
const UPLO = :U

linalgmat(::Type{Matrix}, s) = randmat(s)
linalgmat(::Type{Diagonal}, s) = Diagonal(randvec(s))
Expand Down Expand Up @@ -115,6 +115,20 @@ for s in SIZES

end

# Issue #34013: mul! for 2x2 or 3x3 matrices
for s in (2, 3)
A = randmat(s)
B = randmat(s)
C = randmat(s)
g["3-arg mul!", s] = @benchmarkable LinearAlgebra.mul!($C, $A, $B)

if VERSION >= v"1.3"
(α, β) = rand(2)
g["5-arg mul!", s] = @benchmarkable LinearAlgebra.mul!($C, $A, $B, $α, $β)
end
end


for b in values(g)
b.params.time_tolerance = 0.45
b.params.samples = 100
Expand Down