Merge pull request #13056 from terfendail:box_wintr
* Updated boxFilter implementations to use wide universal intrinsics * boxFilter implementation moved to separate file * Replaced ROUNDUP macro with roundUp() function
This commit is contained in:
committed by
Alexander Alekhin
parent
c72b6b3be8
commit
e5d7f446d6
@@ -517,6 +517,23 @@ static inline size_t divUp(size_t a, unsigned int b)
|
||||
return (a + b - 1) / b;
|
||||
}
|
||||
|
||||
/** @brief Round first value up to the nearest multiple of second value.
|
||||
|
||||
Use this function instead of `ceil((float)a / b) * b` expressions.
|
||||
|
||||
@sa divUp
|
||||
*/
|
||||
static inline int roundUp(int a, unsigned int b)
|
||||
{
|
||||
CV_DbgAssert(a >= 0);
|
||||
return a + b - 1 - (a + b -1) % b;
|
||||
}
|
||||
/** @overload */
|
||||
static inline size_t roundUp(size_t a, unsigned int b)
|
||||
{
|
||||
return a + b - 1 - (a + b - 1) % b;
|
||||
}
|
||||
|
||||
/** @brief Enables or disables the optimized code.
|
||||
|
||||
The function can be used to dynamically turn on and off optimized dispatched code (code that uses SSE4.2, AVX/AVX2,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user