diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2023-08-01 12:43:51 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-01 12:43:51 +0800 |
| commit | c34a7b6627d4c07531daf7d99dceaf7f89bd1c0a (patch) | |
| tree | 36eef7ee055c3706bce32493f47fddb5c0af3a4f /source/core | |
| parent | 5349241098076bead63f638daf2e4b9a9cb3e496 (diff) | |
Generalize collectInductionValues (#3031)
* Generalize collectInductionValues
* Support affine transformations of loop index as induction variables
* Test for generalized induction value collection
* Neaten inductive variable finding
* Store the type of implication success when finding inductive variables
* Test that loop induction finding does not alway succeed
* Support chains of additions and branches of additions in induction variable finding
* Use c++17 for downstream compilers
Diffstat (limited to 'source/core')
| -rw-r--r-- | source/core/slang-hash.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/core/slang-hash.h b/source/core/slang-hash.h index 8c4fbac42..bc4b30ccc 100644 --- a/source/core/slang-hash.h +++ b/source/core/slang-hash.h @@ -164,6 +164,13 @@ namespace Slang return PointerHash<std::is_pointer<TKey>::value>::getHashCode(key); } + template<typename TKey> + HashCode getHashCodeBytewise(const TKey& t) + { + static_assert(std::has_unique_object_representations_v<TKey>); + return getHashCode(reinterpret_cast<const char*>(&t), sizeof(TKey)); + } + inline HashCode combineHash(HashCode left, HashCode right) { return (left * 16777619) ^ right; |
