 /**
  * Test key sampling distributions
  */
-template <typename KeyT>
+template <typename KeyT, bool WITH_PRE_SORTED>
 void TestGen(
     std::size_t     max_items,
     int             max_segments)


#elif TEST_KEY_BYTES == 4

    TestGen<float>                (num_items, num_segments);

#ifdef TEST_EXTENDED_KEY_TYPES
    TestGen<int>                  (num_items, num_segments);
    TestGen<unsigned int>         (num_items, num_segments);
#endif // TEST_EXTENDED_KEY_TYPES

#elif TEST_KEY_BYTES == 8

    TestGen<double>               (num_items, num_segments);

#ifdef TEST_EXTENDED_KEY_TYPES
    TestGen<long long>            (num_items, num_segments);
    TestGen<unsigned long long>   (num_items, num_segments);
#endif // TEST_EXTENDED_KEY_TYPES

#endif // TEST_KEY_BYTES switch

    // Compile/run thorough tests
#if TEST_KEY_BYTES == 1

    TestGen<char, true>               (num_items, num_segments);

#ifdef TEST_EXTENDED_KEY_TYPES
    TestGen<bool, false>              (num_items, num_segments);
    TestGen<signed char, false>       (num_items, num_segments);
    TestGen<unsigned char, false>     (num_items, num_segments);
#endif // TEST_EXTENDED_KEY_TYPES

#elif TEST_KEY_BYTES == 2
    TestGen<unsigned short, true>     (num_items, num_segments);

#ifdef TEST_EXTENDED_KEY_TYPES
    TestGen<short, false>             (num_items, num_segments);

#if (__CUDACC_VER_MAJOR__ >= 9 || CUDA_VERSION >= 9000) && !_NVHPC_CUDA
    TestGen<half_t, false>            (num_items, num_segments);
#endif // CTK >= 9

#if (__CUDACC_VER_MAJOR__ >= 11 || CUDA_VERSION >= 11000) && !_NVHPC_CUDA
#if !defined(__ICC)
    // Fails with `-0 != 0` with ICC for unknown reasons. See #333.
    TestGen<bfloat16_t, false>        (num_items, num_segments);
#endif // !ICC
#endif // CTK >= 11

