| 117 | } |
| 118 | |
| 119 | void Device::CopyDataFromHostPtr(Block* dst, const void* src, size_t nBytes, |
| 120 | size_t dst_offset, Context* ctx) { |
| 121 | auto direct = lang_ == kCpp ? kHostToHost : kHostToDevice; |
| 122 | void* dstptr = reinterpret_cast<char*>(dst->mutable_data()) + dst_offset; |
| 123 | Exec([this, dstptr, src, nBytes, |
| 124 | direct](Context* ctx) { CopyToFrom(dstptr, src, nBytes, direct, ctx); }, |
| 125 | {}, {dst}, "CopyDataFromHostPtr"); |
| 126 | } |
| 127 | void Device::Sync() {} |
| 128 | } // namespace singa |
nothing calls this directly
no test coverage detected