Skip to content

Commit 1995295

Browse files
committed
Move StaticArrayStyle to core package
1 parent c97edbf commit 1995295

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/StaticArraysCore.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,4 +384,9 @@ array operations as in the example below.
384384
"""
385385
abstract type FieldVector{N, T} <: FieldArray{Tuple{N}, T, 1} end
386386

387+
# Add a new BroadcastStyle for StaticArrays, derived from AbstractArrayStyle
388+
# A constructor that changes the style parameter N (array dimension) is also required
389+
struct StaticArrayStyle{N} <: Base.Broadcast.AbstractArrayStyle{N} end
390+
StaticArrayStyle{M}(::Val{N}) where {M,N} = StaticArrayStyle{N}()
391+
387392
end # module

0 commit comments

Comments
 (0)