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

Function total_size

src/caffe/parallel.cpp:59–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57// Buffer size necessary to store given blobs
58template<typename Dtype>
59static size_t total_size(const vector<Blob<Dtype>*>& params) {
60 size_t size = 0;
61 for (int i = 0; i < params.size(); ++i)
62 size += params[i]->count();
63 // Size have at least one byte, otherwise cudaMalloc fails if net has no
64 // learnable parameters.
65 return (size > 0) ? size : 1;
66}
67
68template<typename Dtype>
69Params<Dtype>::Params(shared_ptr<Solver<Dtype> > root_solver)

Callers

nothing calls this directly

Calls 2

countMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected