@@ -82,14 +82,7 @@ function mypartials!(::Type{T}, ty::NTuple{B}, ydual) where {T,B}
8282 return ty
8383end
8484
85- # store preparation result with the right input eltype
86- struct PrepContext{T<: DI.Prep } <: DI.Context
87- data:: T
88- end
89-
90- NotCache = Union{DI. GeneralizedConstant,PrepContext}
91-
92- _translate (:: Type{D} , c:: NotCache ) where {D<: Dual } = DI. unwrap (c)
85+ _translate (:: Type{D} , c:: DI.GeneralizedConstant ) where {D<: Dual } = DI. unwrap (c)
9386function _translate (:: Type{D} , c:: DI.Cache ) where {D<: Dual }
9487 c0 = DI. unwrap (c)
9588 return similar (c0, D)
@@ -102,7 +95,7 @@ function translate(::Type{D}, contexts::NTuple{C,DI.Context}) where {D<:Dual,C}
10295 return new_contexts
10396end
10497
105- _translate_toprep (:: Type{D} , c:: NotCache ) where {D<: Dual } = nothing
98+ _translate_toprep (:: Type{D} , c:: DI.GeneralizedConstant ) where {D<: Dual } = nothing
10699function _translate_toprep (:: Type{D} , c:: DI.Cache ) where {D<: Dual }
107100 c0 = DI. unwrap (c)
108101 return similar (c0, D)
@@ -115,7 +108,7 @@ function translate_toprep(::Type{D}, contexts::NTuple{C,DI.Context}) where {D<:D
115108 return new_contexts
116109end
117110
118- _translate_prepared (c:: NotCache , _pc) = DI. unwrap (c)
111+ _translate_prepared (c:: DI.GeneralizedConstant , _pc) = DI. unwrap (c)
119112_translate_prepared (_c:: DI.Cache , pc) = pc
120113
121114function translate_prepared (
0 commit comments