-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.nsconfig
87 lines (73 loc) · 3.86 KB
/
build.nsconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Copyright (C) 2021 Agenium Scale
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
## Get OS/Compiler specific file extensions
set o = @obj_ext
set exe = @exe_ext
set root = @source_dir
set build = @build_dir
set root = @source_dir
## Some defaults
ifnot_set "NSIMD compilation flags" nsimd = -lnsimd_cpu
ifnot_set "SIMD extension to use" simd = cpu
## Targets for compilation
set src_for_cpu = $root$/cifo4/src/cifo4-local.cpp
set src_for_avx = $root$/cifo4/src/cifo4-avx-local.cpp
set src_for_neon128 = $root$/cifo4/src/cifo4-neon-local.cpp
set src_for_aarch64 = $root$/cifo4/src/cifo4-neon-local.cpp
set src_for_sve = $root$/cifo4/src/cifo4-sve-local.cpp
set src_for_sve128 = $root$/cifo4/src/cifo4-sve-local.cpp
set src_for_sve256 = $root$/cifo4/src/cifo4-sve-local.cpp
set src_for_sve512 = $root$/cifo4/src/cifo4-sve-local.cpp
set src_for_sve1024 = $root$/cifo4/src/cifo4-sve-local.cpp
set src_for_sve2048 = $root$/cifo4/src/cifo4-sve-local.cpp
set src_for_nsimd-sse42 = $root$/cifo4/src/cifo4-nsimd-adv-local.cpp
set src_for_nsimd-avx = $root$/cifo4/src/cifo4-nsimd-adv-local.cpp
set src_for_nsimd-avx512-skylake = $root$/cifo4/src/cifo4-nsimd-adv-local.cpp
set src_for_nsimd-neon128 = $root$/cifo4/src/cifo4-nsimd-adv-local.cpp
set src_for_nsimd-aarch64 = $root$/cifo4/src/cifo4-nsimd-adv-local.cpp
set src_for_nsimd-sve = $root$/cifo4/src/cifo4-nsimd-adv-local.cpp
set src_for_nsimd-sve128 = $root$/cifo4/src/cifo4-nsimd-adv-local.cpp
set src_for_nsimd-sve256 = $root$/cifo4/src/cifo4-nsimd-adv-local.cpp
set src_for_nsimd-sve512 = $root$/cifo4/src/cifo4-nsimd-adv-local.cpp
set src_for_nsimd-sve1024 = $root$/cifo4/src/cifo4-nsimd-adv-local.cpp
set src_for_nsimd-sve2048 = $root$/cifo4/src/cifo4-nsimd-adv-local.cpp
## SIMD compiler flags
set cflags_for_cpu =
set cflags_for_avx = -mavx
set cflags_for_neon128 = -mneon128
set cflags_for_aarch64 = -maarch64
set cflags_for_sve = -msve
set cflags_for_sve128 = -msve128
set cflags_for_sve256 = -msve256
set cflags_for_sve512 = -msve512
set cflags_for_sve1024 = -msve1024
set cflags_for_sve2048 = -msve2048
set cflags_for_nsimd-sse42 = -msse42 -mfma -DFMA -DSSE42
set cflags_for_nsimd-avx = -mavx -mfma -DAVX -DFMA
set cflags_for_nsimd-avx512-skylake = -mavx512_skylake -DAVX512_SKYLAKE
set cflags_for_nsimd-neon128 = -mneon128 -DNEON128
set cflags_for_nsimd-aarch64 = -maarch64 -DAARCH64
set cflags_for_nsimd-sve = -msve -DSVE
set cflags_for_nsimd-sve128 = -msve128 -DSVE128
set cflags_for_nsimd-sve256 = -msve256 -DSVE256
set cflags_for_nsimd-sve512 = -msve512 -DSVE512
set cflags_for_nsimd-sve1024 = -msve1024 -DSVE1024
set cflags_for_nsimd-sve2048 = -msve2048 -DSVE2048
## Some defaults
set flags = -Wall -std=c++11 -O3 -g -I$root$/cifo4/include
## Default building rules
phony all deps cifo4$exe
build_file cifo4$exe autodeps ${src_for_$simd$} $root$/cifo4/src/main.cpp
c++ $flags ${cflags_for_$simd$} $nsimd @in -o @out