hash_functions.cpp 334 Bytes
Newer Older
traveller59's avatar
bug fix  
traveller59 committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// nvcc (cuda) 9.0 with gcc 5.5 don't support random, so compile it in host

#include <random>

namespace cuhash {
  
std::random_device random_dev;

std::mt19937 random_engine(random_dev());
std::uniform_int_distribution<unsigned> uint_distribution;

unsigned generate_random_uint32(){
  return uint_distribution(random_engine);
}

}