Add basic unittests for gpu-hist method. (#3785)

* Split building histogram into separated class.
* Extract `InitCompressedRow` definition.
* Basic tests for gpu-hist.
* Document the code more verbosely.
* Removed `HistCutUnit`.
* Removed some duplicated copies in `GPUHistMaker`.
* Implement LCG and use it in tests.
This commit is contained in:
trivialfis
2018-10-15 15:47:00 +13:00
committed by Rory Mitchell
parent 184efff9f9
commit 516457fadc
9 changed files with 928 additions and 404 deletions

View File

@@ -151,10 +151,11 @@ struct Entry {
};
/*!
* \brief in-memory storage unit of sparse batch
* \brief In-memory storage unit of sparse batch, stored in CSR format.
*/
class SparsePage {
public:
// Offset for each row.
HostDeviceVector<size_t> offset;
/*! \brief the data of the segments */
HostDeviceVector<Entry> data;