00001 #ifndef COMBINED_DATA_CONFLICT_TABLE_H_INCLUDED_ 00002 #define COMBINED_DATA_CONFLICT_TABLE_H_INCLUDED_ 00003 00004 #include<string> 00005 #include<utility> 00006 #include<vector> 00007 00008 #include "data_conflict_table.h" 00009 00010 #include "segment_graph.h" // needed for VertexDescriptor 00011 #include "mapped_variable.h" // needed for MappedVariable 00012 00020 namespace risc { 00021 00022 namespace sg { 00023 00024 class CombinedDataConflictTable { 00025 00026 public: 00027 00033 CombinedDataConflictTable( 00034 risc::sg::DataConflictTable &dct, 00035 PathInstanceMapper *path_instance_mapper); 00036 00037 ~CombinedDataConflictTable(); 00038 00043 int get_max_instances(int segment_id); 00044 00051 std::pair<int, int> index_to_segment_and_instance_id(int index); 00052 00058 int segment_and_instance_id_to_index(int segment_id, int instance_id); 00059 00064 void print_conflict_table(); 00065 00070 void print_conflict_table(bool *table); 00071 00077 void print_conflict_table(std::string filename); 00078 00084 void print_lookup_table(); 00085 00091 void print_lookup_table(std::string filename); 00092 00097 int max_prediction_steps(); 00098 00099 PathInstanceMapper *path_instance_mapper_; 00100 00106 VertexDescriptor *vertex_lookup_; 00107 00113 int max_instances_; 00114 00120 int number_of_segments_; 00121 00126 int size_of_conflict_table_; 00127 00132 int **instance_id_to_index_lookup_; 00133 00137 int *combined_table_; 00138 00142 int prediction_steps_; 00143 00144 private: 00145 00151 void compute_combined_table(); 00152 00153 risc::sg::DataConflictTable &dct_; 00154 }; 00155 00156 } // end of namespace sg 00157 00158 } // end of namespace risc 00159 00160 #endif /* COMBINED_DATA_CONFLICT_TABLE_H_INCLUDED_ */ 00161 00162 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */