From f60135cec62c91a9d7923397fe8796d2b3eaa5cb Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 12 Sep 2018 16:27:42 -0400 Subject: Feature/memory arena (#631) * First pass at MemoryArena. * First pass at RandomGenerator. * Extract TestContext into external source file. * Fix warning on printf. * Use enum classes for Test enums. OutputMode -> TestOutputMode. * First pass at FreeList unit test. * Auto registering tests. Improvements to RandomGenerator. * Remove the need for unitTest headers - cos can use registering. * Added unitTest for MemoryArena. * Do unit tests. * Fix typo. --- slang.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'slang.h') diff --git a/slang.h b/slang.h index 6dcfbb503..564973356 100644 --- a/slang.h +++ b/slang.h @@ -230,6 +230,9 @@ convention for interface methods. # define SLANG_FORCE_INLINE __forceinline # define SLANG_BREAKPOINT(id) __debugbreak(); # define SLANG_ALIGN_OF(T) __alignof(T) + +# define SLANG_INT64(x) (x##i64) +# define SLANG_UINT64(x) (x##ui64) #endif // SLANG_MICROSOFT_FAMILY #ifndef SLANG_FORCE_INLINE @@ -268,6 +271,14 @@ convention for interface methods. # define SLANG_UNUSED(v) (void)v; #endif +// Used for doing constant literals +#ifndef SLANG_INT64 +# define SLANG_INT64(x) (x##ll) +#endif +#ifndef SLANG_UINT64 +# define SLANG_UINT64(x) (x##ull) +#endif + #ifdef __cplusplus // C++ specific macros // Gcc @@ -300,6 +311,7 @@ convention for interface methods. # if _MSC_VER >= 1700 # define SLANG_HAS_ENUM_CLASS 1 # endif + # endif // SLANG_VC // Set non set -- cgit v1.2.3