Checked out tag 4.5.2 from github and built bot the release and debug libraries with CUDA support enabled successfully.
Attempting to use function call ’ cv::cuda::gem’ in my C++ app; OpenCV 4.5.2 documents (OpenCV: Arithm Operations on Matrices) state this api is found in ’ #include <opencv2/cudaarithm.hpp>.
The <opencv2/cudaarithm.hpp> is missing from the CUDA built release and debug for Windows 10 libraries.
Cudaarithm (and most other CUDA modules) are part of the opencv_contrib repo. Enabling CUDA support while building OpenCV won’t enable this automatically.
Actually, it turned out that after building from sources (and including the contrib modules), I discovered the need to run the ‘INSTALL’ target to collect up all the pieces-n-parts into a usable entity.
I may have missed something in the documentation regarding the installation of the library, which on windows, simply constructs a directory with all the necessary binaries, includes, etc.
Once I got those details ironed out, it all works as expected.