parent
88f37df443
commit
6818dd821e
|
@ -1,16 +1,65 @@
|
||||||
configurations = [
|
_kinds = []
|
||||||
# TODO: Also add defines for DOUBLE for d and the rest
|
real_kinds = ['s', 'd', 'q']
|
||||||
{'defs': [], 'name': 'imax'}, # Original, no defines
|
complex_kinds = ['c', 'z', 'x']
|
||||||
{'defs': ['-DUSE_ABS'], 'name': 'iamax'},
|
extended_kinds = ['dx', 'bf16']
|
||||||
{'defs': ['-DUSE_ABS', '-DUSE_MIN'], 'name': 'iamin'},
|
_rules = {
|
||||||
{'defs': ['-DUSE_MIN'], 'name': 'imin'},
|
'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 = []
|
_static_libs = []
|
||||||
foreach conf: configurations
|
foreach conf: configurations
|
||||||
_static_libs += static_library(
|
_static_libs += static_library(
|
||||||
conf['name'],
|
conf['name'],
|
||||||
'imax.c',
|
conf['src'],
|
||||||
include_directories: _inc,
|
include_directories: _inc,
|
||||||
c_args: conf['defs'],
|
c_args: conf['defs'],
|
||||||
)
|
)
|
||||||
|
|
|
@ -32,6 +32,9 @@ option('realkind', type : 'string', value : 'd',
|
||||||
option('use_xblas', type : 'boolean', value : false,
|
option('use_xblas', type : 'boolean', value : false,
|
||||||
description : 'Build extended precision (needs XBLAS)')
|
description : 'Build extended precision (needs XBLAS)')
|
||||||
|
|
||||||
|
# From interface/Makefile
|
||||||
|
option('build_bfloat16', type: 'boolean', value: false, description: 'Build bfloat16')
|
||||||
|
|
||||||
# Meson only
|
# Meson only
|
||||||
# This is the equivalent of producing all precisions via make all inside lapack-netlib/blas/src
|
# 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')
|
option('build_all_prec', type: 'boolean', value: true, description: 'Build all precisions')
|
||||||
|
|
Loading…
Reference in New Issue