hash_functions.cpp 351 Bytes
Newer Older
traveller59's avatar
bug fix  
traveller59 committed
1
2
3
4
5
// nvcc (cuda) 9.0 with gcc 5.5 don't support random, so compile it in host

#include <random>

namespace cuhash {
6

traveller59's avatar
bug fix  
traveller59 committed
7
8
9
10
11
std::random_device random_dev;

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

12
unsigned generate_random_uint32() { return uint_distribution(random_engine); }
traveller59's avatar
bug fix  
traveller59 committed
13

14
} // namespace cuhash