@@ -15,24 +15,28 @@ Base.:(*)(y::AdjointAbsVec, A::LinearMap) = adjoint(*(A', y'))
15
15
Base.:(* )(y:: TransposeAbsVec , A:: LinearMap ) = transpose (transpose (A) * transpose (y))
16
16
17
17
# mul!(x, y', A)
18
- LinearAlgebra. mul! (x:: AdjointAbsVec , y:: AdjointAbsVec , A:: LinearMap ) =
19
- mul! (x, y, A, true , false )
20
-
21
- # todo: not sure if we need bounds checks and propagate inbounds stuff here
18
+ Base. @propagate_inbounds function LinearAlgebra. mul! (x:: AbstractMatrix , y:: AdjointAbsVec , A:: LinearMap )
19
+ @boundscheck check_dim_mul (x, y, A)
20
+ @inbounds mul! (adjoint (x), A' , y' )
21
+ return adjoint (x)
22
+ end
22
23
23
- # mul!(x, y', A, α, β)
24
- # the key here is that "adjoint" and "transpose" are lazy "views"
25
- function LinearAlgebra. mul! (x:: AdjointAbsVec , y:: AdjointAbsVec ,
24
+ Base. @propagate_inbounds function LinearAlgebra. mul! (x:: AbstractMatrix , y:: AdjointAbsVec ,
26
25
A:: LinearMap , α:: Number , β:: Number )
27
- check_dim_mul (x, y, A)
28
- mul! (adjoint (x), A' , y' , α, β)
26
+ @boundscheck check_dim_mul (x, y, A)
27
+ @inbounds mul! (adjoint (x), A' , y' , α, β)
29
28
return adjoint (x)
30
29
end
31
30
32
- # mul!(x, transpose(y), A, α, β)
33
- function LinearAlgebra. mul! (x:: TransposeAbsVec , y:: TransposeAbsVec ,
31
+ Base. @propagate_inbounds function LinearAlgebra. mul! (x:: AbstractMatrix , y:: TransposeAbsVec , A:: LinearMap )
32
+ @boundscheck check_dim_mul (x, y, A)
33
+ @inbounds mul! (transpose (x), transpose (A), transpose (y))
34
+ return transpose (x)
35
+ end
36
+
37
+ Base. @propagate_inbounds function LinearAlgebra. mul! (x:: AbstractMatrix , y:: TransposeAbsVec ,
34
38
A:: LinearMap , α:: Number , β:: Number )
35
- check_dim_mul (x, y, A)
36
- mul! (transpose (x), transpose (A), transpose (y), α, β)
39
+ @boundscheck check_dim_mul (x, y, A)
40
+ @inbounds mul! (transpose (x), transpose (A), transpose (y), α, β)
37
41
return transpose (x)
38
42
end
0 commit comments