From a40974fb8647717b15dbfd212b4a33845a405a88 Mon Sep 17 00:00:00 2001 From: Christophe <62888873+christophe-lunarg@users.noreply.github.com> Date: Thu, 28 Dec 2023 16:50:25 +0100 Subject: [PATCH] Test multiple platforms to test multiple compiler versions (#1199) --- .github/workflows/ci.yml | 276 ++++++++++++++++++++---------- glm/simd/platform.h | 103 +++++++++-- test/CMakeLists.txt | 4 +- test/core/core_setup_message.cpp | 85 ++++++++- test/perf/perf_matrix_inverse.cpp | 3 +- 5 files changed, 348 insertions(+), 123 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e88ac1af3..aad77b5ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,17 +3,36 @@ run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 on: push: - pull_request: - types: [opened] + pull_request_target: + types: [opened, edited, reopened] jobs: - windows-latest: - runs-on: windows-latest + windows: + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: + os: [windows-latest, windows-2019] + toolkit: [v143, v142, v141, v140] std: [98, 11, 14, 17, 20] config: [Debug, Release] + exclude: + - os: windows-2019 + toolkit: v143 + - os: windows-2019 + toolkit: v142 + - os: windows-latest + toolkit: v140 + - os: windows-latest + toolkit: v141 + - os: windows-2019 + std: 20 + - os: windows-2019 + toolkit: v140 + std: 17 + - os: windows-2019 + toolkit: v140 + std: 14 steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." @@ -29,41 +48,72 @@ jobs: - run: echo "🍏 This job's status is ${{ job.status }}." - name: CMake Version run: cmake --version - - run: cmake -S. -B ./build_auto - - run: cmake -S. -B ./build_pure_std -DGLM_TEST_FORCE_PURE=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON - - run: cmake -S. -B ./build_pure_ext -DGLM_TEST_FORCE_PURE=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON - - run: cmake -S. -B ./build_sse2_std -DGLM_TEST_ENABLE_SIMD_SSE2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON - - run: cmake -S. -B ./build_sse2_ext -DGLM_TEST_ENABLE_SIMD_SSE2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON - - run: cmake -S. -B ./build_avx1_std -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON - - run: cmake -S. -B ./build_avx1_ext -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON - - run: cmake -S. -B ./build_avx2_std -DGLM_TEST_ENABLE_SIMD_AVX2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON - - run: cmake -S. -B ./build_avx2_ext -DGLM_TEST_ENABLE_SIMD_AVX2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON - - run: cmake --build ./build_auto --config ${{matrix.config}} - - run: cmake --build ./build_pure_std --config ${{matrix.config}} - - run: cmake --build ./build_pure_ext --config ${{matrix.config}} - - run: cmake --build ./build_sse2_std --config ${{matrix.config}} - - run: cmake --build ./build_sse2_ext --config ${{matrix.config}} - - run: cmake --build ./build_avx1_std --config ${{matrix.config}} - - run: cmake --build ./build_avx1_ext --config ${{matrix.config}} - - run: cmake --build ./build_avx2_std --config ${{matrix.config}} - - run: cmake --build ./build_avx2_ext --config ${{matrix.config}} - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_auto - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_std - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_ext - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_std - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_ext - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_std - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_ext - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_std - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_ext - ubuntu-latest: - runs-on: ubuntu-latest + + - name: Run with automagic detection + run: | + cmake -S. -B ./build_auto -T ${{matrix.toolkit}} + cmake --build ./build_auto --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_auto + + - name: Run with GLM_TEST_FORCE_PURE + run: | + cmake -S. -B ./build_pure_std -T ${{matrix.toolkit}} -DGLM_TEST_FORCE_PURE=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON + cmake --build ./build_pure_std --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_std + + - name: Run with GLM_TEST_FORCE_PURE and language extensions + run: | + cmake -S. -B ./build_pure_ext -T ${{matrix.toolkit}} -DGLM_TEST_FORCE_PURE=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON + cmake --build ./build_pure_ext --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_ext + + - name: Run with GLM_TEST_ENABLE_SIMD_SSE2 + run: | + cmake -S. -B ./build_sse2_std -T ${{matrix.toolkit}} -DGLM_TEST_FORCE_PURE=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON + cmake --build ./build_sse2_std --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_std + + - name: Run with GLM_TEST_ENABLE_SIMD_SSE2 and language extensions + run: | + cmake -S. -B ./build_sse2_ext -T ${{matrix.toolkit}} -DGLM_TEST_ENABLE_SIMD_SSE2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON + cmake --build ./build_sse2_ext --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_ext + + - name: Run with GLM_TEST_ENABLE_SIMD_AVX + run: | + cmake -S. -B ./build_avx1_std -T ${{matrix.toolkit}} -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON + cmake --build ./build_avx1_std --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_std + + - name: Run with GLM_TEST_ENABLE_SIMD_AVX and language extensions + run: | + cmake -S. -B ./build_avx1_ext -T ${{matrix.toolkit}} -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON + cmake --build ./build_avx1_ext --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_ext + + - name: Run with GLM_TEST_ENABLE_SIMD_AVX2 + run: | + cmake -S. -B ./build_avx2_std -T ${{matrix.toolkit}} -DGLM_TEST_ENABLE_SIMD_AVX2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON + cmake --build ./build_avx2_std --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_std + + - name: Run with GLM_TEST_ENABLE_SIMD_AVX2 and language extensions + run: | + cmake -S. -B ./build_avx2_ext -T ${{matrix.toolkit}} -DGLM_TEST_ENABLE_SIMD_AVX2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON + cmake --build ./build_avx2_ext --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_ext + + ubuntu: + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - # compiler: [gcc, clang] + os: [ubuntu-latest, ubuntu-20.04] std: [98, 11, 14, 17, 20] config: [Debug, Release] + exclude: + - os: ubuntu-20.04 + std: 20 steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." @@ -77,48 +127,69 @@ jobs: run: | ls ${{ github.workspace }} - run: echo "🍏 This job's status is ${{ job.status }}." -# - name: make (with ${{matrix.compiler}}, for ${{matrix.os}}) -# env: -# CC: ${{ matrix.compiler }} -# - name: Compiler Version -# run: ${{matrix.compiler}} --version - name: CMake Version run: cmake --version - - run: cmake -S. -B ./build_unknown -DGLM_DISABLE_AUTO_DETECTION=ON - - run: cmake -S. -B ./build_auto - - run: cmake -S. -B ./build_pure_std -DGLM_TEST_FORCE_PURE=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON - - run: cmake -S. -B ./build_pure_ext -DGLM_TEST_FORCE_PURE=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON - - run: cmake -S. -B ./build_sse2_std -DGLM_TEST_ENABLE_SIMD_SSE2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON - - run: cmake -S. -B ./build_sse2_ext -DGLM_TEST_ENABLE_SIMD_SSE2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON - - run: cmake -S. -B ./build_avx1_std -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON - - run: cmake -S. -B ./build_avx1_ext -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON - - run: cmake -S. -B ./build_avx2_std -DGLM_TEST_ENABLE_SIMD_AVX2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON - - run: cmake -S. -B ./build_avx2_ext -DGLM_TEST_ENABLE_SIMD_AVX2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON - - run: cmake --build ./build_auto --config ${{matrix.config}} - - run: cmake --build ./build_pure_std --config ${{matrix.config}} - - run: cmake --build ./build_pure_ext --config ${{matrix.config}} - - run: cmake --build ./build_sse2_std --config ${{matrix.config}} - - run: cmake --build ./build_sse2_ext --config ${{matrix.config}} - - run: cmake --build ./build_avx1_std --config ${{matrix.config}} - - run: cmake --build ./build_avx1_ext --config ${{matrix.config}} - - run: cmake --build ./build_avx2_std --config ${{matrix.config}} - - run: cmake --build ./build_avx2_ext --config ${{matrix.config}} - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_auto - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_std - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_ext - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_std - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_ext - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_std - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_ext - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_std - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_ext - macos-latest: - runs-on: macos-latest + - name: Run with automagic detection + run: | + cmake -S. -B ./build_auto + cmake --build ./build_auto --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_auto + + - name: Run with GLM_TEST_FORCE_PURE + run: | + cmake -S. -B ./build_pure_std -DGLM_TEST_FORCE_PURE=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON + cmake --build ./build_pure_std --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_std + - name: Run with GLM_TEST_FORCE_PURE and language extensions + run: | + cmake -S. -B ./build_pure_ext -DGLM_TEST_FORCE_PURE=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON + cmake --build ./build_pure_ext --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_ext + + - name: Run with GLM_TEST_ENABLE_SIMD_SSE2 + run: | + cmake -S. -B ./build_sse2_std -DGLM_TEST_FORCE_PURE=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON + cmake --build ./build_sse2_std --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_std + - name: Run with GLM_TEST_ENABLE_SIMD_SSE2 and language extensions + run: | + cmake -S. -B ./build_sse2_ext -DGLM_TEST_ENABLE_SIMD_SSE2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON + cmake --build ./build_sse2_ext --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_ext + + - name: Run with GLM_TEST_ENABLE_SIMD_AVX + run: | + cmake -S. -B ./build_avx1_std -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON + cmake --build ./build_avx1_std --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_std + - name: Run with GLM_TEST_ENABLE_SIMD_AVX and language extensions + run: | + cmake -S. -B ./build_avx1_ext -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON + cmake --build ./build_avx1_ext --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_ext + + - name: Run with GLM_TEST_ENABLE_SIMD_AVX2 + run: | + cmake -S. -B ./build_avx2_std -DGLM_TEST_ENABLE_SIMD_AVX2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON + cmake --build ./build_avx2_std --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_std + - name: Run with GLM_TEST_ENABLE_SIMD_AVX2 and language extensions + run: | + cmake -S. -B ./build_avx2_ext -DGLM_TEST_ENABLE_SIMD_AVX2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON + cmake --build ./build_avx2_ext --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_ext + + macos: + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: + os: [macos-latest, macos-11] std: [98, 11, 14, 17, 20] config: [Debug, Release] + exclude: + - os: macos-11 + std: 20 steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." @@ -134,29 +205,44 @@ jobs: - run: echo "🍏 This job's status is ${{ job.status }}." - name: CMake Version run: cmake --version - - name: Clang Version - run: clang --version - - run: cmake -S. -B ./build_auto - - run: cmake -S. -B ./build_unknown -DGLM_DISABLE_AUTO_DETECTION=ON - - run: cmake -S. -B ./build_pure_std -DGLM_TEST_FORCE_PURE=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON - - run: cmake -S. -B ./build_pure_ext -DGLM_TEST_FORCE_PURE=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON - - run: cmake -S. -B ./build_sse2_std -DGLM_TEST_ENABLE_SIMD_SSE2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON - - run: cmake -S. -B ./build_sse2_ext -DGLM_TEST_ENABLE_SIMD_SSE2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON - - run: cmake -S. -B ./build_avx1_std -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON - - run: cmake -S. -B ./build_avx1_ext -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON - - run: cmake --build ./build_auto --config ${{matrix.config}} - - run: cmake --build ./build_unknown --config ${{matrix.config}} - - run: cmake --build ./build_pure_std --config ${{matrix.config}} - - run: cmake --build ./build_pure_ext --config ${{matrix.config}} - - run: cmake --build ./build_sse2_std --config ${{matrix.config}} - - run: cmake --build ./build_sse2_ext --config ${{matrix.config}} - - run: cmake --build ./build_avx1_std --config ${{matrix.config}} - - run: cmake --build ./build_avx1_ext --config ${{matrix.config}} - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_auto - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_unknown - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_std - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_ext - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_std - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_ext - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_std - - run: ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_ext + - name: Run with automagic detection + run: | + cmake -S. -B ./build_auto + cmake --build ./build_auto --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_auto + + - name: Run with GLM_TEST_FORCE_PURE + run: | + cmake -S. -B ./build_pure_std -DGLM_TEST_FORCE_PURE=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON + cmake --build ./build_pure_std --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_std + - name: Run with GLM_TEST_FORCE_PURE and language extensions + run: | + cmake -S. -B ./build_pure_ext -DGLM_TEST_FORCE_PURE=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON + cmake --build ./build_pure_ext --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_ext + + - name: Run with GLM_TEST_ENABLE_SIMD_SSE2 + run: | + cmake -S. -B ./build_sse2_std -DGLM_TEST_FORCE_PURE=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON + cmake --build ./build_sse2_std --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_std + - name: Run with GLM_TEST_ENABLE_SIMD_SSE2 and language extensions + run: | + cmake -S. -B ./build_sse2_ext -DGLM_TEST_ENABLE_SIMD_SSE2=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON + cmake --build ./build_sse2_ext --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_ext + + - name: Run with GLM_TEST_ENABLE_SIMD_AVX + run: | + cmake -S. -B ./build_avx1_std -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON + cmake --build ./build_avx1_std --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_std + - name: Run with GLM_TEST_ENABLE_SIMD_AVX and language extensions + run: | + cmake -S. -B ./build_avx1_ext -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_CXX_${{matrix.std}}=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON + cmake --build ./build_avx1_ext --config ${{matrix.config}} + ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_ext + + + \ No newline at end of file diff --git a/glm/simd/platform.h b/glm/simd/platform.h index de72e08e7..a318b098f 100644 --- a/glm/simd/platform.h +++ b/glm/simd/platform.h @@ -50,19 +50,23 @@ #define GLM_COMPILER_INTEL15 0x00100050 #define GLM_COMPILER_INTEL16 0x00100060 #define GLM_COMPILER_INTEL17 0x00100070 +#define GLM_COMPILER_INTEL18 0x00100080 +#define GLM_COMPILER_INTEL19 0x00100090 +#define GLM_COMPILER_INTEL21 0x001000A0 // Visual C++ defines #define GLM_COMPILER_VC 0x01000000 -#define GLM_COMPILER_VC12 0x01000001 -#define GLM_COMPILER_VC14 0x01000002 -#define GLM_COMPILER_VC15 0x01000003 +#define GLM_COMPILER_VC12 0x01000001 // Visual Studio 2013 +#define GLM_COMPILER_VC14 0x01000002 // Visual Studio 2015 +#define GLM_COMPILER_VC15 0x01000003 // Visual Studio 2017 #define GLM_COMPILER_VC15_3 0x01000004 #define GLM_COMPILER_VC15_5 0x01000005 #define GLM_COMPILER_VC15_6 0x01000006 #define GLM_COMPILER_VC15_7 0x01000007 #define GLM_COMPILER_VC15_8 0x01000008 #define GLM_COMPILER_VC15_9 0x01000009 -#define GLM_COMPILER_VC16 0x0100000A +#define GLM_COMPILER_VC16 0x0100000A // Visual Studio 2019 +#define GLM_COMPILER_VC17 0x0100000B // Visual Studio 2022 // GCC defines #define GLM_COMPILER_GCC 0x02000000 @@ -75,13 +79,19 @@ #define GLM_COMPILER_GCC61 0x02000800 #define GLM_COMPILER_GCC7 0x02000400 #define GLM_COMPILER_GCC8 0x02000500 +#define GLM_COMPILER_GCC9 0x02000600 +#define GLM_COMPILER_GCC10 0x02000700 +#define GLM_COMPILER_GCC11 0x02000800 +#define GLM_COMPILER_GCC12 0x02000900 +#define GLM_COMPILER_GCC13 0x02000A00 +#define GLM_COMPILER_GCC14 0x02000B00 // CUDA #define GLM_COMPILER_CUDA 0x10000000 #define GLM_COMPILER_CUDA75 0x10000001 #define GLM_COMPILER_CUDA80 0x10000002 #define GLM_COMPILER_CUDA90 0x10000004 -#define GLM_COMPILER_CUDA_RTC 0x10000100 +#define GLM_COMPILER_CUDA_RTC 0x10000100 // Clang #define GLM_COMPILER_CLANG 0x20000000 @@ -91,9 +101,22 @@ #define GLM_COMPILER_CLANG37 0x20000080 #define GLM_COMPILER_CLANG38 0x20000090 #define GLM_COMPILER_CLANG39 0x200000A0 -#define GLM_COMPILER_CLANG40 0x200000B0 -#define GLM_COMPILER_CLANG41 0x200000C0 -#define GLM_COMPILER_CLANG42 0x200000D0 +#define GLM_COMPILER_CLANG4 0x200000B0 +#define GLM_COMPILER_CLANG5 0x200000C0 +#define GLM_COMPILER_CLANG6 0x200000D0 +#define GLM_COMPILER_CLANG7 0x200000E0 +#define GLM_COMPILER_CLANG8 0x200000F0 +#define GLM_COMPILER_CLANG9 0x20000100 +#define GLM_COMPILER_CLANG10 0x20000200 +#define GLM_COMPILER_CLANG11 0x20000300 +#define GLM_COMPILER_CLANG12 0x20000400 +#define GLM_COMPILER_CLANG13 0x20000500 +#define GLM_COMPILER_CLANG14 0x20000600 +#define GLM_COMPILER_CLANG15 0x20000700 +#define GLM_COMPILER_CLANG16 0x20000800 +#define GLM_COMPILER_CLANG17 0x20000900 +#define GLM_COMPILER_CLANG18 0x20000A00 +#define GLM_COMPILER_CLANG19 0x20000B00 // HIP #define GLM_COMPILER_HIP 0x40000000 @@ -107,7 +130,13 @@ # define GLM_COMPILER GLM_COMPILER_UNKNOWN #elif defined(__INTEL_COMPILER) -# if __INTEL_COMPILER >= 1700 +# if __INTEL_COMPILER >= 2021 +# define GLM_COMPILER GLM_COMPILER_INTEL21 +# elif __INTEL_COMPILER >= 1900 +# define GLM_COMPILER GLM_COMPILER_INTEL19 +# elif __INTEL_COMPILER >= 1800 +# define GLM_COMPILER GLM_COMPILER_INTEL18 +# elif __INTEL_COMPILER >= 1700 # define GLM_COMPILER GLM_COMPILER_INTEL17 # elif __INTEL_COMPILER >= 1600 # define GLM_COMPILER GLM_COMPILER_INTEL16 @@ -168,19 +197,45 @@ # elif __clang_major__ == 3 && __clang_minor__ >= 9 # define GLM_COMPILER GLM_COMPILER_CLANG39 # elif __clang_major__ == 4 && __clang_minor__ == 0 -# define GLM_COMPILER GLM_COMPILER_CLANG40 -# elif __clang_major__ == 4 && __clang_minor__ == 1 -# define GLM_COMPILER GLM_COMPILER_CLANG41 -# elif __clang_major__ == 4 && __clang_minor__ >= 2 -# define GLM_COMPILER GLM_COMPILER_CLANG42 -# elif __clang_major__ >= 4 -# define GLM_COMPILER GLM_COMPILER_CLANG42 +# define GLM_COMPILER GLM_COMPILER_CLANG4 +# elif __clang_major__ == 5 +# define GLM_COMPILER GLM_COMPILER_CLANG5 +# elif __clang_major__ == 6 +# define GLM_COMPILER GLM_COMPILER_CLANG6 +# elif __clang_major__ == 7 +# define GLM_COMPILER GLM_COMPILER_CLANG7 +# elif __clang_major__ == 8 +# define GLM_COMPILER GLM_COMPILER_CLANG8 +# elif __clang_major__ == 9 +# define GLM_COMPILER GLM_COMPILER_CLANG9 +# elif __clang_major__ == 10 +# define GLM_COMPILER GLM_COMPILER_CLANG10 +# elif __clang_major__ == 11 +# define GLM_COMPILER GLM_COMPILER_CLANG11 +# elif __clang_major__ == 12 +# define GLM_COMPILER GLM_COMPILER_CLANG12 +# elif __clang_major__ == 13 +# define GLM_COMPILER GLM_COMPILER_CLANG13 +# elif __clang_major__ == 14 +# define GLM_COMPILER GLM_COMPILER_CLANG14 +# elif __clang_major__ == 15 +# define GLM_COMPILER GLM_COMPILER_CLANG15 +# elif __clang_major__ == 16 +# define GLM_COMPILER GLM_COMPILER_CLANG16 +# elif __clang_major__ == 17 +# define GLM_COMPILER GLM_COMPILER_CLANG17 +# elif __clang_major__ == 18 +# define GLM_COMPILER GLM_COMPILER_CLANG18 +# elif __clang_major__ >= 19 +# define GLM_COMPILER GLM_COMPILER_CLANG19 # endif # endif // Visual C++ #elif defined(_MSC_VER) -# if _MSC_VER >= 1920 +# if _MSC_VER >= 1930 +# define GLM_COMPILER GLM_COMPILER_VC17 +# elif _MSC_VER >= 1920 # define GLM_COMPILER GLM_COMPILER_VC16 # elif _MSC_VER >= 1916 # define GLM_COMPILER GLM_COMPILER_VC15_9 @@ -206,7 +261,19 @@ // G++ #elif defined(__GNUC__) || defined(__MINGW32__) -# if __GNUC__ >= 8 +# if __GNUC__ >= 14 +# define GLM_COMPILER GLM_COMPILER_GCC14 +# elif __GNUC__ >= 13 +# define GLM_COMPILER GLM_COMPILER_GCC13 +# elif __GNUC__ >= 12 +# define GLM_COMPILER GLM_COMPILER_GCC12 +# elif __GNUC__ >= 11 +# define GLM_COMPILER GLM_COMPILER_GCC11 +# elif __GNUC__ >= 10 +# define GLM_COMPILER GLM_COMPILER_GCC10 +# elif __GNUC__ >= 9 +# define GLM_COMPILER GLM_COMPILER_GCC9 +# elif __GNUC__ >= 8 # define GLM_COMPILER GLM_COMPILER_GCC8 # elif __GNUC__ >= 7 # define GLM_COMPILER GLM_COMPILER_GCC7 diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0946dcba0..20834019e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -86,6 +86,7 @@ else() endif() option(GLM_TEST_ENABLE "Build unit tests" ON) +option(GLM_PERF_TEST_ENABLE "Build perf tests" OFF) option(GLM_TEST_ENABLE_SIMD_SSE2 "Enable SSE2 optimizations" OFF) option(GLM_TEST_ENABLE_SIMD_SSE3 "Enable SSE3 optimizations" OFF) option(GLM_TEST_ENABLE_SIMD_SSSE3 "Enable SSSE3 optimizations" OFF) @@ -242,7 +243,8 @@ if(GLM_TEST_ENABLE) add_subdirectory(ext) add_subdirectory(gtc) add_subdirectory(gtx) +endif() +if(GLM_PERF_TEST_ENABLE) add_subdirectory(perf) endif() - diff --git a/test/core/core_setup_message.cpp b/test/core/core_setup_message.cpp index 7594743dc..eef33cbc1 100644 --- a/test/core/core_setup_message.cpp +++ b/test/core/core_setup_message.cpp @@ -40,6 +40,9 @@ int test_compiler() case GLM_COMPILER_VC16: std::printf("Visual C++ 16 - 2019\n"); break; + case GLM_COMPILER_VC17: + std::printf("Visual C++ 17 - 2022\n"); + break; default: std::printf("Visual C++ version not detected\n"); Error += 1; @@ -74,6 +77,24 @@ int test_compiler() case GLM_COMPILER_GCC8: std::printf("GCC 8\n"); break; + case GLM_COMPILER_GCC9: + std::printf("GCC 9\n"); + break; + case GLM_COMPILER_GCC10: + std::printf("GCC 10\n"); + break; + case GLM_COMPILER_GCC11: + std::printf("GCC 11\n"); + break; + case GLM_COMPILER_GCC12: + std::printf("GCC 12\n"); + break; + case GLM_COMPILER_GCC13: + std::printf("GCC 13\n"); + break; + case GLM_COMPILER_GCC14: + std::printf("GCC 14\n"); + break; default: std::printf("GCC version not detected\n"); Error += 1; @@ -106,14 +127,53 @@ int test_compiler() case GLM_COMPILER_CLANG39: std::printf("Clang 3.9\n"); break; - case GLM_COMPILER_CLANG40: - std::printf("Clang 4.0\n"); + case GLM_COMPILER_CLANG4: + std::printf("Clang 4\n"); + break; + case GLM_COMPILER_CLANG5: + std::printf("Clang 5\n"); + break; + case GLM_COMPILER_CLANG6: + std::printf("Clang 6\n"); + break; + case GLM_COMPILER_CLANG7: + std::printf("Clang 7\n"); + break; + case GLM_COMPILER_CLANG8: + std::printf("Clang 8\n"); + break; + case GLM_COMPILER_CLANG9: + std::printf("Clang 9\n"); break; - case GLM_COMPILER_CLANG41: - std::printf("Clang 4.1\n"); + case GLM_COMPILER_CLANG10: + std::printf("Clang 10\n"); break; - case GLM_COMPILER_CLANG42: - std::printf("Clang 4.2\n"); + case GLM_COMPILER_CLANG11: + std::printf("Clang 11\n"); + break; + case GLM_COMPILER_CLANG12: + std::printf("Clang 12\n"); + break; + case GLM_COMPILER_CLANG13: + std::printf("Clang 13\n"); + break; + case GLM_COMPILER_CLANG14: + std::printf("Clang 14\n"); + break; + case GLM_COMPILER_CLANG15: + std::printf("Clang 15\n"); + break; + case GLM_COMPILER_CLANG16: + std::printf("Clang 16\n"); + break; + case GLM_COMPILER_CLANG17: + std::printf("Clang 17\n"); + break; + case GLM_COMPILER_CLANG18: + std::printf("Clang 18\n"); + break; + case GLM_COMPILER_CLANG19: + std::printf("Clang 19\n"); break; default: std::printf("LLVM version not detected\n"); @@ -131,10 +191,19 @@ int test_compiler() std::printf("ICC 15 - 2015\n"); break; case GLM_COMPILER_INTEL16: - std::printf("ICC 16 - 2017\n"); + std::printf("ICC 16 - 2015\n"); break; case GLM_COMPILER_INTEL17: - std::printf("ICC 17 - 20XX\n"); + std::printf("ICC 17 - 2016\n"); + break; + case GLM_COMPILER_INTEL18: + std::printf("ICC 18 - 2017\n"); + break; + case GLM_COMPILER_INTEL19: + std::printf("ICC 19 - 2018\n"); + break; + case GLM_COMPILER_INTEL21: + std::printf("ICC 21 - 2021\n"); break; default: std::printf("Intel compiler version not detected\n"); diff --git a/test/perf/perf_matrix_inverse.cpp b/test/perf/perf_matrix_inverse.cpp index c2ab4bfa4..bed7b5bbc 100644 --- a/test/perf/perf_matrix_inverse.cpp +++ b/test/perf/perf_matrix_inverse.cpp @@ -4,6 +4,7 @@ #include #include #include + #if GLM_CONFIG_SIMD == GLM_ENABLE #include #include @@ -115,7 +116,7 @@ static int comp_mat4_inverse(std::size_t Samples) int main() { - std::size_t const Samples = 1000; + std::size_t const Samples = 10; int Error = 0;