Skip to content

Commit 5c5a22d

Browse files
Fix FastBroadcast extension for v1.0 API
Update RecursiveArrayToolsFastBroadcastExt to use FastBroadcast v1.0's 2-arg fast_materialize!(dst, bc) signature instead of the old 4-arg fast_materialize!(::Static.False, ::DB, dst, bc). The 2-arg method is the base dispatch point that Serial() delegates to, so this covers all non-threaded paths. Require FastBroadcast >= 1.1. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1b7261e commit 5c5a22d

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Adapt = "4"
4747
Aqua = "0.8"
4848
ArrayInterface = "7.16"
4949
DocStringExtensions = "0.9.3"
50-
FastBroadcast = "0.3.5, 1"
50+
FastBroadcast = "1.1"
5151
ForwardDiff = "0.10.38, 1"
5252
GPUArraysCore = "0.2"
5353
KernelAbstractions = "0.9.36"

ext/RecursiveArrayToolsFastBroadcastExt.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ module RecursiveArrayToolsFastBroadcastExt
22

33
using RecursiveArrayTools
44
using FastBroadcast
5+
using FastBroadcast: Serial, Threaded
56
using StaticArraysCore
67

78
const AbstractVectorOfSArray = AbstractVectorOfArray{
89
T, N, <:AbstractVector{<:StaticArraysCore.SArray},
910
} where {T, N}
1011

12+
# Override the base 2-arg path (called by Serial dispatch and direct macro path)
1113
@inline function FastBroadcast.fast_materialize!(
12-
::FastBroadcast.Static.False, ::DB, dst::AbstractVectorOfSArray,
14+
dst::AbstractVectorOfSArray,
1315
bc::Broadcast.Broadcasted{S}
14-
) where {S, DB}
16+
) where {S}
1517
if FastBroadcast.use_fast_broadcast(S)
1618
for i in 1:length(dst.u)
1719
unpacked = RecursiveArrayTools.unpack_voa(bc, i)

0 commit comments

Comments
 (0)