Skip to content

Commit 31a76d4

Browse files
committed
Fix printing
1 parent 50ce141 commit 31a76d4

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

src/dense.jl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ function Base.show(io::IO, backend::AutoForwardDiff{chunksize}) where {chunksize
185185
print(io, ")")
186186
end
187187

188-
189188
"""
190189
AutoGTPSA{D}
191190
@@ -201,11 +200,10 @@ Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
201200
202201
- `descriptor::D`: can be either
203202
204-
+ a GTPSA `Descriptor` specifying the number of variables/parameters, parameter
205-
order, individual variable/parameter truncation orders, and maximum order. See
203+
+ a GTPSA `Descriptor` specifying the number of variables/parameters, parameter
204+
order, individual variable/parameter truncation orders, and maximum order. See
206205
the [GTPSA.jl documentation](https://bmad-sim.github.io/GTPSA.jl/stable/man/c_descriptor/) for more details.
207206
+ `nothing` to automatically use a `Descriptor` given the context.
208-
209207
"""
210208
Base.@kwdef struct AutoGTPSA{D} <: AbstractADType
211209
descriptor::D = nothing
@@ -215,12 +213,10 @@ mode(::AutoGTPSA) = ForwardMode()
215213

216214
function Base.show(io::IO, backend::AutoGTPSA{D}) where {D}
217215
print(io, AutoGTPSA, "(")
218-
D != Nothing && print(io, "descriptor=\n", repr(backend.descriptor; context = io))
216+
D != Nothing && print(io, "descriptor=", repr(backend.descriptor; context = io))
219217
print(io, ")")
220218
end
221219

222-
223-
224220
"""
225221
AutoPolyesterForwardDiff{chunksize,T}
226222

test/misc.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ for backend in [
3333
ADTypes.AutoFiniteDifferences(; fdm = :fdm),
3434
ADTypes.AutoForwardDiff(),
3535
ADTypes.AutoForwardDiff(chunksize = 3, tag = :tag),
36+
ADTypes.AutoGTPSA(),
37+
ADTypes.AutoGTPSA(; descriptor = Val(:descriptor)),
3638
ADTypes.AutoPolyesterForwardDiff(),
3739
ADTypes.AutoPolyesterForwardDiff(chunksize = 3, tag = :tag),
3840
ADTypes.AutoReverseDiff(),

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function every_ad_with_options()
6666
AutoForwardDiff(),
6767
AutoForwardDiff(chunksize = 3, tag = :tag),
6868
AutoGTPSA(),
69-
AutoGTPSA(descriptor=:descriptor),
69+
AutoGTPSA(descriptor = Val(:descriptor)),
7070
AutoPolyesterForwardDiff(),
7171
AutoPolyesterForwardDiff(chunksize = 3, tag = :tag),
7272
AutoReverseDiff(),

0 commit comments

Comments
 (0)