From d74ca7b39d6a8f60eeb4a71d34d7c5906a07de3e Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 3 Oct 2013 20:00:41 +0400 Subject: [PATCH] ocl: update module documentation --- .../doc/structures_and_utility_functions.rst | 58 +++++++------------ 1 file changed, 21 insertions(+), 37 deletions(-) diff --git a/modules/ocl/doc/structures_and_utility_functions.rst b/modules/ocl/doc/structures_and_utility_functions.rst index c3c93ecbf..aec3f70bf 100644 --- a/modules/ocl/doc/structures_and_utility_functions.rst +++ b/modules/ocl/doc/structures_and_utility_functions.rst @@ -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 & 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( const DeviceInfo* info ) + + :param info: device info + +ocl::setBinaryPath ------------------ Returns void -.. ocv:function:: void ocl::setDevice( Info &oclinfo, int devnum = 0 ) - - :param oclinfo: Output vector of ``ocl::Info`` structures - - :param devnum: the selected OpenCL device under this platform. - -ocl::setBinpath ------------------- -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.