@@ -278,55 +278,38 @@ class CV_EXPORTS Platform
278
278
Impl* p;
279
279
};
280
280
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
297
290
*/
298
291
CV_EXPORTS void attachContext (const String& platformName, void * platformID, void * context, void * deviceID);
299
292
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
315
304
*/
316
305
CV_EXPORTS void convertFromBuffer (void * cl_mem_buffer, size_t step, int rows, int cols, int type, UMat& dst);
317
306
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
330
313
*/
331
314
CV_EXPORTS void convertFromImage (void * cl_mem_image, UMat& dst);
332
315
@@ -569,14 +552,12 @@ class CV_EXPORTS Kernel
569
552
i = set (i, a6); i = set (i, a7); i = set (i, a8); i = set (i, a9); i = set (i, a10); i = set (i, a11);
570
553
i = set (i, a12); i = set (i, a13); i = set (i, a14); set (i, a15); return *this ;
571
554
}
572
- /*
573
- Run the OpenCL kernel.
555
+ /* * @brief Run the OpenCL kernel.
574
556
@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.
580
561
@param localsize work-group size for each dimension.
581
562
@param sync specify whether to wait for OpenCL computation to finish before return.
582
563
@param q command queue
@@ -711,22 +692,25 @@ class CV_EXPORTS Image2D
711
692
public:
712
693
Image2D ();
713
694
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
+ */
719
701
explicit Image2D (const UMat &src, bool norm = false , bool alias = false );
720
702
Image2D (const Image2D & i);
721
703
~Image2D ();
722
704
723
705
Image2D & operator = (const Image2D & i);
724
706
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
+ */
727
710
static bool canCreateAlias (const UMat &u);
728
711
729
- // Indicates if the image format is supported.
712
+ /* * Indicates if the image format is supported.
713
+ */
730
714
static bool isFormatSupported (int depth, int cn, bool norm);
731
715
732
716
void * ptr () const ;
0 commit comments