Ignore:
Timestamp:
Nov 18, 2021, 5:42:51 PM (9 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
enum, master, pthread-emulation
Children:
fefd77a
Parents:
4d0eb1c
Message:

String perf make-run refactor into fewer rules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/zombies/string-perf/Makefile

    r4d0eb1c r97d58dc  
    2424all : $(PERFPROGS)
    2525
    26 perfexp-cfa-hl-pta-share : prog.cfa $(LIBCFA)
    27         $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_HL_SHARE -DOP_PLUS_THEN_ASSIGN
     26# upper-case conversion function
     27define uc
     28$(shell echo $(1) | tr  '[:lower:]' '[:upper:]')
     29endef
    2830
    29 perfexp-cfa-hl-peq-share : prog.cfa $(LIBCFA)
    30         $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_HL_SHARE -DOP_PLUSEQ
     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)
    3136
    32 perfexp-cfa-ll-pta-share : prog.cfa $(LIBCFA)
    33         $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_LL_SHARE -DOP_PLUS_THEN_ASSIGN
     37perfexp-stl-%: OPERATION=$(call uc,$(word 3,$(subst -, ,$@)))
     38perfexp-stl-%: prog.cfa
     39        $(CXX) -xc++ $(PERFFLAGS_CXX) $< -o $@ -DIMPL_STL -DOP_$(OPERATION)
    3440
    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
     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)
    6144
    6245buhr94-string.o:
     
    6649        $(CXX) -xc++ -c $(PERFFLAGS_CXX) ~/usys1/sm/string/StringSharing/src/VbyteSM.cc -o $@
    6750
    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
     51perfexp-buhr94-% : perfexp-buhr94-%.o buhr94-string.o buhr94-VbyteSM.o
    7252        $(CXX) $(PERFFLAGS_CXX) $^ -o $@
    7353
Note: See TracChangeset for help on using the changeset viewer.