一 接口
1.1 内存类
1.1.1 DeviceAllocation
1 位置
2 内置函数
(a)reset
/// Deletes the managed object and resets capacity to zero
void reset() {
capacity = 0;
smart_ptr.reset();
}
/// Deletes managed object, if owned, and allocates a new object
void reset(size_t _capacity) {
reset(device_memory::allocate<T>(_capacity), _capacity);
}
在hbm分配_capacity大小的空间
(b)get
/// Returns a pointer to the managed object
T* get() const { return smart_ptr.g