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

Method Clone

tensorflow/core/framework/variant.h:324–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322 const void* RawPtr() const override { return &value; }
323
324 ValueInterface* Clone() const override {
325 // NOTE: Use placement new here because we override `operator delete`,
326 // and need to match the call to `port::Free()` with a call to
327 // `port::Malloc()`.
328 auto* clone = static_cast<Value*>(port::Malloc(sizeof(Value)));
329 new (clone) Value(kInPlace, value);
330 return clone;
331 }
332
333 void MoveAssign(ValueInterface* memory) override {
334 CHECK(TypeId() == memory->TypeId())

Callers 1

VariantMethod · 0.45

Calls 1

MallocFunction · 0.50

Tested by

no test coverage detected