MCPcopy Create free account
hub / github.com/cactus-compute/cactus / fill_random_float

Function fill_random_float

tests/test_utils.cpp:84–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void fill_random_float(std::vector<float>& data) {
85 std::uniform_real_distribution<float> dist(-2.0f, 2.0f);
86 for (auto& val : data) val = dist(gen);
87}
88
89void fill_random_fp16(std::vector<__fp16>& data) {
90 std::uniform_real_distribution<float> dist(-2.0f, 2.0f);

Callers 1

setup_random_dataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected