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

Function main

rtpose_wrapper/src/caffe/test/test_caffe_main.cpp:14–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12#endif
13
14int main(int argc, char** argv) {
15 ::testing::InitGoogleTest(&argc, argv);
16 caffe::GlobalInit(&argc, &argv);
17#ifndef CPU_ONLY
18 // Before starting testing, let's first print out a few cuda defice info.
19 int device;
20 cudaGetDeviceCount(&device);
21 cout << "Cuda number of devices: " << device << endl;
22 if (argc > 1) {
23 // Use the given device
24 device = atoi(argv[1]);
25 cudaSetDevice(device);
26 cout << "Setting to use device " << device << endl;
27 } else if (CUDA_TEST_DEVICE >= 0) {
28 // Use the device assigned in build configuration; but with a lower priority
29 device = CUDA_TEST_DEVICE;
30 }
31 cudaGetDevice(&device);
32 cout << "Current device id: " << device << endl;
33 cudaGetDeviceProperties(&CAFFE_TEST_CUDA_PROP, device);
34 cout << "Current device name: " << CAFFE_TEST_CUDA_PROP.name << endl;
35#endif
36 // invoke the test.
37 return RUN_ALL_TESTS();
38}

Callers

nothing calls this directly

Calls 2

InitGoogleTestFunction · 0.85
GlobalInitFunction · 0.85

Tested by

no test coverage detected