mini-caffe
mini-caffe copied to clipboard
time
@luoyetx thanks for your nice work!the code is really simplified for caffe inference. and there is a question: when I use the time count: clock_t start = clock(); clock_t end = clock(); float time = (float)(end - start) / CLOCKS_PER_SEC; the time I get is about 1000ms,but when I use profiler in the mini-caffe,the time I get is about 250ms,I know the clock() is not so accurate,and the time it get is about twice of profile,but why I get four times?
@zhly0 consider to use profiler, see this doc
clock() will sum the time of all threads.
use #include <omp.h> double t1 = omp_get_wtime(); ... double t2 = omp_get_wtime(); printf("time = %.3f seconds\n",t2-t1);