Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
2ce47fda
O
Opencv
项目概览
Greenplum
/
Opencv
10 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2ce47fda
编写于
11月 05, 2021
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #21011 from vrabaud:3.4
上级
edf533c8
ffd01076
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
26 addition
and
2 deletion
+26
-2
modules/core/include/opencv2/core/hal/intrin_avx.hpp
modules/core/include/opencv2/core/hal/intrin_avx.hpp
+13
-1
modules/core/include/opencv2/core/hal/intrin_avx512.hpp
modules/core/include/opencv2/core/hal/intrin_avx512.hpp
+13
-1
未找到文件。
modules/core/include/opencv2/core/hal/intrin_avx.hpp
浏览文件 @
2ce47fda
...
...
@@ -1390,11 +1390,21 @@ OPENCV_HAL_IMPL_AVX_CHECK_SHORT(v_int16x16)
////////// Other math /////////
/** Some frequent operations **/
#if CV_FMA3
#define OPENCV_HAL_IMPL_AVX_MULADD(_Tpvec, suffix) \
inline _Tpvec v_fma(const _Tpvec& a, const _Tpvec& b, const _Tpvec& c) \
{ return _Tpvec(_mm256_fmadd_##suffix(a.val, b.val, c.val)); } \
inline _Tpvec v_muladd(const _Tpvec& a, const _Tpvec& b, const _Tpvec& c) \
{ return _Tpvec(_mm256_fmadd_##suffix(a.val, b.val, c.val)); } \
{ return _Tpvec(_mm256_fmadd_##suffix(a.val, b.val, c.val)); }
#else
#define OPENCV_HAL_IMPL_AVX_MULADD(_Tpvec, suffix) \
inline _Tpvec v_fma(const _Tpvec& a, const _Tpvec& b, const _Tpvec& c) \
{ return _Tpvec(_mm256_add_##suffix(_mm256_mul_##suffix(a.val, b.val), c.val)); } \
inline _Tpvec v_muladd(const _Tpvec& a, const _Tpvec& b, const _Tpvec& c) \
{ return _Tpvec(_mm256_add_##suffix(_mm256_mul_##suffix(a.val, b.val), c.val)); }
#endif
#define OPENCV_HAL_IMPL_AVX_MISC(_Tpvec, suffix) \
inline _Tpvec v_sqrt(const _Tpvec& x) \
{ return _Tpvec(_mm256_sqrt_##suffix(x.val)); } \
inline _Tpvec v_sqr_magnitude(const _Tpvec& a, const _Tpvec& b) \
...
...
@@ -1404,6 +1414,8 @@ OPENCV_HAL_IMPL_AVX_CHECK_SHORT(v_int16x16)
OPENCV_HAL_IMPL_AVX_MULADD
(
v_float32x8
,
ps
)
OPENCV_HAL_IMPL_AVX_MULADD
(
v_float64x4
,
pd
)
OPENCV_HAL_IMPL_AVX_MISC
(
v_float32x8
,
ps
)
OPENCV_HAL_IMPL_AVX_MISC
(
v_float64x4
,
pd
)
inline
v_int32x8
v_fma
(
const
v_int32x8
&
a
,
const
v_int32x8
&
b
,
const
v_int32x8
&
c
)
{
...
...
modules/core/include/opencv2/core/hal/intrin_avx512.hpp
浏览文件 @
2ce47fda
...
...
@@ -1385,11 +1385,21 @@ inline v_uint64x8 v_popcount(const v_uint64x8& a) { return v_popcount(v_reinte
////////// Other math /////////
/** Some frequent operations **/
#if CV_FMA3
#define OPENCV_HAL_IMPL_AVX512_MULADD(_Tpvec, suffix) \
inline _Tpvec v_fma(const _Tpvec& a, const _Tpvec& b, const _Tpvec& c) \
{ return _Tpvec(_mm512_fmadd_##suffix(a.val, b.val, c.val)); } \
inline _Tpvec v_muladd(const _Tpvec& a, const _Tpvec& b, const _Tpvec& c) \
{ return _Tpvec(_mm512_fmadd_##suffix(a.val, b.val, c.val)); } \
{ return _Tpvec(_mm512_fmadd_##suffix(a.val, b.val, c.val)); }
#else
#define OPENCV_HAL_IMPL_AVX512_MULADD(_Tpvec, suffix) \
inline _Tpvec v_fma(const _Tpvec& a, const _Tpvec& b, const _Tpvec& c) \
{ return _Tpvec(_mm512_add_##suffix(_mm512_mul_##suffix(a.val, b.val), c.val)); } \
inline _Tpvec v_muladd(const _Tpvec& a, const _Tpvec& b, const _Tpvec& c) \
{ return _Tpvec(_mm512_add_##suffix(_mm512_mul_##suffix(a.val, b.val), c.val)); }
#endif
#define OPENCV_HAL_IMPL_AVX512_MISC(_Tpvec, suffix) \
inline _Tpvec v_sqrt(const _Tpvec& x) \
{ return _Tpvec(_mm512_sqrt_##suffix(x.val)); } \
inline _Tpvec v_sqr_magnitude(const _Tpvec& a, const _Tpvec& b) \
...
...
@@ -1399,6 +1409,8 @@ inline v_uint64x8 v_popcount(const v_uint64x8& a) { return v_popcount(v_reinte
OPENCV_HAL_IMPL_AVX512_MULADD
(
v_float32x16
,
ps
)
OPENCV_HAL_IMPL_AVX512_MULADD
(
v_float64x8
,
pd
)
OPENCV_HAL_IMPL_AVX512_MISC
(
v_float32x16
,
ps
)
OPENCV_HAL_IMPL_AVX512_MISC
(
v_float64x8
,
pd
)
inline
v_int32x16
v_fma
(
const
v_int32x16
&
a
,
const
v_int32x16
&
b
,
const
v_int32x16
&
c
)
{
return
a
*
b
+
c
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录