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

Function CreateRandomBuffer

cpp/src/arrow/util/bit_util_benchmark.cc:105–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103#endif
104
105static std::shared_ptr<Buffer> CreateRandomBuffer(int64_t nbytes) {
106 auto buffer = *AllocateBuffer(nbytes);
107 memset(buffer->mutable_data(), 0, nbytes);
108 random_bytes(nbytes, /*seed=*/0, buffer->mutable_data());
109 return buffer;
110}
111
112static std::shared_ptr<Buffer> CreateRandomBitsBuffer(int64_t nbits,
113 int64_t set_percentage) {

Callers 10

BenchmarkAndImplFunction · 0.70
BenchmarkBitmapReaderFunction · 0.70
BenchmarkVisitBitsFunction · 0.70
BenchmarkBitmapWriterFunction · 0.70
BenchmarkGenerateBitsFunction · 0.70
BitmapUInt64ReaderFunction · 0.70
SetBitsToFunction · 0.70
CountSetBitsFunction · 0.70
CopyBitmapFunction · 0.70
BitmapEqualsFunction · 0.70

Calls 3

AllocateBufferFunction · 0.50
random_bytesFunction · 0.50
mutable_dataMethod · 0.45

Tested by

no test coverage detected