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