Revision 3e2cb34bf112722368c296130b1424de267d2b3c authored by Tim Foley on 17 September 2020, 00:45:07 UTC, committed by GitHub on 17 September 2020, 00:45:07 UTC
The logic we use to compute `SV_DispatchThreadID` and friends for CUDA makes use of the `gridDim` and `blockDim` built-in variables in CUDA. These variables have type `dim3` which is similar to `uint3` but is considered a distinct type for some reason. The logic for computing the `SV`s currently pretends that `gridDim` and `blockDim` are `uint3`s, and this means that the code they emit doesn't always compile cleanly (although it does in our existing test cases...). This change adds a few overloads that work on `dim3` to the CUDA prelude and that seem to make the code we emit work again. Note: This change should be seen as a somewhat hacky quick fix rather than a real resolution to the underlying issue. It is probably better if we emit code that replaces uses of `gridDim` with `uint3(gridDim.x, gridDim.y, gridDim.z)` instead, to ensure that we get the typing correct, even if the result looks less idiomatic.
1 parent 8dd0d26
File | Mode | Size |
---|---|---|
docs | ||
examples | ||
external | ||
extras | ||
prelude | ||
source | ||
tests | ||
tools | ||
.editorconfig | -rw-r--r-- | 937 bytes |
.gitattributes | -rw-r--r-- | 95 bytes |
.gitignore | -rw-r--r-- | 759 bytes |
.gitmodules | -rw-r--r-- | 774 bytes |
.travis.yml | -rw-r--r-- | 2.1 KB |
CODE_OF_CONDUCT.md | -rw-r--r-- | 3.1 KB |
LICENSE | -rw-r--r-- | 1.1 KB |
README.md | -rw-r--r-- | 7.4 KB |
appveyor.yml | -rw-r--r-- | 4.0 KB |
premake.bat | -rw-r--r-- | 120 bytes |
premake5.lua | -rw-r--r-- | 38.6 KB |
slang-com-helper.h | -rw-r--r-- | 4.8 KB |
slang-com-ptr.h | -rw-r--r-- | 4.8 KB |
slang-tag-version.h | -rw-r--r-- | 36 bytes |
slang.h | -rw-r--r-- | 130.3 KB |
slang.sln | -rw-r--r-- | 13.7 KB |
test.bat | -rw-r--r-- | 1.4 KB |
travis_build.sh | -rw-r--r-- | 460 bytes |
travis_test.sh | -rw-r--r-- | 435 bytes |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...