@@ -95,15 +95,16 @@ An abstract trait that is used to determine how axes are combined when calling `
9595"""
9696abstract type BroadcastAxis end
9797
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}
9999 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
101104 end
102105 return nothing
103106end
104107
105- _find_first_true (:: Tuple{Static.True, Bool} ) = 1
106-
107108"""
108109 IndicesInfo{N}(inds::Tuple) -> IndicesInfo{N}(typeof(inds))
109110 IndicesInfo{N}(T::Type{<:Tuple}) -> IndicesInfo{N,pdims,cdims}()
@@ -218,11 +219,12 @@ struct IndicesInfo{Np, pdims, cdims, Nc}
218219 IndicesInfo (x:: SubArray ) = IndicesInfo {ndims(parent(x))} (typeof (x. indices))
219220end
220221
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} }} )
222223 ntuple (length (dims)) do i
223224 i === splat_index ? (nsplat * getfield (dims, i)) : getfield (dims, i)
224225 end
225226end
227+
226228@inline function _accum_dims (csdims:: NTuple{N, Int} , nd:: NTuple{N, Int} ) where {N}
227229 ntuple (N) do i
228230 nd_i = getfield (nd, i)
0 commit comments