Skip to content

Commit 8403128

Browse files
Carsten Griwodzsimogasp
authored andcommitted
[code] avoid boost timer deprecation warnings
# Conflicts: # src/cctag/cuda/pinned_counters.h
1 parent d96a054 commit 8403128

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

src/cctag/CCTag.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <opencv2/core/core_c.h>
1919

2020
#include <boost/foreach.hpp>
21-
#include <boost/timer.hpp>
2221
#include <boost/array.hpp>
2322
#include <boost/mpl/bool.hpp>
2423

src/cctag/Detection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include <boost/mpl/bool.hpp>
3535
#include <boost/ptr_container/ptr_vector.hpp>
3636
#include <boost/unordered/unordered_set.hpp>
37-
#include <boost/timer.hpp>
37+
#include <boost/timer/timer.hpp>
3838
#include <boost/date_time/posix_time/posix_time.hpp>
3939

4040
#include <cmath>
@@ -584,7 +584,7 @@ void cctagDetectionFromEdges(
584584
createImageForVoteResultDebug(src, pyramidLevel);
585585

586586
// Set some timers
587-
boost::timer t3;
587+
boost::timer::cpu_timer t3;
588588
boost::posix_time::ptime tstart0(boost::posix_time::microsec_clock::local_time());
589589

590590
std::size_t nSegmentOut = 0;

src/cctag/Multiresolution.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <cctag/Detection.hpp>
1717
#include <cctag/utils/Talk.hpp> // for DO_TALK macro
1818

19-
#include <boost/timer.hpp>
19+
#include <boost/timer/timer.hpp>
2020
#include <boost/date_time/posix_time/posix_time.hpp>
2121

2222
#include <cmath>

src/cctag/Vote.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <boost/multi_array/subarray.hpp>
3030
#include <boost/container/flat_set.hpp>
3131

32-
#include <boost/timer.hpp>
3332
#include <boost/date_time/posix_time/posix_time.hpp>
3433

3534
#include <deque>

src/cctag/filter/cvRecode.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "cctag/Params.hpp"
1919
#include "cctag/utils/Talk.hpp" // do DO_TALK macro
2020

21-
#include <boost/timer.hpp>
21+
#include <boost/timer/timer.hpp>
2222

2323
#include <cstdlib> // for ::abs
2424
#include <climits>
@@ -47,7 +47,7 @@ void cvRecodedCanny(
4747
int debug_info_level,
4848
const cctag::Parameters* params )
4949
{
50-
boost::timer t;
50+
boost::timer::cpu_timer t;
5151
std::vector<uchar*> stack;
5252
uchar** stack_top = nullptr, ** stack_bottom = nullptr;
5353

@@ -166,8 +166,9 @@ void cvRecodedCanny(
166166
#define CANNY_PUSH( d ) *( d ) = (uchar)2, *stack_top++ = ( d )
167167
#define CANNY_POP( d ) ( d ) = *--stack_top
168168

169+
t.stop();
169170
DO_TALK( CCTAG_COUT_DEBUG( "Canny 1 took: " << t.elapsed() ); );
170-
t.restart();
171+
t.resume();
171172

172173
// calculate magnitude and angle of gradient, perform non-maxima supression.
173174
// fill the map with one of the following values:
@@ -328,6 +329,7 @@ void cvRecodedCanny(
328329
mag_buf[2] = _mag;
329330
}
330331

332+
t.stop();
331333
DO_TALK( CCTAG_COUT_DEBUG( "Canny 2 took : " << t.elapsed() ); )
332334

333335
#ifdef DEBUG_MAGMAP_BY_GRIFF
@@ -354,7 +356,7 @@ void cvRecodedCanny(
354356
delete[] write_mag;
355357
}
356358
#endif // DEBUG_MAGMAP_BY_GRIFF
357-
t.restart();
359+
t.resume();
358360

359361
// now track the edges (hysteresis thresholding)
360362
while( stack_top > stack_bottom )
@@ -389,9 +391,9 @@ void cvRecodedCanny(
389391
CANNY_PUSH( m + mapstep + 1 );
390392
}
391393

394+
t.stop();
392395
DO_TALK( CCTAG_COUT_DEBUG( "Canny 3 took : " << t.elapsed() ); )
393-
394-
t.restart();
396+
t.resume();
395397

396398
// the final pass, form the final image
397399
for( i = 0; i < size.height; i++ )

0 commit comments

Comments
 (0)