Use Span in gpu coordinate. (#4029)

* Use Span in gpu coordinate.

* Use Span in device code.
* Fix shard size calculation.
  - Use lower_bound instead of upper_bound.
* Check empty devices.
This commit is contained in:
Jiaming Yuan
2019-01-02 11:32:43 +08:00
committed by GitHub
parent f368d0de2b
commit 1f022929f4
3 changed files with 62 additions and 36 deletions

View File

@@ -621,8 +621,8 @@ XGBOOST_DEVICE auto as_writable_bytes(Span<T, E> s) __span_noexcept -> // NOLIN
return {reinterpret_cast<byte*>(s.data()), s.size_bytes()};
}
} // namespace common
} // namespace xgboost
} // namespace common NOLINT
} // namespace xgboost NOLINT
#if defined(_MSC_VER) &&_MSC_VER < 1910
#undef constexpr