MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / torch_cuda_uniform_element

Function torch_cuda_uniform_element

src/framework/sampling/torch_random.cpp:88–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88float torch_cuda_uniform_element(uint64_t seed, uint64_t index) {
89 const Philox4 counter{
90 0U,
91 0U,
92 static_cast<uint32_t>(index),
93 static_cast<uint32_t>(index >> 32U),
94 };
95 const Philox4 random = philox_4x32_10(counter, seed);
96 return static_cast<float>(random.x) * kInvTwoPow32 + (kInvTwoPow32 * 0.5F);
97}
98
99float torch_cuda_uniform_tensor_iterator_element(
100 uint64_t seed,

Callers 1

fill_torch_cuda_uniformFunction · 0.85

Calls 1

philox_4x32_10Function · 0.85

Tested by

no test coverage detected