Use avx or neon for auto-vectorisation
parent
9f67b47e8c
commit
a43bb5d3d4
16
meson.build
16
meson.build
|
@ -13,6 +13,22 @@ add_project_arguments([
|
||||||
'-fvisibility=hidden',
|
'-fvisibility=hidden',
|
||||||
], language: 'c')
|
], language: 'c')
|
||||||
|
|
||||||
|
cpu = host_machine.cpu_family()
|
||||||
|
|
||||||
|
if cpu == 'x86_64'
|
||||||
|
arch_args = [
|
||||||
|
'-mavx',
|
||||||
|
]
|
||||||
|
elif cpu == 'arm' or cpu == 'aarch64'
|
||||||
|
arch_args = [
|
||||||
|
'-mfpu=neon',
|
||||||
|
]
|
||||||
|
else
|
||||||
|
arch_args = []
|
||||||
|
endif
|
||||||
|
|
||||||
|
add_project_arguments(arch_args, language: 'c')
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
|
|
||||||
libm = cc.find_library('m', required: false)
|
libm = cc.find_library('m', required: false)
|
||||||
|
|
Loading…
Reference in New Issue