Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenCV
opencv
提交
b5fcb06a
O
opencv
项目概览
OpenCV
/
opencv
上一次同步 大约 1 年
通知
1005
Star
71102
Fork
55580
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b5fcb06a
编写于
10月 18, 2021
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
core(SIMD): update int64 SSE constructor
上级
bd0732b1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
0 deletion
+29
-0
modules/core/include/opencv2/core/hal/intrin_sse.hpp
modules/core/include/opencv2/core/hal/intrin_sse.hpp
+12
-0
modules/core/test/test_intrin_utils.hpp
modules/core/test/test_intrin_utils.hpp
+17
-0
未找到文件。
modules/core/include/opencv2/core/hal/intrin_sse.hpp
浏览文件 @
b5fcb06a
...
...
@@ -244,7 +244,13 @@ struct v_uint64x2
explicit
v_uint64x2
(
__m128i
v
)
:
val
(
v
)
{}
v_uint64x2
(
uint64
v0
,
uint64
v1
)
{
#if defined(_MSC_VER) && _MSC_VER >= 1920
/*MSVS 2019*/
&& defined(_M_X64)
val
=
_mm_setr_epi64x
((
int64_t
)
v0
,
(
int64_t
)
v1
);
#elif defined(__GNUC__)
val
=
_mm_setr_epi64
((
__m64
)
v0
,
(
__m64
)
v1
);
#else
val
=
_mm_setr_epi32
((
int
)
v0
,
(
int
)(
v0
>>
32
),
(
int
)
v1
,
(
int
)(
v1
>>
32
));
#endif
}
uint64
get0
()
const
...
...
@@ -272,7 +278,13 @@ struct v_int64x2
explicit
v_int64x2
(
__m128i
v
)
:
val
(
v
)
{}
v_int64x2
(
int64
v0
,
int64
v1
)
{
#if defined(_MSC_VER) && _MSC_VER >= 1920
/*MSVS 2019*/
&& defined(_M_X64)
val
=
_mm_setr_epi64x
((
int64_t
)
v0
,
(
int64_t
)
v1
);
#elif defined(__GNUC__)
val
=
_mm_setr_epi64
((
__m64
)
v0
,
(
__m64
)
v1
);
#else
val
=
_mm_setr_epi32
((
int
)
v0
,
(
int
)(
v0
>>
32
),
(
int
)
v1
,
(
int
)(
v1
>>
32
));
#endif
}
int64
get0
()
const
...
...
modules/core/test/test_intrin_utils.hpp
浏览文件 @
b5fcb06a
...
...
@@ -373,6 +373,23 @@ template<typename R> struct TheTest
EXPECT_EQ
((
LaneType
)
12
,
vx_setall_res2_
[
i
]);
}
#if CV_SIMD_WIDTH == 16
{
uint64
a
=
CV_BIG_INT
(
0x7fffffffffffffff
);
uint64
b
=
(
uint64
)
CV_BIG_INT
(
0xcfffffffffffffff
);
v_uint64x2
uint64_vec
(
a
,
b
);
EXPECT_EQ
(
a
,
uint64_vec
.
get0
());
EXPECT_EQ
(
b
,
v_extract_n
<
1
>
(
uint64_vec
));
}
{
int64
a
=
CV_BIG_INT
(
0x7fffffffffffffff
);
int64
b
=
CV_BIG_INT
(
-
1
);
v_int64x2
int64_vec
(
a
,
b
);
EXPECT_EQ
(
a
,
int64_vec
.
get0
());
EXPECT_EQ
(
b
,
v_extract_n
<
1
>
(
int64_vec
));
}
#endif
return
*
this
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录