From e91ca8c6a32c847149a220153417fd94d1ba6ecd Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Fri, 14 Jan 2011 17:52:40 +0000 Subject: [PATCH] documented all functions from GPU initialization section --- doc/gpu.tex | 26 -------------- doc/gpu_initialization.tex | 69 ++++++++++++++++++++++++++++++++++++++ doc/gpu_introduction.tex | 3 ++ doc/opencvref_body.tex | 7 ++++ 4 files changed, 79 insertions(+), 26 deletions(-) create mode 100644 doc/gpu_initialization.tex create mode 100644 doc/gpu_introduction.tex diff --git a/doc/gpu.tex b/doc/gpu.tex index f5312189ba..7e334a1584 100644 --- a/doc/gpu.tex +++ b/doc/gpu.tex @@ -1,27 +1,3 @@ -\ifCpp - - -\section{Initalization and Info} - - -\cvCppFunc{gpu::hasNativeDoubleSupport} -Returns true if current GPU has native double support, false otherwise. - -\cvdefCpp{bool hasNativeDoubleSupport(int device);} -\begin{description} -\cvarg{device}{GPU identity. Can be obtained via \cvCppCross{gpu::getDevice}.} -\end{description} - - -\cvCppFunc{gpu::hasAtomicsSupport} -Returns true if current GPU has atomics support, false otherwise. - -\cvdefCpp{bool hasAtomicsSupport(int device);} -\begin{description} -\cvarg{device}{GPU identity. Can be obtained via \cvCppCross{gpu::getDevice}.} -\end{description} - - \section{Data Structures} @@ -821,5 +797,3 @@ Returns block descriptors computed for the whole image. \cvarg{DESCR\_FORMAT\_COL\_BY\_COL}{Column-major order.} \end{description}} \end{description} - -\fi \ No newline at end of file diff --git a/doc/gpu_initialization.tex b/doc/gpu_initialization.tex new file mode 100644 index 0000000000..9c12163cb5 --- /dev/null +++ b/doc/gpu_initialization.tex @@ -0,0 +1,69 @@ +\section{Initalization and Information} + + +\cvCppFunc{gpu::getCudaEnabledDeviceCount} +Returns number of CUDA-enabled devices installed. It is to be used before any other GPU funtions calls. If OpenCV is compiled without GPU support this function returns 0. + +\cvdefCpp{int getCudaEnabledDeviceCount();} + + +\cvCppFunc{gpu::setDevice} +Sets device and initializes it for current thread. If this call is omitted, default device will be initialized. + +\cvdefCpp{void setDevice(int device);} +\begin{description} +\cvarg{device}{index of GPU device in system starting with 0.} +\end{description} + + +\cvCppFunc{gpu::getDevice} +Returns current device index, which was set by \cvCppCross{gpu::getDevice} of initialized by default. + +\cvdefCpp{int getDevice();} + + +\cvCppFunc{gpu::getComputeCapability} +Returns compute capability version for given device. + +\cvdefCpp{void getComputeCapability(int device, int\& major, int\& minor);} +\begin{description} +\cvarg{device}{GPU index. Can be obtained via \cvCppCross{gpu::getDevice}.} +\cvarg{major}{Major CC version.} +\cvarg{minor}{Minor CC version.} +\end{description} + +\cvCppFunc{gpu::getNumberOfSMs} +Returns number of Streaming Multiprocessors for given device. + +\cvdefCpp{int getNumberOfSMs(int device);} +\begin{description} +\cvarg{device}{GPU index. Can be obtained via \cvCppCross{gpu::getDevice}.} +\end{description} + + +\cvCppFunc{gpu::getGpuMemInfo} +Returns free and total memory for current device. + +\cvdefCpp{void getGpuMemInfo(size\_t\& free, size\_t\& total);} +\begin{description} +\cvarg{free}{Reference to free GPU memory counter.} +\cvarg{total}{Reference to total GPU memory counter.} +\end{description} + + +\cvCppFunc{gpu::hasNativeDoubleSupport} +Returns true if current GPU has native double support, false otherwise. + +\cvdefCpp{bool hasNativeDoubleSupport(int device);} +\begin{description} +\cvarg{device}{GPU index. Can be obtained via \cvCppCross{gpu::getDevice}.} +\end{description} + + +\cvCppFunc{gpu::hasAtomicsSupport} +Returns true if current GPU has atomics support, false otherwise. + +\cvdefCpp{bool hasAtomicsSupport(int device);} +\begin{description} +\cvarg{device}{GPU index. Can be obtained via \cvCppCross{gpu::getDevice}.} +\end{description} \ No newline at end of file diff --git a/doc/gpu_introduction.tex b/doc/gpu_introduction.tex new file mode 100644 index 0000000000..09ea1496cc --- /dev/null +++ b/doc/gpu_introduction.tex @@ -0,0 +1,3 @@ + +\setction{ABC} +GPU INTRODUTION \ No newline at end of file diff --git a/doc/opencvref_body.tex b/doc/opencvref_body.tex index 0aff9ad729..f4da822ee2 100644 --- a/doc/opencvref_body.tex +++ b/doc/opencvref_body.tex @@ -62,7 +62,14 @@ \ifCpp \chapter{gpu. GPU-based Functionality} \renewcommand{\curModule}{gpu} +%\input{gpu_introduction} +\input{gpu_initialization} \input{gpu} +%\input{gpu_datastructures} +%\input{gpu_matrixoperations} +%\input{gpu_imageproc} +%\input{gpu_matrixreductions} +%\input{gpu_objectdetection} \input{gpu_features2d} \input{gpu_image_filtering} \fi