fixing a debug print
[charm.git] / src / ck-cp / API-generator / cp_effects.C
1 ///////////////////////////////////////////////////////////////////
2 // WARNING: THIS FILE IS GENERATED BY cp_effects.pl
3 //          ANY CHANGES TO THIS FILE MAY BE LOST 
4 ///////////////////////////////////////////////////////////////////
5
6 #include "cp_effects.h"
7
8 #if CMK_WITH_CONTROLPOINT
9
10 using namespace ControlPoint;
11 using namespace std;
12
13 CkpvDeclare(ControlPoint::cp_effect_map, cp_effects);
14 //CkpvDeclare(ControlPoint::cp_name_map, cp_names);
15
16 NoControlPointAssociation default_assoc;
17
18 ControlPoint::ControlPointAssociatedEntry ControlPoint::assocWithEntry(const int entry) {
19     ControlPointAssociatedEntry e(entry);
20     return e;
21 }
22
23 ControlPoint::ControlPointAssociatedArray ControlPoint::assocWithArray(const CProxy_ArrayBase &array) {
24     ControlPointAssociatedArray a(array);
25     return a;
26 }
27
28 void ControlPoint::initControlPointEffects() {
29     CkpvInitialize(cp_effect_map, cp_effects);
30 //    CkpvInitialize(cp_name_map, cp_names);
31 }
32
33 void testControlPointEffects() {
34         ControlPoint::EffectIncrease::Priority("name");
35         ControlPoint::EffectDecrease::Priority("name");
36         ControlPoint::EffectIncrease::Priority("name", assocWithEntry(0));
37         ControlPoint::EffectDecrease::Priority("name", assocWithEntry(0));
38         ControlPoint::EffectIncrease::MemoryConsumption("name");
39         ControlPoint::EffectDecrease::MemoryConsumption("name");
40         ControlPoint::EffectIncrease::MemoryConsumption("name", assocWithEntry(0));
41         ControlPoint::EffectDecrease::MemoryConsumption("name", assocWithEntry(0));
42         ControlPoint::EffectIncrease::GrainSize("name");
43         ControlPoint::EffectDecrease::GrainSize("name");
44         ControlPoint::EffectIncrease::GrainSize("name", assocWithEntry(0));
45         ControlPoint::EffectDecrease::GrainSize("name", assocWithEntry(0));
46         ControlPoint::EffectIncrease::ComputeDurations("name");
47         ControlPoint::EffectDecrease::ComputeDurations("name");
48         ControlPoint::EffectIncrease::ComputeDurations("name", assocWithEntry(0));
49         ControlPoint::EffectDecrease::ComputeDurations("name", assocWithEntry(0));
50         ControlPoint::EffectIncrease::FlopRate("name");
51         ControlPoint::EffectDecrease::FlopRate("name");
52         ControlPoint::EffectIncrease::FlopRate("name", assocWithEntry(0));
53         ControlPoint::EffectDecrease::FlopRate("name", assocWithEntry(0));
54         ControlPoint::EffectIncrease::NumComputeObjects("name");
55         ControlPoint::EffectDecrease::NumComputeObjects("name");
56         ControlPoint::EffectIncrease::NumComputeObjects("name", assocWithEntry(0));
57         ControlPoint::EffectDecrease::NumComputeObjects("name", assocWithEntry(0));
58         ControlPoint::EffectIncrease::NumMessages("name");
59         ControlPoint::EffectDecrease::NumMessages("name");
60         ControlPoint::EffectIncrease::NumMessages("name", assocWithEntry(0));
61         ControlPoint::EffectDecrease::NumMessages("name", assocWithEntry(0));
62         ControlPoint::EffectIncrease::MessageSizes("name");
63         ControlPoint::EffectDecrease::MessageSizes("name");
64         ControlPoint::EffectIncrease::MessageSizes("name", assocWithEntry(0));
65         ControlPoint::EffectDecrease::MessageSizes("name", assocWithEntry(0));
66         ControlPoint::EffectIncrease::MessageOverhead("name");
67         ControlPoint::EffectDecrease::MessageOverhead("name");
68         ControlPoint::EffectIncrease::MessageOverhead("name", assocWithEntry(0));
69         ControlPoint::EffectDecrease::MessageOverhead("name", assocWithEntry(0));
70         ControlPoint::EffectIncrease::UnnecessarySyncronization("name");
71         ControlPoint::EffectDecrease::UnnecessarySyncronization("name");
72         ControlPoint::EffectIncrease::UnnecessarySyncronization("name", assocWithEntry(0));
73         ControlPoint::EffectDecrease::UnnecessarySyncronization("name", assocWithEntry(0));
74         ControlPoint::EffectIncrease::Concurrency("name");
75         ControlPoint::EffectDecrease::Concurrency("name");
76         ControlPoint::EffectIncrease::Concurrency("name", assocWithEntry(0));
77         ControlPoint::EffectDecrease::Concurrency("name", assocWithEntry(0));
78         ControlPoint::EffectIncrease::PotentialOverlap("name");
79         ControlPoint::EffectDecrease::PotentialOverlap("name");
80         ControlPoint::EffectIncrease::PotentialOverlap("name", assocWithEntry(0));
81         ControlPoint::EffectDecrease::PotentialOverlap("name", assocWithEntry(0));
82         ControlPoint::EffectIncrease::LoadBalancingPeriod("name");
83         ControlPoint::EffectDecrease::LoadBalancingPeriod("name");
84         ControlPoint::EffectIncrease::LoadBalancingPeriod("name", assocWithEntry(0));
85         ControlPoint::EffectDecrease::LoadBalancingPeriod("name", assocWithEntry(0));
86         ControlPoint::EffectIncrease::GPUOffloadedWork("name");
87         ControlPoint::EffectDecrease::GPUOffloadedWork("name");
88         ControlPoint::EffectIncrease::GPUOffloadedWork("name", assocWithEntry(0));
89         ControlPoint::EffectDecrease::GPUOffloadedWork("name", assocWithEntry(0));
90
91 }
92
93 void insert(const std::string effect, const std::string name, const ControlPoint::ControlPointAssociation &assoc, const int direction) {
94    std::pair<int, std::vector<ControlPoint::ControlPointAssociation> > &info = CkpvAccess(cp_effects)[effect][name];
95    info.first = direction;
96    info.second.push_back(assoc);
97   // CkpvAccess(cp_names)[name] = make_pair(push_back(std::make_pair(direction, assoc));
98 }
99
100 void ControlPoint::EffectDecrease::Priority(std::string s, const ControlPoint::ControlPointAssociation &a) {
101         insert("Priority", s, a, EFF_DEC);
102 }
103 void ControlPoint::EffectIncrease::Priority(std::string s, const ControlPoint::ControlPointAssociation &a) {
104         insert("Priority", s, a, EFF_INC);
105 }
106 void ControlPoint::EffectDecrease::Priority(std::string s) {
107         insert("Priority", s, default_assoc, EFF_DEC);
108 }
109 void ControlPoint::EffectIncrease::Priority(std::string s) {
110         insert("Priority", s, default_assoc, EFF_INC);
111 }
112 void ControlPoint::EffectDecrease::MemoryConsumption(std::string s, const ControlPoint::ControlPointAssociation &a) {
113         insert("MemoryConsumption", s, a, EFF_DEC);
114 }
115 void ControlPoint::EffectIncrease::MemoryConsumption(std::string s, const ControlPoint::ControlPointAssociation &a) {
116         insert("MemoryConsumption", s, a, EFF_INC);
117 }
118 void ControlPoint::EffectDecrease::MemoryConsumption(std::string s) {
119         insert("MemoryConsumption", s, default_assoc, EFF_DEC);
120 }
121 void ControlPoint::EffectIncrease::MemoryConsumption(std::string s) {
122         insert("MemoryConsumption", s, default_assoc, EFF_INC);
123 }
124 void ControlPoint::EffectDecrease::GrainSize(std::string s, const ControlPoint::ControlPointAssociation &a) {
125         insert("GrainSize", s, a, EFF_DEC);
126 }
127 void ControlPoint::EffectIncrease::GrainSize(std::string s, const ControlPoint::ControlPointAssociation &a) {
128         insert("GrainSize", s, a, EFF_INC);
129 }
130 void ControlPoint::EffectDecrease::GrainSize(std::string s) {
131         insert("GrainSize", s, default_assoc, EFF_DEC);
132 }
133 void ControlPoint::EffectIncrease::GrainSize(std::string s) {
134         insert("GrainSize", s, default_assoc, EFF_INC);
135 }
136 void ControlPoint::EffectDecrease::ComputeDurations(std::string s, const ControlPoint::ControlPointAssociation &a) {
137         insert("ComputeDurations", s, a, EFF_DEC);
138 }
139 void ControlPoint::EffectIncrease::ComputeDurations(std::string s, const ControlPoint::ControlPointAssociation &a) {
140         insert("ComputeDurations", s, a, EFF_INC);
141 }
142 void ControlPoint::EffectDecrease::ComputeDurations(std::string s) {
143         insert("ComputeDurations", s, default_assoc, EFF_DEC);
144 }
145 void ControlPoint::EffectIncrease::ComputeDurations(std::string s) {
146         insert("ComputeDurations", s, default_assoc, EFF_INC);
147 }
148 void ControlPoint::EffectDecrease::FlopRate(std::string s, const ControlPoint::ControlPointAssociation &a) {
149         insert("FlopRate", s, a, EFF_DEC);
150 }
151 void ControlPoint::EffectIncrease::FlopRate(std::string s, const ControlPoint::ControlPointAssociation &a) {
152         insert("FlopRate", s, a, EFF_INC);
153 }
154 void ControlPoint::EffectDecrease::FlopRate(std::string s) {
155         insert("FlopRate", s, default_assoc, EFF_DEC);
156 }
157 void ControlPoint::EffectIncrease::FlopRate(std::string s) {
158         insert("FlopRate", s, default_assoc, EFF_INC);
159 }
160 void ControlPoint::EffectDecrease::NumComputeObjects(std::string s, const ControlPoint::ControlPointAssociation &a) {
161         insert("NumComputeObjects", s, a, EFF_DEC);
162 }
163 void ControlPoint::EffectIncrease::NumComputeObjects(std::string s, const ControlPoint::ControlPointAssociation &a) {
164         insert("NumComputeObjects", s, a, EFF_INC);
165 }
166 void ControlPoint::EffectDecrease::NumComputeObjects(std::string s) {
167         insert("NumComputeObjects", s, default_assoc, EFF_DEC);
168 }
169 void ControlPoint::EffectIncrease::NumComputeObjects(std::string s) {
170         insert("NumComputeObjects", s, default_assoc, EFF_INC);
171 }
172 void ControlPoint::EffectDecrease::NumMessages(std::string s, const ControlPoint::ControlPointAssociation &a) {
173         insert("NumMessages", s, a, EFF_DEC);
174 }
175 void ControlPoint::EffectIncrease::NumMessages(std::string s, const ControlPoint::ControlPointAssociation &a) {
176         insert("NumMessages", s, a, EFF_INC);
177 }
178 void ControlPoint::EffectDecrease::NumMessages(std::string s) {
179         insert("NumMessages", s, default_assoc, EFF_DEC);
180 }
181 void ControlPoint::EffectIncrease::NumMessages(std::string s) {
182         insert("NumMessages", s, default_assoc, EFF_INC);
183 }
184 void ControlPoint::EffectDecrease::MessageSizes(std::string s, const ControlPoint::ControlPointAssociation &a) {
185         insert("MessageSizes", s, a, EFF_DEC);
186 }
187 void ControlPoint::EffectIncrease::MessageSizes(std::string s, const ControlPoint::ControlPointAssociation &a) {
188         insert("MessageSizes", s, a, EFF_INC);
189 }
190 void ControlPoint::EffectDecrease::MessageSizes(std::string s) {
191         insert("MessageSizes", s, default_assoc, EFF_DEC);
192 }
193 void ControlPoint::EffectIncrease::MessageSizes(std::string s) {
194         insert("MessageSizes", s, default_assoc, EFF_INC);
195 }
196 void ControlPoint::EffectDecrease::MessageOverhead(std::string s, const ControlPoint::ControlPointAssociation &a) {
197         insert("MessageOverhead", s, a, EFF_DEC);
198 }
199 void ControlPoint::EffectIncrease::MessageOverhead(std::string s, const ControlPoint::ControlPointAssociation &a) {
200         insert("MessageOverhead", s, a, EFF_INC);
201 }
202 void ControlPoint::EffectDecrease::MessageOverhead(std::string s) {
203         insert("MessageOverhead", s, default_assoc, EFF_DEC);
204 }
205 void ControlPoint::EffectIncrease::MessageOverhead(std::string s) {
206         insert("MessageOverhead", s, default_assoc, EFF_INC);
207 }
208 void ControlPoint::EffectDecrease::UnnecessarySyncronization(std::string s, const ControlPoint::ControlPointAssociation &a) {
209         insert("UnnecessarySyncronization", s, a, EFF_DEC);
210 }
211 void ControlPoint::EffectIncrease::UnnecessarySyncronization(std::string s, const ControlPoint::ControlPointAssociation &a) {
212         insert("UnnecessarySyncronization", s, a, EFF_INC);
213 }
214 void ControlPoint::EffectDecrease::UnnecessarySyncronization(std::string s) {
215         insert("UnnecessarySyncronization", s, default_assoc, EFF_DEC);
216 }
217 void ControlPoint::EffectIncrease::UnnecessarySyncronization(std::string s) {
218         insert("UnnecessarySyncronization", s, default_assoc, EFF_INC);
219 }
220 void ControlPoint::EffectDecrease::Concurrency(std::string s, const ControlPoint::ControlPointAssociation &a) {
221         insert("Concurrency", s, a, EFF_DEC);
222 }
223 void ControlPoint::EffectIncrease::Concurrency(std::string s, const ControlPoint::ControlPointAssociation &a) {
224         insert("Concurrency", s, a, EFF_INC);
225 }
226 void ControlPoint::EffectDecrease::Concurrency(std::string s) {
227         insert("Concurrency", s, default_assoc, EFF_DEC);
228 }
229 void ControlPoint::EffectIncrease::Concurrency(std::string s) {
230         insert("Concurrency", s, default_assoc, EFF_INC);
231 }
232 void ControlPoint::EffectDecrease::PotentialOverlap(std::string s, const ControlPoint::ControlPointAssociation &a) {
233         insert("PotentialOverlap", s, a, EFF_DEC);
234 }
235 void ControlPoint::EffectIncrease::PotentialOverlap(std::string s, const ControlPoint::ControlPointAssociation &a) {
236         insert("PotentialOverlap", s, a, EFF_INC);
237 }
238 void ControlPoint::EffectDecrease::PotentialOverlap(std::string s) {
239         insert("PotentialOverlap", s, default_assoc, EFF_DEC);
240 }
241 void ControlPoint::EffectIncrease::PotentialOverlap(std::string s) {
242         insert("PotentialOverlap", s, default_assoc, EFF_INC);
243 }
244 void ControlPoint::EffectDecrease::LoadBalancingPeriod(std::string s, const ControlPoint::ControlPointAssociation &a) {
245         insert("LoadBalancingPeriod", s, a, EFF_DEC);
246 }
247 void ControlPoint::EffectIncrease::LoadBalancingPeriod(std::string s, const ControlPoint::ControlPointAssociation &a) {
248         insert("LoadBalancingPeriod", s, a, EFF_INC);
249 }
250 void ControlPoint::EffectDecrease::LoadBalancingPeriod(std::string s) {
251         insert("LoadBalancingPeriod", s, default_assoc, EFF_DEC);
252 }
253 void ControlPoint::EffectIncrease::LoadBalancingPeriod(std::string s) {
254         insert("LoadBalancingPeriod", s, default_assoc, EFF_INC);
255 }
256 void ControlPoint::EffectDecrease::GPUOffloadedWork(std::string s, const ControlPoint::ControlPointAssociation &a) {
257         insert("GPUOffloadedWork", s, a, EFF_DEC);
258 }
259 void ControlPoint::EffectIncrease::GPUOffloadedWork(std::string s, const ControlPoint::ControlPointAssociation &a) {
260         insert("GPUOffloadedWork", s, a, EFF_INC);
261 }
262 void ControlPoint::EffectDecrease::GPUOffloadedWork(std::string s) {
263         insert("GPUOffloadedWork", s, default_assoc, EFF_DEC);
264 }
265 void ControlPoint::EffectIncrease::GPUOffloadedWork(std::string s) {
266         insert("GPUOffloadedWork", s, default_assoc, EFF_INC);
267 }
268
269
270 #endif