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

Method set_cpu_data

src/caffe/blob.cpp:90–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88
89template <typename Dtype>
90void Blob<Dtype>::set_cpu_data(Dtype* data) {
91 CHECK(data);
92 // Make sure CPU and GPU sizes remain equal
93 size_t size = count_ * sizeof(Dtype);
94 if (data_->size() != size) {
95 data_.reset(new SyncedMemory(size));
96 diff_.reset(new SyncedMemory(size));
97 }
98 data_->set_cpu_data(data);
99}
100
101template <typename Dtype>
102const Dtype* Blob<Dtype>::gpu_data() const {

Callers 6

apply_buffersFunction · 0.45
TransformMethod · 0.45
Forward_cpuMethod · 0.45
load_batchMethod · 0.45
load_batchMethod · 0.45
Forward_cpuMethod · 0.45

Calls 2

sizeMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected