18template <
typename T, u
int32_t seed_t, ck::enable_if_t<is_same<
float, T>{},
bool> = false>
24 drop_bits = ((drop_bits & 31) << 11) | (drop_bits >> 5);
25 drop_bits *= 0x7000149;
29 uint32_t rng = (drop_bits ^ 0x13371337 ^ (
id * 229791) ^ seed);
34template <
typename T, u
int32_t seed_t, ck::enable_if_t<is_same<_Float16, T>{},
bool> = false>
39 drop_bits = ((drop_bits & 31) << 11) | (drop_bits >> 5);
40 drop_bits *= 0x7000149;
44 uint32_t rng = (drop_bits ^ 0x13371337 ^ (
id * 229791) ^ seed);
int32_t index_t
Definition ck.hpp:299
constexpr detail::ignore_t ignore
Definition utility/ignore.hpp:20
__host__ __device__ uint32_t prand_generator(index_t id, T val, uint32_t seed=seed_t)
Definition random_gen.hpp:19
__host__ __device__ constexpr Y bit_cast(const X &x)
Definition type.hpp:306
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