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

Method get

tensorflow/core/framework/variant.h:225–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223 // otherwise.
224 template <typename T>
225 T* get() {
226 const TypeIndex TTypeIndex = MakeTypeIndex<T>();
227 if (is_empty() || (TTypeIndex != TypeId())) return nullptr;
228 return std::addressof(static_cast<Variant::Value<T>*>(GetValue())->value);
229 }
230
231 // Returns a pointer to the stored value if it is type T, or nullptr
232 // otherwise.

Callers 1

GetValueMethod · 0.45

Calls 1

GetValueFunction · 0.50

Tested by

no test coverage detected