MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / copyTuples

Method copyTuples

src/processor/result/factorized_table.cpp:44–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void DataBlock::copyTuples(DataBlock* blockToCopyFrom, ft_tuple_idx_t tupleIdxToCopyFrom,
45 DataBlock* blockToCopyInto, ft_tuple_idx_t tupleIdxToCopyTo, uint32_t numTuplesToCopy,
46 uint32_t numBytesPerTuple) {
47 for (auto i = 0u; i < numTuplesToCopy; i++) {
48 memcpy(blockToCopyInto->getData() + (tupleIdxToCopyTo * numBytesPerTuple),
49 blockToCopyFrom->getData() + (tupleIdxToCopyFrom * numBytesPerTuple), numBytesPerTuple);
50 tupleIdxToCopyFrom++;
51 tupleIdxToCopyTo++;
52 }
53 blockToCopyInto->numTuples += numTuplesToCopy;
54 blockToCopyInto->freeSize -= (numTuplesToCopy * numBytesPerTuple);
55}
56
57void DataBlockCollection::merge(DataBlockCollection& other) {
58 if (blocks.empty()) {

Callers

nothing calls this directly

Calls 1

getDataMethod · 0.45

Tested by

no test coverage detected