Skip to content

Commit e34fdc6

Browse files
committed
fix compile for CUDA 13
1 parent 8623b69 commit e34fdc6

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/popsift/s_extrema.cu

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "sift_pyramid.h"
1414

1515
#include <cuda_runtime.h>
16-
#include <texture_fetch_functions.h>
1716

1817
#include <cstdio>
1918

src/popsift/s_filtergrid.cu

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111

1212
#if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX)
1313
#include <nvtx3/nvToolsExtCuda.h>
14+
#define nvtxRangePushA_() nvtxRangePushA()
15+
#define nvtxRangePop_() nvtxRangePop()
1416
#else
15-
#define nvtxRangePushA(a)
16-
#define nvtxRangePop()
17+
#define nvtxRangePushA_(a)
18+
#define nvtxRangePop_()
1719
#endif
1820

1921
#if ! POPSIFT_IS_DEFINED(POPSIFT_DISABLE_GRID_FILTER)
@@ -29,6 +31,7 @@
2931
#include <thrust/sort.h>
3032
#include <thrust/transform.h>
3133
#include <thrust/transform_scan.h>
34+
#include <thrust/version.h>
3235

3336
namespace popsift
3437
{
@@ -292,7 +295,11 @@ int Pyramid::extrema_filter_grid( const Config& conf, int ext_total )
292295

293296
if( ocount > 0 ) {
294297
FunctionExtractIgnored fun_extract_ignore;
298+
#if THRUST_VERSION >= 300000
299+
::cuda::std::identity fun_id;
300+
#else
295301
thrust::identity<int> fun_id;
302+
#endif
296303

297304
grid.resize( ocount );
298305

@@ -317,9 +324,9 @@ int Pyramid::extrema_filter_grid( const Config& conf, int ext_total )
317324
}
318325
}
319326

320-
nvtxRangePushA( "writing back count" );
327+
nvtxRangePushA_( "writing back count" );
321328
writeDescCountersToDevice( );
322-
nvtxRangePop( );
329+
nvtxRangePop_( );
323330

324331
return ret_ext_total;
325332
}

0 commit comments

Comments
 (0)