112 int mul=atoi(argv[2]); |
112 int mul=atoi(argv[2]); |
113 |
113 |
114 // cout << "Creating Hipercube ("<< (1<<dim) << " nodes, " |
114 // cout << "Creating Hipercube ("<< (1<<dim) << " nodes, " |
115 // << dim*(1<<dim) << " edges):"; |
115 // << dim*(1<<dim) << " edges):"; |
116 |
116 |
117 T.reset(); |
117 T.restart(); |
118 vector<Node> nodes; |
118 vector<Node> nodes; |
119 addBiDirHyperCube(G,dim,nodes); |
119 addBiDirHyperCube(G,dim,nodes); |
120 |
120 |
121 PrintTime("GENGRAPH",T); |
121 PrintTime("GENGRAPH",T); |
122 |
122 |
123 T.reset(); |
123 T.restart(); |
124 { |
124 { |
125 for(int i=0;i<mul;i++) |
125 for(int i=0;i<mul;i++) |
126 bfsStlQueue(G,nodes[0]); |
126 bfsStlQueue(G,nodes[0]); |
127 } |
127 } |
128 PrintTime("BFS-STL",T); |
128 PrintTime("BFS-STL",T); |
129 T.reset(); |
129 T.restart(); |
130 { |
130 { |
131 for(int i=0;i<mul;i++) |
131 for(int i=0;i<mul;i++) |
132 bfsOwnQueue(G,nodes[0]); |
132 bfsOwnQueue(G,nodes[0]); |
133 } |
133 } |
134 PrintTime("BFS-OWN",T); |
134 PrintTime("BFS-OWN",T); |
135 T.reset(); |
135 T.restart(); |
136 { |
136 { |
137 for(int i=0;i<mul;i++) |
137 for(int i=0;i<mul;i++) |
138 iteratorBench(G); |
138 iteratorBench(G); |
139 } |
139 } |
140 PrintTime("ITERATE",T); |
140 PrintTime("ITERATE",T); |