@@ -74,30 +74,19 @@ function matricize(a::AbstractArray, permblock1::Tuple, permblock2::Tuple)
7474end
7575
7676# ==================================== unmatricize =======================================
77- function unmatricize (
78- m:: AbstractMatrix ,
79- axes:: Tuple{Vararg{AbstractUnitRange}} ,
80- biperm:: AbstractBlockPermutation{2} ,
81- )
77+ function unmatricize (m:: AbstractMatrix , axes, biperm:: AbstractBlockPermutation{2} )
8278 length (axes) == length (biperm) || throw (ArgumentError (" axes do not match permutation" ))
8379 return unmatricize (FusionStyle (m), m, axes, biperm)
8480end
8581
8682function unmatricize (
87- :: FusionStyle ,
88- m:: AbstractMatrix ,
89- axes:: Tuple{Vararg{AbstractUnitRange}} ,
90- biperm:: AbstractBlockPermutation{2} ,
83+ :: FusionStyle , m:: AbstractMatrix , axes, biperm:: AbstractBlockPermutation{2}
9184)
9285 blocked_axes = axes[biperm]
9386 a_perm = unmatricize (m, blocked_axes)
9487 return permuteblockeddims (a_perm, invperm (biperm))
9588end
9689
97- function unmatricize (:: ReshapeFusion , m:: AbstractMatrix , axes:: AbstractUnitRange... )
98- return reshape (m, axes... )
99- end
100-
10190function unmatricize (
10291 :: ReshapeFusion ,
10392 m:: AbstractMatrix ,
@@ -106,9 +95,7 @@ function unmatricize(
10695 return reshape (m, Tuple (blocked_axes)... )
10796end
10897
109- function unmatricize (
110- m:: AbstractMatrix , blocked_axes:: BlockedTuple{2,<:Any,<:Tuple{Vararg{AbstractUnitRange}}}
111- )
98+ function unmatricize (m:: AbstractMatrix , blocked_axes)
11299 return unmatricize (FusionStyle (m), m, blocked_axes)
113100end
114101
@@ -121,9 +108,7 @@ function unmatricize(
121108 return unmatricize (m, blocked_axes)
122109end
123110
124- function unmatricize! (
125- a:: AbstractArray , m:: AbstractMatrix , biperm:: AbstractBlockPermutation{2}
126- )
111+ function unmatricize! (a, m:: AbstractMatrix , biperm:: AbstractBlockPermutation{2} )
127112 ndims (a) == length (biperm) ||
128113 throw (ArgumentError (" destination does not match permutation" ))
129114 blocked_axes = axes (a)[biperm]
0 commit comments