Last change
on this file since 37 was
5,
checked in by rosiere, 18 years ago
|
Ajout du composant Meta_Predictor
|
File size:
1.2 KB
|
Line | |
---|
1 | #ifdef STATISTICS |
---|
2 | /* |
---|
3 | * $Id$ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/include/Statistics.h" |
---|
10 | |
---|
11 | #include <sstream> |
---|
12 | using namespace std; |
---|
13 | |
---|
14 | namespace morpheo { |
---|
15 | namespace behavioural { |
---|
16 | namespace stage_1_ifetch { |
---|
17 | namespace predictor { |
---|
18 | namespace meta_predictor { |
---|
19 | |
---|
20 | |
---|
21 | string Statistics::print (uint32_t depth, |
---|
22 | string component_stat) |
---|
23 | { |
---|
24 | log_printf(FUNC,Meta_Predictor,"print","Begin"); |
---|
25 | |
---|
26 | string tab = string(depth,'\t'); |
---|
27 | ostringstream msg; |
---|
28 | |
---|
29 | msg << tab << "<meta_predictor name=\"" << _name << "\" >" << endl |
---|
30 | << print_body(depth+1) << endl |
---|
31 | << component_stat |
---|
32 | << tab << "</meta_predictor>" << endl; |
---|
33 | |
---|
34 | log_printf(FUNC,Meta_Predictor,"print","End"); |
---|
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 , |
---|
45 | morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::Statistics & x) |
---|
46 | { |
---|
47 | output_stream << x.print(0); |
---|
48 | |
---|
49 | return output_stream; |
---|
50 | }; |
---|
51 | |
---|
52 | }; // end namespace meta_predictor |
---|
53 | }; // end namespace predictor |
---|
54 | }; // end namespace stage_1_ifetch |
---|
55 | |
---|
56 | }; // end namespace behavioural |
---|
57 | }; // end namespace morpheo |
---|
58 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.