MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / RegisterDecodeFn

Method RegisterDecodeFn

tensorflow/core/framework/variant_op_registry.cc:49–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void UnaryVariantOpRegistry::RegisterDecodeFn(
50 const string& type_name, const VariantDecodeFn& decode_fn) {
51 CHECK(!type_name.empty()) << "Need a valid name for UnaryVariantDecode";
52 VariantDecodeFn* existing = GetDecodeFn(type_name);
53 CHECK_EQ(existing, nullptr)
54 << "Unary VariantDecodeFn for type_name: " << type_name
55 << " already registered";
56 decode_fns.insert(std::pair<StringPiece, VariantDecodeFn>(
57 GetPersistentStringPiece(type_name), decode_fn));
58}
59
60bool DecodeUnaryVariant(Variant* variant) {
61 CHECK_NOTNULL(variant);

Callers 2

TESTFunction · 0.80

Calls 2

emptyMethod · 0.45
insertMethod · 0.45

Tested by 1

TESTFunction · 0.64