| 44 | |
| 45 | template <typename T> |
| 46 | inline std::vector<int64_t> MakeChunksOffsets(std::span<T> chunks) { |
| 47 | std::vector<int64_t> offsets(chunks.size() + 1); |
| 48 | int64_t offset = 0; |
| 49 | std::transform(chunks.begin(), chunks.end(), offsets.begin(), |
| 50 | [&offset](const T& chunk) { |
| 51 | auto curr_offset = offset; |
| 52 | offset += GetLength(chunk); |
| 53 | return curr_offset; |
| 54 | }); |
| 55 | offsets[chunks.size()] = offset; |
| 56 | return offsets; |
| 57 | } |
| 58 | |
| 59 | template <typename IndexType> |
| 60 | inline TypedChunkLocation<IndexType> ResolveOneInline(uint32_t num_offsets, |
no test coverage detected