MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / DataReader

Method DataReader

rtpose_wrapper/src/caffe/data_reader.cpp:18–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16static boost::mutex bodies_mutex_;
17
18DataReader::DataReader(const LayerParameter& param)
19 : queue_pair_(new QueuePair( //
20 param.data_param().prefetch() * param.data_param().batch_size())) {
21 // Get or create a body
22 boost::mutex::scoped_lock lock(bodies_mutex_);
23 string key = source_key(param);
24 weak_ptr<Body>& weak = bodies_[key];
25 body_ = weak.lock();
26 if (!body_) {
27 body_.reset(new Body(param));
28 bodies_[key] = weak_ptr<Body>(body_);
29 }
30 body_->new_queue_pairs_.push(queue_pair_);
31}
32
33DataReader::~DataReader() {
34 string key = source_key(body_->param_);

Callers

nothing calls this directly

Calls 3

batch_sizeMethod · 0.80
pushMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected