File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 168
168
169
169
Chooses [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl) while exploiting sparsity.
170
170
"""
171
- struct AutoSparseFiniteDiff <: AbstractSparseFiniteDifferences end
171
+ Base. @kwdef struct AutoSparseFiniteDiff{T1, T2, T3} <: AbstractSparseFiniteDifferences
172
+ fdtype:: T1 = Val (:forward )
173
+ fdjtype:: T2 = fdtype
174
+ fdhtype:: T3 = Val (:hcentral )
175
+ end
172
176
173
177
"""
174
178
AutoSparseForwardDiff{chunksize,T}
Original file line number Diff line number Diff line change @@ -77,6 +77,9 @@ struct CustomTag end
77
77
adtype = AutoSparseFiniteDiff ()
78
78
@test adtype isa ADTypes. AbstractADType
79
79
@test adtype isa AutoSparseFiniteDiff
80
+ @test adtype. fdtype === Val (:forward )
81
+ @test adtype. fdjtype === Val (:forward )
82
+ @test adtype. fdhtype === Val (:hcentral )
80
83
81
84
adtype = AutoSparseForwardDiff ()
82
85
@test adtype isa ADTypes. AbstractADType
You can’t perform that action at this time.
0 commit comments