Fix and cleanup for column matrix. (#7901)
* Fix missed type dispatching for dense columns with missing values. * Code cleanup to reduce special cases. * Reduce memory usage.
This commit is contained in:
@@ -28,7 +28,7 @@ void EncodeTreeLeafHost(RegTree const& tree, std::vector<bst_node_t> const& posi
|
||||
sorted_pos[i] = position[ridx[i]];
|
||||
}
|
||||
// find the first non-sampled row
|
||||
auto begin_pos =
|
||||
size_t begin_pos =
|
||||
std::distance(sorted_pos.cbegin(), std::find_if(sorted_pos.cbegin(), sorted_pos.cend(),
|
||||
[](bst_node_t nidx) { return nidx >= 0; }));
|
||||
CHECK_LE(begin_pos, sorted_pos.size());
|
||||
|
||||
Reference in New Issue
Block a user