diff options
| author | Yong He <yonghe@outlook.com> | 2022-12-01 18:55:43 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-01 18:55:43 -0800 |
| commit | e7df8538eb8f0ed06f0838d946bec8e9e0fe0985 (patch) | |
| tree | 3c08e646600ab82ffda260f2b6deb96dd2085776 /source/slang/diff.meta.slang | |
| parent | f51f69d045d9e0b83d9ab1f4623d4319ce1867be (diff) | |
Allow `no_diff` on `this` parameter. (#2543)
Diffstat (limited to 'source/slang/diff.meta.slang')
| -rw-r--r-- | source/slang/diff.meta.slang | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/slang/diff.meta.slang b/source/slang/diff.meta.slang index 69ced9156..033c173ab 100644 --- a/source/slang/diff.meta.slang +++ b/source/slang/diff.meta.slang @@ -11,13 +11,16 @@ attribute_syntax [ForwardDerivative(function)] : ForwardDerivativeAttribute; __attributeTarget(FunctionDeclBase) attribute_syntax [BackwardDifferentiable] : BackwardDifferentiableAttribute; - __attributeTarget(FunctionDeclBase) attribute_syntax [ForwardDerivativeOf(function)] : ForwardDerivativeOfAttribute; __attributeTarget(DeclBase) attribute_syntax [DerivativeMember(memberName)] : DerivativeMemberAttribute; +// Exclude "this" parameter from differentiation. +__attributeTarget(FunctionDeclBase) +attribute_syntax [NoDiffThis] : NoDiffThisAttribute; + /// Pair type that serves to wrap the primal and /// differential types of an arbitrary type T. |
