MCPcopy Create free account
hub / github.com/apache/arrow / MakeText

Function MakeText

cpp/src/gandiva/tests/string_ops_benchmark.cc:71–77  ·  view source on GitHub ↗

Builds a `len`-byte string with `match` once every `stride` bytes.

Source from the content-addressed store, hash-verified

69
70// Builds a `len`-byte string with `match` once every `stride` bytes.
71std::string MakeText(int64_t len, int stride, char match, char filler) {
72 std::string s(static_cast<size_t>(len), filler);
73 for (int64_t i = 0; i < len; i += stride) {
74 s[static_cast<size_t>(i)] = match;
75 }
76 return s;
77}
78
79// Exact output size, so the "old" arm gets a buffer large enough to complete.
80int32_t ExactCapacity(const std::string& text, const char* from, int flen, int olen) {

Callers 2

BM_ReplaceNewFunction · 0.85
BM_ReplaceOldFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected