Commit c98e5434 authored by Carla Guillen's avatar Carla Guillen
Browse files

Using doubles for most calculations

parent e9f50eaf
......@@ -36,6 +36,7 @@
#include <cstdint>
#include <memory>
#include <string>
#include <numeric>
#include "../../../common/include/logging.h"
#include "../../../common/include/sensorbase.h"
......@@ -77,39 +78,33 @@ void PerSystSqlOperator::compute(U_Ptr unit, qeJobData& jobData) {
compute_internal(unit, _buffer);
}
void PerSystSqlOperator::compute_internal(U_Ptr unit, vector<reading_t> buffer) {
void PerSystSqlOperator::compute_internal(U_Ptr unit, vector<reading_t>& buffer) {
_quantileSensors.clear();
reading_t reading;
AggregatorSensorBase::aggregationOps_t op;
reading.timestamp = getTimestamp() - 10e9;
std::vector<double> douBuffer;
punToDoubles(buffer, douBuffer);
// Performing the actual aggregation operation
for(const auto& out : unit->getOutputs()) {
op = out->getOperation();
if(op!=AggregatorSensorBase::QTL) {
switch (op) {
case AggregatorSensorBase::SUM:
reading.value = computeSum(buffer);
reading.value = punDoubleToLL(std::accumulate(douBuffer.begin(), douBuffer.end(), 0.0));
break;
case AggregatorSensorBase::AVG:
reading.value = computeAvg(buffer);
break;
case AggregatorSensorBase::MIN:
reading.value = computeMin(buffer);
break;
case AggregatorSensorBase::MAX:
reading.value = computeMax(buffer);
break;
case AggregatorSensorBase::STD:
reading.value = computeStd(buffer);
reading.value = punDoubleToLL(std::accumulate(douBuffer.begin(), douBuffer.end(), 0.0)/douBuffer.size());
break;
case AggregatorSensorBase::OBS:
reading.value = computeObs(buffer);
break;
case AggregatorSensorBase::AVG_SEV:
reading.value = computeSeverityAverage(buffer); //ToDo an appropriate cast needed here
break;
reading.value = punDoubleToLL(computeSeverityAverage(douBuffer));
break;
default:
LOG(warning) << _name << ": Encountered unknown operation!";
LOG(warning) << _name << ": Operation " << op << " not supported!";
reading.value = 0;
break;
}
......@@ -120,10 +115,10 @@ void PerSystSqlOperator::compute_internal(U_Ptr unit, vector<reading_t> buffer)
}
if(!_quantileSensors.empty()) {
vector<int64_t> quantiles;
computeEvenQuantiles(buffer, _number_of_even_quantiles, quantiles);
vector<double> quantiles;
computeEvenQuantiles(douBuffer, _number_of_even_quantiles, quantiles);
for(unsigned idx=0; idx<quantiles.size(); idx++) {
reading.value = quantiles[idx];
reading.value = punDoubleToLL(quantiles[idx]);
_quantileSensors[idx]->storeReading(reading);
}
}
......@@ -133,10 +128,10 @@ void PerSystSqlOperator::compute(U_Ptr unit){
//nothing here!
}
float severity_formula1(float metric, float threshold, float exponent){
float val = metric - threshold;
double severity_formula1(double metric, double threshold, double exponent){
double val = metric - threshold;
if (val > 0) {
float ret = (pow(val, exponent));
double ret = (pow(val, exponent));
if(ret > 1){
return 1;
}
......@@ -145,13 +140,13 @@ float severity_formula1(float metric, float threshold, float exponent){
return 0;
}
float severity_formula2(float metric, float threshold, float exponent){
double severity_formula2(double metric, double threshold, double exponent){
if(!threshold){
return -1;
}
float val = metric / threshold - 1;
double val = metric / threshold - 1;
if (val > 0) {
float ret= (pow(val, exponent));
double ret= (pow(val, exponent));
if(ret > 1){
return 1;
}
......@@ -160,13 +155,13 @@ float severity_formula2(float metric, float threshold, float exponent){
return 0;
}
float severity_formula3(float metric, float threshold, float exponent){
double severity_formula3(double metric, double threshold, double exponent){
if (!threshold) {
return -1;
}
float val = metric / threshold;
double val = metric / threshold;
if (val > 0) {
float ret= (1 - pow(val, exponent));
double ret= (1 - pow(val, exponent));
if(ret > 1 ){
return 1;
}
......@@ -178,9 +173,9 @@ float severity_formula3(float metric, float threshold, float exponent){
return 0;
}
float severity_memory(float metric, float threshold, float max_memory){
float denominator = max_memory - threshold;
float severity = -1;
double severity_memory(double metric, double threshold, double max_memory){
double denominator = max_memory - threshold;
double severity = -1;
if(denominator){
severity = metric - threshold/(max_memory - threshold);
if(severity > 1) {
......@@ -192,40 +187,90 @@ float severity_memory(float metric, float threshold, float max_memory){
return severity;
}
float PerSystSqlOperator::computeSeverityAverage(vector<reading_t> & buffer){
std::vector<float> severities;
double PerSystSqlOperator::computeSeverityAverage(std::vector<double> & buffer){
std::vector<double> severities;
switch( _severity_formula ) {
case (FORMULA1):
for(auto reading: buffer){
auto severity = severity_formula1(reading.value, _severity_threshold, _severity_exponent);
for(auto val : buffer){
auto severity = severity_formula1(val, _severity_threshold, _severity_exponent);
severities.push_back(severity);
}
break;
case (FORMULA2):
for(auto reading: buffer){
auto severity = severity_formula2(reading.value, _severity_threshold, _severity_exponent);
for(auto val: buffer){
auto severity = severity_formula2(val, _severity_threshold, _severity_exponent);
severities.push_back(severity);
}
break;
case (FORMULA3):
for(auto reading: buffer){
auto severity = severity_formula3(reading.value, _severity_threshold, _severity_exponent);
for(auto val: buffer){
auto severity = severity_formula3(val, _severity_threshold, _severity_exponent);
severities.push_back(severity);
}
break;
case (MEMORY_FORMULA):
for(auto reading: buffer){
auto severity = severity_memory(reading.value, _severity_threshold, _severity_max_memory);
for(auto val: buffer){
auto severity = severity_memory(val, _severity_threshold, _severity_max_memory);
severities.push_back(severity);
}
break;
case (NOFORMULA):
for(auto val: buffer){
severities.push_back(severity_noformula());
}
default:
return 0.0;
break;
}
if (severities.size()){
return (std::accumulate(severities.begin(),severities.end(), 0.0f) / severities.size());
return (std::accumulate(severities.begin(),severities.end(), 0.0) / severities.size());
}
return 0.0;
}
void punToDoubles(std::vector<reading_t> & buffer, std::vector<double> & outDoubleVec){
for(auto & reading: buffer){
outDoubleVec.push_back(punLLToDouble(reading.value));
}
}
double punLLToDouble(long long value){
double * returnval;
returnval = (double *)(&value);
return *returnval;
}
long long punDoubleToLL(double value){
long long * returnval;
returnval = (long long *)(&value);
return *returnval;
}
void computeEvenQuantiles(std::vector<double> &data, const unsigned int NUMBER_QUANTILES, std::vector<double> &quantiles) {
if (data.empty() || NUMBER_QUANTILES == 0) {
return;
}
std::sort(data.begin(), data.end());
int elementNumber = data.size();
quantiles.resize(NUMBER_QUANTILES + 1); //+min
double factor = elementNumber/static_cast<double>(NUMBER_QUANTILES);
quantiles[0] = data[0]; //minimum
quantiles[NUMBER_QUANTILES] = data[data.size() - 1]; //maximum
for (unsigned int i = 1; i < NUMBER_QUANTILES; i++) {
if (elementNumber > 1) {
int idx = static_cast<int>(std::floor(i * factor));
if(idx == 0){
quantiles[i] = data[0];
} else {
double rest = (i * factor) - idx;
quantiles[i] = data[idx - 1] + rest * (data[idx] - data[idx - 1]); //ToDo scaling factor??
}
} else { //optimization, we don't need to calculate all the quantiles
quantiles[i] = data[0];
}
}
}
......@@ -60,7 +60,7 @@ public:
_quantileSensors.push_back(qSensor);
}
void setSeverityExponent(float severityExponent) {
void setSeverityExponent(double severityExponent) {
_severity_exponent = severityExponent;
}
......@@ -68,33 +68,39 @@ public:
_severity_formula = severityFormula;
}
void setSeverityMaxMemory(float severityMaxMemory) {
void setSeverityMaxMemory(double severityMaxMemory) {
_severity_max_memory = severityMaxMemory;
}
void setSeverityThreshold(float severityThreshold) {
void setSeverityThreshold(double severityThreshold) {
_severity_threshold = severityThreshold;
}
private:
std::vector<reading_t> _buffer;
std::vector<double> _severities;
protected:
virtual void compute(U_Ptr unit) override;
void compute_internal(U_Ptr unit, vector<reading_t> buffer);
float computeSeverityAverage(vector<reading_t> & buffer);
virtual void compute(U_Ptr unit) override;
void compute_internal(U_Ptr unit, vector<reading_t>& buffer);
double computeSeverityAverage(vector<double> & buffer);
std::vector<AggregatorSBPtr> _quantileSensors;
unsigned int _number_of_even_quantiles;
Formula _severity_formula;
float _severity_threshold;
float _severity_exponent;
float _severity_max_memory;
double _severity_threshold;
double _severity_exponent;
double _severity_max_memory;
};
float severity_formula1(float metric, float threshold, float exponent);
float severity_formula2(float metric, float threshold, float exponent);
float severity_formula3(float metric, float threshold, float exponent);
float severity_memory(float metric, float threshold, float max_memory);
constexpr float severity_noformula(){return 0;} //No severity
double severity_formula1(double metric, double threshold, double exponent);
double severity_formula2(double metric, double threshold, double exponent);
double severity_formula3(double metric, double threshold, double exponent);
double severity_memory(double metric, double threshold, double max_memory);
constexpr double severity_noformula(){return 0.0;} //No severity
void punToDoubles(std::vector<reading_t> & buffer, std::vector<double> & outDoubleVec);
void computeEvenQuantiles(std::vector<double> &data, const unsigned int NUMBER_QUANTILES, std::vector<double> &quantiles);
double punLLToDouble(long long value);
long long punDoubleToLL(double value);
#endif /* ANALYTICS_OPERATORS_PERSYSTSQL_PERSYSTSQLOPERATOR_H_ */
......@@ -28,39 +28,54 @@
#include "SKXPMUMetrics.h"
double punLLToDouble(long long value){
double * returnval;
returnval = (double *)(&value);
return *returnval;
}
long long punDoubleToLL(double value){
long long * returnval;
returnval = (long long *)(&value);
return *returnval;
}
bool calculateFlops(reading_t &scalarDB, reading_t & scalarSP,
bool calculateFlopsPerSec(reading_t &scalarDB, reading_t & scalarSP,
reading_t & packedDP128, reading_t & packedSP128,
reading_t & packedDP256, reading_t & packedSP256,
reading_t & packedDP512, reading_t & packedSP512, reading_t & result) {
result.value = (packedDP128.value * 2 + packedSP128.value * 4
reading_t & packedDP512, reading_t & packedSP512, reading_t & result, double measuring_interval_s) {
if(!measuring_interval_s) return false;
result.value = punDoubleToLL(packedDP128.value * 2 + packedSP128.value * 4
+ packedDP256.value * 4 + packedSP256.value * 8
+ packedDP512.value * 8 + packedSP512.value * 16 + scalarDB.value
+ scalarSP.value);
+ scalarSP.value)/measuring_interval_s;
return getTimestampFromReadings(result.timestamp, scalarDB, scalarSP, packedDP128, packedSP128, packedDP256, packedSP256, packedDP512, packedSP512);
}
bool calculatePackedFlops(reading_t & packedDP128, reading_t & packedSP128,
bool calculatePackedFlopsPerSec(reading_t & packedDP128, reading_t & packedSP128,
reading_t & packedDP256, reading_t & packedSP256,
reading_t & packedDP512, reading_t & packedSP512,
reading_t & result) {
result.value = (packedDP128.value * 2 + packedSP128.value * 4
reading_t & result, double measuring_interval_s) {
result.value = punDoubleToLL((packedDP128.value * 2 + packedSP128.value * 4
+ packedDP256.value * 4 + packedSP256.value * 8
+ packedDP512.value * 8 + packedSP512.value * 16);
+ packedDP512.value * 8 + packedSP512.value * 16)/measuring_interval_s);
return getTimestampFromReadings(result.timestamp, packedDP128, packedSP128, packedDP256, packedSP256, packedDP512, packedSP512);
}
bool calculateVectorizationRatio(reading_t & scalarDB, reading_t & scalarSP,
reading_t & packedDP128, reading_t & packedSP128,
reading_t & packedDP256, reading_t & packedSP256,
reading_t & packedDP512, reading_t & packedSP512, unsigned int scaling_factor, reading_t & result) {
float denominator = static_cast<float>(scalarDB.value + scalarSP.value +
reading_t & packedDP512, reading_t & packedSP512, reading_t & result) {
double denominator = static_cast<double>(scalarDB.value + scalarSP.value +
packedDP128.value + packedSP128.value +
packedDP256.value + packedSP256.value +
packedDP512.value + packedSP512.value);
if(denominator > 0 ){
result.value = (packedDP128.value + packedSP128.value + packedDP256.value
+ packedSP256.value + packedDP256.value + packedSP512.value + packedDP512.value)/denominator;
result.value = punDoubleToLL((packedDP128.value + packedSP128.value + packedDP256.value
+ packedSP256.value + packedDP256.value + packedSP512.value + packedDP512.value)/denominator);
return getTimestampFromReadings(result.timestamp, scalarDB, scalarSP,
packedDP128, packedSP128, packedDP256, packedSP256, packedDP512,
packedSP512);
......@@ -70,13 +85,13 @@ bool calculateVectorizationRatio(reading_t & scalarDB, reading_t & scalarSP,
bool calculateAVX512FlopsToVectorizedRatio(reading_t & packedDP128, reading_t & packedSP128,
reading_t & packedDP256, reading_t & packedSP256,
reading_t & packedDP512, reading_t & packedSP512, unsigned int scaling_factor,
reading_t & packedDP512, reading_t & packedSP512,
reading_t & result){
float denominator = static_cast<float>(packedDP128.value + packedSP128.value +
double denominator = static_cast<double>(packedDP128.value + packedSP128.value +
packedDP256.value + packedSP256.value +
packedDP512.value + packedSP512.value);
if(denominator > 0){
result.value = (packedDP512.value * 8 + packedSP512.value * 16)/denominator;
result.value = punDoubleToLL((packedDP512.value * 8 + packedSP512.value * 16)/denominator);
return getTimestampFromReadings(result.timestamp, packedDP128, packedSP128, packedDP256, packedSP256, packedDP512, packedSP512);
}
return false;
......@@ -86,13 +101,13 @@ bool calculateAVX512FlopsToVectorizedRatio(reading_t & packedDP128, reading_t &
bool calculateSP_TO_TOTAL_RATIO(reading_t &scalarDB, reading_t & scalarSP,
reading_t & packedDP128, reading_t & packedSP128,
reading_t & packedDP256, reading_t & packedSP256,
reading_t & packedDP512, reading_t & packedSP512, unsigned int scaling_factor,
reading_t & packedDP512, reading_t & packedSP512,
reading_t & result){
auto single_precision = packedSP128.value * 4 + packedSP256.value * 8
+ packedSP512.value * 16 + scalarSP.value;
float total = single_precision = packedDP128.value * 2 + packedDP256.value * 4 + packedDP512.value * 8 + scalarDB.value;
double total = single_precision = packedDP128.value * 2 + packedDP256.value * 4 + packedDP512.value * 8 + scalarDB.value;
if(total > 0){
result.value = single_precision/total;
result.value = punDoubleToLL(single_precision/total);
return getTimestampFromReadings(result.timestamp, scalarDB, scalarSP,
packedDP128, packedSP128, packedDP256, packedSP256, packedDP512,
packedSP512);
......@@ -101,16 +116,16 @@ bool calculateSP_TO_TOTAL_RATIO(reading_t &scalarDB, reading_t & scalarSP,
}
bool calculateL3HitToL3MissRatio(reading_t & l3_misses, reading_t& l3_load_hits,
reading_t & l3_load_misses, reading_t & result, unsigned int scaling_factor){
float denominator = static_cast<float>(l3_load_hits.value + l3_load_misses.value);
reading_t & l3_load_misses, reading_t & result){
double denominator = static_cast<double>(l3_load_hits.value + l3_load_misses.value);
if(denominator > 0){
result.value = (l3_misses.value/denominator) * scaling_factor;
result.value = punDoubleToLL(l3_misses.value/denominator);
return getTimestampFromReadings(result.timestamp, l3_misses, l3_load_hits, l3_load_misses);
}
return false;
}
bool calculateMemoryBandwidth(std::vector<reading_t> membw_counts, reading_t & result) {
bool calculateMemoryBandwidth(std::vector<reading_t> membw_counts, reading_t & result, double measuring_interval_s ) {
result.value = 0;
const unsigned int SIZEPERACCESS = 64;
bool ret_val = false;
......@@ -121,6 +136,7 @@ bool calculateMemoryBandwidth(std::vector<reading_t> membw_counts, reading_t & r
ret_val = true;
}
}
result.value = punDoubleToLL(result.value/measuring_interval_s);
return ret_val;
}
......@@ -128,19 +144,18 @@ bool calculateMemoryBandwidth(std::vector<reading_t> membw_counts, reading_t & r
/**
* For CPI, LoadsToStore, Branch rate, miss branch ratio, etc..
*/
bool calculateMetricRatio(reading_t & dividend, reading_t & divisor,
unsigned int scaling_factor, reading_t & result) {
bool calculateMetricRatio(reading_t & dividend, reading_t & divisor, reading_t & result) {
if(divisor.value > 0){
result.value = (dividend.value / static_cast<float>(divisor.value))*scaling_factor;
result.value = punDoubleToLL(dividend.value / static_cast<double>(divisor.value));
return getTimestampFromReadings(result.timestamp, dividend, divisor);
}
return false; //Division by zero
}
/** Any generic metric per second. For instance: instructions per second, l2 misses per second **/
bool calculateMetricPerSec(reading_t & metric, uint64_t interval, unsigned int scaling_factor, reading_t & result) {
if(interval > 0) {
result.value = (metric.value / static_cast<float>(interval))*scaling_factor;
bool calculateMetricPerSec(reading_t & metric, double measuring_interval_s, reading_t & result) {
if(measuring_interval_s > 0) {
result.value = punDoubleToLL(metric.value / measuring_interval_s);
return getTimestampFromReadings(result.timestamp, metric);
}
return false; //Division by zero
......@@ -149,10 +164,11 @@ bool calculateMetricPerSec(reading_t & metric, uint64_t interval, unsigned int s
bool calculateFrequency(reading_t & unhaltedRef, reading_t & unhaltedClocks,
unsigned int min_freq, unsigned int max_freq, reading_t & result) {
if(unhaltedRef.value > 0){
result.value = (unhaltedClocks.value / static_cast<float>(unhaltedRef.value)) * max_freq;
if(result.value > (max_freq * 1.1) || result.value < (min_freq*0.9)) { //There is something wrong here...
double resValue = (unhaltedClocks.value / static_cast<double>(unhaltedRef.value)) * max_freq;
if(resValue > (max_freq * 1.1) || resValue < (min_freq*0.9)) { //There is something wrong here...
return false;
}
result.value = punDoubleToLL(resValue);
return getTimestampFromReadings(result.timestamp, unhaltedRef, unhaltedClocks);
}
return false; //Division by zero
......
......@@ -42,46 +42,50 @@ bool getTimestampFromReadings(uint64_t & timestamp, Args&...args){
return false;
}
bool calculateFlops(reading_t &scalarDB, reading_t & scalarSP,
reading_t & packedDP128, reading_t & packedSP128,
reading_t & packedDP256, reading_t & packedSP256,
reading_t & packedDP512, reading_t & packedSP512,
reading_t & result);
double punLLToDouble(long long value);
bool calculatePackedFlops(reading_t & packedDP128, reading_t & packedSP128,
long long punDoubleToLL(double value);
bool calculateFlopsPerSec(reading_t &scalarDB, reading_t & scalarSP,
reading_t & packedDP128, reading_t & packedSP128,
reading_t & packedDP256, reading_t & packedSP256,
reading_t & packedDP512, reading_t & packedSP512,
reading_t & result, double measuring_interval_s);
bool calculatePackedFlopsPerSec(reading_t & packedDP128, reading_t & packedSP128,
reading_t & packedDP256, reading_t & packedSP256,
reading_t & packedDP512, reading_t & packedSP512,
reading_t & result);
reading_t & result, double measuring_interval_s);
bool calculateVectorizationRatio(reading_t & scalarDB, reading_t & scalarSP,
reading_t & packedDP128, reading_t & packedSP128,
reading_t & packedDP256, reading_t & packedSP256,
reading_t & packedDP512, reading_t & packedSP512, unsigned int scaling_factor, reading_t & result);
reading_t & packedDP512, reading_t & packedSP512, reading_t & result);
bool calculateAVX512FlopsToVectorizedRatio(reading_t & packedDP128, reading_t & packedSP128,
reading_t & packedDP256, reading_t & packedSP256,
reading_t & packedDP512, reading_t & packedSP512, unsigned int scaling_factor,
reading_t & packedDP512, reading_t & packedSP512,
reading_t & result);
bool calculateSP_TO_TOTAL_RATIO(reading_t &scalarDB, reading_t & scalarSP,
reading_t & packedDP128, reading_t & packedSP128,
reading_t & packedDP256, reading_t & packedSP256,
reading_t & packedDP512, reading_t & packedSP512, unsigned int scaling_factor,
reading_t & packedDP512, reading_t & packedSP512,
reading_t & result);
bool calculateL3HitToL3MissRatio(reading_t & l3_misses, reading_t& l3_load_hits,
reading_t & l3_load_misses, reading_t & result, unsigned int scaling_factor);
reading_t & l3_load_misses, reading_t & result);
bool calculateMemoryBandwidth(std::vector<reading_t> membw_counts, reading_t & result, double measuring_interval_s);
bool calculateMetricRatio(reading_t & dividend, reading_t & divisor,
unsigned int scaling_factor, reading_t & result);
bool calculateMetricRatio(reading_t & dividend, reading_t & divisor, reading_t & result);
/** Any generic metric per second. For instance: instructions per second, l2 misses per second **/
bool calculateMetricPerSec(reading_t & metric, uint64_t interval, unsigned int scaling_factor, reading_t & result) ;
bool calculateMetricPerSec(reading_t & metric, double measuring_interval_s, unsigned int scaling_factor, reading_t & result) ;
bool calculateFrequency(reading_t & unhaltedRef, reading_t & unhaltedClocks,
unsigned int min_freq, unsigned int max_freq, reading_t & result);
bool calculateMemoryBandwidth(std::vector<reading_t> membw_counts, reading_t & result);
#endif /* ANALYTICS_ANALYZERS_SMUCNGPERFANALYZER_SKXDERIVEDMETRICS_SKXPMUMETRICS_H_ */
......@@ -67,13 +67,13 @@ void SMUCNGPerfConfigurator::sensorBase(SMUCSensorBase& s, CFG_VAL config) {
void SMUCNGPerfConfigurator::operatorAttributes(SMUCNGPerfOperator& op, CFG_VAL config){
op.setMetricToPosition(_metricToPosition);
/*BOOST_FOREACH(boost::property_tree::iptree::value_type &val, config)
BOOST_FOREACH(boost::property_tree::iptree::value_type &val, config)
{
if (boost::iequals(val.first, "measurement_interval")){
auto measurementInterval = stoull(val.second.data()) * 1000000;
op.setMeasurementInterval(measurementInterval);
if (boost::iequals(val.first, "measuring_interval")){
auto measurementInterval_s = std::stod(val.second.data())/1000.0; //miliseconds to seconds
op.setMeasuringInterval(measurementInterval_s);
}
}*/
}
}
bool SMUCNGPerfConfigurator::unit(UnitTemplate<SMUCSensorBase>& u) {
......
......@@ -71,7 +71,7 @@ void SMUCNGPerfOperator::printConfig(LOG_LEVEL ll) {
OperatorTemplate<SMUCSensorBase>::printConfig(ll);
LOG_VAR(ll) << " metric to position map: ";
for(auto &kv : _metricToPosition){
LOG_VAR(ll) << "Metric = " << kv.first << "Position = " << kv.second;
LOG_VAR(ll) << "Metric = " << kv.first << " Position = " << kv.second;
}
}
......@@ -123,7 +123,7 @@ void SMUCNGPerfOperator::computeCPI(std::vector<SMUCNGPtr>& inputs, SMUCNGPtr &o
query(inputs[_metricToPosition[SMUCSensorBase::CLOCKS]]->getName(), timestamp, clocks);
bool wascalced = false;
reading_t cpi;
if (instructions.size() > 0 && clocks.size() > 0 && calculateMetricRatio(clocks[0], instructions[0], outSensor->getScalingFactor(), cpi)) {
if (instructions.size() > 0 && clocks.size() > 0 && calculateMetricRatio(clocks[0], instructions[0], cpi)) {
outSensor->storeReading(cpi);
}
}
......@@ -173,31 +173,31 @@ void SMUCNGPerfOperator::computeFLOPS(std::vector<SMUCNGPtr>& inputs, SMUCNGPtr&
reading_t result;
if(flop_metric == SMUCSensorBase::FLOPS) {
if (calculateFlops(scalar_double, scalar_single, packed128_double,
if (calculateFlopsPerSec(scalar_double, scalar_single