summaryrefslogtreecommitdiff
path: root/source/slang/diff.meta.slang
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-08-28 23:52:04 -0700
committerGitHub <noreply@github.com>2024-08-28 23:52:04 -0700
commitaaf3f5e97aaa3a256f4ca938251d011c125b9491 (patch)
tree139f4dc52d3c6c84ae4fb0c148fa309cdfc0ed3c /source/slang/diff.meta.slang
parente9f52a694710d793c7032bbb6175a452618f1b23 (diff)
Make sure `NullDifferential` and its witness are removed after autodiff. (#4958)
* Make sure `NullDifferential` and its witness are removed after autodiff. * Fix. * Add a test.
Diffstat (limited to 'source/slang/diff.meta.slang')
-rw-r--r--source/slang/diff.meta.slang1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/slang/diff.meta.slang b/source/slang/diff.meta.slang
index 80aca230a..b9cc0b103 100644
--- a/source/slang/diff.meta.slang
+++ b/source/slang/diff.meta.slang
@@ -26,6 +26,7 @@ __attributeTarget(FunctionDeclBase)
attribute_syntax [NoDiffThis] : NoDiffThisAttribute;
// A 'none-type' that acts as a run-time sentinel for zero differentials.
+[__AutoDiffBuiltin]
export struct NullDifferential : IDifferentiable
{
// for now, we'll use at least one field to make sure the type is non-empty