|
123 | 123 | @test_throws DimensionMismatch axpy!(α, x, Vector(1:3), y, Vector(1:5)) |
124 | 124 | end |
125 | 125 |
|
| 126 | +@testset "generic syrk & herk" begin |
| 127 | + for T ∈ (BigFloat, Complex{BigFloat}, Quaternion{Float64}) |
| 128 | + α = randn(T) |
| 129 | + a = randn(T, 3, 4) |
| 130 | + csmall = similar(a, 3, 3) |
| 131 | + csmall_fallback = similar(a, 3, 3) |
| 132 | + cbig = similar(a, 4, 4) |
| 133 | + cbig_fallback = similar(a, 4, 4) |
| 134 | + mul!(csmall, a, a', real(α), false) |
| 135 | + LinearAlgebra._generic_matmatmul!(csmall_fallback, a, a', real(α), false) |
| 136 | + @test ishermitian(csmall) |
| 137 | + @test csmall ≈ csmall_fallback |
| 138 | + mul!(cbig, a', a, real(α), false) |
| 139 | + LinearAlgebra._generic_matmatmul!(cbig_fallback, a', a, real(α), false) |
| 140 | + @test ishermitian(cbig) |
| 141 | + @test cbig ≈ cbig_fallback |
| 142 | + mul!(csmall, a, transpose(a), α, false) |
| 143 | + LinearAlgebra._generic_matmatmul!(csmall_fallback, a, transpose(a), α, false) |
| 144 | + @test csmall ≈ csmall_fallback |
| 145 | + mul!(cbig, transpose(a), a, α, false) |
| 146 | + LinearAlgebra._generic_matmatmul!(cbig_fallback, transpose(a), a, α, false) |
| 147 | + @test cbig ≈ cbig_fallback |
| 148 | + end |
| 149 | +end |
| 150 | + |
126 | 151 | @test !issymmetric(fill(1,5,3)) |
127 | 152 | @test !ishermitian(fill(1,5,3)) |
128 | 153 | @test (x = fill(1,3); cross(x,x) == zeros(3)) |
|
0 commit comments