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

Function copyIndicesBuffer

bolt/vector/DecodedVector.cpp:364–374  ·  view source on GitHub ↗

Copies 'size' entries from 'indices' into a newly allocated buffer.

Source from the content-addressed store, hash-verified

362
363/// Copies 'size' entries from 'indices' into a newly allocated buffer.
364BufferPtr copyIndicesBuffer(
365 const vector_size_t* indices,
366 vector_size_t size,
367 memory::MemoryPool* pool) {
368 BufferPtr copy = AlignedBuffer::allocate<vector_size_t>(size, pool);
369 memcpy(
370 copy->asMutable<vector_size_t>(),
371 indices,
372 BaseVector::byteSize<vector_size_t>(size));
373 return copy;
374}
375
376/// Copies 'size' bits from 'nulls' into a newly allocated buffer. Returns
377/// nullptr if 'nulls' is null.

Callers 1

dictionaryWrappingMethod · 0.85

Calls 1

memcpyFunction · 0.85

Tested by

no test coverage detected