summaryrefslogtreecommitdiffstats
path: root/build/visual-studio
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2023-08-16 08:57:47 +0800
committerGitHub <noreply@github.com>2023-08-16 08:57:47 +0800
commit45d9961a6a86d184248ef84f6a07125b0c224f97 (patch)
treec91d9b9aa722ceb727f7f1c8c2041d7d2bb13466 /build/visual-studio
parente34b005c47d265105e7bba509cadaa3e225237af (diff)
Use ankerl/unordered_dense as a hashmap implementation (#3036)
* Correct namespace for getClockFrequency * missing const * Add missing assignment operator * Remove unused variables * Return correct modified variable * Use stable hash code for file system identity * terse static_assert * Structured binding for map iteration * Make (==) and getHashCode const on many structs * Add ConstIterator for LinkedList * Replace uses of ItemProxy::getValue with Dictionary::at * Extract list of loads from gradientsMap before updating it * Const correctness in type layout * Add unordered_dense hashmap submodule * Use wyhash or getHashCode in slang-hash.h * refactor slang-hash.h * Use ankerl/unordered_dense as a hashmap implementation Notable changes: - The subscript operator returns a reference directly to the value, rather than a lazy ItemProxy (pair of dict pointer and key) slang-profile time (95% over 10 runs): - Before: 6.3913906 (±0.0746) - After: 5.9276123 (±0.0964) * 64 bit hash for strings So they have the same hash as char buffers with the same contents * Narrowing warnings for gcc to match msvc * revert back to c++17 * Correct c++ version for msvc * Use path to unordered_dense which keeps tests happy * Do not assign to and read from map in same expression * Remove redundant map operations in primal-hoist * Split out stable hash functions into slang-stable-hash.h * 64 bit hash by default * regenerate vs projects * Correct return type from HashSetBase::getCount() * correct width for call to Dictionary::reserve * Use stable hash for obfuscated module ids * Signed int for reserve * clearer variable naming * Parameterize Dictionary on hash and equality functors * Allow heterogenous lookup for Dictionary * missing const * Use set over operator[] in some places * Remove unused function * s/at/getValue
Diffstat (limited to 'build/visual-studio')
-rw-r--r--build/visual-studio/core/core.vcxproj1
-rw-r--r--build/visual-studio/core/core.vcxproj.filters3
-rw-r--r--build/visual-studio/slang-rt/slang-rt.vcxproj1
-rw-r--r--build/visual-studio/slang-rt/slang-rt.vcxproj.filters3
4 files changed, 8 insertions, 0 deletions
diff --git a/build/visual-studio/core/core.vcxproj b/build/visual-studio/core/core.vcxproj
index abecd620a..80a791a13 100644
--- a/build/visual-studio/core/core.vcxproj
+++ b/build/visual-studio/core/core.vcxproj
@@ -320,6 +320,7 @@
<ClInclude Include="..\..\..\source\core\slang-short-list.h" />
<ClInclude Include="..\..\..\source\core\slang-signal.h" />
<ClInclude Include="..\..\..\source\core\slang-smart-pointer.h" />
+ <ClInclude Include="..\..\..\source\core\slang-stable-hash.h" />
<ClInclude Include="..\..\..\source\core\slang-std-writers.h" />
<ClInclude Include="..\..\..\source\core\slang-stream.h" />
<ClInclude Include="..\..\..\source\core\slang-string-escape-util.h" />
diff --git a/build/visual-studio/core/core.vcxproj.filters b/build/visual-studio/core/core.vcxproj.filters
index 607e9451e..0c06e36f2 100644
--- a/build/visual-studio/core/core.vcxproj.filters
+++ b/build/visual-studio/core/core.vcxproj.filters
@@ -174,6 +174,9 @@
<ClInclude Include="..\..\..\source\core\slang-smart-pointer.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\..\..\source\core\slang-stable-hash.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
<ClInclude Include="..\..\..\source\core\slang-std-writers.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/build/visual-studio/slang-rt/slang-rt.vcxproj b/build/visual-studio/slang-rt/slang-rt.vcxproj
index 09d27d621..bd972fd6b 100644
--- a/build/visual-studio/slang-rt/slang-rt.vcxproj
+++ b/build/visual-studio/slang-rt/slang-rt.vcxproj
@@ -332,6 +332,7 @@
<ClInclude Include="..\..\..\source\core\slang-short-list.h" />
<ClInclude Include="..\..\..\source\core\slang-signal.h" />
<ClInclude Include="..\..\..\source\core\slang-smart-pointer.h" />
+ <ClInclude Include="..\..\..\source\core\slang-stable-hash.h" />
<ClInclude Include="..\..\..\source\core\slang-std-writers.h" />
<ClInclude Include="..\..\..\source\core\slang-stream.h" />
<ClInclude Include="..\..\..\source\core\slang-string-escape-util.h" />
diff --git a/build/visual-studio/slang-rt/slang-rt.vcxproj.filters b/build/visual-studio/slang-rt/slang-rt.vcxproj.filters
index 2dcb22999..3b9e2b59e 100644
--- a/build/visual-studio/slang-rt/slang-rt.vcxproj.filters
+++ b/build/visual-studio/slang-rt/slang-rt.vcxproj.filters
@@ -174,6 +174,9 @@
<ClInclude Include="..\..\..\source\core\slang-smart-pointer.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\..\..\source\core\slang-stable-hash.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
<ClInclude Include="..\..\..\source\core\slang-std-writers.h">
<Filter>Header Files</Filter>
</ClInclude>