File tree Expand file tree Collapse file tree 5 files changed +225
-127
lines changed Expand file tree Collapse file tree 5 files changed +225
-127
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ pub struct AutoDiffAttrs {
7777 /// e.g. in the [JAX
7878 /// Documentation](https://jax.readthedocs.io/en/latest/_tutorials/advanced-autodiff.html#how-it-s-made-two-foundational-autodiff-functions).
7979 pub mode : DiffMode ,
80+ pub width : u32 ,
8081 pub ret_activity : DiffActivity ,
8182 pub input_activity : Vec < DiffActivity > ,
8283}
@@ -222,13 +223,15 @@ impl AutoDiffAttrs {
222223 pub const fn error ( ) -> Self {
223224 AutoDiffAttrs {
224225 mode : DiffMode :: Error ,
226+ width : 0 ,
225227 ret_activity : DiffActivity :: None ,
226228 input_activity : Vec :: new ( ) ,
227229 }
228230 }
229231 pub fn source ( ) -> Self {
230232 AutoDiffAttrs {
231233 mode : DiffMode :: Source ,
234+ width : 0 ,
232235 ret_activity : DiffActivity :: None ,
233236 input_activity : Vec :: new ( ) ,
234237 }
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ builtin_macros_autodiff_ret_activity = invalid return activity {$act} in {$mode}
7979builtin_macros_autodiff_ty_activity = { $act } can not be used for this type
8080builtin_macros_autodiff_unknown_activity = did not recognize Activity: `{ $act } `
8181
82+ builtin_macros_autodiff_width = autodiff width must fit u32, but is { $width }
8283builtin_macros_bad_derive_target = `derive` may only be applied to `struct`s, `enum`s and `union`s
8384 .label = not applicable here
8485 .label2 = not a `struct`, `enum` or `union`
You can’t perform that action at this time.
0 commit comments