Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
9238316c
O
Opencv
项目概览
Greenplum
/
Opencv
大约 1 年 前同步成功
通知
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,发现更多精彩内容 >>
提交
9238316c
编写于
1月 25, 2022
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #21441 from alexgiving:atrutnev/split3_simd_fluid
上级
266835cd
5e89b9a4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
43 addition
and
16 deletion
+43
-16
modules/gapi/src/backends/fluid/gfluidcore.cpp
modules/gapi/src/backends/fluid/gfluidcore.cpp
+8
-16
modules/gapi/src/backends/fluid/gfluidcore_func.dispatch.cpp
modules/gapi/src/backends/fluid/gfluidcore_func.dispatch.cpp
+7
-0
modules/gapi/src/backends/fluid/gfluidcore_func.hpp
modules/gapi/src/backends/fluid/gfluidcore_func.hpp
+3
-0
modules/gapi/src/backends/fluid/gfluidcore_func.simd.hpp
modules/gapi/src/backends/fluid/gfluidcore_func.simd.hpp
+25
-0
未找到文件。
modules/gapi/src/backends/fluid/gfluidcore.cpp
浏览文件 @
9238316c
...
...
@@ -2509,26 +2509,18 @@ GAPI_FLUID_KERNEL(GFluidSplit3, cv::gapi::core::GSplit3, false)
static
void
run
(
const
View
&
src
,
Buffer
&
dst1
,
Buffer
&
dst2
,
Buffer
&
dst3
)
{
const
auto
*
in
=
src
.
InLine
<
uchar
>
(
0
);
auto
*
out1
=
dst1
.
OutLine
<
uchar
>
();
auto
*
out2
=
dst2
.
OutLine
<
uchar
>
();
auto
*
out3
=
dst3
.
OutLine
<
uchar
>
();
const
auto
*
in
=
src
.
InLine
<
uchar
>
(
0
);
auto
*
out1
=
dst1
.
OutLine
<
uchar
>
();
auto
*
out2
=
dst2
.
OutLine
<
uchar
>
();
auto
*
out3
=
dst3
.
OutLine
<
uchar
>
();
GAPI_Assert
(
3
==
src
.
meta
().
chan
);
int
width
=
src
.
length
();
int
w
=
0
;
int
w
=
0
;
// cycle counter
#if CV_SIMD128
for
(;
w
<=
width
-
16
;
w
+=
16
)
{
v_uint8x16
a
,
b
,
c
;
v_load_deinterleave
(
&
in
[
3
*
w
],
a
,
b
,
c
);
v_store
(
&
out1
[
w
],
a
);
v_store
(
&
out2
[
w
],
b
);
v_store
(
&
out3
[
w
],
c
);
}
#endif
#if CV_SIMD
w
=
split3_simd
(
in
,
out1
,
out2
,
out3
,
width
);
#endif
for
(;
w
<
width
;
w
++
)
{
...
...
modules/gapi/src/backends/fluid/gfluidcore_func.dispatch.cpp
浏览文件 @
9238316c
...
...
@@ -207,6 +207,13 @@ ABSDIFFC_SIMD(float)
#undef ABSDIFFC_SIMD
int
split3_simd
(
const
uchar
in
[],
uchar
out1
[],
uchar
out2
[],
uchar
out3
[],
const
int
width
)
{
CV_CPU_DISPATCH
(
split3_simd
,
(
in
,
out1
,
out2
,
out3
,
width
),
CV_CPU_DISPATCH_MODES_ALL
);
}
}
// namespace fluid
}
// namespace gapi
}
// namespace cv
...
...
modules/gapi/src/backends/fluid/gfluidcore_func.hpp
浏览文件 @
9238316c
...
...
@@ -163,6 +163,9 @@ ABSDIFFC_SIMD(float)
#undef ABSDIFFC_SIMD
int
split3_simd
(
const
uchar
in
[],
uchar
out1
[],
uchar
out2
[],
uchar
out3
[],
const
int
width
);
}
// namespace fluid
}
// namespace gapi
}
// namespace cv
...
...
modules/gapi/src/backends/fluid/gfluidcore_func.simd.hpp
浏览文件 @
9238316c
...
...
@@ -184,6 +184,9 @@ ABSDIFFC_SIMD(float)
#undef ABSDIFFC_SIMD
int
split3_simd
(
const
uchar
in
[],
uchar
out1
[],
uchar
out2
[],
uchar
out3
[],
const
int
width
);
#ifndef CV_CPU_OPTIMIZATION_DECLARATIONS_ONLY
struct
scale_tag
{};
...
...
@@ -1568,6 +1571,28 @@ ABSDIFFC_SIMD(float)
#undef ABSDIFFC_SIMD
//-------------------------
//
// Fluid kernels: Split3
//
//-------------------------
int
split3_simd
(
const
uchar
in
[],
uchar
out1
[],
uchar
out2
[],
uchar
out3
[],
const
int
width
)
{
constexpr
int
nlanes
=
v_uint8
::
nlanes
;
int
x
=
0
;
for
(;
x
<=
width
-
nlanes
;
x
+=
nlanes
)
{
v_uint8
a
,
b
,
c
;
v_load_deinterleave
(
&
in
[
3
*
x
],
a
,
b
,
c
);
vx_store
(
&
out1
[
x
],
a
);
vx_store
(
&
out2
[
x
],
b
);
vx_store
(
&
out3
[
x
],
c
);
}
return
x
;
}
#endif // CV_CPU_OPTIMIZATION_DECLARATIONS_ONLY
CV_CPU_OPTIMIZATION_NAMESPACE_END
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录