Skip to content

Commit b236c71

Browse files
authored
Merge pull request #3751 from peters:4.x
Add conditional include for <cuda/std/tuple> to support CUDA 12.4+ #3751 Fixes #3752 Adds a preprocessor check to conditionally include <cuda/std/tuple> only for CUDA versions 12.4 and above. This ensures backward compatibility with older legacy CUDA versions. Related to pull request #3744 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
1 parent 1ed3dd2 commit b236c71

File tree

1 file changed

+4
-0
lines changed
  • modules/cudev/include/opencv2/cudev/ptr2d

1 file changed

+4
-0
lines changed

modules/cudev/include/opencv2/cudev/ptr2d/zip.hpp

+4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949
#include "../common.hpp"
5050
#include "../util/tuple.hpp"
5151
#include "traits.hpp"
52+
#if defined(__CUDACC_VER_MAJOR__) && (__CUDACC_VER_MAJOR__ > 12 || (__CUDACC_VER_MAJOR__ == 12 && __CUDACC_VER_MINOR__ >= 4))
5253
#include <cuda/std/tuple>
54+
#endif
5355

5456
namespace cv { namespace cudev {
5557

@@ -176,6 +178,7 @@ template <class PtrTuple> struct PtrTraits< ZipPtrSz<PtrTuple> > : PtrTraitsBase
176178

177179
}}
178180

181+
#if defined(__CUDACC_VER_MAJOR__) && (__CUDACC_VER_MAJOR__ > 12 || (__CUDACC_VER_MAJOR__ == 12 && __CUDACC_VER_MINOR__ >= 4))
179182
_LIBCUDACXX_BEGIN_NAMESPACE_STD
180183

181184
template< class... Types >
@@ -198,3 +201,4 @@ struct tuple_element<N, cv::cudev::ZipPtrSz<tuple<Types...> > >
198201
_LIBCUDACXX_END_NAMESPACE_STD
199202

200203
#endif
204+
#endif

0 commit comments

Comments
 (0)