source: tests/zombies/string-perf/Makefile@ 97d58dc

ADT ast-experimental enum pthread-emulation qualifiedEnum
Last change on this file since 97d58dc was 97d58dc, checked in by Michael Brooks <mlbrooks@…>, 4 years ago

String perf make-run refactor into fewer rules

  • Property mode set to 100644
File size: 1.9 KB
Line 
1
2CFABUILD = ~/cfa2/build-perf
3LIBCFA = $(CFABUILD)/libcfa/*/src/.libs/libcfa.so
4
5CFA = $(CFABUILD)/driver/cfa
6PERFFLAGS_CFA = -nodebug -O2
7PERFFLAGS_CXX = -DNDEBUG -O2
8
9
10PERFPROGS = \
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
24all : $(PERFPROGS)
25
26# upper-case conversion function
27define uc
28$(shell echo $(1) | tr '[:lower:]' '[:upper:]')
29endef
30
31perfexp-cfa-%: APILEVEL=$(call uc,$(word 3,$(subst -, ,$@)))
32perfexp-cfa-%: OPERATION=$(call uc,$(word 4,$(subst -, ,$@)))
33perfexp-cfa-%: SHARING=$(call uc,$(word 5,$(subst -, ,$@)))
34perfexp-cfa-%: prog.cfa $(LIBCFA)
35 $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_$(APILEVEL)_$(SHARING) -DOP_$(OPERATION)
36
37perfexp-stl-%: OPERATION=$(call uc,$(word 3,$(subst -, ,$@)))
38perfexp-stl-%: prog.cfa
39 $(CXX) -xc++ $(PERFFLAGS_CXX) $< -o $@ -DIMPL_STL -DOP_$(OPERATION)
40
41perfexp-buhr94-%.o: OPERATION=$(call uc,$(word 3,$(subst -, ,$(basename $@))))
42perfexp-buhr94-%.o: prog.cfa
43 $(CXX) -xc++ -c $(PERFFLAGS_CXX) $< -o $@ -DIMPL_BUHR94 -DOP_$(OPERATION)
44
45buhr94-string.o:
46 $(CXX) -xc++ -c $(PERFFLAGS_CXX) ~/usys1/sm/string/StringSharing/src/string.cc -o $@
47
48buhr94-VbyteSM.o:
49 $(CXX) -xc++ -c $(PERFFLAGS_CXX) ~/usys1/sm/string/StringSharing/src/VbyteSM.cc -o $@
50
51perfexp-buhr94-% : perfexp-buhr94-%.o buhr94-string.o buhr94-VbyteSM.o
52 $(CXX) $(PERFFLAGS_CXX) $^ -o $@
53
54clean:
55 rm -f *.o perfexp*
56
57MEASURE = $(PERFPROGS)
58CORPORI = corpus-100-*-1.txt
59
60measurement: $(MEASURE)
61 tofile=measurement-`date '+%F--%H-%M-%S'`.csv ; \
62 echo $$tofile ; \
63 for prog in $(MEASURE) ; do \
64 for corpus in $(CORPORI) ; do \
65 corpusbody=`cat $$corpus` ; \
66 printed=`./$$prog 100 10 $$corpusbody` ; \
67 echo $$prog,$$corpus,$$printed >> $$tofile ; \
68 done ; \
69 done ; \
70 cat $$tofile
Note: See TracBrowser for help on using the repository browser.