@@ -175,8 +175,8 @@ int main(int argc, char *argv[]) {
175175 evts.push_back (PERF_COUNT_HW_CPU_CYCLES );
176176 evts.push_back (PERF_COUNT_HW_INSTRUCTIONS );
177177 LinuxEvents<PERF_TYPE_HARDWARE > unified (evts);
178- unsigned long cy1 = 0 , cy2 = 0 , cy3 = 0 ;
179- unsigned long cl1 = 0 , cl2 = 0 , cl3 = 0 ;
178+ unsigned long cy1 = 0 , cy2 = 0 ;
179+ unsigned long cl1 = 0 , cl2 = 0 ;
180180 vector<unsigned long long > results;
181181 results.resize (evts.size ());
182182 for (uint32_t i = 0 ; i < iterations; i++) {
@@ -188,26 +188,17 @@ int main(int argc, char *argv[]) {
188188 cl1 += results[1 ];
189189
190190 unified.start ();
191- isok = isok && flatten_indexes ( p.size (), pj);
191+ isok = isok && unified_machine (p. data (), p.size (), pj);
192192 unified.end (results);
193193
194194 cy2 += results[0 ];
195195 cl2 += results[1 ];
196-
197- unified.start ();
198- isok = isok && unified_machine (p.data (), p.size (), pj);
199- unified.end (results);
200-
201- cy3 += results[0 ];
202- cl3 += results[1 ];
203-
204196 if (!isok) {
205197 std::cerr << " failure?" << std::endl;
206198 }
207199 }
208- printf (" %f %f %f %f %f %f" , cy1 * 1.0 / iterations, cl1 * 1.0 / iterations,
209- cy2 * 1.0 / iterations, cl2 * 1.0 / iterations, cy3 * 1.0 / iterations,
210- cl3 * 1.0 / iterations);
200+ printf (" %f %f %f %f " , cy1 * 1.0 / iterations, cl1 * 1.0 / iterations,
201+ cy2 * 1.0 / iterations, cl2 * 1.0 / iterations);
211202#endif // __linux__
212203 printf (" \n " );
213204 return EXIT_SUCCESS ;
0 commit comments