Updating Control Point API generator.
authorIsaac Dooley <idooley2@illinois.edu>
Mon, 26 Oct 2009 17:50:11 +0000 (17:50 +0000)
committerIsaac Dooley <idooley2@illinois.edu>
Mon, 26 Oct 2009 17:50:11 +0000 (17:50 +0000)
src/ck-cp/API-generator/Makefile-cp_effects
src/ck-cp/API-generator/cp_effects.pl

index e7e6cd2329e53abf1187bd0efa7048bee70bc66a..525f8217b02f91a65342575ddbd2be64ee2338df 100644 (file)
@@ -2,10 +2,10 @@
 
 
 cp_effects : cp_effects.cpp cp_effects.h
-        ../../../bin/charmc  cp_effects.cpp -o cp_effects
+        ../bin/charmc  -c cp_effects.cpp
 
-cp_effects.h cp_effects.cpp : cp_effects.pl cp_effects.txt
+cp_effects.h cp_effects.cpp : cp_effects.pl cp_effects.txt Makefile-cp_effects
        ./cp_effects.pl
 
 clean : 
-       rm -rf cp_effects *~
\ No newline at end of file
+       rm -rf cp_effects cp_effects.cpp cp_effects.h *~
\ No newline at end of file
index 1e8bf17f48acdc8f4c415fb305d76ccabb460bdc..0d5100f16a25560874c9e38f640a883a9510fb25 100755 (executable)
@@ -20,6 +20,12 @@ while($line = <FILE>){
     $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";
+
+
 
     $funcdefs .= "\t  void ControlPoint::EffectDecrease::$cp(std::string s, const ControlPoint::ControlPointAssociation &a){ }\n";
     $funcdefs .= "\t  void ControlPoint::EffectIncrease::$cp(std::string s, const ControlPoint::ControlPointAssociation &a){ }\n";
@@ -34,7 +40,9 @@ while($line = <FILE>){
 print OUT_H <<EOF;
 #include <string>
 #include <set>
-#include <ckarray.h>
+#include "charm++.h"
+#include "ck.h"
+#include "ckarray.h"
 
 namespace ControlPoint {
   class ControlPointAssociation{
@@ -48,6 +56,8 @@ namespace ControlPoint {
   
   class ControlPointAssociatedEntry : public ControlPointAssociation {
     public :
+       ControlPointAssociatedEntry() : ControlPointAssociation(){}
+
        ControlPointAssociatedEntry(int epid) : ControlPointAssociation() {
          EntryID.insert(epid);
        }    
@@ -55,14 +65,19 @@ namespace ControlPoint {
   
   class ControlPointAssociatedArray : public ControlPointAssociation {
   public:
+    ControlPointAssociatedArray() : ControlPointAssociation() {}
+
     ControlPointAssociatedArray(CProxy_ArrayBase &a) : ControlPointAssociation() {
-      CkGroupID aid = arraybase.ckGetArrayID();
+      CkGroupID aid = a.ckGetArrayID();
       int groupIdx = aid.idx;
       ArrayGroupIdx.insert(groupIdx);
     }    
   };
   
   ControlPointAssociation NoControlPointAssociation;
+  int epid = 2;
+  ControlPointAssociatedEntry EntryAssociation(epid);
+  ControlPointAssociatedArray ArrayAssociation;
 
 EOF