rename namespace Statistics to Stats

--HG--
extra : convert_revision : 28f1703f8d7d8cf33fb952ae450f66bdba860fb7
This commit is contained in:
Nathan Binkert
2004-05-21 13:39:20 -04:00
parent f5c7b1358c
commit 62d756f253
39 changed files with 146 additions and 146 deletions

View File

@@ -63,7 +63,7 @@ HybridPredictor::HybridPredictor(const char *_p_name, const char *_z_name,
void HybridPredictor::regStats()
{
using namespace Statistics;
using namespace Stats;
string p_name;
stringstream description;
@@ -148,7 +148,7 @@ void HybridPredictor::regStats()
void HybridPredictor::regFormulas()
{
using namespace Statistics;
using namespace Stats;
string p_name;
stringstream description;

View File

@@ -59,22 +59,22 @@ class HybridPredictor : public GenericPredictor
//
// Stats
//
Statistics::Scalar<> pred_one; //num_one_preds
Statistics::Scalar<> pred_zero; //num_zero_preds
Statistics::Scalar<> correct_pred_one; //num_one_correct
Statistics::Scalar<> correct_pred_zero; //num_zero_correct
Statistics::Scalar<> record_one; //num_one_updates
Statistics::Scalar<> record_zero; //num_zero_updates
Stats::Scalar<> pred_one; //num_one_preds
Stats::Scalar<> pred_zero; //num_zero_preds
Stats::Scalar<> correct_pred_one; //num_one_correct
Stats::Scalar<> correct_pred_zero; //num_zero_correct
Stats::Scalar<> record_one; //num_one_updates
Stats::Scalar<> record_zero; //num_zero_updates
Statistics::Formula total_preds;
Statistics::Formula frac_preds_zero;
Statistics::Formula frac_preds_one;
Statistics::Formula total_correct;
Statistics::Formula total_accuracy;
Statistics::Formula zero_accuracy;
Statistics::Formula one_accuracy;
Statistics::Formula zero_coverage;
Statistics::Formula one_coverage;
Stats::Formula total_preds;
Stats::Formula frac_preds_zero;
Stats::Formula frac_preds_one;
Stats::Formula total_correct;
Stats::Formula total_accuracy;
Stats::Formula zero_accuracy;
Stats::Formula one_accuracy;
Stats::Formula zero_coverage;
Stats::Formula one_coverage;
public:
HybridPredictor(const char *_p_name, const char *_z_name,

View File

@@ -69,7 +69,7 @@ SaturatingCounterPred::SaturatingCounterPred(string p_name,
void SaturatingCounterPred::regStats()
{
using namespace Statistics;
using namespace Stats;
stringstream name, description;
//
@@ -138,7 +138,7 @@ void SaturatingCounterPred::regStats()
void SaturatingCounterPred::regFormulas()
{
using namespace Statistics;
using namespace Stats;
stringstream name, description;
//

View File

@@ -61,24 +61,24 @@ class SaturatingCounterPred : public GenericPredictor
unsigned *table;
// Statistics
Statistics::Scalar<> predicted_one; // Total predictions of one, preds_one
Statistics::Scalar<> predicted_zero; // Total predictions of zero, preds_zero
Statistics::Scalar<> correct_pred_one; // Total correct predictions of one, correct_one
Statistics::Scalar<> correct_pred_zero; // Total correct predictions of zero, correct_zero
Stats::Scalar<> predicted_one; // Total predictions of one, preds_one
Stats::Scalar<> predicted_zero; // Total predictions of zero, preds_zero
Stats::Scalar<> correct_pred_one; // Total correct predictions of one, correct_one
Stats::Scalar<> correct_pred_zero; // Total correct predictions of zero, correct_zero
Statistics::Scalar<> record_zero; //updates_zero
Statistics::Scalar<> record_one; //updates_one
Stats::Scalar<> record_zero; //updates_zero
Stats::Scalar<> record_one; //updates_one
Statistics::Formula preds_total;
Statistics::Formula pred_frac_zero;
Statistics::Formula pred_frac_one;
Statistics::Formula correct_total;
Statistics::Formula updates_total;
Statistics::Formula pred_rate;
Statistics::Formula frac_correct_zero;
Statistics::Formula frac_correct_one;
Statistics::Formula coverage_zero;
Statistics::Formula coverage_one;
Stats::Formula preds_total;
Stats::Formula pred_frac_zero;
Stats::Formula pred_frac_one;
Stats::Formula correct_total;
Stats::Formula updates_total;
Stats::Formula pred_rate;
Stats::Formula frac_correct_zero;
Stats::Formula frac_correct_one;
Stats::Formula coverage_zero;
Stats::Formula coverage_one;
private:
bool pred_one(unsigned &counter) { return counter > thresh; }

View File

@@ -46,7 +46,7 @@
using namespace std;
namespace Statistics {
namespace Stats {
StatData *
DataAccess::find() const
@@ -346,4 +346,4 @@ registerResetCallback(Callback *cb)
resetQueue.add(cb);
}
/* namespace Statistics */ }
/* namespace Stats */ }

View File

@@ -70,7 +70,7 @@ class Callback;
extern Tick curTick;
/* A namespace for all of the Statistics */
namespace Statistics {
namespace Stats {
/* Contains the statistic implementation details */
//////////////////////////////////////////////////////////////////////
@@ -2897,6 +2897,6 @@ sum(Temp val)
return NodePtr(new SumNode<std::plus<Result> >(val));
}
/* namespace Statistics */ }
/* namespace Stats */ }
#endif // __BASE_STATISTICS_HH__

View File

@@ -28,7 +28,7 @@
#ifndef __BASE_STATS_FLAGS_HH__
#define __BASE_STATS_FLAGS_HH__
namespace Statistics {
namespace Stats {
/**
* Define the storage for format flags.
@@ -68,6 +68,6 @@ enum DisplayMode
extern DisplayMode DefaultMode;
/* namespace Statistics */ }
/* namespace Stats */ }
#endif // __BASE_STATS_FLAGS_HH__

View File

@@ -44,7 +44,7 @@
using namespace std;
namespace Statistics {
namespace Stats {
struct MySqlData
{
@@ -841,4 +841,4 @@ MySql::visit(const FormulaData &data)
output(data);
}
/* namespace Statistics */ }
/* namespace Stats */ }

View File

@@ -34,7 +34,7 @@
#include "base/stats/output.hh"
namespace MySQL { class Connection; }
namespace Statistics {
namespace Stats {
class DistDataData;
class MySqlData;
@@ -144,6 +144,6 @@ class MySql : public Output
void configure(const FormulaData &data);
};
/* namespace Statistics */ }
/* namespace Stats */ }
#endif // __BASE_STATS_MYSQL_HH__

View File

@@ -33,7 +33,7 @@
#include "base/stats/visit.hh"
namespace Statistics {
namespace Stats {
struct Output : public Visit
{
@@ -42,6 +42,6 @@ struct Output : public Visit
virtual bool valid() const = 0;
};
/* namespace Statistics */ }
/* namespace Stats */ }
#endif // __BASE_STATS_OUTPUT_HH__

View File

@@ -34,7 +34,7 @@
using namespace std;
namespace Statistics {
namespace Stats {
namespace Database {
StatData *
@@ -86,4 +86,4 @@ TheDatabase &db()
}
/* namespace Database */ }
/* namespace Statistics */ }
/* namespace Stats */ }

View File

@@ -36,7 +36,7 @@
class Python;
namespace Statistics {
namespace Stats {
class MainBin;
class StatData;
@@ -69,6 +69,6 @@ void regPrint(void *stat);
inline std::string name() { return "Statistics Database"; }
/* namespace Database */ }
/* namespace Statistics */ }
/* namespace Stats */ }
#endif // __BASE_STATS_STATDB_HH__

View File

@@ -60,7 +60,7 @@ __nan()
}
#endif
namespace Statistics {
namespace Stats {
Text::Text()
: mystream(false), stream(NULL), compat(false), descriptions(false)
@@ -282,14 +282,14 @@ VectorPrint::operator()(std::ostream &stream) const
print(stream);
}
if (flags & ::Statistics::total) {
if (flags & ::Stats::total) {
print.name = base + "total";
print.desc = desc;
print.value = total;
print(stream);
}
} else {
if (flags & ::Statistics::total) {
if (flags & ::Stats::total) {
print.value = total;
print(stream);
}
@@ -640,7 +640,7 @@ Text::visit(const Vector2dData &data)
print(*stream);
}
if ((data.flags & ::Statistics::total) && (data.x > 1)) {
if ((data.flags & ::Stats::total) && (data.x > 1)) {
print.name = data.name;
print.desc = data.desc;
print.vec = tot_vec;
@@ -728,4 +728,4 @@ Text::visit(const FormulaData &data)
visit((const VectorData &)data);
}
/* namespace Statistics */ }
/* namespace Stats */ }

View File

@@ -34,7 +34,7 @@
#include "base/stats/output.hh"
namespace Statistics {
namespace Stats {
class Text : public Output
{
@@ -72,6 +72,6 @@ class Text : public Output
virtual void output();
};
/* namespace Statistics */ }
/* namespace Stats */ }
#endif // __BASE_STATS_TEXT_HH__

View File

@@ -32,7 +32,7 @@
#include <vector>
#include <inttypes.h>
namespace Statistics {
namespace Stats {
/** All counters are of 64-bit values. */
typedef double Counter;
@@ -44,6 +44,6 @@ typedef double Result;
/** vector of results. */
typedef std::vector<Result> VResult;
/* namespace Statistics */ }
/* namespace Stats */ }
#endif // __BASE_STATS_TYPES_HH__

View File

@@ -28,7 +28,7 @@
#include "base/stats/visit.hh"
namespace Statistics {
namespace Stats {
namespace Detail {
Visit::Visit()
@@ -38,4 +38,4 @@ Visit::~Visit()
{}
/* namespace Detail */ }
/* namespace Statistics */ }
/* namespace Stats */ }

View File

@@ -34,7 +34,7 @@
#include "base/time.hh"
#include "sim/host.hh"
namespace Statistics {
namespace Stats {
class StatData;
class ScalarData;
@@ -58,6 +58,6 @@ struct Visit
virtual void visit(const FormulaData &data) = 0;
};
/* namespace Statistics */ }
/* namespace Stats */ }
#endif // __BASE_STATS_VISIT_HH__