MCPcopy Create free account
hub / github.com/BVLC/caffe / set_gpu_data

Method set_gpu_data

src/caffe/blob.cpp:108–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106
107template <typename Dtype>
108void Blob<Dtype>::set_gpu_data(Dtype* data) {
109 CHECK(data);
110 // Make sure CPU and GPU sizes remain equal
111 size_t size = count_ * sizeof(Dtype);
112 if (data_->size() != size) {
113 data_.reset(new SyncedMemory(size));
114 diff_.reset(new SyncedMemory(size));
115 }
116 data_->set_gpu_data(data);
117}
118
119template <typename Dtype>
120const Dtype* Blob<Dtype>::cpu_diff() const {

Callers 1

apply_buffersFunction · 0.45

Calls 2

sizeMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected