You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- all the elements of `other_contexts` have the same type and size as the corresponding elements of `contexts`
127
143
128
-
- the inputs `x` and `other_x` have the same types and sizes
129
-
- the tangents in `t` and `other_t` have the same types and sizes
144
+
For same-point preparation, the same rules hold with two modifications:
130
145
131
-
For same-point preparation, the output `prep` of `prepare_op_same_point(f, b, x, [t])` can be reused in `op(f, prep, b, x, other_t)`, provided that:
146
+
-`other_x` must be _equal_ to `x`
147
+
- any element of `other_contexts` with type `Constant` must be _equal_ to the corresponding element of `contexts`
132
148
133
-
- the input `x` remains exactly the same (as well as any [`Constant`](@ref) context)
134
-
- the tangents in `t` and `other_t` have the same types and sizes
149
+
!!! danger
150
+
Reusing preparation with different types or sizes may work with some backends and error with others, so it is not allowed by the API of DifferentiationInterface.
135
151
136
152
!!! warning
137
153
These rules hold for the majority of backends, but there are some exceptions.
0 commit comments