Commit 5291b9df authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

corrected grammar (done by Elena)

parent fafc2f37
This diff is collapsed.
This diff is collapsed.
Initalization and Information Initalization and Information
============================= =============================
.. highlight:: cpp .. highlight:: cpp
.. index:: gpu::getCudaEnabledDeviceCount .. index:: gpu::getCudaEnabledDeviceCount
gpu::getCudaEnabledDeviceCount gpu::getCudaEnabledDeviceCount
---------------------------------- ----------------------------------
.. cpp:function:: int gpu::getCudaEnabledDeviceCount()
Returns number of CUDA-enabled devices installed. It is to be used before any other GPU functions calls. If OpenCV is compiled without GPU support this function returns 0.
.. cpp:function:: int getCudaEnabledDeviceCount()
Returns the number of installed CUDA-enabled devices. Use this function before any other GPU functions calls. If OpenCV is compiled without GPU support, this function returns 0.
.. index:: gpu::setDevice .. index:: gpu::setDevice
gpu::setDevice gpu::setDevice
------------------ ------------------
.. cpp:function:: void gpu::setDevice(int device) .. cpp:function:: void setDevice(int device)
Sets device and initializes it for the current thread. Call of this function can be omitted, but in this case a default device will be initialized on fist GPU usage.
:param device: index of GPU device in system starting with 0.
Sets a device and initializes it for the current thread. If call of this function is omitted, a default device is initialized at the fist GPU usage.
:param device: System index of a GPU device starting with 0.
.. index:: gpu::getDevice .. index:: gpu::getDevice
gpu::getDevice gpu::getDevice
------------------ ------------------
.. cpp:function:: int gpu::getDevice() .. cpp:function:: int getDevice()
Returns the current device index, which was set by :cpp:func:`gpu::setDevice` or initialized by default.
Returns the current device index that was set by {gpu::getDevice} or initialized by default.
.. index:: gpu::GpuFeature .. index:: gpu::GpuFeature
gpu::GpuFeature gpu::GpuFeature
--------------- ---------------
.. c:type:: gpu::GpuFeature .. c:type:: gpu::GpuFeature
GPU compute features. :: This class provides GPU computing features.
::
enum GpuFeature enum GpuFeature
{ {
...@@ -54,16 +47,16 @@ GPU compute features. :: ...@@ -54,16 +47,16 @@ GPU compute features. ::
}; };
.. index:: gpu::DeviceInfo .. index:: gpu::DeviceInfo
gpu::DeviceInfo gpu::DeviceInfo
--------------- ---------------
.. cpp:class:: gpu::DeviceInfo .. cpp:class:: gpu::DeviceInfo
This class provides functionality for querying the specified GPU properties. :: This class provides functionality for querying the specified GPU properties.
::
class DeviceInfo class CV_EXPORTS DeviceInfo
{ {
public: public:
DeviceInfo(); DeviceInfo();
...@@ -84,20 +77,18 @@ This class provides functionality for querying the specified GPU properties. :: ...@@ -84,20 +77,18 @@ This class provides functionality for querying the specified GPU properties. ::
}; };
.. index:: gpu::DeviceInfo::DeviceInfo .. index:: gpu::DeviceInfo::DeviceInfo
.. Comment: two lines below look like a bug
gpu::DeviceInfo::DeviceInfo gpu::DeviceInfo::DeviceInfo
------------------------------- ------------------------------- ``_``
.. cpp:function:: gpu::DeviceInfo::DeviceInfo() .. cpp:function:: gpu::DeviceInfo::DeviceInfo()
.. cpp:function:: gpu::DeviceInfo::DeviceInfo(int device_id) .. cpp:function:: gpu::DeviceInfo::DeviceInfo(int device_id)
Constructs :cpp:class:`gpu::DeviceInfo` object for the specified device. If ``device_id`` parameter is missed it constructs object for the current device. Constructs the ``DeviceInfo`` object for the specified device. If ``device_id`` parameter is missed, it constructs an object for the current device.
:param device_id: Index of the GPU device in system starting with 0.
:param device_id: System index of the GPU device starting with 0.
.. index:: gpu::DeviceInfo::name .. index:: gpu::DeviceInfo::name
...@@ -107,8 +98,6 @@ gpu::DeviceInfo::name ...@@ -107,8 +98,6 @@ gpu::DeviceInfo::name
Returns the device name. Returns the device name.
.. index:: gpu::DeviceInfo::majorVersion .. index:: gpu::DeviceInfo::majorVersion
gpu::DeviceInfo::majorVersion gpu::DeviceInfo::majorVersion
...@@ -117,8 +106,6 @@ gpu::DeviceInfo::majorVersion ...@@ -117,8 +106,6 @@ gpu::DeviceInfo::majorVersion
Returns the major compute capability version. Returns the major compute capability version.
.. index:: gpu::DeviceInfo::minorVersion .. index:: gpu::DeviceInfo::minorVersion
gpu::DeviceInfo::minorVersion gpu::DeviceInfo::minorVersion
...@@ -127,8 +114,6 @@ gpu::DeviceInfo::minorVersion ...@@ -127,8 +114,6 @@ gpu::DeviceInfo::minorVersion
Returns the minor compute capability version. Returns the minor compute capability version.
.. index:: gpu::DeviceInfo::multiProcessorCount .. index:: gpu::DeviceInfo::multiProcessorCount
gpu::DeviceInfo::multiProcessorCount gpu::DeviceInfo::multiProcessorCount
...@@ -137,8 +122,6 @@ gpu::DeviceInfo::multiProcessorCount ...@@ -137,8 +122,6 @@ gpu::DeviceInfo::multiProcessorCount
Returns the number of streaming multiprocessors. Returns the number of streaming multiprocessors.
.. index:: gpu::DeviceInfo::freeMemory .. index:: gpu::DeviceInfo::freeMemory
gpu::DeviceInfo::freeMemory gpu::DeviceInfo::freeMemory
...@@ -147,8 +130,6 @@ gpu::DeviceInfo::freeMemory ...@@ -147,8 +130,6 @@ gpu::DeviceInfo::freeMemory
Returns the amount of free memory in bytes. Returns the amount of free memory in bytes.
.. index:: gpu::DeviceInfo::totalMemory .. index:: gpu::DeviceInfo::totalMemory
gpu::DeviceInfo::totalMemory gpu::DeviceInfo::totalMemory
...@@ -157,19 +138,15 @@ gpu::DeviceInfo::totalMemory ...@@ -157,19 +138,15 @@ gpu::DeviceInfo::totalMemory
Returns the amount of total memory in bytes. Returns the amount of total memory in bytes.
.. index:: gpu::DeviceInfo::supports .. index:: gpu::DeviceInfo::supports
gpu::DeviceInfo::supports gpu::DeviceInfo::supports
----------------------------- -----------------------------
.. cpp:function:: bool gpu::DeviceInfo::supports(GpuFeature feature) .. cpp:function:: bool gpu::DeviceInfo::supports(GpuFeature feature)
Returns true if the device has the given GPU feature, otherwise false. Provides information on GPU feature support. This function returns true if the device has the specified GPU feature, otherwise returns false.
:param feature: Feature to be checked. See :c:type:`gpu::GpuFeature`.
:param feature: Feature to be checked. See ?.
.. index:: gpu::DeviceInfo::isCompatible .. index:: gpu::DeviceInfo::isCompatible
...@@ -177,46 +154,45 @@ gpu::DeviceInfo::isCompatible ...@@ -177,46 +154,45 @@ gpu::DeviceInfo::isCompatible
--------------------------------- ---------------------------------
.. cpp:function:: bool gpu::DeviceInfo::isCompatible() .. cpp:function:: bool gpu::DeviceInfo::isCompatible()
Returns true if the GPU module can be run on the specified device, otherwise false. Checks the GPU module and device compatibility. This function returns true if the GPU module can be run on the specified device, otherwise returns false.
.. index:: gpu::TargetArchs .. index:: gpu::TargetArchs
.. _gpu::TargetArchs:
gpu::TargetArchs gpu::TargetArchs
---------------- ----------------
.. cpp:class:: gpu::TargetArchs .. cpp:class:: gpu::TargetArchs
This class provides functionality (as set of static methods) for checking which NVIDIA card architectures the GPU module was built for. This class provides a set of static methods to check what NVIDIA card architecture the GPU module was built for.
The following method checks whether the module was built with the support of the given feature: The following method checks whether the module was built with the support of the given feature:
.. cpp:function:: static bool gpu::TargetArchs::builtWith(GpuFeature feature) .. cpp:function:: static bool gpu::TargetArchs::builtWith(GpuFeature feature)
:param feature: Feature to be checked. See :c:type:`gpu::GpuFeature`. :param feature: Feature to be checked. See ?.
There are a set of methods for checking whether the module contains intermediate (PTX) or binary GPU code for the given architecture(s): There is a set of methods to check whether the module contains intermediate (PTX) or binary GPU code for the given architecture(s):
.. cpp:function:: static bool gpu::TargetArchs::has(int major, int minor) .. cpp:function:: static bool gpu::TargetArchs::has(int major, int minor)
.. cpp:function:: static bool gpu::TargetArchs::hasPtx(int major, int minor) .. cpp:function:: static bool gpu::TargetArchs::hasPtx(int major, int minor)
.. cpp:function:: static bool gpu::TargetArchs::hasBin(int major, int minor) .. cpp:function:: static bool gpu::TargetArchs::hasBin(int major, int minor)
.. cpp:function:: static bool gpu::TargetArchs::hasEqualOrLessPtx(int major, int minor) .. cpp:function:: static bool gpu::TargetArchs::hasEqualOrLessPtx(int major, int minor)
.. cpp:function:: static bool gpu::TargetArchs::hasEqualOrGreater(int major, int minor) .. cpp:function:: static bool gpu::TargetArchs::hasEqualOrGreater(int major, int minor)
.. cpp:function:: static bool gpu::TargetArchs::hasEqualOrGreaterPtx(int major, int minor) .. cpp:function:: static bool gpu::TargetArchs::hasEqualOrGreaterPtx(int major, int minor)
.. cpp:function:: static bool gpu::TargetArchs::hasEqualOrGreaterBin(int major, int minor) .. cpp:function:: static bool gpu::TargetArchs::hasEqualOrGreaterBin(int major, int minor)
:param major: Major compute capability version. * **major** Major compute capability version.
:param minor: Minor compute capability version. * **minor** Minor compute capability version.
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".
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".
.. index:: gpu::MultiGpuManager .. index:: gpu::MultiGpuManager
...@@ -296,3 +272,4 @@ gpu::MultiGpuManager::gpuOff ...@@ -296,3 +272,4 @@ gpu::MultiGpuManager::gpuOff
.. cpp:function:: void gpu::MultiGpuManager::gpuOff() .. cpp:function:: void gpu::MultiGpuManager::gpuOff()
Finishes the piece of work on the current GPU. Finishes the piece of work on the current GPU.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment