From f62e4012536acc6aea9e282fedcb3dd6fd09f5a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= <765740+giordano@users.noreply.github.com> Date: Mon, 7 Oct 2024 20:41:38 +0100 Subject: [PATCH] Define `Base.dataids` method for FixedSizeArrays (#64) Co-authored-by: Neven Sajko --- src/FixedSizeArrays.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/FixedSizeArrays.jl b/src/FixedSizeArrays.jl index 41c1394..3b1e484 100644 --- a/src/FixedSizeArrays.jl +++ b/src/FixedSizeArrays.jl @@ -392,4 +392,11 @@ function collect_as(::Type{T}, iterator) where {T<:FixedSizeArray} collect_as_fsa_checked(iterator, spec, dim_count, len_stat)::T end +if isdefined(Base, :dataids) && (Base.dataids isa Function) + # This is an internal, non-public function which is nevertheless needed to + # get good performance in some cases (e.g. broadcasting): + # . + Base.dataids(a::FixedSizeArray) = Base.dataids(a.mem) +end + end # module FixedSizeArrays