summaryrefslogtreecommitdiff
path: root/tests/autodiff/getter-setter-multi.slang
diff options
context:
space:
mode:
authorSai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com>2023-07-26 17:15:21 -0400
committerGitHub <noreply@github.com>2023-07-26 17:15:21 -0400
commitba89fc84267bfd09f1c8abf10a5b85d09bbc79de (patch)
tree2c79fc5dafb89a030d22fa86cd6fa3d69a89a785 /tests/autodiff/getter-setter-multi.slang
parentb8ade05df10a2774d3da5ef1fb2c7479ff48989a (diff)
Refactor `dmul(This, Differential)` to `dmul<T:Real>(T, Differential)` (#3029)
* Refactor `dmul(This, Differential)` to `dmul<T:Real>(T, Differential)` - Add AST synthesis support for generic containers - Refactor relevant tests * Merge dmul synthesis with dadd and dzero, and disambiguate using an enum * Fix trailing spaces
Diffstat (limited to 'tests/autodiff/getter-setter-multi.slang')
-rw-r--r--tests/autodiff/getter-setter-multi.slang4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/autodiff/getter-setter-multi.slang b/tests/autodiff/getter-setter-multi.slang
index 9055e860a..9f03ac4eb 100644
--- a/tests/autodiff/getter-setter-multi.slang
+++ b/tests/autodiff/getter-setter-multi.slang
@@ -34,9 +34,9 @@ struct A : IDifferentiable
}
[__unsafeForceInlineEarly]
- static Differential dmul(This a, Differential b)
+ static Differential dmul<T: __BuiltinRealType>(T a, Differential b)
{
- B o = {a.x * b.z};
+ B o = {__realCast<float, T>(a) * b.z};
return o;
}
};