16 parent(parent_), num_inputs(inputs), sorted(false), done_callibration(
42 for (vector<PowerCallibSize*>::iterator it =
entries.begin() + 1;
43 it !=
entries.end() - 1; it++) {
45 (*it)->transistor_size);
46 (*it)->factor = (*it)->power / est_power;
59 float transistor_size) {
63 for (vector<PowerCallibSize*>::iterator it =
entries.begin() + 1;
65 if ((*it)->transistor_size > transistor_size) {
77 float (*usage_fn)(
int num_inputs,
float transistor_size)) {
96 vector<PowerCallibInputs*>::iterator it;
99 if ((*it)->num_inputs == num_inputs) {
116 for (vector<PowerCallibInputs*>::iterator it =
entries.begin() + 1;
118 if ((*it)->num_inputs > num_inputs) {
140 inputs_entry->
add_size(transistor_size, power);
145 float transistor_size) {
153 float factor_lower = 0.;
154 float factor_upper = 0.;
172 factor_lower = perc_upper * size_upper->
factor
173 + (1 - perc_upper) * size_lower->
factor;
184 factor_upper = perc_upper * size_upper->
factor
185 + (1 - perc_upper) * size_lower->
factor;
189 factor = factor_upper;
190 }
else if (!inputs_upper) {
191 factor = factor_lower;
195 ((float) (num_inputs - inputs_lower->
num_inputs))
198 factor = perc_upper * factor_upper + (1 - perc_upper) * factor_lower;
211 for (vector<PowerCallibInputs*>::iterator it =
entries.begin();
221 for (vector<PowerCallibInputs*>::iterator it =
entries.begin();
bool sorter_PowerCallibInputs(PowerCallibInputs *a, PowerCallibInputs *b)
float(* component_usage)(int num_inputs, float transistor_size)
std::vector< PowerCallibInputs * > entries
PowerCallibInputs * add_entry(int num_inputs)
PowerSpicedComponent(float(*usage_fn)(int num_inputs, float transistor_size))
bool is_done_callibration(void)
PowerCallibInputs * get_entry(int num_inputs)
void add_data_point(int num_inputs, float transistor_size, float power)
PowerCallibInputs * get_entry_bound(bool lower, int num_inputs)
bool sorter_PowerCallibSize(PowerCallibSize *a, PowerCallibSize *b)
float scale_factor(int num_inputs, float transistor_size)