v4.0 update. (#2371)
This commit is contained in:
@@ -75,6 +75,8 @@ struct DeviceAllocation {
|
||||
|
||||
size_t size() const { return size_; }
|
||||
|
||||
size_t get_storage_size() const { return (size_ + offset_) * sizeof(T); }
|
||||
|
||||
void copy_from_host(const T* ptr, size_t sz) {
|
||||
auto ret = cudaMemcpy(ptr_, ptr, sz * sizeof(T), cudaMemcpyDefault);
|
||||
assert(ret == cudaSuccess);
|
||||
|
||||
Reference in New Issue
Block a user