summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-impl.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-01-19 08:58:20 -0800
committerGitHub <noreply@github.com>2023-01-19 08:58:20 -0800
commit6fae15cd1210d8b664243d640e70ca47dccf9752 (patch)
treed3235149f587ed18147f7a0d916932e199dce888 /source/slang/slang-check-impl.h
parent0586f3298fa7d554fa2682103eefba88740d6758 (diff)
Add diagnostic for calling non-bwd-diff func from bwd-diff func. (#2602)
Diffstat (limited to 'source/slang/slang-check-impl.h')
-rw-r--r--source/slang/slang-check-impl.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/slang/slang-check-impl.h b/source/slang/slang-check-impl.h
index fb47a38c1..6099febb5 100644
--- a/source/slang/slang-check-impl.h
+++ b/source/slang/slang-check-impl.h
@@ -11,7 +11,12 @@
namespace Slang
{
-
+ enum class FunctionDifferentiableLevel
+ {
+ None,
+ Forward,
+ Backward
+ };
/// Should the given `decl` be treated as a static rather than instance declaration?
bool isEffectivelyStatic(
Decl* decl);
@@ -292,6 +297,7 @@ namespace Slang
bool isDifferentiableFunc(FunctionDeclBase* func);
bool isBackwardDifferentiableFunc(FunctionDeclBase* func);
+ FunctionDifferentiableLevel getFuncDifferentiableLevel(FunctionDeclBase* func);
private:
/// Mapping from type declarations to the known extensiosn that apply to them