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

Method add

app/workflow/pipeline.cpp:8–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6namespace minitts::app {
7
8void AppPipelineRegistry::add(std::unique_ptr<IAppPipeline> pipeline) {
9 if (pipeline == nullptr) {
10 throw std::runtime_error("cannot register a null app pipeline");
11 }
12 const std::string id = pipeline->id();
13 if (id.empty()) {
14 throw std::runtime_error("app pipeline id must not be empty");
15 }
16 const auto [_, inserted] = pipelines_.emplace(id, std::move(pipeline));
17 if (!inserted) {
18 throw std::runtime_error("duplicate app pipeline id: " + id);
19 }
20}
21
22const IAppPipeline & AppPipelineRegistry::require(std::string_view id) const {
23 const auto it = pipelines_.find(std::string(id));

Callers 3

tensor_state_dictFunction · 0.80
choose_diverse_textsFunction · 0.80
materialize_weight_normFunction · 0.80

Calls 2

idMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected