1 | |
---|
2 | CFABUILD = ~/cfa2/build-perf |
---|
3 | LIBCFA = $(CFABUILD)/libcfa/*/src/.libs/libcfa.so |
---|
4 | |
---|
5 | CFA = $(CFABUILD)/driver/cfa |
---|
6 | PERFFLAGS_CFA = -nodebug -O2 |
---|
7 | PERFFLAGS_CXX = -DNDEBUG -O2 |
---|
8 | |
---|
9 | |
---|
10 | PERFPROGS = \ |
---|
11 | perfexp-cfa-hl-pta-share \ |
---|
12 | perfexp-cfa-hl-peq-share \ |
---|
13 | perfexp-cfa-ll-pta-share \ |
---|
14 | perfexp-cfa-ll-peq-share \ |
---|
15 | perfexp-cfa-hl-pta-noshare \ |
---|
16 | perfexp-cfa-hl-peq-noshare \ |
---|
17 | perfexp-cfa-ll-pta-noshare \ |
---|
18 | perfexp-cfa-ll-peq-noshare \ |
---|
19 | perfexp-stl-pta \ |
---|
20 | perfexp-stl-peq \ |
---|
21 | perfexp-buhr94-pta \ |
---|
22 | perfexp-buhr94-peq |
---|
23 | |
---|
24 | all : $(PERFPROGS) |
---|
25 | |
---|
26 | perfexp-cfa-hl-pta-share : prog.cfa $(LIBCFA) |
---|
27 | $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_HL_SHARE -DOP_PLUS_THEN_ASSIGN |
---|
28 | |
---|
29 | perfexp-cfa-hl-peq-share : prog.cfa $(LIBCFA) |
---|
30 | $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_HL_SHARE -DOP_PLUSEQ |
---|
31 | |
---|
32 | perfexp-cfa-ll-pta-share : prog.cfa $(LIBCFA) |
---|
33 | $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_LL_SHARE -DOP_PLUS_THEN_ASSIGN |
---|
34 | |
---|
35 | perfexp-cfa-ll-peq-share : prog.cfa $(LIBCFA) |
---|
36 | $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_LL_SHARE -DOP_PLUSEQ |
---|
37 | |
---|
38 | perfexp-cfa-hl-pta-noshare : prog.cfa $(LIBCFA) |
---|
39 | $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_HL_NOSHARE -DOP_PLUS_THEN_ASSIGN |
---|
40 | |
---|
41 | perfexp-cfa-hl-peq-noshare : prog.cfa $(LIBCFA) |
---|
42 | $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_HL_NOSHARE -DOP_PLUSEQ |
---|
43 | |
---|
44 | perfexp-cfa-ll-pta-noshare : prog.cfa $(LIBCFA) |
---|
45 | $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_LL_NOSHARE -DOP_PLUS_THEN_ASSIGN |
---|
46 | |
---|
47 | perfexp-cfa-ll-peq-noshare : prog.cfa $(LIBCFA) |
---|
48 | $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_LL_NOSHARE -DOP_PLUSEQ |
---|
49 | |
---|
50 | perfexp-stl-pta : prog.cfa |
---|
51 | $(CXX) -xc++ $(PERFFLAGS_CXX) $< -o $@ -DIMPL_STL -DOP_PLUS_THEN_ASSIGN |
---|
52 | |
---|
53 | perfexp-stl-peq : prog.cfa |
---|
54 | $(CXX) -xc++ $(PERFFLAGS_CXX) $< -o $@ -DIMPL_STL -DOP_PLUSEQ |
---|
55 | |
---|
56 | perfexp-buhr94-pta.o : prog.cfa |
---|
57 | $(CXX) -xc++ -c $(PERFFLAGS_CXX) $< -o $@ -DIMPL_BUHR94 -DOP_PLUS_THEN_ASSIGN |
---|
58 | |
---|
59 | perfexp-buhr94-peq.o : prog.cfa |
---|
60 | $(CXX) -xc++ -c $(PERFFLAGS_CXX) $< -o $@ -DIMPL_BUHR94 -DOP_PLUSEQ |
---|
61 | |
---|
62 | buhr94-string.o: |
---|
63 | $(CXX) -xc++ -c $(PERFFLAGS_CXX) ~/usys1/sm/string/StringSharing/src/string.cc -o $@ |
---|
64 | |
---|
65 | buhr94-VbyteSM.o: |
---|
66 | $(CXX) -xc++ -c $(PERFFLAGS_CXX) ~/usys1/sm/string/StringSharing/src/VbyteSM.cc -o $@ |
---|
67 | |
---|
68 | perfexp-buhr94-pta : perfexp-buhr94-pta.o buhr94-string.o buhr94-VbyteSM.o |
---|
69 | $(CXX) $(PERFFLAGS_CXX) $^ -o $@ |
---|
70 | |
---|
71 | perfexp-buhr94-peq : perfexp-buhr94-peq.o buhr94-string.o buhr94-VbyteSM.o |
---|
72 | $(CXX) $(PERFFLAGS_CXX) $^ -o $@ |
---|
73 | |
---|
74 | clean: |
---|
75 | rm -f *.o perfexp* |
---|
76 | |
---|
77 | MEASURE = $(PERFPROGS) |
---|
78 | CORPORI = corpus-100-*-1.txt |
---|
79 | |
---|
80 | measurement: $(MEASURE) |
---|
81 | tofile=measurement-`date '+%F--%H-%M-%S'`.csv ; \ |
---|
82 | echo $$tofile ; \ |
---|
83 | for prog in $(MEASURE) ; do \ |
---|
84 | for corpus in $(CORPORI) ; do \ |
---|
85 | corpusbody=`cat $$corpus` ; \ |
---|
86 | printed=`./$$prog 100 10 $$corpusbody` ; \ |
---|
87 | echo $$prog,$$corpus,$$printed >> $$tofile ; \ |
---|
88 | done ; \ |
---|
89 | done ; \ |
---|
90 | cat $$tofile |
---|