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

Function CopySubrangeToArray

tensorflow/core/platform/tensor_coding.h:43–47  ·  view source on GitHub ↗

Copy subrange [pos:(pos + n)) from src to dst. If pos >= src.size() the result is empty. If pos + n > src.size() the subrange [pos, size()) is copied.

Source from the content-addressed store, hash-verified

41// result is empty. If pos + n > src.size() the subrange [pos, size()) is
42// copied.
43inline void CopySubrangeToArray(const string& src, size_t pos, size_t n,
44 char* dst) {
45 if (pos >= src.size()) return;
46 memcpy(dst, src.data() + pos, std::min(n, src.size() - pos));
47}
48
49// Store encoding of strings[0..n-1] in *out.
50void EncodeStringList(const tstring* strings, int64 n, string* out);

Callers 1

CompressTensorContentFunction · 0.85

Calls 4

CopyToArrayMethod · 0.80
minFunction · 0.50
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected