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

Function product

src/models/miocodec/weights.cpp:110–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110int64_t product(const std::vector<int> & values) {
111 if (values.empty()) {
112 throw std::runtime_error("MioCodec quantizer levels must not be empty");
113 }
114 int64_t out = 1;
115 for (const int value : values) {
116 if (value <= 0) {
117 throw std::runtime_error("MioCodec quantizer levels must be positive");
118 }
119 out *= value;
120 }
121 return out;
122}
123
124std::vector<int64_t> quantizer_basis(const std::vector<int> & levels) {
125 std::vector<int64_t> basis(levels.size(), 1);

Callers 1

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected