-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (44 loc) · 1.58 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
CC := clang++
RUSTC := rustc
RUSTC_NIGHTLY := ~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc
RUSTC_PATCHED := ~/Source/rust/build/x86_64-unknown-linux-gnu/stage2/bin/rustc
.PHONY: gbench-cc
gbench-cc: gbench.cc
$(CC) gbench.cc -O2 -march=haswell -lbenchmark
.PHONY: naive-cc
naive-cc: naive.cc
$(CC) naive.cc -O2 -march=haswell -DLEN=100000
.PHONY: naive-4k-cc
naive-4k-cc: naive.cc
$(CC) naive.cc -O2 -march=haswell -DLEN=4000
.PHONY: naive-rs
naive-rs: naive.rs
$(RUSTC) -C opt-level=3 -C target-feature=+avx2,+fma -o a.out naive.rs
.PHONY: naive-4k-rs
naive-4k-rs: naive-4k.rs
$(RUSTC) -C opt-level=3 -C target-feature=+avx2,+fma -o a.out naive-4k.rs
.PHONY: mul-add-rs
mul-add-rs: mul-add.rs
$(RUSTC) -C opt-level=3 -C target-feature=+avx2,+fma -o a.out mul-add.rs
.PHONY: map-rs
map-rs: map.rs
$(RUSTC) -C opt-level=3 -C target-feature=+avx2,+fma -o a.out map.rs
.PHONY: fold-rs
fold-rs: fold.rs
$(RUSTC) -C opt-level=3 -C target-feature=+avx2,+fma -o a.out fold.rs
.PHONY: algebraic-rs
algebraic-rs: algebraic.rs
$(RUSTC_NIGHTLY) -C opt-level=3 -C target-feature=+avx2,+fma -o a.out algebraic.rs
.PHONY: algebraic-4k-rs
algebraic-4k-rs: algebraic-4k.rs
$(RUSTC_NIGHTLY) -C opt-level=3 -C target-feature=+avx2,+fma -o a.out algebraic-4k.rs
.PHONY: fast-rs
fast-rs: fast.rs
$(RUSTC_NIGHTLY) -C opt-level=3 -C target-feature=+avx2,+fma -o a.out fast.rs
.PHONY: algebraic-stable-rs
algebraic-stable-rs: algebraic-stable.rs
$(RUSTC_PATCHED) -C opt-level=3 -C target-feature=+avx2,+fma -o a.out algebraic-stable.rs
.PHONE: profile
profile:
perf record ./a.out
perf annotate