Skip to content

Commit 9ea2f52

Browse files
krishraghurammshabunin
authored andcommitted
Correct the existing documented T-API functions to match the doxygen format (opencv#8758)
* Correct the existing documented T-API functions to match the doxygen format. * docs: fix comments style * T-API documentation: minor formatting changes
1 parent 9f0bbda commit 9ea2f52

File tree

1 file changed

+42
-58
lines changed
  • modules/core/include/opencv2/core

1 file changed

+42
-58
lines changed

modules/core/include/opencv2/core/ocl.hpp

Lines changed: 42 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -278,55 +278,38 @@ class CV_EXPORTS Platform
278278
Impl* p;
279279
};
280280

281-
/*
282-
//! @brief Attaches OpenCL context to OpenCV
283-
//
284-
//! @note Note:
285-
// OpenCV will check if available OpenCL platform has platformName name,
286-
// then assign context to OpenCV and call clRetainContext function.
287-
// The deviceID device will be used as target device and new command queue
288-
// will be created.
289-
//
290-
// Params:
291-
//! @param platformName - name of OpenCL platform to attach,
292-
//! this string is used to check if platform is available
293-
//! to OpenCV at runtime
294-
//! @param platfromID - ID of platform attached context was created for
295-
//! @param context - OpenCL context to be attached to OpenCV
296-
//! @param deviceID - ID of device, must be created from attached context
281+
/** @brief Attaches OpenCL context to OpenCV
282+
@note
283+
OpenCV will check if available OpenCL platform has platformName name, then assign context to
284+
OpenCV and call `clRetainContext` function. The deviceID device will be used as target device and
285+
new command queue will be created.
286+
@param platformName name of OpenCL platform to attach, this string is used to check if platform is available to OpenCV at runtime
287+
@param platformID ID of platform attached context was created for
288+
@param context OpenCL context to be attached to OpenCV
289+
@param deviceID ID of device, must be created from attached context
297290
*/
298291
CV_EXPORTS void attachContext(const String& platformName, void* platformID, void* context, void* deviceID);
299292

300-
/*
301-
//! @brief Convert OpenCL buffer to UMat
302-
//
303-
//! @note Note:
304-
// OpenCL buffer (cl_mem_buffer) should contain 2D image data, compatible with OpenCV.
305-
// Memory content is not copied from clBuffer to UMat. Instead, buffer handle assigned
306-
// to UMat and clRetainMemObject is called.
307-
//
308-
// Params:
309-
//! @param cl_mem_buffer - source clBuffer handle
310-
//! @param step - num of bytes in single row
311-
//! @param rows - number of rows
312-
//! @param cols - number of cols
313-
//! @param type - OpenCV type of image
314-
//! @param dst - destination UMat
293+
/** @brief Convert OpenCL buffer to UMat
294+
@note
295+
OpenCL buffer (cl_mem_buffer) should contain 2D image data, compatible with OpenCV. Memory
296+
content is not copied from `clBuffer` to UMat. Instead, buffer handle assigned to UMat and
297+
`clRetainMemObject` is called.
298+
@param cl_mem_buffer source clBuffer handle
299+
@param step num of bytes in single row
300+
@param rows number of rows
301+
@param cols number of cols
302+
@param type OpenCV type of image
303+
@param dst destination UMat
315304
*/
316305
CV_EXPORTS void convertFromBuffer(void* cl_mem_buffer, size_t step, int rows, int cols, int type, UMat& dst);
317306

318-
/*
319-
//! @brief Convert OpenCL image2d_t to UMat
320-
//
321-
//! @note Note:
322-
// OpenCL image2d_t (cl_mem_image), should be compatible with OpenCV
323-
// UMat formats.
324-
// Memory content is copied from image to UMat with
325-
// clEnqueueCopyImageToBuffer function.
326-
//
327-
// Params:
328-
//! @param cl_mem_image - source image2d_t handle
329-
//! @param dst - destination UMat
307+
/** @brief Convert OpenCL image2d_t to UMat
308+
@note
309+
OpenCL `image2d_t` (cl_mem_image), should be compatible with OpenCV UMat formats. Memory content
310+
is copied from image to UMat with `clEnqueueCopyImageToBuffer` function.
311+
@param cl_mem_image source image2d_t handle
312+
@param dst destination UMat
330313
*/
331314
CV_EXPORTS void convertFromImage(void* cl_mem_image, UMat& dst);
332315

@@ -569,14 +552,12 @@ class CV_EXPORTS Kernel
569552
i = set(i, a6); i = set(i, a7); i = set(i, a8); i = set(i, a9); i = set(i, a10); i = set(i, a11);
570553
i = set(i, a12); i = set(i, a13); i = set(i, a14); set(i, a15); return *this;
571554
}
572-
/*
573-
Run the OpenCL kernel.
555+
/** @brief Run the OpenCL kernel.
574556
@param dims the work problem dimensions. It is the length of globalsize and localsize. It can be either 1, 2 or 3.
575-
@param globalsize work items for each dimension.
576-
It is not the final globalsize passed to OpenCL.
577-
Each dimension will be adjusted to the nearest integer divisible by the corresponding value in localsize.
578-
If localsize is NULL, it will still be adjusted depending on dims.
579-
The adjusted values are greater than or equal to the original values.
557+
@param globalsize work items for each dimension. It is not the final globalsize passed to
558+
OpenCL. Each dimension will be adjusted to the nearest integer divisible by the corresponding
559+
value in localsize. If localsize is NULL, it will still be adjusted depending on dims. The
560+
adjusted values are greater than or equal to the original values.
580561
@param localsize work-group size for each dimension.
581562
@param sync specify whether to wait for OpenCL computation to finish before return.
582563
@param q command queue
@@ -711,22 +692,25 @@ class CV_EXPORTS Image2D
711692
public:
712693
Image2D();
713694

714-
// src: The UMat from which to get image properties and data
715-
// norm: Flag to enable the use of normalized channel data types
716-
// alias: Flag indicating that the image should alias the src UMat.
717-
// If true, changes to the image or src will be reflected in
718-
// both objects.
695+
/**
696+
@param src UMat object from which to get image properties and data
697+
@param norm flag to enable the use of normalized channel data types
698+
@param alias flag indicating that the image should alias the src UMat. If true, changes to the
699+
image or src will be reflected in both objects.
700+
*/
719701
explicit Image2D(const UMat &src, bool norm = false, bool alias = false);
720702
Image2D(const Image2D & i);
721703
~Image2D();
722704

723705
Image2D & operator = (const Image2D & i);
724706

725-
// Indicates if creating an aliased image should succeed. Depends on the
726-
// underlying platform and the dimensions of the UMat.
707+
/** Indicates if creating an aliased image should succeed.
708+
Depends on the underlying platform and the dimensions of the UMat.
709+
*/
727710
static bool canCreateAlias(const UMat &u);
728711

729-
// Indicates if the image format is supported.
712+
/** Indicates if the image format is supported.
713+
*/
730714
static bool isFormatSupported(int depth, int cn, bool norm);
731715

732716
void* ptr() const;

0 commit comments

Comments
 (0)