diff options
| author | Yong He <yonghe@outlook.com> | 2023-03-22 21:16:35 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-22 21:16:35 -0700 |
| commit | 259a015feb9d4ab65e8fbba32f6c777e92780cc7 (patch) | |
| tree | 45bd4cb9217325c67f5a27d8562b0e7e6b79bb77 /source/core | |
| parent | d4f99c8bac8b28f18c864a717d8833db6a1c872d (diff) | |
Type legalization and autodiff bug fixes. (#2722)
* Bug fixes.
* Fix.
* Only perform autodiff for functions whose derivative is actually used.
* Fix loop optimize bug.
* Fix high order diff.
* Fix trivial diff func generation.
* Fixes.
* Cleanup.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/core')
| -rw-r--r-- | source/core/slang-dictionary.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/core/slang-dictionary.h b/source/core/slang-dictionary.h index e923832e5..fffec9640 100644 --- a/source/core/slang-dictionary.h +++ b/source/core/slang-dictionary.h @@ -648,6 +648,14 @@ namespace Slang { return dict.AddIfNotExists(_Move(obj), _DummyClass()); } + bool add(const T& obj) + { + return dict.AddIfNotExists(obj, _DummyClass()); + } + bool add(T&& obj) + { + return dict.AddIfNotExists(_Move(obj), _DummyClass()); + } void Remove(const T & obj) { dict.Remove(obj); |
