Skip to content

Commit d7dbe61

Browse files
authored
Merge branch 'master' into fix-simd-smooth
2 parents 9356f40 + 69b130c commit d7dbe61

File tree

91 files changed

+2250
-1017
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+2250
-1017
lines changed

.github/workflows/ci.yml

+85-31
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: ci
22
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
33

44
on:
5+
pull_request:
6+
branches:
7+
- main
58
push:
69
workflow_dispatch:
710

@@ -50,55 +53,55 @@ jobs:
5053

5154
- name: Run with automagic detection
5255
run: |
53-
cmake -S. -B ./build_auto -T ${{matrix.toolkit}}
56+
cmake -S. -B ./build_auto -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON
5457
cmake --build ./build_auto --config ${{matrix.config}}
5558
ctest --verbose -C ${{matrix.config}} --test-dir ./build_auto
5659
5760
- name: Run with GLM_FORCE_PURE
5861
run: |
59-
cmake -S. -B ./build_pure_std -T ${{matrix.toolkit}} -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
62+
cmake -S. -B ./build_pure_std -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
6063
cmake --build ./build_pure_std --config ${{matrix.config}}
6164
ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_std
6265
6366
- name: Run with GLM_FORCE_PURE and language extensions
6467
run: |
65-
cmake -S. -B ./build_pure_ext -T ${{matrix.toolkit}} -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
68+
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
6669
cmake --build ./build_pure_ext --config ${{matrix.config}}
6770
ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_ext
6871
6972
- name: Run with GLM_ENABLE_SIMD_SSE2
7073
run: |
71-
cmake -S. -B ./build_sse2_std -T ${{matrix.toolkit}} -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
74+
cmake -S. -B ./build_sse2_std -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
7275
cmake --build ./build_sse2_std --config ${{matrix.config}}
7376
ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_std
7477
7578
- name: Run with GLM_ENABLE_SIMD_SSE2 and language extensions
7679
run: |
77-
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
80+
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
7881
cmake --build ./build_sse2_ext --config ${{matrix.config}}
7982
ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_ext
8083
8184
- name: Run with GLM_ENABLE_SIMD_AVX
8285
run: |
83-
cmake -S. -B ./build_avx1_std -T ${{matrix.toolkit}} -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
86+
cmake -S. -B ./build_avx1_std -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
8487
cmake --build ./build_avx1_std --config ${{matrix.config}}
8588
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_std
8689
8790
- name: Run with GLM_ENABLE_SIMD_AVX and language extensions
8891
run: |
89-
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
92+
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
9093
cmake --build ./build_avx1_ext --config ${{matrix.config}}
9194
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_ext
9295
9396
- name: Run with GLM_ENABLE_SIMD_AVX2
9497
run: |
95-
cmake -S. -B ./build_avx2_std -T ${{matrix.toolkit}} -DGLM_ENABLE_SIMD_AVX2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
98+
cmake -S. -B ./build_avx2_std -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
9699
cmake --build ./build_avx2_std --config ${{matrix.config}}
97100
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_std
98101
99102
- name: Run with GLM_ENABLE_SIMD_AVX2 and language extensions
100103
run: |
101-
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
104+
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
102105
cmake --build ./build_avx2_ext --config ${{matrix.config}}
103106
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_ext
104107
@@ -113,6 +116,8 @@ jobs:
113116
exclude:
114117
- os: ubuntu-20.04
115118
std: 20
119+
- os: ubuntu-latest
120+
std: 98
116121

117122
steps:
118123
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
@@ -130,65 +135,62 @@ jobs:
130135
run: cmake --version
131136
- name: Run with automagic detection
132137
run: |
133-
cmake -S. -B ./build_auto
138+
cmake -S. -B ./build_auto -DGLM_BUILD_TESTS=ON
134139
cmake --build ./build_auto --config ${{matrix.config}}
135140
ctest --verbose -C ${{matrix.config}} --test-dir ./build_auto
136141
137142
- name: Run with GLM_FORCE_PURE
138143
run: |
139-
cmake -S. -B ./build_pure_std -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
144+
cmake -S. -B ./build_pure_std -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
140145
cmake --build ./build_pure_std --config ${{matrix.config}}
141146
ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_std
142147
- name: Run with GLM_FORCE_PURE and language extensions
143148
run: |
144-
cmake -S. -B ./build_pure_ext -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
149+
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
145150
cmake --build ./build_pure_ext --config ${{matrix.config}}
146151
ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_ext
147152
148153
- name: Run with GLM_ENABLE_SIMD_SSE2
149154
run: |
150-
cmake -S. -B ./build_sse2_std -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
155+
cmake -S. -B ./build_sse2_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
151156
cmake --build ./build_sse2_std --config ${{matrix.config}}
152157
ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_std
153158
- name: Run with GLM_ENABLE_SIMD_SSE2 and language extensions
154159
run: |
155-
cmake -S. -B ./build_sse2_ext -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
160+
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
156161
cmake --build ./build_sse2_ext --config ${{matrix.config}}
157162
ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_ext
158163
159164
- name: Run with GLM_ENABLE_SIMD_AVX
160165
run: |
161-
cmake -S. -B ./build_avx1_std -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
166+
cmake -S. -B ./build_avx1_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
162167
cmake --build ./build_avx1_std --config ${{matrix.config}}
163168
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_std
164169
- name: Run with GLM_ENABLE_SIMD_AVX and language extensions
165170
run: |
166-
cmake -S. -B ./build_avx1_ext -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
171+
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
167172
cmake --build ./build_avx1_ext --config ${{matrix.config}}
168173
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_ext
169174
170175
- name: Run with GLM_ENABLE_SIMD_AVX2
171176
run: |
172-
cmake -S. -B ./build_avx2_std -DGLM_ENABLE_SIMD_AVX2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
177+
cmake -S. -B ./build_avx2_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
173178
cmake --build ./build_avx2_std --config ${{matrix.config}}
174179
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_std
175180
- name: Run with GLM_ENABLE_SIMD_AVX2 and language extensions
176181
run: |
177-
cmake -S. -B ./build_avx2_ext -DGLM_ENABLE_SIMD_AVX2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
182+
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
178183
cmake --build ./build_avx2_ext --config ${{matrix.config}}
179184
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_ext
180185
181-
macos:
186+
macos-13:
182187
runs-on: ${{ matrix.os }}
183188
strategy:
184189
fail-fast: false
185190
matrix:
186-
os: [macos-latest, macos-11]
191+
os: [macos-13]
187192
std: [98, 11, 14, 17, 20]
188193
config: [Debug, Release]
189-
exclude:
190-
- os: macos-11
191-
std: 20
192194

193195
steps:
194196
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
@@ -206,40 +208,92 @@ jobs:
206208
run: cmake --version
207209
- name: Run with automagic detection
208210
run: |
209-
cmake -S. -B ./build_auto
211+
cmake -S. -B ./build_auto -DGLM_BUILD_TESTS=ON
210212
cmake --build ./build_auto --config ${{matrix.config}}
211213
ctest --verbose -C ${{matrix.config}} --test-dir ./build_auto
212214
213215
- name: Run with GLM_FORCE_PURE
214216
run: |
215-
cmake -S. -B ./build_pure_std -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
217+
cmake -S. -B ./build_pure_std -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
216218
cmake --build ./build_pure_std --config ${{matrix.config}}
217219
ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_std
218220
- name: Run with GLM_FORCE_PURE and language extensions
219221
run: |
220-
cmake -S. -B ./build_pure_ext -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
222+
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
221223
cmake --build ./build_pure_ext --config ${{matrix.config}}
222224
ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_ext
223225
224226
- name: Run with GLM_ENABLE_SIMD_SSE2
225227
run: |
226-
cmake -S. -B ./build_sse2_std -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
228+
cmake -S. -B ./build_sse2_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
227229
cmake --build ./build_sse2_std --config ${{matrix.config}}
228230
ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_std
229231
- name: Run with GLM_ENABLE_SIMD_SSE2 and language extensions
230232
run: |
231-
cmake -S. -B ./build_sse2_ext -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
233+
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
232234
cmake --build ./build_sse2_ext --config ${{matrix.config}}
233235
ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_ext
234236
235237
- name: Run with GLM_ENABLE_SIMD_AVX
236238
run: |
237-
cmake -S. -B ./build_avx1_std -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
239+
cmake -S. -B ./build_avx1_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
238240
cmake --build ./build_avx1_std --config ${{matrix.config}}
239241
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_std
240242
- name: Run with GLM_ENABLE_SIMD_AVX and language extensions
241243
run: |
242-
cmake -S. -B ./build_avx1_ext -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
244+
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
243245
cmake --build ./build_avx1_ext --config ${{matrix.config}}
244246
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_ext
245-
247+
248+
macos-latest:
249+
runs-on: ${{ matrix.os }}
250+
strategy:
251+
fail-fast: false
252+
matrix:
253+
os: [macos-latest]
254+
std: [98, 11, 14, 17, 20]
255+
config: [Debug, Release]
256+
257+
steps:
258+
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
259+
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
260+
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
261+
- name: Check out repository code
262+
uses: actions/checkout@v4
263+
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
264+
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
265+
- name: List files in the repository
266+
run: |
267+
ls ${{ github.workspace }}
268+
- run: echo "🍏 This job's status is ${{ job.status }}."
269+
- name: CMake Version
270+
run: cmake --version
271+
- name: Run with automagic detection
272+
run: |
273+
cmake -S. -B ./build_auto -DGLM_BUILD_TESTS=ON
274+
cmake --build ./build_auto --config ${{matrix.config}}
275+
ctest --verbose -C ${{matrix.config}} --test-dir ./build_auto
276+
277+
- name: Run with GLM_FORCE_PURE
278+
run: |
279+
cmake -S. -B ./build_pure_std -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
280+
cmake --build ./build_pure_std --config ${{matrix.config}}
281+
ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_std
282+
- name: Run with GLM_FORCE_PURE and language extensions
283+
run: |
284+
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
285+
cmake --build ./build_pure_ext --config ${{matrix.config}}
286+
ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_ext
287+
288+
- name: Run with GLM_ENABLE_SIMD_NEON
289+
run: |
290+
cmake -S. -B ./build_neon_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_NEON=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
291+
cmake --build ./build_neon_std --config ${{matrix.config}}
292+
ctest --verbose -C ${{matrix.config}} --test-dir ./build_neon_std
293+
- name: Run with GLM_ENABLE_SIMD_NEON and language extensions
294+
run: |
295+
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
296+
cmake --build ./build_neon_ext --config ${{matrix.config}}
297+
ctest --verbose -C ${{matrix.config}} --test-dir ./build_neon_ext
298+
299+

.github/workflows/make_light_release.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,28 @@ jobs:
1515
run: sudo apt-get update -y && sudo apt-get install -y zip p7zip
1616

1717
- name: Check out repository code
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919

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

23-
- name: Prepare layout
24-
run: mv copying.txt glm
23+
# - name: Prepare layout
24+
# run: mv copying.txt glm
2525

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

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

32-
- uses: actions/upload-artifact@v3
32+
- uses: actions/upload-artifact@v4
3333
with:
34-
name: glm-${{ env.RELEASE_VERSION }}-light
35-
path: glm-${{ env.RELEASE_VERSION }}-light.*
34+
name: glm-${{ env.RELEASE_VERSION }}
35+
path: glm-${{ env.RELEASE_VERSION }}.*
3636

3737
- name: Add to Release
38-
uses: softprops/action-gh-release@v1
38+
uses: softprops/action-gh-release@v2
3939
with:
4040
files: |
41-
glm-${{ env.RELEASE_VERSION }}-light.zip
42-
glm-${{ env.RELEASE_VERSION }}-light.7z
41+
glm-${{ env.RELEASE_VERSION }}.zip
42+
glm-${{ env.RELEASE_VERSION }}.7z

CMakeLists.txt

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
cmake_minimum_required(VERSION 3.6 FATAL_ERROR)
2-
cmake_policy(VERSION 3.6)
1+
# 3.6 is the actual minimun. 3.14 as the upper policy limit avoids CMake deprecation warnings.
2+
cmake_minimum_required(VERSION 3.6...3.14 FATAL_ERROR)
3+
cmake_policy(VERSION 3.6...3.14)
34

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

2324
option(GLM_BUILD_LIBRARY "Build dynamic/static library" ON)
24-
option(GLM_BUILD_TESTS "Build the test programs" ${GLM_IS_MASTER_PROJECT})
25+
option(GLM_BUILD_TESTS "Build the test programs" OFF)
2526
option(GLM_BUILD_INSTALL "Generate the install target" ${GLM_IS_MASTER_PROJECT})
2627

2728
include(GNUInstallDirs)
@@ -149,6 +150,7 @@ option(GLM_ENABLE_SIMD_SSE4_1 "Enable SSE 4.1 optimizations" OFF)
149150
option(GLM_ENABLE_SIMD_SSE4_2 "Enable SSE 4.2 optimizations" OFF)
150151
option(GLM_ENABLE_SIMD_AVX "Enable AVX optimizations" OFF)
151152
option(GLM_ENABLE_SIMD_AVX2 "Enable AVX2 optimizations" OFF)
153+
option(GLM_ENABLE_SIMD_NEON "Enable ARM NEON optimizations" OFF)
152154
option(GLM_FORCE_PURE "Force 'pure' instructions" OFF)
153155

154156
if(GLM_FORCE_PURE)
@@ -191,7 +193,7 @@ elseif(GLM_ENABLE_SIMD_SSE4_2)
191193
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
192194
add_compile_options(/QxSSE4.2)
193195
elseif((CMAKE_CXX_COMPILER_ID MATCHES "MSVC") AND NOT CMAKE_CL_64)
194-
add_compile_options(/arch:SSE2) # VC doesn't support SSE4.2
196+
add_compile_options(/arch:SSE4.2)
195197
endif()
196198
message(STATUS "GLM: SSE4.2 instruction set")
197199

@@ -242,6 +244,10 @@ elseif(GLM_ENABLE_SIMD_SSE2)
242244
add_compile_options(/arch:SSE2)
243245
endif()
244246
message(STATUS "GLM: SSE2 instruction set")
247+
elseif(GLM_ENABLE_SIMD_NEON)
248+
add_definitions(-DGLM_FORCE_INTRINSICS)
249+
250+
message(STATUS "GLM: ARM NEON instruction set")
245251
endif()
246252

247253
add_subdirectory(glm)

glm/detail/compute_vector_decl.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ namespace glm {
159159
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(vec<L, T, Q> const& v1, vec<L, T, Q> const& v2)
160160
{
161161
bool b = true;
162-
for (length_t i = 0; i < L; ++i)
163-
b = b && detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.x, v2.x);
162+
for (length_t i = 0; b && i < L; ++i)
163+
b = detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1[i], v2[i]);
164164
return b;
165165
}
166166
};

glm/detail/func_common.inl

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ namespace detail
345345
template<int c>
346346
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, T, Q> call(vec<L, T, Q> const& a)
347347
{
348-
vec<L, T, Q> v;
348+
vec<L, T, Q> v(0.0f);
349349
for (int i = 0; i < L; ++i)
350350
v[i] = a[c];
351351
return v;

glm/detail/func_common_simd.inl

+3-1
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,9 @@ namespace glm {
573573
struct compute_splat<L, float, Q, true> {
574574
template<int c>
575575
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, float, Q> call(vec<L, float, Q> const& a)
576-
{}
576+
{
577+
(void)a;
578+
}
577579

578580
template<>
579581
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, float, Q> call<0>(vec<L, float, Q> const& a)

glm/detail/func_exponential.inl

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace detail
1414
using std::log2;
1515
# else
1616
template<typename genType>
17-
genType log2(genType Value)
17+
GLM_FUNC_QUALIFIER genType log2(genType Value)
1818
{
1919
return std::log(Value) * static_cast<genType>(1.4426950408889634073599246810019);
2020
}

0 commit comments

Comments
 (0)