summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--prelude/slang-cuda-prelude.h1
-rw-r--r--prelude/slang-torch-prelude.h30
-rw-r--r--source/slang/slang-emit-cpp.cpp2
3 files changed, 17 insertions, 16 deletions
diff --git a/prelude/slang-cuda-prelude.h b/prelude/slang-cuda-prelude.h
index 0362a3a67..0b56b8a71 100644
--- a/prelude/slang-cuda-prelude.h
+++ b/prelude/slang-cuda-prelude.h
@@ -11,6 +11,7 @@
#else
#include <cstdint>
+#include <stdio.h>
#endif
diff --git a/prelude/slang-torch-prelude.h b/prelude/slang-torch-prelude.h
index 0a69b8305..0de06750c 100644
--- a/prelude/slang-torch-prelude.h
+++ b/prelude/slang-torch-prelude.h
@@ -7,20 +7,6 @@
#include <stdexcept>
#include <string>
-#ifndef SLANG_NO_THROW
-# define SLANG_NO_THROW
-#endif
-
-#ifndef SLANG_STDCALL
-# define SLANG_STDCALL
-#endif
-#ifndef SLANG_MCALL
-# define SLANG_MCALL SLANG_STDCALL
-#endif
-#ifndef SLANG_FORCE_INLINE
-# define SLANG_FORCE_INLINE inline
-#endif
-
#ifdef SLANG_LLVM
#include "slang-llvm.h"
#else // SLANG_LLVM
@@ -38,6 +24,8 @@
# include <stdint.h>
#endif // SLANG_LLVM
+#include "../source/core/slang-string.h"
+
#if defined(_MSC_VER)
# define SLANG_PRELUDE_SHARED_LIB_EXPORT __declspec(dllexport)
#else
@@ -55,12 +43,24 @@
# define SLANG_PRELUDE_EXTERN_C_END
#endif
-
#define SLANG_PRELUDE_NAMESPACE
+#ifndef SLANG_NO_THROW
+# define SLANG_NO_THROW
+#endif
+#ifndef SLANG_STDCALL
+# define SLANG_STDCALL
+#endif
+#ifndef SLANG_MCALL
+# define SLANG_MCALL SLANG_STDCALL
+#endif
+#ifndef SLANG_FORCE_INLINE
+# define SLANG_FORCE_INLINE inline
+#endif
#include "slang-cpp-types-core.h"
#include "slang-cpp-scalar-intrinsics.h"
+
static const int kSlangTorchTensorMaxDim = 5;
struct TensorView
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp
index ef9b7f54e..83af4ad47 100644
--- a/source/slang/slang-emit-cpp.cpp
+++ b/source/slang/slang-emit-cpp.cpp
@@ -1574,7 +1574,7 @@ bool CPPSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOut
if (m_hasString)
{
- m_writer->emit("toTerminatedSlice(");
+ m_writer->emit("Slang::toTerminatedSlice(");
m_writer->emit(buf);
m_writer->emit(")");
}