Преглед изворни кода

Fix mismatch between size_t and uint64_t in std::set benchmark.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345523 91177308-0d34-0410-b5e6-96231b3b80d8
Samuel Benzaquen пре 6 година
родитељ
комит
081dda5c16
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      benchmarks/ordered_set.bench.cpp

+ 3 - 3
benchmarks/ordered_set.bench.cpp

@@ -83,12 +83,12 @@ struct Create : Base {
   using Base::Base;
   using Base::Base;
 
 
   void run(benchmark::State& State) const {
   void run(benchmark::State& State) const {
-    std::vector<size_t> Keys(TableSize);
-    std::iota(Keys.begin(), Keys.end(), size_t{0});
+    std::vector<uint64_t> Keys(TableSize);
+    std::iota(Keys.begin(), Keys.end(), uint64_t{0});
     sortKeysBy(Keys, Access());
     sortKeysBy(Keys, Access());
 
 
     while (State.KeepRunningBatch(TableSize * NumTables)) {
     while (State.KeepRunningBatch(TableSize * NumTables)) {
-      std::vector<std::set<size_t>> Sets(NumTables);
+      std::vector<std::set<uint64_t>> Sets(NumTables);
       for (auto K : Keys) {
       for (auto K : Keys) {
         for (auto& Set : Sets) {
         for (auto& Set : Sets) {
           benchmark::DoNotOptimize(Set.insert(K));
           benchmark::DoNotOptimize(Set.insert(K));