From 37e8917d10626b519470f2e34625f0efe741352f Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 10 Jun 2021 14:57:09 -0400 Subject: CUDA layout corner cases/testing (#1881) * #include an absolute path didn't work - because paths were taken to always be relative. * Add support for sizeOf/alignOf/offsetOf to stdlib. Add $G intrinsic expansion that works of the generic parameters not the param type * Test cuda layout. * Fix CUDA layout issues. Fix reflection to handle other built in types. Fix __offsetOf * Tests of reflection and layout as reported directly from CUDA. * Comment about use of aligned size as size. * Fix warning from VS. * Check alignment is pow2. * Small improvements to alignment calcs. * Tab to spaces. * Fix alignment pointer sizes on 32 bit OS for CUDA. * Fix CUDA reflection on 32 bit. --- tools/slang-reflection-test/slang-reflection-test-main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools') diff --git a/tools/slang-reflection-test/slang-reflection-test-main.cpp b/tools/slang-reflection-test/slang-reflection-test-main.cpp index 655b4e41d..0b8e88d68 100644 --- a/tools/slang-reflection-test/slang-reflection-test-main.cpp +++ b/tools/slang-reflection-test/slang-reflection-test-main.cpp @@ -489,10 +489,16 @@ static void emitReflectionScalarTypeInfoJSON( #define CASE(TAG, ID) case slang::TypeReflection::ScalarType::TAG: write(writer, #ID); break CASE(Void, void); CASE(Bool, bool); + + CASE(Int8, int8); + CASE(UInt8, uint8); + CASE(Int16, int16); + CASE(UInt16, uint16); CASE(Int32, int32); CASE(UInt32, uint32); CASE(Int64, int64); CASE(UInt64, uint64); + CASE(Float16, float16); CASE(Float32, float32); CASE(Float64, float64); -- cgit v1.2.3