ocl: update module documentation
authorAlexander Alekhin <alexander.alekhin@itseez.com>
Thu, 3 Oct 2013 16:00:41 +0000 (20:00 +0400)
committerAlexander Alekhin <alexander.alekhin@itseez.com>
Thu, 3 Oct 2013 19:26:06 +0000 (23:26 +0400)
modules/ocl/doc/structures_and_utility_functions.rst

index c3c93ec..aec3f70 100644 (file)
@@ -3,56 +3,40 @@ Data Structures and Utility Functions
 
 .. highlight:: cpp
 
-ocl::Info
--------------
-.. ocv:class:: ocl::Info
+ocl::getOpenCLPlatforms
+-----------------------
+Returns the list of OpenCL platforms
 
-this class should be maintained by the user and be passed to getDevice
+.. ocv:function:: int ocl::getOpenCLPlatforms( PlatformsInfo& platforms )
 
-ocl::getDevice
-------------------
+    :param platforms: Output variable
+
+ocl::getOpenCLDevices
+---------------------
 Returns the list of devices
 
-.. ocv:function:: int ocl::getDevice( std::vector<Info> & oclinfo, int devicetype=CVCL_DEVICE_TYPE_GPU )
+.. ocv:function:: int ocl::getOpenCLDevices( DevicesInfo& devices, int deviceType = CVCL_DEVICE_TYPE_GPU, const PlatformInfo* platform = NULL )
 
-    :param oclinfo: Output vector of ``ocl::Info`` structures
+    :param devices: Output variable
 
-    :param devicetype: One of ``CVCL_DEVICE_TYPE_GPU``, ``CVCL_DEVICE_TYPE_CPU`` or ``CVCL_DEVICE_TYPE_DEFAULT``.
+    :param deviceType: Bitmask of ``CVCL_DEVICE_TYPE_GPU``, ``CVCL_DEVICE_TYPE_CPU`` or ``CVCL_DEVICE_TYPE_DEFAULT``.
 
-the function must be called before any other ``cv::ocl`` functions; it initializes ocl runtime.
+    :param platform: Specifies preferrable platform
 
 ocl::setDevice
-------------------
+--------------
 Returns void
 
-.. ocv:function:: void ocl::setDevice( Info &oclinfo, int devnum = 0 )
+.. ocv:function:: void ocl::setDevice( const DeviceInfo* info )
 
-    :param oclinfo: Output vector of ``ocl::Info`` structures
+    :param info: device info
 
-    :param devnum: the selected OpenCL device under this platform.
-
-ocl::setBinpath
+ocl::setBinaryPath
 ------------------
 Returns void
 
-.. ocv:function:: void ocl::setBinpath(const char *path)
+.. ocv:function:: void ocl::setBinaryPath(const char *path)
 
     :param path: the path of OpenCL kernel binaries
 
 If you call this function and set a valid path, the OCL module will save the compiled kernel to the address in the first time and reload the binary since that. It can save compilation time at the runtime.
-
-ocl::getoclContext
-----------------------
-Returns the pointer to the opencl context
-
-.. ocv:function:: void* ocl::getoclContext()
-
-Thefunction are used to get opencl context so that opencv can interactive with other opencl program.
-
-ocl::getoclCommandQueue
---------------------------
-Returns the pointer to the opencl command queue
-
-.. ocv:function:: void* ocl::getoclCommandQueue()
-
-Thefunction are used to get opencl command queue so that opencv can interactive with other opencl program.