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

Function test_fill_matches_vector_api

tests/unittests/test_torch_random.cpp:103–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void test_fill_matches_vector_api() {
104 std::vector<float> filled(257, 0.0F);
105 engine::sampling::fill_torch_cuda_randn(
106 filled.data(),
107 filled.size(),
108 1,
109 engine::sampling::TorchRandnPrecision::Float32);
110 const auto generated = engine::sampling::generate_torch_cuda_randn(
111 filled.size(),
112 1,
113 engine::sampling::TorchRandnPrecision::Float32);
114 require_vector_close(filled, generated, 0.0F, "fill/vector torch_cuda_randn");
115}
116
117void test_start_index_matches_full_generation_slice() {
118 const auto full = engine::sampling::generate_torch_cuda_randn(

Callers 1

mainFunction · 0.85

Calls 5

fill_torch_cuda_randnFunction · 0.85
require_vector_closeFunction · 0.70
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected