From b6e8fcb5f73a495d9d96fac657a9bac9aa148c89 Mon Sep 17 00:00:00 2001 From: David Reid Date: Sun, 29 Apr 2018 16:24:17 +1000 Subject: [PATCH] Update tests. --- tests/mal_test_0.c | 33 +++++++++++++++++++++++++++++++++ tests/mal_test_0.vcxproj | 21 ++++++++++++++------- tests/mal_test_0_build.bat | 9 +++++++-- 3 files changed, 54 insertions(+), 9 deletions(-) diff --git a/tests/mal_test_0.c b/tests/mal_test_0.c index 1b15b662..297f1c0c 100644 --- a/tests/mal_test_0.c +++ b/tests/mal_test_0.c @@ -2378,6 +2378,39 @@ int main(int argc, char** argv) mal_bool32 hasErrorOccurred = MAL_FALSE; int result = 0; + // Print the compiler. +#if defined(_MSC_VER) && !defined(__clang__) + printf("Compiler: VC++\n"); +#endif +#if defined(__GNUC__) && !defined(__clang__) + printf("Compiler: GCC\n"); +#endif +#if defined(__clang__) + printf("Compiler: Clang\n"); +#endif + + // Print CPU features. + if (mal_has_sse2()) { + printf("Has SSE: YES\n"); + } else { + printf("Has SSE: NO\n"); + } + if (mal_has_avx()) { + printf("Has AVX: YES\n"); + } else { + printf("Has AVX: NO\n"); + } + if (mal_has_avx512f()) { + printf("Has AVX-512F: YES\n"); + } else { + printf("Has AVX-512F: NO\n"); + } + if (mal_has_neon()) { + printf("Has NEON: YES\n"); + } else { + printf("Has NEON: NO\n"); + } + // Aligned malloc/free printf("=== TESTING CORE ===\n"); result = do_core_tests(); diff --git a/tests/mal_test_0.vcxproj b/tests/mal_test_0.vcxproj index 26433077..3aee3154 100644 --- a/tests/mal_test_0.vcxproj +++ b/tests/mal_test_0.vcxproj @@ -260,7 +260,14 @@ - + + true + true + true + true + true + true + true true @@ -270,12 +277,12 @@ true - true - true - true - true - true - true + false + false + false + false + false + false true diff --git a/tests/mal_test_0_build.bat b/tests/mal_test_0_build.bat index 99a6a25b..3fe3e188 100644 --- a/tests/mal_test_0_build.bat +++ b/tests/mal_test_0_build.bat @@ -1,2 +1,7 @@ -gcc mal_test_0.c -o ./bin/mal_test_0.exe -Wall -mavx -g++ mal_test_0.cpp -o ./bin/mal_test_0_cpp.exe -Wall -mavx \ No newline at end of file +@echo off +SET c_compiler=gcc +SET cpp_compiler=g++ +@echo on + +%c_compiler% mal_test_0.c -o ./bin/mal_test_0.exe -Wall -mavx +%cpp_compiler% mal_test_0.cpp -o ./bin/mal_test_0_cpp.exe -Wall -mavx \ No newline at end of file