MCPcopy Create free account
hub / github.com/bytedance/bolt / readBuffer

Function readBuffer

bolt/vector/VectorSaver.cpp:133–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133BufferPtr readBuffer(std::istream& in, memory::MemoryPool* pool) {
134 auto numBytes = read<int32_t>(in);
135 auto buffer = AlignedBuffer::allocate<char>(numBytes, pool);
136 auto rawBuffer = buffer->asMutable<char>();
137 in.read(rawBuffer, numBytes);
138 return buffer;
139}
140
141BufferPtr readOptionalBuffer(std::istream& in, memory::MemoryPool* pool) {
142 bool hasBuffer = read<bool>(in);

Callers 13

readOptionalBufferFunction · 0.85
readFlatVectorFunction · 0.85
readDictionaryVectorFunction · 0.85
readArrayVectorFunction · 0.85
readMapVectorFunction · 0.85
enqueueMethod · 0.85
isBufferedMethod · 0.85
readMethod · 0.85
readByteMethod · 0.85
ensureInputMethod · 0.85
readOrSkipMethod · 0.85
readOrSkipMethod · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected