\cvarg{device}{GPU index. Can be obtained via \cvCppCross{gpu::getDevice}.}
\cvarg{feature}{Feature to be checked. Available alternatives:
\begin{itemize}
\item NATIVE\_DOUBLE Native double operations support
\item ATOMICS Atomic operations support
\end{itemize}}
\end{description}
\cvCppFunc{gpu::hasAtomicsSupport}
Returns true, if the specified GPU has atomics support, otherwise false.
\cvCppFunc{gpu::DeviceInfo::isCompatible}
Returns true if the GPU module can be run on the specified device, otherwise false.
\cvdefCpp{bool DeviceInfo::isCompatible();}
\cvdefCpp{bool hasAtomicsSupport(int device);}
\begin{description}
\cvarg{device}{GPU index. Can be obtained via \cvCppCross{gpu::getDevice}.}
\end{description}
\cvclass{gpu::TargetArchs}
This class provides functionality (as set of static methods) for checking which NVIDIA card architectures the GPU module was built for.
...
...
@@ -83,7 +128,7 @@ The following method checks whether the module was built with the support of the
\end{itemize}}
\end{description}
There are a set of methods for checking whether the module contains intermediate (PTX) or binary GPU code for the given architecture:
There are a set of methods for checking whether the module contains intermediate (PTX) or binary GPU code for the given architecture(s):
\cvdefCpp{
static bool has(int major, int minor);\newline
static bool hasPtx(int major, int minor);\newline
...
...
@@ -97,14 +142,6 @@ static bool hasEqualOrGreaterBin(int major, int minor);}
\cvarg{minor}{Minor compute capability version.}
\end{description}
\cvCppFunc{gpu::isCompatibleWith}
Returns true, if the GPU module is built with PTX or CUBIN compatible with the given GPU device, otherwise false.
\cvdefCpp{bool isCompatibleWith(int device);}
\begin{description}
\cvarg{device}{GPU index. Can be obtained via \cvCppCross{gpu::getDevice}.}
\end{description}
% By default GPU module is no compiled for devices with compute capability equal to 1.0. So if you run
According to the CUDA C Programming Guide Version 3.2: "PTX code produced for some specific compute capability can always be compiled to binary code of greater or equal compute capability".
@@ -28,7 +28,7 @@ That means for devices with CC 1.3 and 2.0 binary images are ready to run. For a
Devices with compute capability 1.0 are supported by most of GPU functionality now (just compile the library corresponding settings). There are only a couple things that can not run on it. They are guarded with asserts. But the in future the number will raise, because of CC 1.0 support requires writing special implementation for it. So, It is decided not to spend time for old platform support.
Because of OpenCV can be compiled not for all architectures, there can be binary incompatibility between GPU and code linked to OpenCV. In this case unclear error is returned in arbitrary place. But there is a way to check if the module was build to be able to run on the given device using \cvCppCross{gpu::isCompatibleWith} function.
Because of OpenCV can be compiled not for all architectures, there can be binary incompatibility between GPU and code linked to OpenCV. In this case unclear error is returned in arbitrary place. But there is a way to check if the module was build to be able to run on the given device using \cvCppCross{gpu::DeviceInfo::isCompatible} function.