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

Method StartInternalThread

rtpose_wrapper/src/caffe/internal_thread.cpp:21–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21void InternalThread::StartInternalThread() {
22 CHECK(!is_started()) << "Threads should persist and not be restarted.";
23
24 int device = 0;
25#ifndef CPU_ONLY
26 CUDA_CHECK(cudaGetDevice(&device));
27#endif
28 Caffe::Brew mode = Caffe::mode();
29 int rand_seed = caffe_rng_rand();
30 int solver_count = Caffe::solver_count();
31 bool root_solver = Caffe::root_solver();
32
33 try {
34 thread_.reset(new boost::thread(&InternalThread::entry, this, device, mode,
35 rand_seed, solver_count, root_solver));
36 } catch (std::exception& e) {
37 LOG(FATAL) << "Thread exception: " << e.what();
38 }
39}
40
41void InternalThread::entry(int device, Caffe::Brew mode, int rand_seed,
42 int solver_count, bool root_solver) {

Callers 2

RunMethod · 0.80
TEST_FFunction · 0.80

Calls 3

caffe_rng_randFunction · 0.85
whatMethod · 0.80
resetMethod · 0.45

Tested by 1

TEST_FFunction · 0.64