- Timestamp:
- Jul 30, 2010, 4:47:27 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat.cpp
r138 r139 5 5 namespace behavioural { 6 6 7 Stat::Stat (std::string name_instance,8 std::string name_component,7 Stat::Stat (std::string name_instance, 8 std::string name_component, 9 9 Parameters_Statistics * param): 10 10 _name_instance (name_instance), … … 16 16 _generate_file = true; 17 17 18 _list_operand = new std::map<std::string, var_t>; 19 _list_expr = new std::list<expr_t>; 20 _list_stat = new std::list<Stat *>; 21 _list_counters = new std::list<counters_t *>; 18 _list_operand = new std::map<std::string, var_t>; 19 _list_expr_per_cycle = new std::list<expr_t>; 20 _list_expr_per_period = new std::list<expr_t>; 21 _list_stat = new std::list<Stat *>; 22 _list_counters = new std::list<counters_t *>; 22 23 23 _cycle = create_variable("cycle");24 // _cycle = create_counter("cycle","","");25 *_cycle = 0; // for the first period24 _cycle = create_variable("cycle"); 25 // _cycle = create_counter("cycle","",""); 26 *_cycle = 0; // for the first period 26 27 } 27 28 28 29 Stat::Stat (std::string name_instance, 29 30 std::string name_component, 30 cycle_t nb_cycle_before_begin,31 cycle_t period):31 cycle_t nb_cycle_before_begin, 32 cycle_t period): 32 33 _name_instance (name_instance), 33 34 _name_component (name_component), … … 38 39 _generate_file = true; 39 40 40 _list_operand = new std::map<std::string, var_t>; 41 _list_expr = new std::list<expr_t>; 42 _list_stat = new std::list<Stat *>; 43 _list_counters = new std::list<counters_t *>; 41 _list_operand = new std::map<std::string, var_t>; 42 _list_expr_per_cycle = new std::list<expr_t>; 43 _list_expr_per_period = new std::list<expr_t>; 44 _list_stat = new std::list<Stat *>; 45 _list_counters = new std::list<counters_t *>; 44 46 45 _cycle = create_variable("cycle");46 // _cycle = create_counter("cycle","","");47 *_cycle = 0; // for the first period47 _cycle = create_variable("cycle"); 48 // _cycle = create_counter("cycle","",""); 49 *_cycle = 0; // for the first period 48 50 } 49 51 … … 63 65 64 66 // parcourir la liste et desallouer les arbres 65 for (std::list<expr_t>::iterator i=_list_expr ->begin();66 i!= _list_expr ->end();67 for (std::list<expr_t>::iterator i=_list_expr_per_cycle->begin(); 68 i!= _list_expr_per_cycle->end(); 67 69 ++i) 68 70 { 69 71 delete i->expression; 70 72 } 71 delete _list_expr; 73 delete _list_expr_per_cycle; 74 75 for (std::list<expr_t>::iterator i=_list_expr_per_period->begin(); 76 i!= _list_expr_per_period->end(); 77 ++i) 78 { 79 delete i->expression; 80 } 81 delete _list_expr_per_period; 72 82 73 83 // parcourir la liste et desallouer les arbres
Note: See TracChangeset
for help on using the changeset viewer.