Skip to content

Commit f62e401

Browse files
giordanonsajko
andauthored
Define Base.dataids method for FixedSizeArrays (#64)
Co-authored-by: Neven Sajko <s@purelymail.com>
1 parent c14fbe8 commit f62e401

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/FixedSizeArrays.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,4 +392,11 @@ function collect_as(::Type{T}, iterator) where {T<:FixedSizeArray}
392392
collect_as_fsa_checked(iterator, spec, dim_count, len_stat)::T
393393
end
394394

395+
if isdefined(Base, :dataids) && (Base.dataids isa Function)
396+
# This is an internal, non-public function which is nevertheless needed to
397+
# get good performance in some cases (e.g. broadcasting):
398+
# <https://github.com/JuliaArrays/FixedSizeArrays.jl/issues/63>.
399+
Base.dataids(a::FixedSizeArray) = Base.dataids(a.mem)
400+
end
401+
395402
end # module FixedSizeArrays

0 commit comments

Comments
 (0)