You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vpr/src/pack/pack_types.h
+4-7Lines changed: 4 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
* Defines core data structures used in packing
8
8
*/
9
9
#include<map>
10
+
#include<unordered_set>
10
11
#include<vector>
11
12
12
13
#include"arch_types.h"
@@ -64,13 +65,9 @@ struct t_pb_stats {
64
65
* currently open pb? */
65
66
std::map<AtomNetId, int> num_pins_of_net_in_pb;
66
67
67
-
/* Record of pins of class used
68
-
* TODO: Jason Luu: Should really be using hash table for this for speed,
69
-
* too lazy to write one now, performance isn't too bad since I'm at
70
-
* most iterating over the number of pins of a pb which is effectively
71
-
* a constant for reasonable architectures */
72
-
std::vector<std::vector<AtomNetId>> input_pins_used; /* [0..pb_graph_node->num_pin_classes-1][0..pin_class_size] number of input pins of this class that are used */
73
-
std::vector<std::vector<AtomNetId>> output_pins_used; /* [0..pb_graph_node->num_pin_classes-1][0..pin_class_size] number of output pins of this class that are used */
68
+
/* Record of pins of class used */
69
+
std::vector<std::unordered_set<AtomNetId>> input_pins_used; /* [0..pb_graph_node->num_pin_classes-1] nets using this input pin class */
70
+
std::vector<std::unordered_set<AtomNetId>> output_pins_used; /* [0..pb_graph_node->num_pin_classes-1] nets using this output pin class */
74
71
75
72
/* Use vector because array size is expected to be small so runtime should be faster using vector than map despite the O(N) vs O(log(n)) behaviour.*/
76
73
std::vector<std::vector<AtomNetId>> lookahead_input_pins_used; /* [0..pb_graph_node->num_pin_classes-1] vector of input pins of this class that are speculatively used */
0 commit comments