parent
88f37df443
commit
6818dd821e
|
@ -1,16 +1,65 @@
|
|||
configurations = [
|
||||
# TODO: Also add defines for DOUBLE for d and the rest
|
||||
{'defs': [], 'name': 'imax'}, # Original, no defines
|
||||
{'defs': ['-DUSE_ABS'], 'name': 'iamax'},
|
||||
{'defs': ['-DUSE_ABS', '-DUSE_MIN'], 'name': 'iamin'},
|
||||
{'defs': ['-DUSE_MIN'], 'name': 'imin'},
|
||||
_kinds = []
|
||||
real_kinds = ['s', 'd', 'q']
|
||||
complex_kinds = ['c', 'z', 'x']
|
||||
extended_kinds = ['dx', 'bf16']
|
||||
_rules = {
|
||||
's': ['FLOAT'],
|
||||
'd': ['DOUBLE'],
|
||||
'q': ['QUAD_PRECISION'],
|
||||
'c': ['COMPLEX'],
|
||||
'dx': ['XDOUBLE'],
|
||||
'bf19': ['BFLOAT16'],
|
||||
}
|
||||
|
||||
sblas_extobs = []
|
||||
_defs = []
|
||||
|
||||
blas_roots = []
|
||||
blas1_roots = [
|
||||
# These don't exist as roots.
|
||||
# ismax amax isamax amin ismin isamin
|
||||
# TODO: Why is dsdot in sblas1objs!?
|
||||
'axpy', 'swap', 'copy', 'scal', 'dot', 'dsdot', 'asum', 'sum', 'nrm2', 'max',
|
||||
'rot', 'rotg', 'rotm', 'rotmg', 'axpby',
|
||||
]
|
||||
blas2_roots = [
|
||||
'gemv', 'ger', 'trsv', 'trmv', 'symv', 'syr', 'syr2', 'gbmv', 'sbmv',
|
||||
'spmv', 'spr', 'spr2', 'tbsv', 'tbmv', 'tpsv', 'tpmv',
|
||||
]
|
||||
blas3_roots = [
|
||||
# TODO: trmm is trsm with a flag
|
||||
'gemm', 'symm', 'trsm', 'syrk', 'syr2k', 'omatcopy', 'imatcopy', 'geadd',
|
||||
'gemmt'
|
||||
]
|
||||
|
||||
# Generated
|
||||
# TODO: Generated the imax and max via use_abs use_min
|
||||
configurations = []
|
||||
blas_roots += blas1_roots
|
||||
blas_roots += blas2_roots
|
||||
blas_roots += blas3_roots
|
||||
_kinds += real_kinds
|
||||
foreach blasi : blas_roots
|
||||
sfiles = blasi + '.c'
|
||||
foreach tkind : real_kinds
|
||||
name = tkind + blasi
|
||||
defs = []
|
||||
configurations += {'defs': defs, 'name': name, 'src': sfiles}
|
||||
endforeach
|
||||
endforeach
|
||||
|
||||
# if get_option('bfloat16')
|
||||
# TODO: Handle bfloat16
|
||||
# sblas1_srcs += files('sbdot.c')
|
||||
# sblas2_srcs += files('sbgemv.c')
|
||||
# sblas3_srcs += files(['sbgemm.c', 'sbgemmt.c'])
|
||||
# endif
|
||||
|
||||
_static_libs = []
|
||||
foreach conf: configurations
|
||||
_static_libs += static_library(
|
||||
conf['name'],
|
||||
'imax.c',
|
||||
conf['src'],
|
||||
include_directories: _inc,
|
||||
c_args: conf['defs'],
|
||||
)
|
||||
|
|
|
@ -32,6 +32,9 @@ option('realkind', type : 'string', value : 'd',
|
|||
option('use_xblas', type : 'boolean', value : false,
|
||||
description : 'Build extended precision (needs XBLAS)')
|
||||
|
||||
# From interface/Makefile
|
||||
option('build_bfloat16', type: 'boolean', value: false, description: 'Build bfloat16')
|
||||
|
||||
# Meson only
|
||||
# This is the equivalent of producing all precisions via make all inside lapack-netlib/blas/src
|
||||
option('build_all_prec', type: 'boolean', value: true, description: 'Build all precisions')
|
||||
|
|
Loading…
Reference in New Issue