Commit d74ca7b3 authored by Alexander Alekhin's avatar Alexander Alekhin

ocl: update module documentation

parent 69c2ef5e
......@@ -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.
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