Added control point stuff to the Makefile...
authorJonathan Lifflander <jliffl2@illinois.edu>
Tue, 27 Oct 2009 20:41:26 +0000 (20:41 +0000)
committerJonathan Lifflander <jliffl2@illinois.edu>
Tue, 27 Oct 2009 20:41:26 +0000 (20:41 +0000)
src/ck-cp/API-generator/cp_effects.C
src/ck-cp/API-generator/cp_effects.h
src/ck-cp/API-generator/cp_effects.pl
src/ck-cp/controlPoints.C
src/scripts/Make.depends
src/scripts/Makefile

index 4dcca9997e53fd1e5df56ad06566ac23171f652a..25fd442d58ddb8eb4b725555b8378795113e66dd 100644 (file)
@@ -11,6 +11,18 @@ typedef map<std::string, vector<pair<int, ControlPoint::ControlPointAssociation>
 CkpvDeclare(cp_effect_map, cp_effects);
 CkpvDeclare(cp_name_map, cp_names);
 
+NoControlPointAssociation default_assoc;
+
+ControlPoint::ControlPointAssociatedEntry ControlPoint::assocWithEntry(const int entry) {
+    ControlPointAssociatedEntry e(entry);
+    return e;
+}
+
+ControlPoint::ControlPointAssociatedArray ControlPoint::assocWithArray(const CProxy_ArrayBase &array) {
+    ControlPointAssociatedArray a(array);
+    return a;
+}
+
 void initControlPointEffects() {
        CkpvInitialize(cp_effect_map, cp_effects);
        CkpvInitialize(cp_name_map, cp_names);
@@ -20,116 +32,60 @@ void testControlPointEffects() {
 
        ControlPoint::EffectIncrease::Priority("name");
        ControlPoint::EffectDecrease::Priority("name");
-       ControlPoint::EffectIncrease::Priority("name", NoControlPointAssociation);
-       ControlPoint::EffectDecrease::Priority("name", NoControlPointAssociation);
-       ControlPoint::EffectIncrease::Priority("name", EntryAssociation);
-       ControlPoint::EffectDecrease::Priority("name", EntryAssociation);
-       ControlPoint::EffectIncrease::Priority("name", ArrayAssociation);
-       ControlPoint::EffectDecrease::Priority("name", ArrayAssociation);
+       ControlPoint::EffectIncrease::Priority("name", assocWithEntry(0));
+       ControlPoint::EffectDecrease::Priority("name", assocWithEntry(0));
        ControlPoint::EffectIncrease::MemoryConsumption("name");
        ControlPoint::EffectDecrease::MemoryConsumption("name");
-       ControlPoint::EffectIncrease::MemoryConsumption("name", NoControlPointAssociation);
-       ControlPoint::EffectDecrease::MemoryConsumption("name", NoControlPointAssociation);
-       ControlPoint::EffectIncrease::MemoryConsumption("name", EntryAssociation);
-       ControlPoint::EffectDecrease::MemoryConsumption("name", EntryAssociation);
-       ControlPoint::EffectIncrease::MemoryConsumption("name", ArrayAssociation);
-       ControlPoint::EffectDecrease::MemoryConsumption("name", ArrayAssociation);
+       ControlPoint::EffectIncrease::MemoryConsumption("name", assocWithEntry(0));
+       ControlPoint::EffectDecrease::MemoryConsumption("name", assocWithEntry(0));
        ControlPoint::EffectIncrease::Granularity("name");
        ControlPoint::EffectDecrease::Granularity("name");
-       ControlPoint::EffectIncrease::Granularity("name", NoControlPointAssociation);
-       ControlPoint::EffectDecrease::Granularity("name", NoControlPointAssociation);
-       ControlPoint::EffectIncrease::Granularity("name", EntryAssociation);
-       ControlPoint::EffectDecrease::Granularity("name", EntryAssociation);
-       ControlPoint::EffectIncrease::Granularity("name", ArrayAssociation);
-       ControlPoint::EffectDecrease::Granularity("name", ArrayAssociation);
+       ControlPoint::EffectIncrease::Granularity("name", assocWithEntry(0));
+       ControlPoint::EffectDecrease::Granularity("name", assocWithEntry(0));
        ControlPoint::EffectIncrease::ComputeDurations("name");
        ControlPoint::EffectDecrease::ComputeDurations("name");
-       ControlPoint::EffectIncrease::ComputeDurations("name", NoControlPointAssociation);
-       ControlPoint::EffectDecrease::ComputeDurations("name", NoControlPointAssociation);
-       ControlPoint::EffectIncrease::ComputeDurations("name", EntryAssociation);
-       ControlPoint::EffectDecrease::ComputeDurations("name", EntryAssociation);
-       ControlPoint::EffectIncrease::ComputeDurations("name", ArrayAssociation);
-       ControlPoint::EffectDecrease::ComputeDurations("name", ArrayAssociation);
+       ControlPoint::EffectIncrease::ComputeDurations("name", assocWithEntry(0));
+       ControlPoint::EffectDecrease::ComputeDurations("name", assocWithEntry(0));
        ControlPoint::EffectIncrease::FlopRate("name");
        ControlPoint::EffectDecrease::FlopRate("name");
-       ControlPoint::EffectIncrease::FlopRate("name", NoControlPointAssociation);
-       ControlPoint::EffectDecrease::FlopRate("name", NoControlPointAssociation);
-       ControlPoint::EffectIncrease::FlopRate("name", EntryAssociation);
-       ControlPoint::EffectDecrease::FlopRate("name", EntryAssociation);
-       ControlPoint::EffectIncrease::FlopRate("name", ArrayAssociation);
-       ControlPoint::EffectDecrease::FlopRate("name", ArrayAssociation);
+       ControlPoint::EffectIncrease::FlopRate("name", assocWithEntry(0));
+       ControlPoint::EffectDecrease::FlopRate("name", assocWithEntry(0));
        ControlPoint::EffectIncrease::NumComputeObjects("name");
        ControlPoint::EffectDecrease::NumComputeObjects("name");
-       ControlPoint::EffectIncrease::NumComputeObjects("name", NoControlPointAssociation);
-       ControlPoint::EffectDecrease::NumComputeObjects("name", NoControlPointAssociation);
-       ControlPoint::EffectIncrease::NumComputeObjects("name", EntryAssociation);
-       ControlPoint::EffectDecrease::NumComputeObjects("name", EntryAssociation);
-       ControlPoint::EffectIncrease::NumComputeObjects("name", ArrayAssociation);
-       ControlPoint::EffectDecrease::NumComputeObjects("name", ArrayAssociation);
+       ControlPoint::EffectIncrease::NumComputeObjects("name", assocWithEntry(0));
+       ControlPoint::EffectDecrease::NumComputeObjects("name", assocWithEntry(0));
        ControlPoint::EffectIncrease::NumMessages("name");
        ControlPoint::EffectDecrease::NumMessages("name");
-       ControlPoint::EffectIncrease::NumMessages("name", NoControlPointAssociation);
-       ControlPoint::EffectDecrease::NumMessages("name", NoControlPointAssociation);
-       ControlPoint::EffectIncrease::NumMessages("name", EntryAssociation);
-       ControlPoint::EffectDecrease::NumMessages("name", EntryAssociation);
-       ControlPoint::EffectIncrease::NumMessages("name", ArrayAssociation);
-       ControlPoint::EffectDecrease::NumMessages("name", ArrayAssociation);
+       ControlPoint::EffectIncrease::NumMessages("name", assocWithEntry(0));
+       ControlPoint::EffectDecrease::NumMessages("name", assocWithEntry(0));
        ControlPoint::EffectIncrease::MessageSizes("name");
        ControlPoint::EffectDecrease::MessageSizes("name");
-       ControlPoint::EffectIncrease::MessageSizes("name", NoControlPointAssociation);
-       ControlPoint::EffectDecrease::MessageSizes("name", NoControlPointAssociation);
-       ControlPoint::EffectIncrease::MessageSizes("name", EntryAssociation);
-       ControlPoint::EffectDecrease::MessageSizes("name", EntryAssociation);
-       ControlPoint::EffectIncrease::MessageSizes("name", ArrayAssociation);
-       ControlPoint::EffectDecrease::MessageSizes("name", ArrayAssociation);
+       ControlPoint::EffectIncrease::MessageSizes("name", assocWithEntry(0));
+       ControlPoint::EffectDecrease::MessageSizes("name", assocWithEntry(0));
        ControlPoint::EffectIncrease::MessageOverhead("name");
        ControlPoint::EffectDecrease::MessageOverhead("name");
-       ControlPoint::EffectIncrease::MessageOverhead("name", NoControlPointAssociation);
-       ControlPoint::EffectDecrease::MessageOverhead("name", NoControlPointAssociation);
-       ControlPoint::EffectIncrease::MessageOverhead("name", EntryAssociation);
-       ControlPoint::EffectDecrease::MessageOverhead("name", EntryAssociation);
-       ControlPoint::EffectIncrease::MessageOverhead("name", ArrayAssociation);
-       ControlPoint::EffectDecrease::MessageOverhead("name", ArrayAssociation);
+       ControlPoint::EffectIncrease::MessageOverhead("name", assocWithEntry(0));
+       ControlPoint::EffectDecrease::MessageOverhead("name", assocWithEntry(0));
        ControlPoint::EffectIncrease::UnnecessarySyncronization("name");
        ControlPoint::EffectDecrease::UnnecessarySyncronization("name");
-       ControlPoint::EffectIncrease::UnnecessarySyncronization("name", NoControlPointAssociation);
-       ControlPoint::EffectDecrease::UnnecessarySyncronization("name", NoControlPointAssociation);
-       ControlPoint::EffectIncrease::UnnecessarySyncronization("name", EntryAssociation);
-       ControlPoint::EffectDecrease::UnnecessarySyncronization("name", EntryAssociation);
-       ControlPoint::EffectIncrease::UnnecessarySyncronization("name", ArrayAssociation);
-       ControlPoint::EffectDecrease::UnnecessarySyncronization("name", ArrayAssociation);
+       ControlPoint::EffectIncrease::UnnecessarySyncronization("name", assocWithEntry(0));
+       ControlPoint::EffectDecrease::UnnecessarySyncronization("name", assocWithEntry(0));
        ControlPoint::EffectIncrease::Concurrency("name");
        ControlPoint::EffectDecrease::Concurrency("name");
-       ControlPoint::EffectIncrease::Concurrency("name", NoControlPointAssociation);
-       ControlPoint::EffectDecrease::Concurrency("name", NoControlPointAssociation);
-       ControlPoint::EffectIncrease::Concurrency("name", EntryAssociation);
-       ControlPoint::EffectDecrease::Concurrency("name", EntryAssociation);
-       ControlPoint::EffectIncrease::Concurrency("name", ArrayAssociation);
-       ControlPoint::EffectDecrease::Concurrency("name", ArrayAssociation);
+       ControlPoint::EffectIncrease::Concurrency("name", assocWithEntry(0));
+       ControlPoint::EffectDecrease::Concurrency("name", assocWithEntry(0));
        ControlPoint::EffectIncrease::PotentialOverlap("name");
        ControlPoint::EffectDecrease::PotentialOverlap("name");
-       ControlPoint::EffectIncrease::PotentialOverlap("name", NoControlPointAssociation);
-       ControlPoint::EffectDecrease::PotentialOverlap("name", NoControlPointAssociation);
-       ControlPoint::EffectIncrease::PotentialOverlap("name", EntryAssociation);
-       ControlPoint::EffectDecrease::PotentialOverlap("name", EntryAssociation);
-       ControlPoint::EffectIncrease::PotentialOverlap("name", ArrayAssociation);
-       ControlPoint::EffectDecrease::PotentialOverlap("name", ArrayAssociation);
+       ControlPoint::EffectIncrease::PotentialOverlap("name", assocWithEntry(0));
+       ControlPoint::EffectDecrease::PotentialOverlap("name", assocWithEntry(0));
        ControlPoint::EffectIncrease::LoadBalancingPeriod("name");
        ControlPoint::EffectDecrease::LoadBalancingPeriod("name");
-       ControlPoint::EffectIncrease::LoadBalancingPeriod("name", NoControlPointAssociation);
-       ControlPoint::EffectDecrease::LoadBalancingPeriod("name", NoControlPointAssociation);
-       ControlPoint::EffectIncrease::LoadBalancingPeriod("name", EntryAssociation);
-       ControlPoint::EffectDecrease::LoadBalancingPeriod("name", EntryAssociation);
-       ControlPoint::EffectIncrease::LoadBalancingPeriod("name", ArrayAssociation);
-       ControlPoint::EffectDecrease::LoadBalancingPeriod("name", ArrayAssociation);
+       ControlPoint::EffectIncrease::LoadBalancingPeriod("name", assocWithEntry(0));
+       ControlPoint::EffectDecrease::LoadBalancingPeriod("name", assocWithEntry(0));
        ControlPoint::EffectIncrease::GPUOffloadedWork("name");
        ControlPoint::EffectDecrease::GPUOffloadedWork("name");
-       ControlPoint::EffectIncrease::GPUOffloadedWork("name", NoControlPointAssociation);
-       ControlPoint::EffectDecrease::GPUOffloadedWork("name", NoControlPointAssociation);
-       ControlPoint::EffectIncrease::GPUOffloadedWork("name", EntryAssociation);
-       ControlPoint::EffectDecrease::GPUOffloadedWork("name", EntryAssociation);
-       ControlPoint::EffectIncrease::GPUOffloadedWork("name", ArrayAssociation);
-       ControlPoint::EffectDecrease::GPUOffloadedWork("name", ArrayAssociation);
+       ControlPoint::EffectIncrease::GPUOffloadedWork("name", assocWithEntry(0));
+       ControlPoint::EffectDecrease::GPUOffloadedWork("name", assocWithEntry(0));
 }
 
 void insert(const std::string control_type, const std::string name, const ControlPoint::ControlPointAssociation &a, const int effect) {
@@ -142,81 +98,165 @@ void ControlPoint::EffectDecrease::Priority(std::string s, const ControlPoint::C
 void ControlPoint::EffectIncrease::Priority(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("Priority", s, a, EFF_INC);
 }
+void ControlPoint::EffectDecrease::Priority(std::string s) {
+       insert("Priority", s, default_assoc, EFF_DEC);
+}
+void ControlPoint::EffectIncrease::Priority(std::string s) {
+       insert("Priority", s, default_assoc, EFF_INC);
+}
 void ControlPoint::EffectDecrease::MemoryConsumption(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("MemoryConsumption", s, a, EFF_DEC);
 }
 void ControlPoint::EffectIncrease::MemoryConsumption(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("MemoryConsumption", s, a, EFF_INC);
 }
+void ControlPoint::EffectDecrease::MemoryConsumption(std::string s) {
+       insert("MemoryConsumption", s, default_assoc, EFF_DEC);
+}
+void ControlPoint::EffectIncrease::MemoryConsumption(std::string s) {
+       insert("MemoryConsumption", s, default_assoc, EFF_INC);
+}
 void ControlPoint::EffectDecrease::Granularity(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("Granularity", s, a, EFF_DEC);
 }
 void ControlPoint::EffectIncrease::Granularity(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("Granularity", s, a, EFF_INC);
 }
+void ControlPoint::EffectDecrease::Granularity(std::string s) {
+       insert("Granularity", s, default_assoc, EFF_DEC);
+}
+void ControlPoint::EffectIncrease::Granularity(std::string s) {
+       insert("Granularity", s, default_assoc, EFF_INC);
+}
 void ControlPoint::EffectDecrease::ComputeDurations(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("ComputeDurations", s, a, EFF_DEC);
 }
 void ControlPoint::EffectIncrease::ComputeDurations(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("ComputeDurations", s, a, EFF_INC);
 }
+void ControlPoint::EffectDecrease::ComputeDurations(std::string s) {
+       insert("ComputeDurations", s, default_assoc, EFF_DEC);
+}
+void ControlPoint::EffectIncrease::ComputeDurations(std::string s) {
+       insert("ComputeDurations", s, default_assoc, EFF_INC);
+}
 void ControlPoint::EffectDecrease::FlopRate(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("FlopRate", s, a, EFF_DEC);
 }
 void ControlPoint::EffectIncrease::FlopRate(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("FlopRate", s, a, EFF_INC);
 }
+void ControlPoint::EffectDecrease::FlopRate(std::string s) {
+       insert("FlopRate", s, default_assoc, EFF_DEC);
+}
+void ControlPoint::EffectIncrease::FlopRate(std::string s) {
+       insert("FlopRate", s, default_assoc, EFF_INC);
+}
 void ControlPoint::EffectDecrease::NumComputeObjects(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("NumComputeObjects", s, a, EFF_DEC);
 }
 void ControlPoint::EffectIncrease::NumComputeObjects(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("NumComputeObjects", s, a, EFF_INC);
 }
+void ControlPoint::EffectDecrease::NumComputeObjects(std::string s) {
+       insert("NumComputeObjects", s, default_assoc, EFF_DEC);
+}
+void ControlPoint::EffectIncrease::NumComputeObjects(std::string s) {
+       insert("NumComputeObjects", s, default_assoc, EFF_INC);
+}
 void ControlPoint::EffectDecrease::NumMessages(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("NumMessages", s, a, EFF_DEC);
 }
 void ControlPoint::EffectIncrease::NumMessages(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("NumMessages", s, a, EFF_INC);
 }
+void ControlPoint::EffectDecrease::NumMessages(std::string s) {
+       insert("NumMessages", s, default_assoc, EFF_DEC);
+}
+void ControlPoint::EffectIncrease::NumMessages(std::string s) {
+       insert("NumMessages", s, default_assoc, EFF_INC);
+}
 void ControlPoint::EffectDecrease::MessageSizes(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("MessageSizes", s, a, EFF_DEC);
 }
 void ControlPoint::EffectIncrease::MessageSizes(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("MessageSizes", s, a, EFF_INC);
 }
+void ControlPoint::EffectDecrease::MessageSizes(std::string s) {
+       insert("MessageSizes", s, default_assoc, EFF_DEC);
+}
+void ControlPoint::EffectIncrease::MessageSizes(std::string s) {
+       insert("MessageSizes", s, default_assoc, EFF_INC);
+}
 void ControlPoint::EffectDecrease::MessageOverhead(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("MessageOverhead", s, a, EFF_DEC);
 }
 void ControlPoint::EffectIncrease::MessageOverhead(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("MessageOverhead", s, a, EFF_INC);
 }
+void ControlPoint::EffectDecrease::MessageOverhead(std::string s) {
+       insert("MessageOverhead", s, default_assoc, EFF_DEC);
+}
+void ControlPoint::EffectIncrease::MessageOverhead(std::string s) {
+       insert("MessageOverhead", s, default_assoc, EFF_INC);
+}
 void ControlPoint::EffectDecrease::UnnecessarySyncronization(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("UnnecessarySyncronization", s, a, EFF_DEC);
 }
 void ControlPoint::EffectIncrease::UnnecessarySyncronization(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("UnnecessarySyncronization", s, a, EFF_INC);
 }
+void ControlPoint::EffectDecrease::UnnecessarySyncronization(std::string s) {
+       insert("UnnecessarySyncronization", s, default_assoc, EFF_DEC);
+}
+void ControlPoint::EffectIncrease::UnnecessarySyncronization(std::string s) {
+       insert("UnnecessarySyncronization", s, default_assoc, EFF_INC);
+}
 void ControlPoint::EffectDecrease::Concurrency(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("Concurrency", s, a, EFF_DEC);
 }
 void ControlPoint::EffectIncrease::Concurrency(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("Concurrency", s, a, EFF_INC);
 }
+void ControlPoint::EffectDecrease::Concurrency(std::string s) {
+       insert("Concurrency", s, default_assoc, EFF_DEC);
+}
+void ControlPoint::EffectIncrease::Concurrency(std::string s) {
+       insert("Concurrency", s, default_assoc, EFF_INC);
+}
 void ControlPoint::EffectDecrease::PotentialOverlap(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("PotentialOverlap", s, a, EFF_DEC);
 }
 void ControlPoint::EffectIncrease::PotentialOverlap(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("PotentialOverlap", s, a, EFF_INC);
 }
+void ControlPoint::EffectDecrease::PotentialOverlap(std::string s) {
+       insert("PotentialOverlap", s, default_assoc, EFF_DEC);
+}
+void ControlPoint::EffectIncrease::PotentialOverlap(std::string s) {
+       insert("PotentialOverlap", s, default_assoc, EFF_INC);
+}
 void ControlPoint::EffectDecrease::LoadBalancingPeriod(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("LoadBalancingPeriod", s, a, EFF_DEC);
 }
 void ControlPoint::EffectIncrease::LoadBalancingPeriod(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("LoadBalancingPeriod", s, a, EFF_INC);
 }
+void ControlPoint::EffectDecrease::LoadBalancingPeriod(std::string s) {
+       insert("LoadBalancingPeriod", s, default_assoc, EFF_DEC);
+}
+void ControlPoint::EffectIncrease::LoadBalancingPeriod(std::string s) {
+       insert("LoadBalancingPeriod", s, default_assoc, EFF_INC);
+}
 void ControlPoint::EffectDecrease::GPUOffloadedWork(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("GPUOffloadedWork", s, a, EFF_DEC);
 }
 void ControlPoint::EffectIncrease::GPUOffloadedWork(std::string s, const ControlPoint::ControlPointAssociation &a) {
        insert("GPUOffloadedWork", s, a, EFF_INC);
 }
+void ControlPoint::EffectDecrease::GPUOffloadedWork(std::string s) {
+       insert("GPUOffloadedWork", s, default_assoc, EFF_DEC);
+}
+void ControlPoint::EffectIncrease::GPUOffloadedWork(std::string s) {
+       insert("GPUOffloadedWork", s, default_assoc, EFF_INC);
+}
index 40e07762020bb573b20b86507431a7183fe5daff..647288b5f6e9c2d48cb21558cc8acbdbe44c5750 100644 (file)
@@ -30,49 +30,76 @@ namespace ControlPoint {
   public:
     ControlPointAssociatedArray() : ControlPointAssociation() {}
 
-    ControlPointAssociatedArray(CProxy_ArrayBase &a) : ControlPointAssociation() {
+    ControlPointAssociatedArray(const CProxy_ArrayBase &a) : ControlPointAssociation() {
       CkGroupID aid = a.ckGetArrayID();
       int groupIdx = aid.idx;
       ArrayGroupIdx.insert(groupIdx);
-    }    
+    }
   };
   
-  ControlPointAssociation NoControlPointAssociation;
-  int epid = 2;
-  ControlPointAssociatedEntry EntryAssociation(epid);
-  ControlPointAssociatedArray ArrayAssociation;
-
+  class NoControlPointAssociation : public ControlPointAssociation { };
+       void initControlPointEffects();
+       ControlPointAssociatedEntry assocWithEntry(const int entry);
+       ControlPointAssociatedArray assocWithArray(const CProxy_ArrayBase &array);
 namespace EffectIncrease {
-       void Priority(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void MemoryConsumption(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void Granularity(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void ComputeDurations(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void FlopRate(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void NumComputeObjects(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void NumMessages(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void MessageSizes(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void MessageOverhead(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void UnnecessarySyncronization(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void Concurrency(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void PotentialOverlap(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void LoadBalancingPeriod(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void GPUOffloadedWork(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
+       void Priority(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void Priority(std::string name);
+       void MemoryConsumption(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void MemoryConsumption(std::string name);
+       void Granularity(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void Granularity(std::string name);
+       void ComputeDurations(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void ComputeDurations(std::string name);
+       void FlopRate(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void FlopRate(std::string name);
+       void NumComputeObjects(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void NumComputeObjects(std::string name);
+       void NumMessages(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void NumMessages(std::string name);
+       void MessageSizes(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void MessageSizes(std::string name);
+       void MessageOverhead(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void MessageOverhead(std::string name);
+       void UnnecessarySyncronization(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void UnnecessarySyncronization(std::string name);
+       void Concurrency(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void Concurrency(std::string name);
+       void PotentialOverlap(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void PotentialOverlap(std::string name);
+       void LoadBalancingPeriod(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void LoadBalancingPeriod(std::string name);
+       void GPUOffloadedWork(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void GPUOffloadedWork(std::string name);
 }
 
 namespace EffectDecrease {
-       void Priority(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void MemoryConsumption(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void Granularity(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void ComputeDurations(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void FlopRate(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void NumComputeObjects(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void NumMessages(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void MessageSizes(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void MessageOverhead(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void UnnecessarySyncronization(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void Concurrency(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void PotentialOverlap(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void LoadBalancingPeriod(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
-       void GPUOffloadedWork(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);
+       void Priority(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void Priority(std::string name);
+       void MemoryConsumption(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void MemoryConsumption(std::string name);
+       void Granularity(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void Granularity(std::string name);
+       void ComputeDurations(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void ComputeDurations(std::string name);
+       void FlopRate(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void FlopRate(std::string name);
+       void NumComputeObjects(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void NumComputeObjects(std::string name);
+       void NumMessages(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void NumMessages(std::string name);
+       void MessageSizes(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void MessageSizes(std::string name);
+       void MessageOverhead(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void MessageOverhead(std::string name);
+       void UnnecessarySyncronization(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void UnnecessarySyncronization(std::string name);
+       void Concurrency(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void Concurrency(std::string name);
+       void PotentialOverlap(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void PotentialOverlap(std::string name);
+       void LoadBalancingPeriod(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void LoadBalancingPeriod(std::string name);
+       void GPUOffloadedWork(std::string name, const ControlPoint::ControlPointAssociation &a);
+       void GPUOffloadedWork(std::string name);
 }
 } //namespace ControlPoint 
index c2d5cc6e998746fd3acc0d9264d85f3a4475bada..eca8992e8066185f7cea1ae01d7bb7223f4fab0d 100755 (executable)
@@ -21,16 +21,15 @@ while(my $line = <FILE>) {
   if(length($line) > 0) {
     my $cp = $line;
 
-    $funcdecls .= "\tvoid $cp(std::string name, const ControlPoint::ControlPointAssociation &a = NoControlPointAssociation);\n";
+    $funcdecls .= "\tvoid $cp(std::string name, const ControlPoint::ControlPointAssociation &a);\n";
+    $funcdecls .= "\tvoid $cp(std::string name);\n";
 
     $funccalls .= "\tControlPoint::EffectIncrease::$cp(\"name\");\n";
     $funccalls .= "\tControlPoint::EffectDecrease::$cp(\"name\");\n";
-    $funccalls .= "\tControlPoint::EffectIncrease::$cp(\"name\", NoControlPointAssociation);\n";
-    $funccalls .= "\tControlPoint::EffectDecrease::$cp(\"name\", NoControlPointAssociation);\n";
-    $funccalls .= "\tControlPoint::EffectIncrease::$cp(\"name\", EntryAssociation);\n";
-    $funccalls .= "\tControlPoint::EffectDecrease::$cp(\"name\", EntryAssociation);\n";
-    $funccalls .= "\tControlPoint::EffectIncrease::$cp(\"name\", ArrayAssociation);\n";
-    $funccalls .= "\tControlPoint::EffectDecrease::$cp(\"name\", ArrayAssociation);\n";
+    $funccalls .= "\tControlPoint::EffectIncrease::$cp(\"name\", assocWithEntry(0));\n";
+    $funccalls .= "\tControlPoint::EffectDecrease::$cp(\"name\", assocWithEntry(0));\n";
+    #$funccalls .= "\tControlPoint::EffectIncrease::$cp(\"name\", assocWithArray(0));\n";
+    #$funccalls .= "\tControlPoint::EffectDecrease::$cp(\"name\", assocWithArray(0));\n";
 
     $funcdefs .= "void ControlPoint::EffectDecrease::$cp(std::string s, const ControlPoint::ControlPointAssociation &a) {\n" .
        "\tinsert(\"$cp\", s, a, EFF_DEC);\n" .
@@ -38,6 +37,12 @@ while(my $line = <FILE>) {
     $funcdefs .= "void ControlPoint::EffectIncrease::$cp(std::string s, const ControlPoint::ControlPointAssociation &a) {\n" .
        "\tinsert(\"$cp\", s, a, EFF_INC);\n" .
        "}\n";
+    $funcdefs .= "void ControlPoint::EffectDecrease::$cp(std::string s) {\n" .
+       "\tinsert(\"$cp\", s, default_assoc, EFF_DEC);\n" .
+       "}\n";
+    $funcdefs .= "void ControlPoint::EffectIncrease::$cp(std::string s) {\n" .
+       "\tinsert(\"$cp\", s, default_assoc, EFF_INC);\n" .
+       "}\n";
   }
 }
 
@@ -74,20 +79,20 @@ namespace ControlPoint {
   public:
     ControlPointAssociatedArray() : ControlPointAssociation() {}
 
-    ControlPointAssociatedArray(CProxy_ArrayBase &a) : ControlPointAssociation() {
+    ControlPointAssociatedArray(const CProxy_ArrayBase &a) : ControlPointAssociation() {
       CkGroupID aid = a.ckGetArrayID();
       int groupIdx = aid.idx;
       ArrayGroupIdx.insert(groupIdx);
-    }    
+    }
   };
   
-  ControlPointAssociation NoControlPointAssociation;
-  int epid = 2;
-  ControlPointAssociatedEntry EntryAssociation(epid);
-  ControlPointAssociatedArray ArrayAssociation;
-
+  class NoControlPointAssociation : public ControlPointAssociation { };
 EOF
 
+print OUT_H "\tvoid initControlPointEffects();\n";
+print OUT_H "\tControlPointAssociatedEntry assocWithEntry(const int entry);\n";
+print OUT_H "\tControlPointAssociatedArray assocWithArray(const CProxy_ArrayBase &array);\n";
+
 print OUT_H "namespace EffectIncrease {\n";
 print OUT_H $funcdecls;
 print OUT_H "}\n\n";
@@ -115,6 +120,18 @@ typedef map<std::string, vector<pair<int, ControlPoint::ControlPointAssociation>
 CkpvDeclare(cp_effect_map, cp_effects);
 CkpvDeclare(cp_name_map, cp_names);
 
+NoControlPointAssociation default_assoc;
+
+ControlPoint::ControlPointAssociatedEntry ControlPoint::assocWithEntry(const int entry) {
+    ControlPointAssociatedEntry e(entry);
+    return e;
+}
+
+ControlPoint::ControlPointAssociatedArray ControlPoint::assocWithArray(const CProxy_ArrayBase &array) {
+    ControlPointAssociatedArray a(array);
+    return a;
+}
+
 void initControlPointEffects() {
 \tCkpvInitialize(cp_effect_map, cp_effects);
 \tCkpvInitialize(cp_name_map, cp_names);
index ca40ceb6e8a5d46fe44f88ed56baadbe4b7fc5e0..415dc7f53045d2e85f841062cac34a3153664561 100644 (file)
@@ -6,6 +6,7 @@
 #include "charm++.h"
 #include "trace-projections.h"
 #include <pathHistory.h>
+#include "cp_effects.h"
 
 
 /**
@@ -115,6 +116,8 @@ controlPointManager::controlPointManager(){
     haveGranularityCallback = false;
 //    CkPrintf("[%d] controlPointManager() Constructor Initializing control points, and loading data file\n", CkMyPe());
     
+    ControlPoint::initControlPointEffects();
+
     phase_id = 0;
     
     loadDataFile();
index cf044a55116a9f70836eec3ccb15b3ed69c3aaf2..4b9f0a55f56bb79ce89d8dd4a33315365d2ade04 100644 (file)
@@ -1935,7 +1935,7 @@ bigsim_node.o: bigsim_node.C blue.h converse.h conv-config.h \
   conv-cpm.h conv-cpath.h conv-qd.h conv-random.h conv-lists.h \
   conv-trace.h persistent.h debug-conv.h blue-conv.h blue_impl.h \
   ckliststring.h blue_types.h bigsim_timing.h cklists.h pup.h \
-  bigsim_logs.h blue_defs.h bigsim_network.h bigsim_debug.h
+  bigsim_logs.h blue_defs.h bigsim_network.h bigsim_debug.h bigsim_ooc.h
        $(CHARMC) -c -I. bigsim_node.C
 
 bigsim_proc.o: bigsim_proc.C blue.h converse.h conv-config.h \
@@ -2645,8 +2645,9 @@ controlPoints.o: controlPoints.C charm++.h charm.h converse.h \
   envelope.h controlPoints.h ControlPoints.decl.h charm++.h pup_stl.h \
   LBDatabase.h arrayRedistributor.h pathHistory.h PathHistory.decl.h \
   envelope.h trace-controlPoints.h trace.h register.h trace-common.h \
-  trace-projections.h ckhashtable.h pup.h pathHistory.h \
-  ControlPoints.def.h
+  trace-projections.h ckhashtable.h pup.h pathHistory.h cp_effects.h ck.h \
+  qd.h stats.h ckfutures.h CkFutures.decl.h ckIgetControl.h charisma.h \
+  ckarray.h ControlPoints.def.h
        $(CHARMC) -c -I. controlPoints.C
 
 arrayRedistributor.o: arrayRedistributor.C charm++.h charm.h converse.h \
@@ -2669,3 +2670,21 @@ arrayRedistributor.o: arrayRedistributor.C charm++.h charm.h converse.h \
   pup_stl.h arrayRedistributor.h pathHistory.h PathHistory.decl.h
        $(CHARMC) -c -I. arrayRedistributor.C
 
+cp_effects.o: cp_effects.C cp_effects.h charm++.h charm.h converse.h \
+  conv-config.h conv-autoconfig.h conv-common.h conv-mach.h \
+  conv-mach-opt.h pup_c.h conv-cpm.h conv-cpath.h conv-qd.h conv-random.h \
+  conv-lists.h conv-trace.h persistent.h debug-conv.h pup.h middle.h \
+  middle-conv.h cklists.h ckbitvector.h ckstream.h init.h ckhashtable.h \
+  debug-charm.h simd.h CkMarshall.decl.h cksection.h ckcallback.h \
+  conv-ccs.h sockRoutines.h ccs-server.h ckobjQ.h ckreduction.h \
+  CkReduction.decl.h cknodegroupreduction.h CkArrayReductionMgr.decl.h \
+  ckmemcheckpoint.h CkMemCheckpoint.decl.h readonly.h ckarray.h \
+  cklocation.h LBDatabase.h lbdb.h LBDBManager.h LBObj.h LBOM.h LBComm.h \
+  LBMachineUtil.h lbdb++.h LBDatabase.decl.h NullLB.decl.h BaseLB.decl.h \
+  CkLocation.decl.h CkArray.decl.h CkFutures.decl.h charisma.h \
+  charisma.decl.h tempo.h tempo.decl.h waitqd.h waitqd.decl.h sdag.h \
+  ckcheckpoint.h CkCheckpoint.decl.h ckevacuation.h ckarrayreductionmgr.h \
+  trace.h trace-bluegene.h envelope.h ck.h qd.h register.h stats.h \
+  ckfutures.h ckIgetControl.h
+       $(CHARMC) -c -I. cp_effects.C
+
index 68df584adaf6632819c7df6c9bec9d5c91d74e74..3fae89be7baf15cb57bfb9fad3b4708a0359ea72 100644 (file)
@@ -179,7 +179,7 @@ CVHEADERS=cpthreads.h converse.h conv-trace.h conv-random.h conv-qd.h \
        convcomlibmanager.h graphrouter.h petable.h gridrouter.h router.h \
        prefixrouter.h pipebroadcastconverse.h pipelinestrategy.h cmipool.h \
       comlib.h cmidirect.h cmidirectmanytomany.h \
-      controlPoints.h arrayRedistributor.h controlPoints.h 
+      controlPoints.h arrayRedistributor.h cp_effects.h
 
 # The .c files are there to be #included by clients whole
 # This is a bit unusual, but makes client linking simpler.
@@ -890,7 +890,7 @@ TRACE_OBJS =  trace-projections.o  trace-summary.o  trace-simple.o \
 ######################################################################
 
 
-CONTROLPOINTS_OBJS = controlPoints.o arrayRedistributor.o
+CONTROLPOINTS_OBJS = controlPoints.o arrayRedistributor.o cp_effects.o
 
 ControlPoints.def.h: ControlPoints.decl.h