summaryrefslogtreecommitdiffstats
path: root/source/core/slang-hex-dump-util.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-12-12 11:39:19 -0500
committerGitHub <noreply@github.com>2019-12-12 11:39:19 -0500
commit6e6a876a6b5ad3d2ef402757d2e20641f5a2b49b (patch)
tree29eab69c4982537376d7eaf422d9090c849e95f7 /source/core/slang-hex-dump-util.cpp
parent79ec0cfdb5f3461c763e0bf712cf42eb87fccb90 (diff)
Slang compiles CUDA source via NVRTC (#1151)
* CPPCompiler -> DownstreamCompiler * Added DownstreamCompileResult to start abstraction such that we don't need files. * * Split out slang-blob.cpp * Made CompileResult hold a DownstreamCompileResult - for access to binary or ISlangSharedLibrary * Keep temporary files in scope. * Add a hash to the hex dump stream. * Move all file tracking into DownstreamCompiler. * WIP support for nvrtc. * WIP: Adding support for nvrtc compiler. Adding enum types, wiring up the nvrtc into slang. * Fix remaining CPPCompiler references. * Fix order issue on target string matching. * Use ISlangSharedLibrary for nvrtc. * Use DownstreamCompiler for nvrtc. * WIP first pass at compilation win nvrtc. * Added testing if file is on file system into CommandLineDownstreamCompiler. Added sourceContentsPath. * Make test cuda-compile.cu work by just compiling not comparing output. * Fix warning on clang.
Diffstat (limited to 'source/core/slang-hex-dump-util.cpp')
-rw-r--r--source/core/slang-hex-dump-util.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/core/slang-hex-dump-util.cpp b/source/core/slang-hex-dump-util.cpp
index 1583d8461..b0bd6f923 100644
--- a/source/core/slang-hex-dump-util.cpp
+++ b/source/core/slang-hex-dump-util.cpp
@@ -75,6 +75,13 @@ static const char s_hex[] = "0123456789abcdef";
*dst++ = s_hex[byte & 0xf];
}
+ // If not a complete line write spaces
+ for (size_t i = count; i < size_t(maxBytesPerLine); ++i)
+ {
+ *dst++ = ' ';
+ *dst++ = ' ';
+ }
+
*dst++ = ' ';
for (size_t i = 0; i < count; ++i)