UnorderedMapTest( uint32_t arg_capacity, uint32_t arg_inserts, uint32_t arg_collisions)
    : capacity(arg_capacity)
    , inserts(arg_inserts)
    , collisions(arg_collisions)
    , seconds(0)
    , map(capacity)
    , histogram(map.get_histogram())
  {
    Kokkos::Timer wall_clock ;
    wall_clock.reset();

    value_type v = {};
    int loop_count = 0;
    do {
      ++loop_count;

      v = value_type();
      Kokkos::parallel_reduce(inserts, *this, v);

      if (v.failed_count > 0u) {
        const uint32_t new_capacity = map.capacity() + ((map.capacity()*3ull)/20u) + v.failed_count/collisions ;
        map.rehash( new_capacity );
      }
    } while (v.failed_count > 0u);

    seconds = wall_clock.seconds();

    switch (loop_count)
    {
    case 1u: std::cout << " \033[0;32m" << loop_count << "\033[0m "; break;
    case 2u: std::cout << " \033[1;31m" << loop_count << "\033[0m "; break;
    default: std::cout << " \033[0;31m" << loop_count << "\033[0m "; break;
    }
    std::cout << std::setprecision(2) << std::fixed << std::setw(5) << (1e9*(seconds/(inserts))) << "; " << std::flush;

    histogram.calculate();
    Device::fence();
  }