Refactor DeviceUVector. (#10595)
Create a wrapper instead of using inheritance to avoid inconsistent interface of the class.
This commit is contained in:
@@ -12,7 +12,7 @@ TEST(DeviceUVector, Basic) {
|
||||
std::int32_t verbosity{3};
|
||||
std::swap(verbosity, xgboost::GlobalConfigThreadLocalStore::Get()->verbosity);
|
||||
DeviceUVector<float> uvec;
|
||||
uvec.Resize(12);
|
||||
uvec.resize(12);
|
||||
auto peak = GlobalMemoryLogger().PeakMemory();
|
||||
auto n_bytes = sizeof(decltype(uvec)::value_type) * uvec.size();
|
||||
ASSERT_EQ(peak, n_bytes);
|
||||
|
||||
Reference in New Issue
Block a user