diff options
Diffstat (limited to 'src/gpgpu-sim/histogram.h')
| -rw-r--r-- | src/gpgpu-sim/histogram.h | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/src/gpgpu-sim/histogram.h b/src/gpgpu-sim/histogram.h index 5470050..e3d8f57 100644 --- a/src/gpgpu-sim/histogram.h +++ b/src/gpgpu-sim/histogram.h @@ -71,57 +71,44 @@ #include <string> class binned_histogram { -protected: - - std::string m_name; - int m_nbins; - int *m_bins; // bin boundaries - int *m_bin_cnts; // counters - int m_maximum; // the maximum sample - signed long long int m_sum; // for calculating the average - public: - + // creators binned_histogram (std::string name = "", int nbins = 32, int* bins = NULL); - binned_histogram (const binned_histogram& other); + virtual ~binned_histogram (); + // modifiers: void reset_bins (); - void add2bin (int sample); - void fprint (FILE *fout); - - virtual ~binned_histogram (); + // accessors: + void fprint (FILE *fout) const; +protected: + std::string m_name; + int m_nbins; + int *m_bins; // bin boundaries + int *m_bin_cnts; // counters + int m_maximum; // the maximum sample + signed long long int m_sum; // for calculating the average }; class pow2_histogram : public binned_histogram { - public: - pow2_histogram ( std::string name = "", int nbins = 32, int* bins = NULL); - ~pow2_histogram() {} void add2bin (int sample); - }; class linear_histogram : public binned_histogram { - -private: - - int m_stride; - public: - linear_histogram (int stride = 1, const char *name = NULL, int nbins = 32, int* bins = NULL); - ~linear_histogram() {} void add2bin (int sample); - +private: + int m_stride; }; #endif |
