提交 e5d7f446 编写于 作者: V Vitaly Tuzov 提交者: Alexander Alekhin

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
上级 c72b6b3b
......@@ -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,
......
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册