Skip to content

Commit c9b2692

Browse files
Merge pull request #39 from prbzrg/support-dot
Support dot broadcast
2 parents dd87ccf + ba9a476 commit c9b2692

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/ADTypes.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ Chooses [FastDifferentiation.jl](https://github.com/brianguenter/FastDifferentia
249249
"""
250250
struct AutoSparseFastDifferentiation <: AbstractSparseSymbolicDifferentiationMode end
251251

252+
Base.broadcastable(ad::AbstractADType) = Ref(ad)
253+
252254
export AutoChainRules,
253255
AutoDiffractor,
254256
AutoFiniteDiff,

test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,6 @@ struct CustomTag end
106106
adtype = AutoSparseFastDifferentiation()
107107
@test adtype isa ADTypes.AbstractADType
108108
@test adtype isa AutoSparseFastDifferentiation
109+
110+
@test identity.(adtype) == adtype
109111
end

0 commit comments

Comments
 (0)