Split up column matrix initialization. (#8060)
* Split up column matrix initialization. This PR splits the column matrix initialization into 2 steps, the first one initializes the storage while the second one does the transpose. By doing so, we can reuse the code for Quantile DMatrix.
This commit is contained in:
@@ -109,9 +109,8 @@ class GHistIndexMatrix {
|
||||
*/
|
||||
size_t RowIdx(size_t ridx) const { return row_ptr[ridx - base_rowid]; }
|
||||
|
||||
bst_row_t Size() const {
|
||||
return row_ptr.empty() ? 0 : row_ptr.size() - 1;
|
||||
}
|
||||
bst_row_t Size() const { return row_ptr.empty() ? 0 : row_ptr.size() - 1; }
|
||||
bst_feature_t Features() const { return cut.Ptrs().size() - 1; }
|
||||
|
||||
bool ReadColumnPage(dmlc::SeekStream* fi);
|
||||
size_t WriteColumnPage(dmlc::Stream* fo) const;
|
||||
|
||||
Reference in New Issue
Block a user