File: meson.build

package info (click to toggle)
numpy 1%3A2.2.4%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 83,420 kB
  • sloc: python: 248,499; asm: 232,365; ansic: 216,874; cpp: 135,657; f90: 1,540; sh: 938; fortran: 558; makefile: 409; sed: 139; xml: 109; java: 92; perl: 79; cs: 54; javascript: 53; objc: 29; lex: 13; yacc: 9
file content (41 lines) | stat: -rw-r--r-- 1,591 bytes parent folder | download
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
source_root = meson.project_source_root()
mod_features = import('features')
compiler_id = meson.get_compiler('c').get_id()

VSX = mod_features.new(
  'VSX', 1, args: '-mvsx',
  test_code: files(source_root + '/numpy/distutils/checks/cpu_vsx.c')[0],
  extra_tests: {
    'VSX_ASM': files(source_root + '/numpy/distutils/checks/extra_vsx_asm.c')[0]
  }
)
if compiler_id == 'clang'
  VSX.update(args: ['-mvsx', '-maltivec'])
endif
VSX2 = mod_features.new(
  'VSX2', 2, implies: VSX, args: {'val': '-mcpu=power8', 'match': '.*vsx'},
  detect: {'val': 'VSX2', 'match': 'VSX'},
  test_code: files(source_root + '/numpy/distutils/checks/cpu_vsx2.c')[0],
)
# VSX2 is hardware baseline feature on ppc64le since the first little-endian
# support was part of Power8
if host_machine.endian() == 'little'
  VSX.update(implies: VSX2)
endif
VSX3 = mod_features.new(
  'VSX3', 3, implies: VSX2, args: {'val': '-mcpu=power9', 'match': '.*[mcpu=|vsx].*'},
  detect: {'val': 'VSX3', 'match': 'VSX.*'},
  test_code: files(source_root + '/numpy/distutils/checks/cpu_vsx3.c')[0],
  extra_tests: {
    'VSX3_HALF_DOUBLE': files(source_root + '/numpy/distutils/checks/extra_vsx3_half_double.c')[0]
  }
)
VSX4 = mod_features.new(
  'VSX4', 4, implies: VSX3, args: {'val': '-mcpu=power10', 'match': '.*[mcpu=|vsx].*'},
  detect: {'val': 'VSX4', 'match': 'VSX.*'},
  test_code: files(source_root + '/numpy/distutils/checks/cpu_vsx4.c')[0],
  extra_tests: {
    'VSX4_MMA': files(source_root + '/numpy/distutils/checks/extra_vsx4_mma.c')[0]
  }
)
PPC64_FEATURES = {'VSX': VSX, 'VSX2': VSX2, 'VSX3': VSX3, 'VSX4': VSX4}