1515#include < fstream>
1616#include < iostream>
1717
18- #if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX)
19- #include < nvtx3/nvToolsExtCuda.h>
20- #else
21- #define nvtxRangePushA (a )
22- #define nvtxRangePop ()
23- #endif
24-
2518using namespace std ;
2619
2720namespace popsift {
@@ -98,8 +91,6 @@ void Image::resetDimensions( int w, int h )
9891 destroyTexture ( );
9992 createTexture ( );
10093 } else {
101- nvtxRangePushA ( " reallocating host-side image memory" );
102-
10394 _max_w = max ( w, _max_w );
10495 _max_h = max ( h, _max_h );
10596 _input_image_h.freeHost ( popsift::CudaAllocated );
@@ -111,21 +102,15 @@ void Image::resetDimensions( int w, int h )
111102
112103 destroyTexture ( );
113104 createTexture ( );
114-
115- nvtxRangePop (); // "reallocating host-side image memory"
116105 }
117106}
118107
119108void Image::allocate ( int w, int h )
120109{
121- nvtxRangePushA ( " allocating host-side image memory" );
122-
123110 _input_image_h.allocHost ( w, h, popsift::CudaAllocated );
124111 _input_image_d.allocDev ( w, h );
125112
126113 createTexture ( );
127-
128- nvtxRangePop (); // "allocating host-side image memory"
129114}
130115
131116void Image::destroyTexture ( )
@@ -222,8 +207,6 @@ void ImageFloat::resetDimensions( int w, int h )
222207 destroyTexture ( );
223208 createTexture ( );
224209 } else {
225- nvtxRangePushA ( " reallocating host-side image memory" );
226-
227210 _max_w = max ( w, _max_w );
228211 _max_h = max ( h, _max_h );
229212 _input_image_h.freeHost ( popsift::CudaAllocated );
@@ -235,21 +218,15 @@ void ImageFloat::resetDimensions( int w, int h )
235218
236219 destroyTexture ( );
237220 createTexture ( );
238-
239- nvtxRangePop (); // "reallocating host-side image memory"
240221 }
241222}
242223
243224void ImageFloat::allocate ( int w, int h )
244225{
245- nvtxRangePushA ( " allocating host-side image memory" );
246-
247226 _input_image_h.allocHost ( w, h, popsift::CudaAllocated );
248227 _input_image_d.allocDev ( w, h );
249228
250229 createTexture ( );
251-
252- nvtxRangePop (); // "allocating host-side image memory"
253230}
254231
255232void ImageFloat::destroyTexture ( )
0 commit comments