MCPcopy Create free account
hub / github.com/apache/singa / CopyDataFromHostPtr

Method CopyDataFromHostPtr

src/core/device/device.cc:119–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void 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}
127void Device::Sync() {}
128} // namespace singa

Callers

nothing calls this directly

Calls 1

mutable_dataMethod · 0.80

Tested by

no test coverage detected