| 366 | } |
| 367 | |
| 368 | void InMemChunkedCSRHeader::copyFrom(const InMemChunkedCSRHeader& other) const { |
| 369 | DASSERT(offset->getNumValues() == length->getNumValues()); |
| 370 | DASSERT(other.offset->getNumValues() == other.length->getNumValues()); |
| 371 | DASSERT(other.offset->getCapacity() == offset->getCapacity()); |
| 372 | const auto numOtherValues = other.offset->getNumValues(); |
| 373 | memcpy(offset->getData(), other.offset->getData(), numOtherValues * sizeof(offset_t)); |
| 374 | memcpy(length->getData(), other.length->getData(), numOtherValues * sizeof(length_t)); |
| 375 | const auto lastOffsetInOtherHeader = other.getEndCSROffset(numOtherValues); |
| 376 | const auto numValues = offset->getNumValues(); |
| 377 | for (auto i = numOtherValues; i < numValues; i++) { |
| 378 | offset->setValue<offset_t>(lastOffsetInOtherHeader, i); |
| 379 | length->setValue<length_t>(0, i); |
| 380 | } |
| 381 | } |
| 382 | |
| 383 | offset_vec_t InMemChunkedCSRHeader::populateStartCSROffsetsFromLength(bool leaveGaps) const { |
| 384 | const auto numNodes = length->getNumValues(); |
no test coverage detected