\brief Resolve a logical index to a ChunkLocation. The returned ChunkLocation contains the chunk index and the within-chunk index equivalent to the logical index. \pre `index >= 0` \post `location.chunk_index` in `[0, chunks.size()]` \param index The logical index to resolve \return ChunkLocation with a valid chunk_index if index is within bounds, or with `chunk_index == chunks.size()` if logica
| 123 | /// bounds, or with `chunk_index == chunks.size()` if logical index is |
| 124 | /// `>= chunked_array.length()`. |
| 125 | inline ChunkLocation Resolve(int64_t index) const { |
| 126 | const auto cached_chunk = cached_chunk_.load(std::memory_order_relaxed); |
| 127 | const auto chunk_index = |
| 128 | ResolveChunkIndex</*StoreCachedChunk=*/true>(index, cached_chunk); |
| 129 | return ChunkLocation{chunk_index, index - offsets_[chunk_index]}; |
| 130 | } |
| 131 | |
| 132 | /// \brief Resolve a logical index to a ChunkLocation. |
| 133 | /// |
no test coverage detected