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