Implement GK sketching on GPU. (#5846)
* Implement GK sketching on GPU. * Strong tests on quantile building. * Handle sparse dataset by binary searching the column index. * Hypothesis test on dask.
This commit is contained in:
@@ -168,7 +168,9 @@ class SimpleRealUniformDistribution {
|
||||
ResultT operator()(GeneratorT* rng) const {
|
||||
ResultT tmp = GenerateCanonical<std::numeric_limits<ResultT>::digits,
|
||||
GeneratorT>(rng);
|
||||
return (tmp * (upper_ - lower_)) + lower_;
|
||||
auto ret = (tmp * (upper_ - lower_)) + lower_;
|
||||
// Correct floating point error.
|
||||
return std::max(ret, lower_);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user