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

Function validate_rank_between

src/framework/core/module.cpp:238–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238void validate_rank_between(const TensorValue & value, size_t min_rank, size_t max_rank, const char * name) {
239 if (!value.valid()) {
240 throw std::runtime_error(name_or_default(name) + " is invalid");
241 }
242 if (value.shape.rank < min_rank || value.shape.rank > max_rank) {
243 throw std::runtime_error(name_or_default(name) + " rank mismatch: expected between " +
244 std::to_string(min_rank) + " and " + std::to_string(max_rank) +
245 ", got " + std::to_string(value.shape.rank));
246 }
247}
248
249} // namespace engine::core

Callers 15

buildMethod · 0.85
build_time_mask_4dFunction · 0.85
apply_channel_affine_btcFunction · 0.85
buildMethod · 0.85
buildMethod · 0.85
buildMethod · 0.85
buildMethod · 0.85
build_normFunction · 0.85
buildMethod · 0.85
buildMethod · 0.85
build_unaryFunction · 0.85
buildMethod · 0.85

Calls 3

name_or_defaultFunction · 0.85
validMethod · 0.80
to_stringFunction · 0.50

Tested by

no test coverage detected