| 62 | } |
| 63 | |
| 64 | static inline void Copy(TTargetChunk* target, size_t targetSize, const TSourceChunk* source, size_t sourceSize) { |
| 65 | Y_ASSERT(targetSize >= sourceSize * BLOCK_SIZE); |
| 66 | if (targetSize > sourceSize * BLOCK_SIZE) { |
| 67 | ::Fill(target + sourceSize * BLOCK_SIZE, target + targetSize, 0); |
| 68 | } |
| 69 | for (size_t i = 0; i < sourceSize; ++i) { |
| 70 | CopyChunk(target + i * BLOCK_SIZE, source[i]); |
| 71 | } |
| 72 | } |
| 73 | }; |
| 74 | |
| 75 | template <typename TTargetChunk, typename TSourceChunk> |