The pits encountered when compiling OpenCV 4.4 + CUDA10.0 with WIN10 VS2019
The general steps are not written in many details on the Internet, mainly to write down a few pits encountered.
.CUDA_ARCH_BIN
Be sure to fill in and modify the value of CUDA_ARCH_BIN (graphics card computing power *10), otherwise it will run into errors after successful compilation.
The following is the calculation table provided by the official website, a part of which is cut off, you can check the official website without a suitable graphics card.
2. Correspondence between VS and CUDA
There are some restrictions on the VS version in the CUDA source code, just like the VS2019 CUAD 10.0 I used is not supported by default.
Configuration file path:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include\crt\host_config.h
Line 141 in the code limits the version number of the _MSC_VER compiler.
My VS2019 version of the _MSC_VER compiler version number exceeds the CUDA configuration file code, and errors will occur during the compilation process. At present, you can modify the 1920 value in the CUDA configuration file to compile normally.