You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Performance optimization: broadcast!(identity, dest, A) is equivalent to copyto!(dest, A) if indices match
50
+
if bc.f === identity && bc.args isa Tuple{AbstractArray} # only a single input argument to broadcast!
51
+
A = bc.args[1]
52
+
ifaxes(dest) ==axes(A)
53
+
returncopyto!(dest′, A)
54
+
end
55
+
end
56
+
bcs′ =preprocess(diffeqbc, dest, bc)
57
+
@simd ivdep for I ineachindex(bcs′)
58
+
@inbounds dest′[I] = bcs′[I]
59
+
end
60
+
return dest′ # return the original array without the wrapper
61
+
end
60
62
end
61
63
62
64
# Forcing `broadcasted` to inline is not necessary, since `Vern9` plays well
@@ -79,12 +81,12 @@ macro ..(x)
79
81
expr = Base.Broadcast.__dot__(x)
80
82
if expr.head in (:(.=), :(.+=), :(.-=), :(.*=), :(./=), :(.\=), :(.^=)) # we exclude `÷=` `%=` `&=` `|=` `⊻=` `>>>=` `>>=` `<<=` because they are for integers
0 commit comments