Repository navigation
Implementing AVX512 support for 3 channel cv::integral for CV_64F - #13572
brad-kelly wants to merge 1 commit into
Conversation
|
Did I do something wrong here? I thought I submitted the PR for opencv_extra correctly. |
Problem is forward slash '/' in branch name. It doesn't work well (URL for GitHub API becomes malformed). |
| //M*/ | ||
| #ifndef OPENCV_IMGPROC_SUM_PIXELS_HPP | ||
| #define OPENCV_IMGPROC_SUM_PIXELS_HPP | ||
| #include "precomp.hpp" |
There was a problem hiding this comment.
Avoid including of precomp.hpp from .hpp files
| { | ||
|
|
||
| namespace opt_AVX512_SKX | ||
| { |
There was a problem hiding this comment.
Please remove extra indentation from namespaces
There was a problem hiding this comment.
Done. My IDE keeps putting the indentation back after I take it out :-(
| sqsum, _sqsumstep, width, height, cn); | ||
| return true; | ||
| } | ||
| #endif |
| // For Open Source Computer Vision Library | ||
| // | ||
| // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. | ||
| // Copyright (C) 2000-2008,2019 Intel Corporation, all rights reserved. |
There was a problem hiding this comment.
It is my understanding that this is not legally allowed. You cannot back-date copyright and since I did not personally publish anything in the range of 2008-2018, it is inaccurate for me to specify any year in that range. I was told this by our legal team a number of years ago when I was training our new hires on coding practices and had to have a section on copyright. For this reason, I believe I need to use a comma to specify my addition of content in 2019 only.
| // TODO: Add support for sqsum and 1,2, and 4 channels | ||
| class IntegralCalculator_3Channel { | ||
| public: | ||
| IntegralCalculator_3Channel() {}; |
There was a problem hiding this comment.
Why do we need class here?
Class is usually used with "template" parameters.
There are no class fields, all members should be "static" (so __always_inline can be safely replaced to inline)
There was a problem hiding this comment.
The reason for the class here is to prepare for the other channels. I am going to use a strategy pattern and factory to handle the rest of the 1,2, and 4 channel integrals and possibly extend this to other architecuture types (AVX2, etc). I haven't templatized it yet because it is not strictly necessary yet.
It is similar to how it is described here but will have a bit more flexibility:
https://github.com/opencv/opencv/wiki/Coding_Style_Guide#high-level-c-interface-algorithms
| // License Agreement | ||
| // For Open Source Computer Vision Library | ||
| // | ||
| // Copyright (C) 2019, Intel Corporation, all rights reserved. |
There was a problem hiding this comment.
Please use short license header: https://github.com/opencv/opencv/wiki/Coding_Style_Guide#file-structure
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
// Copyright (C) 2019, Intel Corporation, all rights reserved.
Merge with extra: opencv/opencv_extra#567
Implementing AVX512 support using universal intrinsics for the cv::integral method when operating on 3 channel and the result is CV_64F.
Will be following up with other channels and types in later updates.
From opencv_perf_imgproc run results: