Skip to content

Commit

Permalink
Merge branch 'master' into fix-simd-smooth
Browse files Browse the repository at this point in the history
  • Loading branch information
Groovounet authored Jan 23, 2025
2 parents 9356f40 + 69b130c commit d7dbe61
Show file tree
Hide file tree
Showing 91 changed files with 2,250 additions and 1,017 deletions.
116 changes: 85 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: ci
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀

on:
pull_request:
branches:
- main
push:
workflow_dispatch:

Expand Down Expand Up @@ -50,55 +53,55 @@ jobs:

- name: Run with automagic detection
run: |
cmake -S. -B ./build_auto -T ${{matrix.toolkit}}
cmake -S. -B ./build_auto -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON
cmake --build ./build_auto --config ${{matrix.config}}
ctest --verbose -C ${{matrix.config}} --test-dir ./build_auto
- name: Run with GLM_FORCE_PURE
run: |
cmake -S. -B ./build_pure_std -T ${{matrix.toolkit}} -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
cmake -S. -B ./build_pure_std -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_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_FORCE_PURE and language extensions
run: |
cmake -S. -B ./build_pure_ext -T ${{matrix.toolkit}} -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
cmake -S. -B ./build_pure_ext -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_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_ENABLE_SIMD_SSE2
run: |
cmake -S. -B ./build_sse2_std -T ${{matrix.toolkit}} -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
cmake -S. -B ./build_sse2_std -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_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_ENABLE_SIMD_SSE2 and language extensions
run: |
cmake -S. -B ./build_sse2_ext -T ${{matrix.toolkit}} -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
cmake -S. -B ./build_sse2_ext -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_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_ENABLE_SIMD_AVX
run: |
cmake -S. -B ./build_avx1_std -T ${{matrix.toolkit}} -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
cmake -S. -B ./build_avx1_std -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX=ON -DGLM_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_ENABLE_SIMD_AVX and language extensions
run: |
cmake -S. -B ./build_avx1_ext -T ${{matrix.toolkit}} -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
cmake -S. -B ./build_avx1_ext -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_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_ENABLE_SIMD_AVX2
run: |
cmake -S. -B ./build_avx2_std -T ${{matrix.toolkit}} -DGLM_ENABLE_SIMD_AVX2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
cmake -S. -B ./build_avx2_std -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX2=ON -DGLM_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_ENABLE_SIMD_AVX2 and language extensions
run: |
cmake -S. -B ./build_avx2_ext -T ${{matrix.toolkit}} -DGLM_ENABLE_SIMD_AVX2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
cmake -S. -B ./build_avx2_ext -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
cmake --build ./build_avx2_ext --config ${{matrix.config}}
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_ext
Expand All @@ -113,6 +116,8 @@ jobs:
exclude:
- os: ubuntu-20.04
std: 20
- os: ubuntu-latest
std: 98

steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
Expand All @@ -130,65 +135,62 @@ jobs:
run: cmake --version
- name: Run with automagic detection
run: |
cmake -S. -B ./build_auto
cmake -S. -B ./build_auto -DGLM_BUILD_TESTS=ON
cmake --build ./build_auto --config ${{matrix.config}}
ctest --verbose -C ${{matrix.config}} --test-dir ./build_auto
- name: Run with GLM_FORCE_PURE
run: |
cmake -S. -B ./build_pure_std -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
cmake -S. -B ./build_pure_std -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_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_FORCE_PURE and language extensions
run: |
cmake -S. -B ./build_pure_ext -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
cmake -S. -B ./build_pure_ext -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_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_ENABLE_SIMD_SSE2
run: |
cmake -S. -B ./build_sse2_std -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
cmake -S. -B ./build_sse2_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_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_ENABLE_SIMD_SSE2 and language extensions
run: |
cmake -S. -B ./build_sse2_ext -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
cmake -S. -B ./build_sse2_ext -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_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_ENABLE_SIMD_AVX
run: |
cmake -S. -B ./build_avx1_std -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
cmake -S. -B ./build_avx1_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX=ON -DGLM_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_ENABLE_SIMD_AVX and language extensions
run: |
cmake -S. -B ./build_avx1_ext -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
cmake -S. -B ./build_avx1_ext -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_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_ENABLE_SIMD_AVX2
run: |
cmake -S. -B ./build_avx2_std -DGLM_ENABLE_SIMD_AVX2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
cmake -S. -B ./build_avx2_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX2=ON -DGLM_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_ENABLE_SIMD_AVX2 and language extensions
run: |
cmake -S. -B ./build_avx2_ext -DGLM_ENABLE_SIMD_AVX2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
cmake -S. -B ./build_avx2_ext -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
cmake --build ./build_avx2_ext --config ${{matrix.config}}
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_ext
macos:
macos-13:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, macos-11]
os: [macos-13]
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."
Expand All @@ -206,40 +208,92 @@ jobs:
run: cmake --version
- name: Run with automagic detection
run: |
cmake -S. -B ./build_auto
cmake -S. -B ./build_auto -DGLM_BUILD_TESTS=ON
cmake --build ./build_auto --config ${{matrix.config}}
ctest --verbose -C ${{matrix.config}} --test-dir ./build_auto
- name: Run with GLM_FORCE_PURE
run: |
cmake -S. -B ./build_pure_std -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
cmake -S. -B ./build_pure_std -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_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_FORCE_PURE and language extensions
run: |
cmake -S. -B ./build_pure_ext -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
cmake -S. -B ./build_pure_ext -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_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_ENABLE_SIMD_SSE2
run: |
cmake -S. -B ./build_sse2_std -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
cmake -S. -B ./build_sse2_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_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_ENABLE_SIMD_SSE2 and language extensions
run: |
cmake -S. -B ./build_sse2_ext -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
cmake -S. -B ./build_sse2_ext -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_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_ENABLE_SIMD_AVX
run: |
cmake -S. -B ./build_avx1_std -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
cmake -S. -B ./build_avx1_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX=ON -DGLM_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_ENABLE_SIMD_AVX and language extensions
run: |
cmake -S. -B ./build_avx1_ext -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
cmake -S. -B ./build_avx1_ext -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
cmake --build ./build_avx1_ext --config ${{matrix.config}}
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_ext
macos-latest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
std: [98, 11, 14, 17, 20]
config: [Debug, Release]

steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
- name: CMake Version
run: cmake --version
- name: Run with automagic detection
run: |
cmake -S. -B ./build_auto -DGLM_BUILD_TESTS=ON
cmake --build ./build_auto --config ${{matrix.config}}
ctest --verbose -C ${{matrix.config}} --test-dir ./build_auto
- name: Run with GLM_FORCE_PURE
run: |
cmake -S. -B ./build_pure_std -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_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_FORCE_PURE and language extensions
run: |
cmake -S. -B ./build_pure_ext -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_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_ENABLE_SIMD_NEON
run: |
cmake -S. -B ./build_neon_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_NEON=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
cmake --build ./build_neon_std --config ${{matrix.config}}
ctest --verbose -C ${{matrix.config}} --test-dir ./build_neon_std
- name: Run with GLM_ENABLE_SIMD_NEON and language extensions
run: |
cmake -S. -B ./build_neon_ext -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_NEON=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
cmake --build ./build_neon_ext --config ${{matrix.config}}
ctest --verbose -C ${{matrix.config}} --test-dir ./build_neon_ext
22 changes: 11 additions & 11 deletions .github/workflows/make_light_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@ jobs:
run: sudo apt-get update -y && sudo apt-get install -y zip p7zip

- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Prepare layout
run: mv copying.txt glm
# - name: Prepare layout
# run: mv copying.txt glm

- name: Create zip archive
run: zip -r glm-${{ env.RELEASE_VERSION }}-light.zip glm
run: zip -r glm-${{ env.RELEASE_VERSION }}.zip .

- name: Create 7z archive
run: 7z a glm-${{ env.RELEASE_VERSION }}-light.7z glm
run: 7z a glm-${{ env.RELEASE_VERSION }}.7z .

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: glm-${{ env.RELEASE_VERSION }}-light
path: glm-${{ env.RELEASE_VERSION }}-light.*
name: glm-${{ env.RELEASE_VERSION }}
path: glm-${{ env.RELEASE_VERSION }}.*

- name: Add to Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: |
glm-${{ env.RELEASE_VERSION }}-light.zip
glm-${{ env.RELEASE_VERSION }}-light.7z
glm-${{ env.RELEASE_VERSION }}.zip
glm-${{ env.RELEASE_VERSION }}.7z
14 changes: 10 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 3.6 FATAL_ERROR)
cmake_policy(VERSION 3.6)
# 3.6 is the actual minimun. 3.14 as the upper policy limit avoids CMake deprecation warnings.
cmake_minimum_required(VERSION 3.6...3.14 FATAL_ERROR)
cmake_policy(VERSION 3.6...3.14)

file(READ "glm/detail/setup.hpp" GLM_SETUP_FILE)
string(REGEX MATCH "#define[ ]+GLM_VERSION_MAJOR[ ]+([0-9]+)" _ ${GLM_SETUP_FILE})
Expand All @@ -21,7 +22,7 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
endif()

option(GLM_BUILD_LIBRARY "Build dynamic/static library" ON)
option(GLM_BUILD_TESTS "Build the test programs" ${GLM_IS_MASTER_PROJECT})
option(GLM_BUILD_TESTS "Build the test programs" OFF)
option(GLM_BUILD_INSTALL "Generate the install target" ${GLM_IS_MASTER_PROJECT})

include(GNUInstallDirs)
Expand Down Expand Up @@ -149,6 +150,7 @@ option(GLM_ENABLE_SIMD_SSE4_1 "Enable SSE 4.1 optimizations" OFF)
option(GLM_ENABLE_SIMD_SSE4_2 "Enable SSE 4.2 optimizations" OFF)
option(GLM_ENABLE_SIMD_AVX "Enable AVX optimizations" OFF)
option(GLM_ENABLE_SIMD_AVX2 "Enable AVX2 optimizations" OFF)
option(GLM_ENABLE_SIMD_NEON "Enable ARM NEON optimizations" OFF)
option(GLM_FORCE_PURE "Force 'pure' instructions" OFF)

if(GLM_FORCE_PURE)
Expand Down Expand Up @@ -191,7 +193,7 @@ elseif(GLM_ENABLE_SIMD_SSE4_2)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
add_compile_options(/QxSSE4.2)
elseif((CMAKE_CXX_COMPILER_ID MATCHES "MSVC") AND NOT CMAKE_CL_64)
add_compile_options(/arch:SSE2) # VC doesn't support SSE4.2
add_compile_options(/arch:SSE4.2)
endif()
message(STATUS "GLM: SSE4.2 instruction set")

Expand Down Expand Up @@ -242,6 +244,10 @@ elseif(GLM_ENABLE_SIMD_SSE2)
add_compile_options(/arch:SSE2)
endif()
message(STATUS "GLM: SSE2 instruction set")
elseif(GLM_ENABLE_SIMD_NEON)
add_definitions(-DGLM_FORCE_INTRINSICS)

message(STATUS "GLM: ARM NEON instruction set")
endif()

add_subdirectory(glm)
Expand Down
4 changes: 2 additions & 2 deletions glm/detail/compute_vector_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ namespace glm {
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(vec<L, T, Q> const& v1, vec<L, T, Q> const& v2)
{
bool b = true;
for (length_t i = 0; i < L; ++i)
b = b && detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.x, v2.x);
for (length_t i = 0; b && i < L; ++i)
b = detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1[i], v2[i]);
return b;
}
};
Expand Down
2 changes: 1 addition & 1 deletion glm/detail/func_common.inl
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ namespace detail
template<int c>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, T, Q> call(vec<L, T, Q> const& a)
{
vec<L, T, Q> v;
vec<L, T, Q> v(0.0f);
for (int i = 0; i < L; ++i)
v[i] = a[c];
return v;
Expand Down
4 changes: 3 additions & 1 deletion glm/detail/func_common_simd.inl
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,9 @@ namespace glm {
struct compute_splat<L, float, Q, true> {
template<int c>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, float, Q> call(vec<L, float, Q> const& a)
{}
{
(void)a;
}

template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, float, Q> call<0>(vec<L, float, Q> const& a)
Expand Down
2 changes: 1 addition & 1 deletion glm/detail/func_exponential.inl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace detail
using std::log2;
# else
template<typename genType>
genType log2(genType Value)
GLM_FUNC_QUALIFIER genType log2(genType Value)
{
return std::log(Value) * static_cast<genType>(1.4426950408889634073599246810019);
}
Expand Down
Loading

0 comments on commit d7dbe61

Please sign in to comment.