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

Method estimate_flow

src/models/heartmula/codec.cpp:1370–1385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1368}
1369
1370HeartCodecConditioning HeartCodecWeightsRuntime::build_conditioning(
1371 const std::vector<int32_t> & codes,
1372 int64_t batch_size,
1373 int64_t code_frames) const {
1374 if (batch_size <= 0 || code_frames <= 0) {
1375 throw std::runtime_error("HeartCodec conditioning request shape is invalid");
1376 }
1377 if (scalar_decoder_graph_ != nullptr) {
1378 scalar_decoder_graph_->release_workspace();
1379 }
1380 if (conditioning_graph_ == nullptr || !conditioning_graph_->matches(*this, batch_size, code_frames)) {
1381 conditioning_graph_ = std::make_unique<HeartCodecConditioningGraph>(*this, batch_size, code_frames);
1382 }
1383 return conditioning_graph_->run(codes);
1384}
1385
1386void HeartCodecWeightsRuntime::clear_graph_cache() const {
1387 flow_estimator_graph_.reset();
1388 conditioning_graph_.reset();

Callers 1

solve_eulerFunction · 0.80

Calls 3

release_workspaceMethod · 0.45
matchesMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected