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

Function RandomString

tensorflow/core/lib/io/table_test.cc:43–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42namespace test {
43static StringPiece RandomString(random::SimplePhilox* rnd, int len,
44 string* dst) {
45 dst->resize(len);
46 for (int i = 0; i < len; i++) {
47 (*dst)[i] = static_cast<char>(' ' + rnd->Uniform(95)); // ' ' .. '~'
48 }
49 return StringPiece(*dst);
50}
51static string RandomKey(random::SimplePhilox* rnd, int len) {
52 // Make sure to generate a wide variety of characters so we
53 // test the boundary conditions for short-key optimizations.

Callers 2

CompressibleStringFunction · 0.70
TEST_FFunction · 0.70

Calls 2

UniformMethod · 0.80
resizeMethod · 0.45

Tested by

no test coverage detected