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

Method Variant

tensorflow/core/framework/variant.h:581–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

579 "Expected internal representation to be 64 bytes.");
580
581inline Variant::Variant(const Variant& other) : is_inline_(other.is_inline_) {
582 if (!other.is_empty()) {
583 if (other.IsInlineValue()) {
584 value_.inline_value = InlineValue();
585 other.GetValue()->CloneInto(GetValue());
586 value_.inline_value.has_value = true;
587 } else {
588 value_.heap_value = HeapValue(other.GetValue()->Clone());
589 is_inline_ = false;
590 }
591 }
592}
593
594inline Variant::Variant(Variant&& other) noexcept
595 : is_inline_(other.is_inline_) {

Callers

nothing calls this directly

Calls 8

InlineValueClass · 0.85
IsInlineValueMethod · 0.80
CloneIntoMethod · 0.80
MoveIntoMethod · 0.80
GetValueFunction · 0.50
is_emptyMethod · 0.45
GetValueMethod · 0.45
CloneMethod · 0.45

Tested by

no test coverage detected