diff options
| author | Theresa Foley <tfoleyNV@users.noreply.github.com> | 2021-11-11 12:07:07 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-11 12:07:07 -0800 |
| commit | ab8eeeafa2eae54dda78b5fa347bb93c808990f5 (patch) | |
| tree | 9f720da0fc8253bbe8fd80cdbd9f3d8ef50de288 /source/slang/slang-emit-cpp.cpp | |
| parent | 8a9e518371df03b3f382e0fe869da83751fdda0b (diff) | |
Fix a bug in CUDA source emit (#2010)
It seems that we were missing a `template<>` prefix when emitting explicit specializations for the `Matrix<...>` type in the CUDA prelude. This might not have caused errors in some versions of the CUDA compiler, but it at least seems to fail on the 11.5 SDK, which I am using to test locally.
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
| -rw-r--r-- | source/slang/slang-emit-cpp.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index 7e70b73e2..cb6c210be 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -262,6 +262,7 @@ void CPPSourceEmitter::emitTypeDefinition(IRType* inType) UnownedStringSlice typeName = _getTypeName(type); UnownedStringSlice rowTypeName = _getTypeName(vecType); + writer->emit("template<>\n"); writer->emit("struct "); writer->emit(typeName); writer->emit("\n{\n"); |
