| 172 | } |
| 173 | |
| 174 | Status CudaBuffer::CopyFromDevice(const int64_t position, const void* data, |
| 175 | int64_t nbytes) { |
| 176 | if (nbytes > size_ - position) { |
| 177 | return Status::Invalid("Copy would overflow buffer"); |
| 178 | } |
| 179 | return context_->CopyDeviceToDevice(const_cast<uint8_t*>(data_) + position, data, |
| 180 | nbytes); |
| 181 | } |
| 182 | |
| 183 | Status CudaBuffer::CopyFromAnotherDevice(const std::shared_ptr<CudaContext>& src_ctx, |
| 184 | const int64_t position, const void* data, |
nothing calls this directly
no test coverage detected