Avoid thrust vector initialization. (#10544)

* Avoid thrust vector initialization.

- Add a wrapper for rmm device uvector.
- Split up the `Resize` method for HDV.
This commit is contained in:
Jiaming Yuan
2024-07-11 17:29:27 +08:00
committed by GitHub
parent 89da9f9741
commit 1ca4bfd20e
13 changed files with 510 additions and 291 deletions

View File

@@ -135,7 +135,9 @@ class HostDeviceVector {
void SetDevice(DeviceOrd device) const;
void Resize(size_t new_size, T v = T());
void Resize(std::size_t new_size);
/** @brief Resize and initialize the data if the new size is larger than the old size. */
void Resize(std::size_t new_size, T v);
using value_type = T; // NOLINT