Implement Empty method for host device vector. (#5781)
* Fix accessing nullptr.
This commit is contained in:
@@ -95,6 +95,7 @@ class HostDeviceVector {
|
||||
HostDeviceVector<T>& operator=(const HostDeviceVector<T>&) = delete;
|
||||
HostDeviceVector<T>& operator=(HostDeviceVector<T>&&);
|
||||
|
||||
bool Empty() const { return Size() == 0; }
|
||||
size_t Size() const;
|
||||
int DeviceIdx() const;
|
||||
common::Span<T> DeviceSpan();
|
||||
|
||||
Reference in New Issue
Block a user