Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup
hostdevice_vector
and add more APIs (#15252)
This work includes: * Fix a bug in `hostdevice_vector` when the host buffer does not change its size when appending new elements. Instead, the new elements are written directly into raw memory (which is out of bounds). Previously, this did not trigger any issue since the host buffer has reserved plenty of memory upon its construction, until I attempted to access the `front()` and `back()` elements of it. * Add `front()` and `back()` accessors which return the first and last elements in the host buffer. Authors: - Nghia Truong (https://github.com/ttnghia) Approvers: - https://github.com/nvdbaranec - Vukasin Milovanovic (https://github.com/vuule) URL: #15252
- Loading branch information