Internal change

PiperOrigin-RevId: 504928797
This commit is contained in:
Sebastian Schmidt 2023-01-26 13:34:36 -08:00 committed by Copybara-Service
parent 4d38557f11
commit c29ab7f083
3 changed files with 4 additions and 2 deletions

View File

@ -1051,6 +1051,7 @@ cc_library(
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:optional",
],
)

View File

@ -92,7 +92,7 @@ bool GraphRegistry::IsRegistered(const std::string& ns,
}
absl::StatusOr<CalculatorGraphConfig> GraphRegistry::CreateByName(
const std::string& ns, const std::string& type_name,
absl::string_view ns, absl::string_view type_name,
SubgraphContext* context) const {
absl::StatusOr<std::unique_ptr<Subgraph>> maker =
local_factories_.IsRegistered(ns, type_name)

View File

@ -20,6 +20,7 @@
#include "absl/base/macros.h"
#include "absl/memory/memory.h"
#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "mediapipe/framework/calculator.pb.h"
#include "mediapipe/framework/deps/registration.h"
@ -187,7 +188,7 @@ class GraphRegistry {
// Returns the specified graph config.
absl::StatusOr<CalculatorGraphConfig> CreateByName(
const std::string& ns, const std::string& type_name,
absl::string_view ns, absl::string_view type_name,
SubgraphContext* context = nullptr) const;
static GraphRegistry global_graph_registry;