@@ -213,9 +213,9 @@ static void verifyIndex2LevelDecoder(
213
213
// evaluate the error
214
214
double error = getError (n, d, outputFaiss, outputKernel1);
215
215
216
- std::cout << description << " \t " << n << " \t " << d << " \t "
217
- << " store_seq " << " \t " << nIterations << " \t " << timeFaiss
218
- << " \t " << timeKernel << " \t " << error << std::endl;
216
+ std::cout << description << " \t " << n << " \t " << d << " \t store_seq \ t"
217
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel
218
+ << " \t " << error << std::endl;
219
219
}
220
220
221
221
// ////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -261,10 +261,9 @@ static void verifyIndex2LevelDecoder(
261
261
262
262
// evaluate the error
263
263
const double error = getError (n, d, outputFaiss, outputKernel1);
264
-
265
- std::cout << description << " \t " << n << " \t " << d << " \t "
266
- << " store_rnd" << " \t " << nIterations << " \t " << timeFaiss
267
- << " \t " << timeKernel << " \t " << error << std::endl;
264
+ std::cout << description << " \t " << n << " \t " << d << " \t store_rnd\t "
265
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel
266
+ << " \t " << error << std::endl;
268
267
}
269
268
270
269
// ////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -324,9 +323,9 @@ static void verifyIndex2LevelDecoder(
324
323
// evaluate the error
325
324
const double error1 = getError (n, d, outputFaiss, outputKernel1);
326
325
327
- std::cout << description << " \t " << n << " \t " << d << " \t "
328
- << " accum_rnd " << " \t " << nIterations << " \t " << timeFaiss
329
- << " \t " << timeKernel1 << " \t " << error1 << std::endl;
326
+ std::cout << description << " \t " << n << " \t " << d << " \t accum_rnd \ t"
327
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel1
328
+ << " \t " << error1 << std::endl;
330
329
331
330
// kernels: accum 2 points, shared centroids
332
331
StopWatch swKernel2;
@@ -353,9 +352,9 @@ static void verifyIndex2LevelDecoder(
353
352
// evaluate the error
354
353
const double error2 = getError (n, d, outputFaiss, outputKernel2);
355
354
356
- std::cout << description << " \t " << n << " \t " << d << " \t "
357
- << " accum2_rnd " << " \t " << nIterations << " \t " << timeFaiss
358
- << " \t " << timeKernel2 << " \t " << error2 << std::endl;
355
+ std::cout << description << " \t " << n << " \t " << d << " \t accum2_rnd \ t"
356
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel2
357
+ << " \t " << error2 << std::endl;
359
358
360
359
// kernels: accum 2 points, unique centroids
361
360
StopWatch swKernel2u;
@@ -384,9 +383,9 @@ static void verifyIndex2LevelDecoder(
384
383
// evaluate the error
385
384
const double error2u = getError (n, d, outputFaiss, outputKernel2u);
386
385
387
- std::cout << description << " \t " << n << " \t " << d << " \t "
388
- << " accum2u_rnd " << " \t " << nIterations << " \t " << timeFaiss
389
- << " \t " << timeKernel2u << " \t " << error2u << std::endl;
386
+ std::cout << description << " \t " << n << " \t " << d << " \t accum2u_rnd \ t"
387
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel2u
388
+ << " \t " << error2u << std::endl;
390
389
391
390
// kernels: accum 3 points, shared centroids
392
391
StopWatch swKernel3;
@@ -418,9 +417,9 @@ static void verifyIndex2LevelDecoder(
418
417
// evaluate the error
419
418
const double error3 = getError (n, d, outputFaiss, outputKernel3);
420
419
421
- std::cout << description << " \t " << n << " \t " << d << " \t "
422
- << " accum3_rnd " << " \t " << nIterations << " \t " << timeFaiss
423
- << " \t " << timeKernel3 << " \t " << error3 << std::endl;
420
+ std::cout << description << " \t " << n << " \t " << d << " \t accum3_rnd \ t"
421
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel3
422
+ << " \t " << error3 << std::endl;
424
423
425
424
// kernels: accum 3 points, unique centroids
426
425
StopWatch swKernel3u;
@@ -456,9 +455,9 @@ static void verifyIndex2LevelDecoder(
456
455
// evaluate the error
457
456
const double error3u = getError (n, d, outputFaiss, outputKernel3u);
458
457
459
- std::cout << description << " \t " << n << " \t " << d << " \t "
460
- << " accum3u_rnd " << " \t " << nIterations << " \t " << timeFaiss
461
- << " \t " << timeKernel3u << " \t " << error3u << std::endl;
458
+ std::cout << description << " \t " << n << " \t " << d << " \t accum3u_rnd \ t"
459
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel3u
460
+ << " \t " << error3u << std::endl;
462
461
}
463
462
}
464
463
@@ -524,9 +523,9 @@ static void verifyMinMaxIndex2LevelDecoder(
524
523
// evaluate the error
525
524
double error = getError (n, d, outputFaiss, outputKernel1);
526
525
527
- std::cout << description << " \t " << n << " \t " << d << " \t "
528
- << " store_seq " << " \t " << nIterations << " \t " << timeFaiss
529
- << " \t " << timeKernel << " \t " << error << std::endl;
526
+ std::cout << description << " \t " << n << " \t " << d << " \t store_seq \ t"
527
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel
528
+ << " \t " << error << std::endl;
530
529
}
531
530
532
531
// ////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -573,9 +572,9 @@ static void verifyMinMaxIndex2LevelDecoder(
573
572
// evaluate the error
574
573
const double error = getError (n, d, outputFaiss, outputKernel1);
575
574
576
- std::cout << description << " \t " << n << " \t " << d << " \t "
577
- << " store_rnd " << " \t " << nIterations << " \t " << timeFaiss
578
- << " \t " << timeKernel << " \t " << error << std::endl;
575
+ std::cout << description << " \t " << n << " \t " << d << " \t store_rnd \ t"
576
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel
577
+ << " \t " << error << std::endl;
579
578
}
580
579
581
580
// ////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -641,9 +640,9 @@ static void verifyMinMaxIndex2LevelDecoder(
641
640
// evaluate the error
642
641
const double error1 = getError (n, d, outputFaiss, outputKernel1);
643
642
644
- std::cout << description << " \t " << n << " \t " << d << " \t "
645
- << " accum_rnd " << " \t " << nIterations << " \t " << timeFaiss
646
- << " \t " << timeKernel1 << " \t " << error1 << std::endl;
643
+ std::cout << description << " \t " << n << " \t " << d << " \t accum_rnd \ t"
644
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel1
645
+ << " \t " << error1 << std::endl;
647
646
648
647
// kernels: accum 2 points, shared centroids
649
648
StopWatch swKernel2;
@@ -675,9 +674,9 @@ static void verifyMinMaxIndex2LevelDecoder(
675
674
// evaluate the error
676
675
const double error2 = getError (n, d, outputFaiss, outputKernel2);
677
676
678
- std::cout << description << " \t " << n << " \t " << d << " \t "
679
- << " accum2_rnd " << " \t " << nIterations << " \t " << timeFaiss
680
- << " \t " << timeKernel2 << " \t " << error2 << std::endl;
677
+ std::cout << description << " \t " << n << " \t " << d << " \t accum2_rnd \ t"
678
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel2
679
+ << " \t " << error2 << std::endl;
681
680
682
681
// kernels: accum 2 points, unique centroids
683
682
StopWatch swKernel2u;
@@ -711,9 +710,9 @@ static void verifyMinMaxIndex2LevelDecoder(
711
710
// evaluate the error
712
711
const double error2u = getError (n, d, outputFaiss, outputKernel2u);
713
712
714
- std::cout << description << " \t " << n << " \t " << d << " \t "
715
- << " accum2u_rnd " << " \t " << nIterations << " \t " << timeFaiss
716
- << " \t " << timeKernel2u << " \t " << error2u << std::endl;
713
+ std::cout << description << " \t " << n << " \t " << d << " \t accum2u_rnd \ t"
714
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel2u
715
+ << " \t " << error2u << std::endl;
717
716
718
717
// kernels: accum 3 points, shared centroids
719
718
StopWatch swKernel3;
@@ -750,9 +749,9 @@ static void verifyMinMaxIndex2LevelDecoder(
750
749
// evaluate the error
751
750
const double error3 = getError (n, d, outputFaiss, outputKernel3);
752
751
753
- std::cout << description << " \t " << n << " \t " << d << " \t "
754
- << " accum3_rnd " << " \t " << nIterations << " \t " << timeFaiss
755
- << " \t " << timeKernel3 << " \t " << error3 << std::endl;
752
+ std::cout << description << " \t " << n << " \t " << d << " \t accum3_rnd \ t"
753
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel3
754
+ << " \t " << error3 << std::endl;
756
755
757
756
// kernels: accum 3 points, unique centroids
758
757
StopWatch swKernel3u;
@@ -793,9 +792,9 @@ static void verifyMinMaxIndex2LevelDecoder(
793
792
// evaluate the error
794
793
const double error3u = getError (n, d, outputFaiss, outputKernel3u);
795
794
796
- std::cout << description << " \t " << n << " \t " << d << " \t "
797
- << " accum3u_rnd " << " \t " << nIterations << " \t " << timeFaiss
798
- << " \t " << timeKernel3u << " \t " << error3u << std::endl;
795
+ std::cout << description << " \t " << n << " \t " << d << " \t accum3u_rnd \ t"
796
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel3u
797
+ << " \t " << error3u << std::endl;
799
798
}
800
799
}
801
800
@@ -851,9 +850,9 @@ static void verifyIndexPQDecoder(
851
850
// evaluate the error
852
851
double error = getError (n, d, outputFaiss, outputKernel1);
853
852
854
- std::cout << description << " \t " << n << " \t " << d << " \t "
855
- << " store_seq " << " \t " << nIterations << " \t " << timeFaiss
856
- << " \t " << timeKernel << " \t " << error << std::endl;
853
+ std::cout << description << " \t " << n << " \t " << d << " \t store_seq \ t"
854
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel
855
+ << " \t " << error << std::endl;
857
856
}
858
857
859
858
// ////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -899,9 +898,9 @@ static void verifyIndexPQDecoder(
899
898
// evaluate the error
900
899
const double error = getError (n, d, outputFaiss, outputKernel1);
901
900
902
- std::cout << description << " \t " << n << " \t " << d << " \t "
903
- << " store_rnd " << " \t " << nIterations << " \t " << timeFaiss
904
- << " \t " << timeKernel << " \t " << error << std::endl;
901
+ std::cout << description << " \t " << n << " \t " << d << " \t store_rnd \ t"
902
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel
903
+ << " \t " << error << std::endl;
905
904
}
906
905
907
906
// ////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -961,9 +960,9 @@ static void verifyIndexPQDecoder(
961
960
// evaluate the error
962
961
const double error1 = getError (n, d, outputFaiss, outputKernel1);
963
962
964
- std::cout << description << " \t " << n << " \t " << d << " \t "
965
- << " accum_rnd " << " \t " << nIterations << " \t " << timeFaiss
966
- << " \t " << timeKernel1 << " \t " << error1 << std::endl;
963
+ std::cout << description << " \t " << n << " \t " << d << " \t accum_rnd \ t"
964
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel1
965
+ << " \t " << error1 << std::endl;
967
966
968
967
// kernels: accum 2 points, shared centroids
969
968
StopWatch swKernel2;
@@ -989,9 +988,9 @@ static void verifyIndexPQDecoder(
989
988
// evaluate the error
990
989
const double error2 = getError (n, d, outputFaiss, outputKernel2);
991
990
992
- std::cout << description << " \t " << n << " \t " << d << " \t "
993
- << " accum2_rnd " << " \t " << nIterations << " \t " << timeFaiss
994
- << " \t " << timeKernel2 << " \t " << error2 << std::endl;
991
+ std::cout << description << " \t " << n << " \t " << d << " \t accum2_rnd \ t"
992
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel2
993
+ << " \t " << error2 << std::endl;
995
994
996
995
// kernels: accum 2 points, unique centroids
997
996
StopWatch swKernel2u;
@@ -1018,9 +1017,9 @@ static void verifyIndexPQDecoder(
1018
1017
// evaluate the error
1019
1018
const double error2u = getError (n, d, outputFaiss, outputKernel2u);
1020
1019
1021
- std::cout << description << " \t " << n << " \t " << d << " \t "
1022
- << " accum2u_rnd " << " \t " << nIterations << " \t " << timeFaiss
1023
- << " \t " << timeKernel2u << " \t " << error2u << std::endl;
1020
+ std::cout << description << " \t " << n << " \t " << d << " \t accum2u_rnd \ t"
1021
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel2u
1022
+ << " \t " << error2u << std::endl;
1024
1023
1025
1024
// kernels: accum 3 points, shared centroids
1026
1025
StopWatch swKernel3;
@@ -1051,9 +1050,9 @@ static void verifyIndexPQDecoder(
1051
1050
// evaluate the error
1052
1051
const double error3 = getError (n, d, outputFaiss, outputKernel3);
1053
1052
1054
- std::cout << description << " \t " << n << " \t " << d << " \t "
1055
- << " accum3_rnd " << " \t " << nIterations << " \t " << timeFaiss
1056
- << " \t " << timeKernel3 << " \t " << error3 << std::endl;
1053
+ std::cout << description << " \t " << n << " \t " << d << " \t accum3_rnd \ t"
1054
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel3
1055
+ << " \t " << error3 << std::endl;
1057
1056
1058
1057
// kernels: accum 3 points, unique centroids
1059
1058
StopWatch swKernel3u;
@@ -1086,9 +1085,9 @@ static void verifyIndexPQDecoder(
1086
1085
// evaluate the error
1087
1086
const double error3u = getError (n, d, outputFaiss, outputKernel3u);
1088
1087
1089
- std::cout << description << " \t " << n << " \t " << d << " \t "
1090
- << " accum3u_rnd " << " \t " << nIterations << " \t " << timeFaiss
1091
- << " \t " << timeKernel3u << " \t " << error3u << std::endl;
1088
+ std::cout << description << " \t " << n << " \t " << d << " \t accum3u_rnd \ t"
1089
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel3u
1090
+ << " \t " << error3u << std::endl;
1092
1091
}
1093
1092
}
1094
1093
@@ -1149,9 +1148,9 @@ static void verifyMinMaxIndexPQDecoder(
1149
1148
// evaluate the error
1150
1149
double error = getError (n, d, outputFaiss, outputKernel1);
1151
1150
1152
- std::cout << description << " \t " << n << " \t " << d << " \t "
1153
- << " store_seq " << " \t " << nIterations << " \t " << timeFaiss
1154
- << " \t " << timeKernel << " \t " << error << std::endl;
1151
+ std::cout << description << " \t " << n << " \t " << d << " \t store_seq \ t"
1152
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel
1153
+ << " \t " << error << std::endl;
1155
1154
}
1156
1155
1157
1156
// ////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1197,9 +1196,9 @@ static void verifyMinMaxIndexPQDecoder(
1197
1196
// evaluate the error
1198
1197
const double error = getError (n, d, outputFaiss, outputKernel1);
1199
1198
1200
- std::cout << description << " \t " << n << " \t " << d << " \t "
1201
- << " store_rnd " << " \t " << nIterations << " \t " << timeFaiss
1202
- << " \t " << timeKernel << " \t " << error << std::endl;
1199
+ std::cout << description << " \t " << n << " \t " << d << " \t store_rnd \ t"
1200
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel
1201
+ << " \t " << error << std::endl;
1203
1202
}
1204
1203
1205
1204
// ////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1264,9 +1263,9 @@ static void verifyMinMaxIndexPQDecoder(
1264
1263
// evaluate the error
1265
1264
const double error1 = getError (n, d, outputFaiss, outputKernel1);
1266
1265
1267
- std::cout << description << " \t " << n << " \t " << d << " \t "
1268
- << " accum_rnd " << " \t " << nIterations << " \t " << timeFaiss
1269
- << " \t " << timeKernel1 << " \t " << error1 << std::endl;
1266
+ std::cout << description << " \t " << n << " \t " << d << " \t accum_rnd \ t"
1267
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel1
1268
+ << " \t " << error1 << std::endl;
1270
1269
1271
1270
// kernels: accum 2 points, shared centroids
1272
1271
StopWatch swKernel2;
@@ -1297,9 +1296,9 @@ static void verifyMinMaxIndexPQDecoder(
1297
1296
// evaluate the error
1298
1297
const double error2 = getError (n, d, outputFaiss, outputKernel2);
1299
1298
1300
- std::cout << description << " \t " << n << " \t " << d << " \t "
1301
- << " accum2_rnd " << " \t " << nIterations << " \t " << timeFaiss
1302
- << " \t " << timeKernel2 << " \t " << error2 << std::endl;
1299
+ std::cout << description << " \t " << n << " \t " << d << " \t accum2_rnd \ t"
1300
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel2
1301
+ << " \t " << error2 << std::endl;
1303
1302
1304
1303
// kernels: accum 2 points, unique centroids
1305
1304
StopWatch swKernel2u;
@@ -1331,9 +1330,9 @@ static void verifyMinMaxIndexPQDecoder(
1331
1330
// evaluate the error
1332
1331
const double error2u = getError (n, d, outputFaiss, outputKernel2u);
1333
1332
1334
- std::cout << description << " \t " << n << " \t " << d << " \t "
1335
- << " accum2u_rnd " << " \t " << nIterations << " \t " << timeFaiss
1336
- << " \t " << timeKernel2u << " \t " << error2u << std::endl;
1333
+ std::cout << description << " \t " << n << " \t " << d << " \t accum2u_rnd \ t"
1334
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel2u
1335
+ << " \t " << error2u << std::endl;
1337
1336
1338
1337
// kernels: accum 3 points, shared centroids
1339
1338
StopWatch swKernel3;
@@ -1369,9 +1368,9 @@ static void verifyMinMaxIndexPQDecoder(
1369
1368
// evaluate the error
1370
1369
const double error3 = getError (n, d, outputFaiss, outputKernel3);
1371
1370
1372
- std::cout << description << " \t " << n << " \t " << d << " \t "
1373
- << " accum3_rnd " << " \t " << nIterations << " \t " << timeFaiss
1374
- << " \t " << timeKernel3 << " \t " << error3 << std::endl;
1371
+ std::cout << description << " \t " << n << " \t " << d << " \t accum3_rnd \ t"
1372
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel3
1373
+ << " \t " << error3 << std::endl;
1375
1374
1376
1375
// kernels: accum 3 points, unique centroids
1377
1376
StopWatch swKernel3u;
@@ -1409,9 +1408,9 @@ static void verifyMinMaxIndexPQDecoder(
1409
1408
// evaluate the error
1410
1409
const double error3u = getError (n, d, outputFaiss, outputKernel3u);
1411
1410
1412
- std::cout << description << " \t " << n << " \t " << d << " \t "
1413
- << " accum3u_rnd " << " \t " << nIterations << " \t " << timeFaiss
1414
- << " \t " << timeKernel3u << " \t " << error3u << std::endl;
1411
+ std::cout << description << " \t " << n << " \t " << d << " \t accum3u_rnd \ t"
1412
+ << nIterations << " \t " << timeFaiss << " \t " << timeKernel3u
1413
+ << " \t " << error3u << std::endl;
1415
1414
}
1416
1415
}
1417
1416
@@ -1484,8 +1483,10 @@ int main(int argc, char** argv) {
1484
1483
(N_ITERATIONS % 6 ) == 0 , " Number of iterations should be 6*x" );
1485
1484
1486
1485
// print the header
1487
- std::cout << " Codec\t " << " n\t " << " d\t " << " Experiment\t " << " Iterations\t "
1488
- << " Faiss time\t " << " SADecodeKernel time\t " << " Error"
1486
+ auto delim = " \t " ;
1487
+ std::cout << " Codec" << delim << " n" << delim << " d" << delim
1488
+ << " Experiment" << delim << " Iterations" << delim << " Faiss time"
1489
+ << delim << " SADecodeKernel time" << delim << " Error"
1489
1490
<< std::endl;
1490
1491
1491
1492
// The following experiment types are available:
0 commit comments