| 1850 | }; |
| 1851 | |
| 1852 | std::vector<FragmentStats> GetFragmentStats(const std::vector<int>& order) { |
| 1853 | auto last_indices = GetLastIndices(order); |
| 1854 | std::vector<FragmentStats> fragment_stats; |
| 1855 | for (std::size_t i = 0; i < last_indices.size(); i++) { |
| 1856 | fragment_stats.push_back({last_indices[i], false}); |
| 1857 | } |
| 1858 | return fragment_stats; |
| 1859 | } |
| 1860 | |
| 1861 | /// When data arrives out of order then we first have to buffer up 1 item in order to |
| 1862 | /// know when the last item has arrived (so we can mark it as the last). This means |