|
20 | 20 | mode(::AutoChainRules) = ForwardOrReverseMode() # specialized in the extension
|
21 | 21 |
|
22 | 22 | function Base.show(io::IO, backend::AutoChainRules)
|
23 |
| - print(io, "AutoChainRules(ruleconfig=$(backend.ruleconfig))") |
| 23 | + print(io, "AutoChainRules(ruleconfig=$(repr(backend.ruleconfig, context=io)))") |
24 | 24 | end
|
25 | 25 |
|
26 | 26 | """
|
@@ -66,7 +66,7 @@ function Base.show(io::IO, backend::AutoEnzyme)
|
66 | 66 | if isnothing(backend.mode)
|
67 | 67 | print(io, "AutoEnzyme()")
|
68 | 68 | else
|
69 |
| - print(io, "AutoEnzyme(mode=$(backend.mode))") |
| 69 | + print(io, "AutoEnzyme(mode=$(repr(backend.mode, context=io)))") |
70 | 70 | end
|
71 | 71 | end
|
72 | 72 |
|
@@ -113,13 +113,13 @@ mode(::AutoFiniteDiff) = ForwardMode()
|
113 | 113 | function Base.show(io::IO, backend::AutoFiniteDiff)
|
114 | 114 | s = "AutoFiniteDiff("
|
115 | 115 | if backend.fdtype != Val(:forward)
|
116 |
| - s *= "fdtype=$(backend.fdtype), " |
| 116 | + s *= "fdtype=$(repr(backend.fdtype, context=io)), " |
117 | 117 | end
|
118 | 118 | if backend.fdjtype != backend.fdtype
|
119 |
| - s *= "fdjtype=$(backend.fdjtype), " |
| 119 | + s *= "fdjtype=$(repr(backend.fdjtype, context=io)), " |
120 | 120 | end
|
121 | 121 | if backend.fdhtype != Val(:hcentral)
|
122 |
| - s *= "fdhtype=$(backend.fdhtype), " |
| 122 | + s *= "fdhtype=$(repr(backend.fdhtype, context=io)), " |
123 | 123 | end
|
124 | 124 | if endswith(s, ", ")
|
125 | 125 | s = s[1:(end - 2)]
|
|
150 | 150 | mode(::AutoFiniteDifferences) = ForwardMode()
|
151 | 151 |
|
152 | 152 | function Base.show(io::IO, backend::AutoFiniteDifferences)
|
153 |
| - print(io, "AutoFiniteDifferences(fdm=$(backend.fdm))") |
| 153 | + print(io, "AutoFiniteDifferences(fdm=$(repr(backend.fdm, context=io)))") |
154 | 154 | end
|
155 | 155 |
|
156 | 156 | """
|
@@ -188,7 +188,7 @@ function Base.show(io::IO, backend::AutoForwardDiff{chunksize}) where {chunksize
|
188 | 188 | s *= "chunksize=$chunksize, "
|
189 | 189 | end
|
190 | 190 | if backend.tag !== nothing
|
191 |
| - s *= "tag=$(backend.tag), " |
| 191 | + s *= "tag=$(repr(backend.tag, context=io)), " |
192 | 192 | end
|
193 | 193 | if endswith(s, ", ")
|
194 | 194 | s = s[1:(end - 2)]
|
@@ -232,7 +232,7 @@ function Base.show(io::IO, backend::AutoPolyesterForwardDiff{chunksize}) where {
|
232 | 232 | s *= "chunksize=$chunksize, "
|
233 | 233 | end
|
234 | 234 | if backend.tag !== nothing
|
235 |
| - s *= "tag=$(backend.tag), " |
| 235 | + s *= "tag=$(repr(backend.tag, context=io)), " |
236 | 236 | end
|
237 | 237 | if endswith(s, ", ")
|
238 | 238 | s = s[1:(end - 2)]
|
|
0 commit comments