Internal change
PiperOrigin-RevId: 504928797
This commit is contained in:
parent
4d38557f11
commit
c29ab7f083
|
@ -1051,6 +1051,7 @@ cc_library(
|
||||||
"@com_google_absl//absl/base:core_headers",
|
"@com_google_absl//absl/base:core_headers",
|
||||||
"@com_google_absl//absl/memory",
|
"@com_google_absl//absl/memory",
|
||||||
"@com_google_absl//absl/status",
|
"@com_google_absl//absl/status",
|
||||||
|
"@com_google_absl//absl/strings",
|
||||||
"@com_google_absl//absl/types:optional",
|
"@com_google_absl//absl/types:optional",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -92,7 +92,7 @@ bool GraphRegistry::IsRegistered(const std::string& ns,
|
||||||
}
|
}
|
||||||
|
|
||||||
absl::StatusOr<CalculatorGraphConfig> GraphRegistry::CreateByName(
|
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 {
|
SubgraphContext* context) const {
|
||||||
absl::StatusOr<std::unique_ptr<Subgraph>> maker =
|
absl::StatusOr<std::unique_ptr<Subgraph>> maker =
|
||||||
local_factories_.IsRegistered(ns, type_name)
|
local_factories_.IsRegistered(ns, type_name)
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "absl/base/macros.h"
|
#include "absl/base/macros.h"
|
||||||
#include "absl/memory/memory.h"
|
#include "absl/memory/memory.h"
|
||||||
#include "absl/status/status.h"
|
#include "absl/status/status.h"
|
||||||
|
#include "absl/strings/string_view.h"
|
||||||
#include "absl/types/optional.h"
|
#include "absl/types/optional.h"
|
||||||
#include "mediapipe/framework/calculator.pb.h"
|
#include "mediapipe/framework/calculator.pb.h"
|
||||||
#include "mediapipe/framework/deps/registration.h"
|
#include "mediapipe/framework/deps/registration.h"
|
||||||
|
@ -187,7 +188,7 @@ class GraphRegistry {
|
||||||
|
|
||||||
// Returns the specified graph config.
|
// Returns the specified graph config.
|
||||||
absl::StatusOr<CalculatorGraphConfig> CreateByName(
|
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;
|
SubgraphContext* context = nullptr) const;
|
||||||
|
|
||||||
static GraphRegistry global_graph_registry;
|
static GraphRegistry global_graph_registry;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user