File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -277,28 +277,43 @@ summary(
277277 section : ' Dependencies' ,
278278)
279279
280+ simd_avx2 = false
280281simd_avx2_flags = []
281282if host_machine .cpu_family().startswith(' x86' )
282283 flag = (cc.get_argument_syntax() == ' msvc' ) ? ' /arch:AVX2' : ' -mavx2'
283284 if cc.has_argument(flag)
284285 simd_avx2_flags += flag
286+ simd_avx2 = true
285287 endif
286288endif
287289
290+ simd_sse2_neon = false
288291simd_sse2_neon_flags = []
289292if host_machine .cpu_family() == ' arm'
290293 # first check if compiler supports the flag, and use it then. Needed only
291294 # on 32-bit armv7.
292295 flag = ' -mfpu=neon'
293296 if cc.has_argument(flag)
294297 simd_sse2_neon_flags += flag
295- add_global_arguments ( ' -DPG_ENABLE_ARM_NEON=1 ' , language : ' c ' )
298+ simd_sse2_neon = true
296299 endif
297300elif host_machine .cpu_family() == ' aarch64'
298301 # no explicit flag needed in this case
302+ simd_sse2_neon = true
303+ endif
304+
305+ if simd_sse2_neon
299306 add_global_arguments (' -DPG_ENABLE_ARM_NEON=1' , language : ' c' )
300307endif
301308
309+ summary (
310+ {
311+ ' AVX2' : simd_avx2,
312+ ' NEON' : simd_sse2_neon,
313+ },
314+ section : ' SIMD' ,
315+ )
316+
302317# stores werror
303318warnings_error = []
304319
You can’t perform that action at this time.
0 commit comments