2023-11-03 12:12:20 +00:00
|
|
|
libmvec-supported-funcs = acos \
|
2024-02-20 16:59:40 +00:00
|
|
|
acosh \
|
2023-11-03 12:12:20 +00:00
|
|
|
asin \
|
2024-02-20 16:59:41 +00:00
|
|
|
asinh \
|
2023-11-03 12:12:21 +00:00
|
|
|
atan \
|
2024-04-03 11:13:53 +00:00
|
|
|
atanh \
|
2023-11-03 12:12:22 +00:00
|
|
|
atan2 \
|
2024-04-30 12:49:59 +00:00
|
|
|
cbrt \
|
2023-11-03 12:12:19 +00:00
|
|
|
cos \
|
2024-02-20 16:59:39 +00:00
|
|
|
cosh \
|
2024-02-20 16:59:38 +00:00
|
|
|
erf \
|
2024-02-20 16:59:45 +00:00
|
|
|
erfc \
|
2023-06-28 11:19:39 +00:00
|
|
|
exp \
|
2023-10-05 16:10:52 +00:00
|
|
|
exp10 \
|
2023-10-05 16:10:49 +00:00
|
|
|
exp2 \
|
2023-11-16 13:24:18 +00:00
|
|
|
expm1 \
|
2024-04-30 12:49:58 +00:00
|
|
|
hypot \
|
2023-06-28 11:19:38 +00:00
|
|
|
log \
|
2023-10-05 16:10:51 +00:00
|
|
|
log10 \
|
2023-11-03 12:12:23 +00:00
|
|
|
log1p \
|
2023-10-05 16:10:50 +00:00
|
|
|
log2 \
|
2024-05-16 08:21:24 +00:00
|
|
|
pow \
|
2023-10-05 16:10:48 +00:00
|
|
|
sin \
|
2024-04-03 11:15:41 +00:00
|
|
|
sinh \
|
2024-02-20 16:59:44 +00:00
|
|
|
tan \
|
|
|
|
tanh
|
2023-04-12 13:37:49 +00:00
|
|
|
|
2023-06-28 11:19:37 +00:00
|
|
|
float-advsimd-funcs = $(libmvec-supported-funcs)
|
|
|
|
double-advsimd-funcs = $(libmvec-supported-funcs)
|
|
|
|
float-sve-funcs = $(libmvec-supported-funcs)
|
|
|
|
double-sve-funcs = $(libmvec-supported-funcs)
|
2023-04-12 13:37:49 +00:00
|
|
|
|
|
|
|
ifeq ($(subdir),mathvec)
|
|
|
|
libmvec-support = $(addsuffix f_advsimd,$(float-advsimd-funcs)) \
|
|
|
|
$(addsuffix _advsimd,$(double-advsimd-funcs)) \
|
|
|
|
$(addsuffix f_sve,$(float-sve-funcs)) \
|
2023-06-28 11:19:38 +00:00
|
|
|
$(addsuffix _sve,$(double-sve-funcs)) \
|
2023-06-28 11:19:39 +00:00
|
|
|
v_log_data \
|
2023-10-05 16:10:50 +00:00
|
|
|
v_exp_data \
|
2023-10-05 16:10:51 +00:00
|
|
|
v_log2_data \
|
2024-02-20 16:59:38 +00:00
|
|
|
v_log10_data \
|
|
|
|
erf_data \
|
|
|
|
erff_data \
|
2024-02-20 16:59:45 +00:00
|
|
|
v_exp_tail_data \
|
|
|
|
erfc_data \
|
2024-05-16 08:21:24 +00:00
|
|
|
erfcf_data \
|
|
|
|
v_pow_exp_data \
|
|
|
|
v_pow_log_data \
|
|
|
|
v_powf_data
|
2023-04-12 13:37:49 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
sve-cflags = -march=armv8-a+sve
|
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(build-mathvec),yes)
|
|
|
|
bench-libmvec = $(addprefix float-advsimd-,$(float-advsimd-funcs)) \
|
|
|
|
$(addprefix double-advsimd-,$(double-advsimd-funcs)) \
|
|
|
|
$(addprefix float-sve-,$(float-sve-funcs)) \
|
|
|
|
$(addprefix double-sve-,$(double-sve-funcs))
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(objpfx)bench-float-advsimd-%.c:
|
|
|
|
$(PYTHON) $(..)sysdeps/aarch64/fpu/scripts/bench_libmvec_advsimd.py $(basename $(@F)) > $@
|
|
|
|
$(objpfx)bench-double-advsimd-%.c:
|
|
|
|
$(PYTHON) $(..)sysdeps/aarch64/fpu/scripts/bench_libmvec_advsimd.py $(basename $(@F)) > $@
|
|
|
|
$(objpfx)bench-float-sve-%.c:
|
|
|
|
$(PYTHON) $(..)sysdeps/aarch64/fpu/scripts/bench_libmvec_sve.py $(basename $(@F)) > $@
|
|
|
|
$(objpfx)bench-double-sve-%.c:
|
|
|
|
$(PYTHON) $(..)sysdeps/aarch64/fpu/scripts/bench_libmvec_sve.py $(basename $(@F)) > $@
|
|
|
|
|
|
|
|
ifeq (${STATIC-BENCHTESTS},yes)
|
|
|
|
libmvec-benchtests = $(common-objpfx)mathvec/libmvec.a $(common-objpfx)math/libm.a
|
|
|
|
else
|
|
|
|
libmvec-benchtests = $(libmvec) $(libm)
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(addprefix $(objpfx)bench-,$(bench-libmvec)): $(libmvec-benchtests)
|
|
|
|
|
|
|
|
ifeq ($(build-mathvec),yes)
|
|
|
|
libmvec-tests += float-advsimd double-advsimd float-sve double-sve
|
|
|
|
endif
|
|
|
|
|
|
|
|
define sve-float-cflags-template
|
|
|
|
CFLAGS-$(1)f_sve.c += $(sve-cflags)
|
|
|
|
CFLAGS-bench-float-sve-$(1).c += $(sve-cflags)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define sve-double-cflags-template
|
|
|
|
CFLAGS-$(1)_sve.c += $(sve-cflags)
|
|
|
|
CFLAGS-bench-double-sve-$(1).c += $(sve-cflags)
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach f,$(float-sve-funcs), $(eval $(call sve-float-cflags-template,$(f))))
|
|
|
|
$(foreach f,$(double-sve-funcs), $(eval $(call sve-double-cflags-template,$(f))))
|
|
|
|
|
|
|
|
CFLAGS-test-float-sve-wrappers.c = $(sve-cflags)
|
|
|
|
CFLAGS-test-double-sve-wrappers.c = $(sve-cflags)
|