15
15
#include < fstream>
16
16
#include < iostream>
17
17
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
-
25
18
using namespace std ;
26
19
27
20
namespace popsift {
@@ -98,8 +91,6 @@ void Image::resetDimensions( int w, int h )
98
91
destroyTexture ( );
99
92
createTexture ( );
100
93
} else {
101
- nvtxRangePushA ( " reallocating host-side image memory" );
102
-
103
94
_max_w = max ( w, _max_w );
104
95
_max_h = max ( h, _max_h );
105
96
_input_image_h.freeHost ( popsift::CudaAllocated );
@@ -111,21 +102,15 @@ void Image::resetDimensions( int w, int h )
111
102
112
103
destroyTexture ( );
113
104
createTexture ( );
114
-
115
- nvtxRangePop (); // "reallocating host-side image memory"
116
105
}
117
106
}
118
107
119
108
void Image::allocate ( int w, int h )
120
109
{
121
- nvtxRangePushA ( " allocating host-side image memory" );
122
-
123
110
_input_image_h.allocHost ( w, h, popsift::CudaAllocated );
124
111
_input_image_d.allocDev ( w, h );
125
112
126
113
createTexture ( );
127
-
128
- nvtxRangePop (); // "allocating host-side image memory"
129
114
}
130
115
131
116
void Image::destroyTexture ( )
@@ -222,8 +207,6 @@ void ImageFloat::resetDimensions( int w, int h )
222
207
destroyTexture ( );
223
208
createTexture ( );
224
209
} else {
225
- nvtxRangePushA ( " reallocating host-side image memory" );
226
-
227
210
_max_w = max ( w, _max_w );
228
211
_max_h = max ( h, _max_h );
229
212
_input_image_h.freeHost ( popsift::CudaAllocated );
@@ -235,21 +218,15 @@ void ImageFloat::resetDimensions( int w, int h )
235
218
236
219
destroyTexture ( );
237
220
createTexture ( );
238
-
239
- nvtxRangePop (); // "reallocating host-side image memory"
240
221
}
241
222
}
242
223
243
224
void ImageFloat::allocate ( int w, int h )
244
225
{
245
- nvtxRangePushA ( " allocating host-side image memory" );
246
-
247
226
_input_image_h.allocHost ( w, h, popsift::CudaAllocated );
248
227
_input_image_d.allocDev ( w, h );
249
228
250
229
createTexture ( );
251
-
252
- nvtxRangePop (); // "allocating host-side image memory"
253
230
}
254
231
255
232
void ImageFloat::destroyTexture ( )
0 commit comments