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

Function fill_torch_cuda_uniform

src/framework/sampling/torch_random.cpp:277–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277void fill_torch_cuda_uniform(float * output, size_t count, uint64_t seed, uint64_t start_index) {
278 if (output == nullptr && count != 0) {
279 throw std::invalid_argument("torch CUDA uniform output pointer is null");
280 }
281 for (size_t index = 0; index < count; ++index) {
282 output[index] = torch_cuda_uniform_element(seed, start_index + static_cast<uint64_t>(index));
283 }
284}
285
286std::vector<float> generate_torch_cuda_uniform(size_t count, uint64_t seed, uint64_t start_index) {
287 std::vector<float> output(count);

Callers 2

Calls 1

Tested by 1