Use std::uint64_t for row index. (#10120)

- Use std::uint64_t instead of size_t to avoid implementation-defined type.
- Rename to bst_idx_t, to account for other types of indexing.
- Small cleanup to the base header.
This commit is contained in:
Jiaming Yuan
2024-03-15 18:43:49 +08:00
committed by GitHub
parent 56b1868278
commit 53fc17578f
57 changed files with 228 additions and 238 deletions

View File

@@ -409,9 +409,9 @@ void TestHistogramExternalMemory(Context const *ctx, BatchParam batch_param, boo
batch_param.hess = hess;
}
std::vector<std::size_t> partition_size(1, 0);
std::vector<bst_idx_t> partition_size(1, 0);
bst_bin_t total_bins{0};
bst_row_t n_samples{0};
bst_idx_t n_samples{0};
auto gpair = GenerateRandomGradients(m->Info().num_row_, 0.0, 1.0);
auto const &h_gpair = gpair.HostVector();