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

Method clear

tensorflow/core/framework/variant.h:656–666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

654}
655
656inline void Variant::clear() noexcept {
657 if (!is_empty()) {
658 if (IsInlineValue()) {
659 value_.inline_value.~InlineValue();
660 } else {
661 value_.heap_value.~HeapValue();
662 }
663 value_.ResetMemory();
664 }
665 is_inline_ = false;
666}
667
668inline void Variant::swap(Variant& other) noexcept {
669 if (is_empty()) {

Callers 15

~ArenaMethod · 0.45
~ThreadLocalCacheMethod · 0.45
ClearMethod · 0.45
ResetLockedMethod · 0.45
BackgroundWorkMethod · 0.45
clear_recorded_memoryMethod · 0.45
ClearMethod · 0.45
OpsUsedByGraphFunction · 0.45
FinalizeDocFunction · 0.45
EncodeVariantImplFunction · 0.45
inputMethod · 0.45

Calls 2

~InlineValueMethod · 0.80
ResetMemoryMethod · 0.80

Tested by 4

TESTFunction · 0.36
TestClearFunction · 0.36
TestClearDeletesFunction · 0.36
ClearMethod · 0.36