@@ -39,19 +39,19 @@ Size(::TSize{S}) where S = Size{S}()
39
39
Base. transpose (:: TSize{S,T} ) where {S,T} = TSize {reverse(S),!T} ()
40
40
41
41
# Get the parent of transposed arrays, or the array itself if it has no parent
42
- # QUESTION: maybe call this something else?
43
- Base . parent (A:: Union{<:Transpose{<:Any,<:StaticArray}, <:Adjoint{<:Any,<:StaticArray}} ) = A. parent
44
- Base . parent (A:: StaticArray ) = A
42
+ # Different from Base.parent because we only want to get rid of Transpose and Adjoint
43
+ mul_parent (A:: Union{<:Transpose{<:Any,<:StaticArray}, <:Adjoint{<:Any,<:StaticArray}} ) = A. parent
44
+ mul_parent (A:: StaticArray ) = A
45
45
46
46
# 5-argument matrix multiplication
47
47
# To avoid allocations, strip away Transpose type and store tranpose info in Size
48
48
@inline LinearAlgebra. mul! (dest:: StaticVecOrMatLike , A:: StaticVecOrMatLike , B:: StaticVecOrMatLike ,
49
- α:: Real , β:: Real ) = _mul! (TSize (dest), parent (dest), TSize (A), TSize (B), parent (A), parent (B),
49
+ α:: Real , β:: Real ) = _mul! (TSize (dest), mul_parent (dest), TSize (A), TSize (B), mul_parent (A), mul_parent (B),
50
50
AlphaBeta (α,β))
51
51
52
52
@inline LinearAlgebra. mul! (dest:: StaticVecOrMatLike , A:: StaticVecOrMatLike{T} ,
53
53
B:: StaticVecOrMatLike{T} ) where T =
54
- _mul! (TSize (dest), parent (dest), TSize (A), TSize (B), parent (A), parent (B), NoMulAdd {T} ())
54
+ _mul! (TSize (dest), mul_parent (dest), TSize (A), TSize (B), mul_parent (A), mul_parent (B), NoMulAdd {T} ())
55
55
56
56
57
57
" Calculate the product of the dimensions being multiplied. Useful as a heuristic for unrolling."
0 commit comments