]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/sort/test/test_sample_sort.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / sort / test / test_sample_sort.cpp
index 2a11adb2cb98d407e7f4cfe69b28ed2b29434074..a83634f2433e42859abf4483fda122e64f416687 100644 (file)
@@ -96,6 +96,7 @@ void test2(void)
 };
 void test3(void)
 {
+    typedef std::less<uint64_t> compare;
     const uint32_t NElem = 2000000;
     std::vector<uint64_t> V1,V2,V3;
     std::mt19937_64 my_rand(0);
@@ -107,21 +108,21 @@ void test3(void)
     
     // --------------- unsorted elements 0 threads ----------------------------
     V3 = V1;
-    bss::sample_sort(V3.begin(), V3.end(), 0);
+    bss::sample_sort(V3.begin(), V3.end(), compare(), 0);
     for (unsigned i = 0; i < NElem; i++)
     {   BOOST_CHECK(V3[i] == V2[i]);
     };
     
     // --------------- unsorted elements -------------------------------------
     V3 = V1;
-    bss::sample_sort(V3.begin(), V3.end());
+    bss::sample_sort(V3.begin(), V3.end(), compare());
     for (unsigned i = 0; i < NElem; i++)
     {   BOOST_CHECK(V3[i] == V2[i]);
     };    
     
     // --------------- unsorted elements 100 threads ----------------------------
     V3 = V1;
-    bss::sample_sort(V3.begin(), V3.end(), 100);
+    bss::sample_sort(V3.begin(), V3.end(), compare(), 100);
     for (unsigned i = 0; i < NElem; i++)
     {   BOOST_CHECK(V3[i] == V2[i]);
     };