diff options
| author | Yong He <yonghe@outlook.com> | 2022-10-26 08:32:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-26 08:32:24 -0700 |
| commit | 939be44ca23476e622dfb24a592383fe2a1da61f (patch) | |
| tree | 7f45645897fe5735d58a7687290552d479e4d6fc /source/slang/diff.meta.slang | |
| parent | 4fc34b18da2f83ee6b4f094067503a66cab3d0b5 (diff) | |
Auto synthesis of Differential type (#2466)
Diffstat (limited to 'source/slang/diff.meta.slang')
| -rw-r--r-- | source/slang/diff.meta.slang | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/diff.meta.slang b/source/slang/diff.meta.slang index 26fec224c..f314e0487 100644 --- a/source/slang/diff.meta.slang +++ b/source/slang/diff.meta.slang @@ -18,6 +18,10 @@ attribute_syntax [__custom_jvp(function)] : CustomJVPAttribute; __magic_type(DifferentiableType) interface IDifferentiable { + // Note: the compiler implementation requires the `Differential` associated type to be defined + // before anything else. + + [__BuiltinAssociatedTypeRequirementAttribute(_BuiltinAssociatedTypeRequirementKind.Differential)] associatedtype Differential; static Differential zero(); |
