Make binary bin search reusable. (#6058)

* Move binary search row to hist util.
* Remove dead code.
This commit is contained in:
Jiaming Yuan
2020-08-26 05:05:11 +08:00
committed by GitHub
parent 9c14e430af
commit 80c8547147
8 changed files with 56 additions and 102 deletions

View File

@@ -134,9 +134,9 @@ struct DeviceAdapterLoader {
using BatchT = Batch;
DEV_INLINE DeviceAdapterLoader(Batch const batch, bool use_shared,
bst_feature_t num_features, bst_row_t num_rows,
size_t entry_start) :
XGBOOST_DEV_INLINE DeviceAdapterLoader(Batch const batch, bool use_shared,
bst_feature_t num_features, bst_row_t num_rows,
size_t entry_start) :
batch{batch},
columns{num_features},
use_shared{use_shared} {
@@ -158,7 +158,7 @@ struct DeviceAdapterLoader {
__syncthreads();
}
DEV_INLINE float GetElement(size_t ridx, size_t fidx) const {
XGBOOST_DEV_INLINE float GetElement(size_t ridx, size_t fidx) const {
if (use_shared) {
return smem[threadIdx.x * columns + fidx];
}