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

Function ToProtoField

tensorflow/core/framework/tensor.cc:657–664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

655// "out" corresponding to type T.
656template <typename T>
657void ToProtoField(const TensorBuffer& in, int64 n, TensorProto* out) {
658 const T* data = in.base<const T>();
659 // NOTE: T may not the same as
660 // ProtoHelper<T>::FieldType::value_type. E.g., T==int16,
661 // ProtoHelper<T>::FieldType::value_type==int32. If performance is
662 // critical, we can specialize T=float and do memcpy directly.
663 ProtoHelper<T>::Fill(data, n, out);
664}
665
666void RefIfNonNull(core::RefCounted* buf) {
667 if (buf) buf->Ref();

Callers

nothing calls this directly

Calls 1

FillFunction · 0.50

Tested by

no test coverage detected