squiggle.c/makefile

34 lines
970 B
Makefile
Raw Normal View History

MAKEFLAGS += --no-print-directory
2023-07-23 10:44:16 +00:00
## Formatter
STYLE_BLUEPRINT=webkit
FORMATTER=clang-format -i -style=$(STYLE_BLUEPRINT)
2024-01-12 19:41:06 +00:00
## Time to botec
TTB=./examples/more/12_time_to_botec_parallel/example
2023-11-18 21:07:12 +00:00
build-examples:
2023-11-19 14:48:16 +00:00
cd examples/core && make all
cd examples/more && make all
2023-11-18 21:07:12 +00:00
format-examples:
2023-11-19 14:48:16 +00:00
cd examples/core && make format-all
cd examples/more && make format-all
2023-07-23 10:44:16 +00:00
format: squiggle.c squiggle.h
$(FORMATTER) squiggle.c squiggle.h
$(FORMATTER) squiggle_more.c squiggle_more.h
2023-07-23 10:44:16 +00:00
lint:
clang-tidy squiggle.c -- -lm
2023-11-30 00:00:11 +00:00
clang-tidy squiggle_more.c -- -lm
2024-01-12 18:02:41 +00:00
profile:
OMP_NUM_THREADS=16 sudo perf record ./examples/more/12_time_to_botec_parallel/example
sudo perf report
rm perf.data
2024-01-12 19:41:06 +00:00
time-linux:
@echo "Running 100x and taking avg time: $(TTB)"
@t=$$(/usr/bin/time -f "%e" -p bash -c 'for i in {1..100}; do $(TTB); done' 2>&1 >/dev/null | grep real | awk '{print $$2}' ); echo "scale=2; 1000 * $$t / 100" | bc | sed "s|^|Time using 16 threads: |" | sed 's|$$|ms|' && echo