@@ -95,15 +95,16 @@ An abstract trait that is used to determine how axes are combined when calling `
95
95
"""
96
96
abstract type BroadcastAxis end
97
97
98
- @assume_effects :total function _find_first_true (isi:: Tuple{Vararg{Bool, N}} ) where {N}
98
+ @assume_effects :total function _find_first_true (isi:: Tuple{Vararg{Union{ Bool, Static.StaticBool} , N}} ) where {N}
99
99
for i in 1 : N
100
- getfield (isi, i) && return i
100
+ x = getfield (isi, i)
101
+ if (x isa Bool && x === true ) || x isa Static. True
102
+ return i
103
+ end
101
104
end
102
105
return nothing
103
106
end
104
107
105
- _find_first_true (:: Tuple{Static.True, Bool} ) = 1
106
-
107
108
"""
108
109
IndicesInfo{N}(inds::Tuple) -> IndicesInfo{N}(typeof(inds))
109
110
IndicesInfo{N}(T::Type{<:Tuple}) -> IndicesInfo{N,pdims,cdims}()
@@ -218,11 +219,12 @@ struct IndicesInfo{Np, pdims, cdims, Nc}
218
219
IndicesInfo (x:: SubArray ) = IndicesInfo {ndims(parent(x))} (typeof (x. indices))
219
220
end
220
221
221
- @inline function _map_splats (nsplat:: Int , splat_index:: Int , dims:: Tuple{Vararg{Int}} )
222
+ @inline function _map_splats (nsplat:: Int , splat_index:: Int , dims:: Tuple{Vararg{Union{ Int,StaticInt} }} )
222
223
ntuple (length (dims)) do i
223
224
i === splat_index ? (nsplat * getfield (dims, i)) : getfield (dims, i)
224
225
end
225
226
end
227
+
226
228
@inline function _accum_dims (csdims:: NTuple{N, Int} , nd:: NTuple{N, Int} ) where {N}
227
229
ntuple (N) do i
228
230
nd_i = getfield (nd, i)
0 commit comments