| 138 | |
| 139 | template <typename T> |
| 140 | void CheckIndexData(T const* data_ptr, uint32_t const* offsets, const GHistIndexMatrix& hmat, |
| 141 | size_t n_cols) { |
| 142 | for (size_t i = 0; i < hmat.index.Size(); ++i) { |
| 143 | EXPECT_EQ(data_ptr[i] + offsets[i % n_cols], hmat.index[i]); |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | TEST(HistUtil, IndexBinData) { |
| 148 | uint64_t constexpr kBinSizes[] = { |