summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-10-31 08:32:38 -0700
committerGitHub <noreply@github.com>2022-10-31 08:32:38 -0700
commit64c9669306f9cee72a37e3a414f40372a0994d23 (patch)
tree81635bb9ef52468454fab72e13c3e7b7de892f03
parent883d9f7cccf1080739213282602c0dbae5fa7fe6 (diff)
Make cpp-host prelude include scalar intrinsics. (#2478)
* Make cpp-host prelude include scalar intrinsics. * Fix. Co-authored-by: Yong He <yhe@nvidia.com>
-rw-r--r--prelude/slang-cpp-host-prelude.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/prelude/slang-cpp-host-prelude.h b/prelude/slang-cpp-host-prelude.h
index 3aec0dd07..0a026471c 100644
--- a/prelude/slang-cpp-host-prelude.h
+++ b/prelude/slang-cpp-host-prelude.h
@@ -11,6 +11,26 @@
#include "../slang-com-ptr.h"
#include "slang-cpp-types.h"
+#ifdef SLANG_LLVM
+#include "slang-llvm.h"
+#else // SLANG_LLVM
+# if SLANG_GCC_FAMILY && __GNUC__ < 6
+# include <cmath>
+# define SLANG_PRELUDE_STD std::
+# else
+# include <math.h>
+# define SLANG_PRELUDE_STD
+# endif
+
+# include <assert.h>
+# include <stdlib.h>
+# include <string.h>
+# include <stdint.h>
+#endif // SLANG_LLVM
+
+
+#include "slang-cpp-scalar-intrinsics.h"
+
using namespace Slang;
template<typename TResult, typename... Args>