17 template <
typename T, u
int32_t seed_t, ck::enable_if_t<std::is_same<
float, T>{},
bool> = false>
23 drop_bits = ((drop_bits & 31) << 11) | (drop_bits >> 5);
24 drop_bits *= 0x7000149;
28 uint32_t rng = (drop_bits ^ 0x13371337 ^ (
id * 229791) ^ seed);
33 template <
typename T, u
int32_t seed_t, ck::enable_if_t<std::is_same<_Float16, T>{},
bool> = false>
38 drop_bits = ((drop_bits & 31) << 11) | (drop_bits >> 5);
39 drop_bits *= 0x7000149;
43 uint32_t rng = (drop_bits ^ 0x13371337 ^ (
id * 229791) ^ seed);
50 ck::enable_if_t<!(std::is_same<float, T>{} || std::is_same<_Float16, T>{}),
bool> =
false>
constexpr detail::ignore_t ignore
Definition: ignore.hpp:20
__host__ __device__ uint32_t prand_generator(index_t id, T val, uint32_t seed=seed_t)
Definition: random_gen.hpp:18
int32_t index_t
Definition: ck.hpp:298
typename std::enable_if< B, T >::type enable_if_t
Definition: enable_if.hpp:27
unsigned short uint16_t
Definition: stdint.h:125
unsigned int uint32_t
Definition: stdint.h:126
unsigned char uint8_t
Definition: stdint.h:124