tensorflow/core/debug/debug_io_utils.cc
// Translates the length of a string to number of bytes when the string is
// encoded as bytes in protobuf. Note that this makes a conservative estimate
// (i.e., an estimate that is usually too large, but never too small under the
// gRPC message size limit) of the Varint-encoded length, to workaround the lack
// of a portable length function.
Translates the length of a string to number of bytes when the string is
encoded as bytes in protobuf. Note that this makes a conservative estimate
of the Varint-encoded length, to workaround the lack
of a portable length function.
Translates the length of a string to number of bytes when the string is encoded as bytes in protobuf . Note that this makes a conservative estimate of the Varint - encoded length to workaround the lack of a portable length function .
const size_t StringValMaxBytesInProto(const string& str) {
#if defined(PLATFORM_GOOGLE)
  return str.size() + DebugGrpcIO::kGrpcMaxVarintLengthSize;
#else
  return str.size();
#endif
}
const size_t StringValMaxBytesInProto ( const string & str ) { #if defined ( PLATFORM_GOOGLE ) return str . size ( ) + DebugGrpcIO :: kGrpcMaxVarintLengthSize ; #else return str . size ( ) ; #endif }
Translates the length of a string to number of bytes when the string is
encoded as bytes in protobuf.
Translates the length of a string to number of bytes when the string is encoded as bytes in protobuf .