File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 11length (a:: SA ) where {SA <: StaticArray } = prod (Size (SA))
22length (a:: Type{SA} ) where {SA <: StaticArray } = prod (Size (SA))
33
4- size (:: StaticArray{S} ) where {S} = get (Size (S))
5- @pure size (:: Type{<:StaticArray{S}} ) where {S} = get (Size (S))
6-
7- size (:: SA , d:: Int ) where {SA <: StaticArray } = Size (SA)[d]
8- @pure size (:: Type{SA} , d:: Int ) where {SA <: StaticArray } = Size (SA)[d]
4+ @pure size (:: Type{<:StaticArray{S}} ) where S = tuple (S. parameters... )
5+ @inline function size (t:: Type{<:StaticArray} , d:: Int )
6+ S = size (t)
7+ d > length (S) ? 1 : S[d]
8+ end
9+ @inline size (a:: StaticArray ) = size (typeof (a))
10+ @inline size (a:: StaticArray , d:: Int ) = size (typeof (a), d)
911
1012# This seems to confuse Julia a bit in certain circumstances (specifically for trailing 1's)
1113@inline function Base. isassigned (a:: StaticArray , i:: Int... )
You can’t perform that action at this time.
0 commit comments