[2] | 1 | #ifdef STATISTICS |
---|
| 2 | /* |
---|
| 3 | * $Id: Statistics_print.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
[48] | 9 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h" |
---|
[2] | 10 | #include <sstream> |
---|
| 11 | using namespace std; |
---|
| 12 | |
---|
| 13 | namespace morpheo { |
---|
| 14 | namespace behavioural { |
---|
[48] | 15 | namespace core { |
---|
| 16 | namespace multi_front_end { |
---|
| 17 | namespace front_end { |
---|
| 18 | namespace prediction_unit { |
---|
| 19 | namespace direction { |
---|
| 20 | |
---|
[2] | 21 | namespace meta_predictor { |
---|
| 22 | namespace two_level_branch_predictor { |
---|
| 23 | namespace branch_history_table { |
---|
| 24 | |
---|
| 25 | string Statistics::print (uint32_t depth , |
---|
| 26 | string component_statistics ) |
---|
| 27 | { |
---|
| 28 | string tab = string(depth,'\t'); |
---|
| 29 | ostringstream msg; |
---|
| 30 | |
---|
| 31 | msg << tab << "<branch_history_table name=\"" << _name << "\" >" << endl |
---|
| 32 | << print_body(depth+1) |
---|
| 33 | << component_statistics |
---|
| 34 | << tab << "</branch_history_table>" << endl; |
---|
| 35 | |
---|
| 36 | return msg.str(); |
---|
| 37 | }; |
---|
| 38 | |
---|
| 39 | string Statistics::print (uint32_t depth) |
---|
| 40 | { |
---|
| 41 | return print(depth,""); |
---|
| 42 | }; |
---|
| 43 | |
---|
| 44 | ostream& operator<< (ostream& output_stream , |
---|
[48] | 45 | morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table::Statistics & x) |
---|
[2] | 46 | { |
---|
| 47 | output_stream << x.print(0); |
---|
| 48 | |
---|
| 49 | return output_stream; |
---|
| 50 | }; |
---|
| 51 | |
---|
| 52 | }; // end namespace branch_history_table |
---|
| 53 | }; // end namespace two_level_branch_predictor |
---|
| 54 | }; // end namespace meta_predictor |
---|
[48] | 55 | |
---|
| 56 | }; // end namespace core |
---|
| 57 | }; // end namespace multi_front_end |
---|
| 58 | }; // end namespace front_end |
---|
| 59 | }; // end namespace prediction_unit |
---|
| 60 | }; // end namespace direction |
---|
| 61 | |
---|
[2] | 62 | }; // end namespace behavioural |
---|
| 63 | }; // end namespace morpheo |
---|
| 64 | #endif |
---|