diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2018-06-08 19:08:48 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2018-06-11 16:01:58 +0100 |
commit | 764b4bfb2b6faa2c38edebf0895aff1f7cf972a2 (patch) | |
tree | b29533294a506475294e745ba10d4193c270be4d /Makefile | |
parent | ed0ecfff891f9b69d5dfd86fa877b90b4566634c (diff) | |
download | arm-optimized-routines-764b4bfb2b6faa2c38edebf0895aff1f7cf972a2.tar.gz |
Add benchmark code
Simple microbenchmark to measure the latency and throughput of math
functions.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -27,7 +27,10 @@ MATH_OBJS = $(MATH_BASE:$(srcdir)/%=build/%.o) RTEST_SRCS = $(wildcard $(srcdir)/test/rtest/*.[cS]) RTEST_BASE = $(basename $(RTEST_SRCS)) RTEST_OBJS = $(RTEST_BASE:$(srcdir)/%=build/%.o) -ALL_OBJS = $(MATH_OBJS) $(RTEST_OBJS) build/test/mathtest.o +ALL_OBJS = $(MATH_OBJS) \ + $(RTEST_OBJS) \ + build/test/mathtest.o \ + build/test/mathbench.o \ INCLUDES = $(wildcard $(srcdir)/math/include/*.h) ALL_INCLUDES = $(INCLUDES:$(srcdir)/math/%=build/%) @@ -40,6 +43,8 @@ ALL_TOOLS = \ build/bin/runtest.sh \ build/bin/rtest \ build/bin/mathtest \ + build/bin/mathbench \ + build/bin/mathbench_libc \ TESTS = $(wildcard $(srcdir)/test/testcases/*/*.tst) ALL_TESTS = $(TESTS:$(srcdir)/test/testcases/%=build/bin/%) @@ -99,6 +104,12 @@ build/bin/rtest: $(RTEST_OBJS) build/bin/mathtest: build/test/mathtest.o build/lib/libmathlib.a $(CC) $(CFLAGS_ALL) $(LDFLAGS_ALL) -static -o $@ $^ -lm +build/bin/mathbench: build/test/mathbench.o build/lib/libmathlib.a + $(CC) $(CFLAGS_ALL) $(LDFLAGS_ALL) -static -o $@ $^ -lm + +build/bin/mathbench_libc: build/test/mathbench.o + $(CC) $(CFLAGS_ALL) $(LDFLAGS_ALL) -static -o $@ $^ -lm + build/include/%.h: $(srcdir)/math/include/%.h cp $< $@ |