Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
52021866
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,发现更多精彩内容 >>
提交
52021866
编写于
1月 14, 2021
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #19050 from anton-potapov:fix_range_var_clang_warnings
上级
bbdae291
da5bfefc
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
36 addition
and
40 deletion
+36
-40
modules/gapi/CMakeLists.txt
modules/gapi/CMakeLists.txt
+0
-4
modules/gapi/src/backends/common/gcompoundkernel.cpp
modules/gapi/src/backends/common/gcompoundkernel.cpp
+1
-1
modules/gapi/src/backends/common/serialization.cpp
modules/gapi/src/backends/common/serialization.cpp
+4
-4
modules/gapi/src/backends/cpu/gcpubackend.cpp
modules/gapi/src/backends/cpu/gcpubackend.cpp
+6
-6
modules/gapi/src/backends/fluid/gfluidbackend.cpp
modules/gapi/src/backends/fluid/gfluidbackend.cpp
+7
-7
modules/gapi/src/backends/ocl/goclbackend.cpp
modules/gapi/src/backends/ocl/goclbackend.cpp
+8
-8
modules/gapi/src/compiler/gcompiler.cpp
modules/gapi/src/compiler/gcompiler.cpp
+2
-2
modules/gapi/src/compiler/gmodelbuilder.cpp
modules/gapi/src/compiler/gmodelbuilder.cpp
+2
-2
modules/gapi/src/compiler/passes/kernels.cpp
modules/gapi/src/compiler/passes/kernels.cpp
+2
-2
modules/gapi/src/compiler/passes/meta.cpp
modules/gapi/src/compiler/passes/meta.cpp
+2
-2
modules/gapi/test/gapi_gcomputation_tests.cpp
modules/gapi/test/gapi_gcomputation_tests.cpp
+1
-1
modules/gapi/test/internal/gapi_int_gmodel_builder_test.cpp
modules/gapi/test/internal/gapi_int_gmodel_builder_test.cpp
+1
-1
未找到文件。
modules/gapi/CMakeLists.txt
浏览文件 @
52021866
...
...
@@ -38,10 +38,6 @@ if(MSVC)
endif
()
endif
()
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
# don't add Clang here: issue should be investigated and fixed (workaround for Apple only)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wrange-loop-analysis
)
# https://github.com/opencv/opencv/issues/18928
endif
()
file
(
GLOB gapi_ext_hdrs
"
${
CMAKE_CURRENT_LIST_DIR
}
/include/opencv2/*.hpp"
"
${
CMAKE_CURRENT_LIST_DIR
}
/include/opencv2/
${
name
}
/*.hpp"
...
...
modules/gapi/src/backends/common/gcompoundkernel.cpp
浏览文件 @
52021866
...
...
@@ -16,7 +16,7 @@
cv
::
detail
::
GCompoundContext
::
GCompoundContext
(
const
cv
::
GArgs
&
in_args
)
{
m_args
.
resize
(
in_args
.
size
());
for
(
const
auto
&
it
:
ade
::
util
::
indexed
(
in_args
))
for
(
const
auto
it
:
ade
::
util
::
indexed
(
in_args
))
{
const
auto
&
i
=
ade
::
util
::
index
(
it
);
const
auto
&
in_arg
=
ade
::
util
::
value
(
it
);
...
...
modules/gapi/src/backends/common/serialization.cpp
浏览文件 @
52021866
...
...
@@ -71,7 +71,7 @@ void linkNodes(ade::Graph& g) {
for
(
const
auto
&
nh
:
g
.
nodes
())
{
if
(
gm
.
metadata
(
nh
).
get
<
cv
::
gimpl
::
NodeType
>
().
t
==
cv
::
gimpl
::
NodeType
::
OP
)
{
const
auto
&
op
=
gm
.
metadata
(
nh
).
get
<
gimpl
::
Op
>
();
for
(
const
auto
&
in
:
ade
::
util
::
indexed
(
op
.
args
))
{
for
(
const
auto
in
:
ade
::
util
::
indexed
(
op
.
args
))
{
const
auto
&
arg
=
ade
::
util
::
value
(
in
);
if
(
arg
.
kind
==
cv
::
detail
::
ArgKind
::
GOBJREF
)
{
const
auto
idx
=
ade
::
util
::
index
(
in
);
...
...
@@ -82,9 +82,9 @@ void linkNodes(ade::Graph& g) {
}
}
for
(
const
auto
&
out
:
ade
::
util
::
indexed
(
op
.
outs
))
{
for
(
const
auto
out
:
ade
::
util
::
indexed
(
op
.
outs
))
{
const
auto
idx
=
ade
::
util
::
index
(
out
);
const
auto
rc
=
ade
::
util
::
value
(
out
);
const
auto
&
rc
=
ade
::
util
::
value
(
out
);
const
auto
&
out_nh
=
dataNodes
.
at
(
rc
);
const
auto
&
out_eh
=
g
.
link
(
nh
,
out_nh
);
gm
.
metadata
(
out_eh
).
set
(
cv
::
gimpl
::
Output
{
idx
});
...
...
modules/gapi/src/backends/cpu/gcpubackend.cpp
浏览文件 @
52021866
...
...
@@ -237,11 +237,11 @@ void cv::gimpl::GCPUExecutable::run(std::vector<InObj> &&input_objs,
// - Output parameters.
// FIXME: pre-allocate internal Mats, etc, according to the known meta
for
(
const
auto
&
out_it
:
ade
::
util
::
indexed
(
op
.
outs
))
for
(
const
auto
out_it
:
ade
::
util
::
indexed
(
op
.
outs
))
{
// FIXME: Can the same GArg type resolution mechanism be reused here?
const
auto
out_port
=
ade
::
util
::
index
(
out_it
);
const
auto
out_desc
=
ade
::
util
::
value
(
out_it
);
const
auto
&
out_desc
=
ade
::
util
::
value
(
out_it
);
context
.
m_results
[
out_port
]
=
magazine
::
getObjPtr
(
m_res
,
out_desc
);
}
...
...
@@ -259,10 +259,10 @@ void cv::gimpl::GCPUExecutable::run(std::vector<InObj> &&input_objs,
//FIXME: unify with cv::detail::ensure_out_mats_not_reallocated
//FIXME: when it's done, remove can_describe(const GMetaArg&, const GRunArgP&)
//and descr_of(const cv::GRunArgP &argp)
for
(
const
auto
&
out_it
:
ade
::
util
::
indexed
(
op_info
.
expected_out_metas
))
for
(
const
auto
out_it
:
ade
::
util
::
indexed
(
op_info
.
expected_out_metas
))
{
const
auto
out_index
=
ade
::
util
::
index
(
out_it
);
const
auto
expected_meta
=
ade
::
util
::
value
(
out_it
);
const
auto
&
expected_meta
=
ade
::
util
::
value
(
out_it
);
if
(
!
can_describe
(
expected_meta
,
context
.
m_results
[
out_index
]))
{
...
...
modules/gapi/src/backends/fluid/gfluidbackend.cpp
浏览文件 @
52021866
...
...
@@ -232,7 +232,7 @@ void cv::gimpl::FluidAgent::reset()
{
m_producedLines
=
0
;
for
(
const
auto
&
it
:
ade
::
util
::
indexed
(
in_views
))
for
(
const
auto
it
:
ade
::
util
::
indexed
(
in_views
))
{
auto
&
v
=
ade
::
util
::
value
(
it
);
if
(
v
)
...
...
@@ -505,7 +505,7 @@ void cv::gimpl::FluidAgent::doWork()
k
.
m_f
(
in_args
,
out_buffers
);
for
(
const
auto
&
it
:
ade
::
util
::
indexed
(
in_views
))
for
(
const
auto
it
:
ade
::
util
::
indexed
(
in_views
))
{
auto
&
in_view
=
ade
::
util
::
value
(
it
);
...
...
@@ -517,7 +517,7 @@ void cv::gimpl::FluidAgent::doWork()
};
}
for
(
auto
out_buf
:
out_buffers
)
for
(
auto
*
out_buf
:
out_buffers
)
{
out_buf
->
priv
().
writeDone
();
// FIXME WARNING: Scratch buffers rotated here too!
...
...
@@ -571,10 +571,10 @@ void cv::gimpl::GFluidExecutable::initBufferRois(std::vector<int>& readStarts,
}
// First, initialize rois for output nodes, add them to traversal stack
for
(
const
auto
&
it
:
ade
::
util
::
indexed
(
proto
.
out_nhs
))
for
(
const
auto
it
:
ade
::
util
::
indexed
(
proto
.
out_nhs
))
{
const
auto
idx
=
ade
::
util
::
index
(
it
);
const
auto
nh
=
ade
::
util
::
value
(
it
);
const
auto
&
nh
=
ade
::
util
::
value
(
it
);
const
auto
&
d
=
m_gm
.
metadata
(
nh
).
get
<
Data
>
();
...
...
@@ -927,7 +927,7 @@ std::size_t cv::gimpl::GFluidExecutable::total_buffers_size() const
{
GConstFluidModel
fg
(
m_g
);
std
::
size_t
total_size
=
0
;
for
(
const
auto
&
i
:
ade
::
util
::
indexed
(
m_buffers
))
for
(
const
auto
i
:
ade
::
util
::
indexed
(
m_buffers
))
{
// Check that all internal and scratch buffers are allocated
const
auto
idx
=
ade
::
util
::
index
(
i
);
...
...
@@ -1310,7 +1310,7 @@ void cv::gimpl::GFluidExecutable::run(std::vector<InObj> &input_objs,
agent
->
reset
();
// Pass input cv::Scalar's to agent argument
const
auto
&
op
=
m_gm
.
metadata
(
agent
->
op_handle
).
get
<
Op
>
();
for
(
const
auto
&
it
:
ade
::
util
::
indexed
(
op
.
args
))
for
(
const
auto
it
:
ade
::
util
::
indexed
(
op
.
args
))
{
const
auto
&
arg
=
ade
::
util
::
value
(
it
);
packArg
(
agent
->
in_args
[
ade
::
util
::
index
(
it
)],
arg
);
...
...
modules/gapi/src/backends/ocl/goclbackend.cpp
浏览文件 @
52021866
...
...
@@ -231,21 +231,21 @@ void cv::gimpl::GOCLExecutable::run(std::vector<InObj> &&input_objs,
// - Output parameters.
// FIXME: pre-allocate internal Mats, etc, according to the known meta
for
(
const
auto
&
out_it
:
ade
::
util
::
indexed
(
op
.
outs
))
for
(
const
auto
out_it
:
ade
::
util
::
indexed
(
op
.
outs
))
{
// FIXME: Can the same GArg type resolution mechanism be reused here?
const
auto
out_port
=
ade
::
util
::
index
(
out_it
);
const
auto
out_desc
=
ade
::
util
::
value
(
out_it
);
const
auto
&
out_desc
=
ade
::
util
::
value
(
out_it
);
context
.
m_results
[
out_port
]
=
magazine
::
getObjPtr
(
m_res
,
out_desc
,
true
);
}
// Now trigger the executable unit
k
.
apply
(
context
);
for
(
const
auto
&
out_it
:
ade
::
util
::
indexed
(
op_info
.
expected_out_metas
))
for
(
const
auto
out_it
:
ade
::
util
::
indexed
(
op_info
.
expected_out_metas
))
{
const
auto
out_index
=
ade
::
util
::
index
(
out_it
);
const
auto
expected_meta
=
ade
::
util
::
value
(
out_it
);
const
auto
&
expected_meta
=
ade
::
util
::
value
(
out_it
);
if
(
!
can_describe
(
expected_meta
,
context
.
m_results
[
out_index
]))
{
...
...
@@ -262,7 +262,7 @@ void cv::gimpl::GOCLExecutable::run(std::vector<InObj> &&input_objs,
for
(
auto
&
it
:
output_objs
)
{
auto
&
rc
=
it
.
first
;
const
auto
&
rc
=
it
.
first
;
auto
&
g_arg
=
it
.
second
;
magazine
::
writeBack
(
m_res
,
rc
,
g_arg
);
if
(
rc
.
shape
==
GShape
::
GMAT
)
...
...
modules/gapi/src/compiler/gcompiler.cpp
浏览文件 @
52021866
...
...
@@ -343,7 +343,7 @@ void cv::gimpl::GCompiler::validateInputMeta()
return
false
;
// should never happen
};
for
(
const
auto
&
meta_arg_idx
:
ade
::
util
::
indexed
(
ade
::
util
::
zip
(
m_metas
,
c_expr
.
m_ins
)))
for
(
const
auto
meta_arg_idx
:
ade
::
util
::
indexed
(
ade
::
util
::
zip
(
m_metas
,
c_expr
.
m_ins
)))
{
const
auto
&
meta
=
std
::
get
<
0
>
(
ade
::
util
::
value
(
meta_arg_idx
));
const
auto
&
proto
=
std
::
get
<
1
>
(
ade
::
util
::
value
(
meta_arg_idx
));
...
...
@@ -370,7 +370,7 @@ void cv::gimpl::GCompiler::validateOutProtoArgs()
return
;
}
const
auto
&
c_expr
=
util
::
get
<
cv
::
GComputation
::
Priv
::
Expr
>
(
m_c
.
priv
().
m_shape
);
for
(
const
auto
&
out_pos
:
ade
::
util
::
indexed
(
c_expr
.
m_outs
))
for
(
const
auto
out_pos
:
ade
::
util
::
indexed
(
c_expr
.
m_outs
))
{
const
auto
&
node
=
proto
::
origin_of
(
ade
::
util
::
value
(
out_pos
)).
node
;
if
(
node
.
shape
()
!=
cv
::
GNode
::
NodeShape
::
CALL
)
...
...
modules/gapi/src/compiler/gmodelbuilder.cpp
浏览文件 @
52021866
...
...
@@ -135,7 +135,7 @@ cv::gimpl::Unrolled cv::gimpl::unrollExpr(const GProtoArgs &ins,
// Put the outputs object description of the node
// so that they are not lost if they are not consumed by other operations
GAPI_Assert
(
call_p
.
m_k
.
outCtors
.
size
()
==
call_p
.
m_k
.
outShapes
.
size
());
for
(
const
auto
&
it
:
ade
::
util
::
indexed
(
call_p
.
m_k
.
outShapes
))
for
(
const
auto
it
:
ade
::
util
::
indexed
(
call_p
.
m_k
.
outShapes
))
{
std
::
size_t
port
=
ade
::
util
::
index
(
it
);
GShape
shape
=
ade
::
util
::
value
(
it
);
...
...
@@ -212,7 +212,7 @@ cv::gimpl::GModelBuilder::put(const GProtoArgs &ins, const GProtoArgs &outs)
const
GCall
::
Priv
&
call_p
=
call
.
priv
();
ade
::
NodeHandle
call_h
=
put_OpNode
(
op_expr_node
);
for
(
const
auto
&
it
:
ade
::
util
::
indexed
(
call_p
.
m_args
))
for
(
const
auto
it
:
ade
::
util
::
indexed
(
call_p
.
m_args
))
{
const
auto
in_port
=
ade
::
util
::
index
(
it
);
const
auto
&
in_arg
=
ade
::
util
::
value
(
it
);
...
...
modules/gapi/src/compiler/passes/kernels.cpp
浏览文件 @
52021866
...
...
@@ -94,7 +94,7 @@ namespace
// Reconnect expanded kernels from graph data objects
// to subgraph data objects, then drop that graph data objects
for
(
const
auto
&
it
:
ade
::
util
::
zip
(
in_nhs
,
sorted_in_nhs
))
for
(
const
auto
it
:
ade
::
util
::
zip
(
in_nhs
,
sorted_in_nhs
))
{
const
auto
&
subgr_in_nh
=
std
::
get
<
0
>
(
it
);
const
auto
&
comp_in_nh
=
std
::
get
<
1
>
(
it
);
...
...
@@ -105,7 +105,7 @@ namespace
gr
.
erase
(
nh
);
for
(
const
auto
&
it
:
ade
::
util
::
zip
(
out_nhs
,
sorted_out_nhs
))
for
(
const
auto
it
:
ade
::
util
::
zip
(
out_nhs
,
sorted_out_nhs
))
{
const
auto
&
subgr_out_nh
=
std
::
get
<
0
>
(
it
);
const
auto
&
comp_out_nh
=
std
::
get
<
1
>
(
it
);
...
...
modules/gapi/src/compiler/passes/meta.cpp
浏览文件 @
52021866
...
...
@@ -24,7 +24,7 @@ void cv::gimpl::passes::initMeta(ade::passes::PassContext &ctx, const GMetaArgs
const
auto
&
proto
=
gr
.
metadata
().
get
<
Protocol
>
();
for
(
const
auto
&
it
:
ade
::
util
::
indexed
(
proto
.
in_nhs
))
for
(
const
auto
it
:
ade
::
util
::
indexed
(
proto
.
in_nhs
))
{
auto
&
data
=
gr
.
metadata
(
ade
::
util
::
value
(
it
)).
get
<
Data
>
();
data
.
meta
=
metas
.
at
(
ade
::
util
::
index
(
it
));
...
...
@@ -125,7 +125,7 @@ void cv::gimpl::passes::storeResultingMeta(ade::passes::PassContext &ctx)
const
auto
&
proto
=
gr
.
metadata
().
get
<
Protocol
>
();
GMetaArgs
output_metas
(
proto
.
out_nhs
.
size
());
for
(
const
auto
&
it
:
ade
::
util
::
indexed
(
proto
.
out_nhs
))
for
(
const
auto
it
:
ade
::
util
::
indexed
(
proto
.
out_nhs
))
{
auto
&
data
=
gr
.
metadata
(
ade
::
util
::
value
(
it
)).
get
<
Data
>
();
output_metas
[
ade
::
util
::
index
(
it
)]
=
data
.
meta
;
...
...
modules/gapi/test/gapi_gcomputation_tests.cpp
浏览文件 @
52021866
...
...
@@ -81,7 +81,7 @@ namespace opencv_test
void
check
(
const
std
::
vector
<
cv
::
Mat
>&
out_mats
)
{
for
(
const
auto
&
it
:
ade
::
util
::
zip
(
ref_mats
,
out_mats
))
for
(
const
auto
it
:
ade
::
util
::
zip
(
ref_mats
,
out_mats
))
{
const
auto
&
ref_mat
=
std
::
get
<
0
>
(
it
);
const
auto
&
out_mat
=
std
::
get
<
1
>
(
it
);
...
...
modules/gapi/test/internal/gapi_int_gmodel_builder_test.cpp
浏览文件 @
52021866
...
...
@@ -213,7 +213,7 @@ TEST(GModelBuilder, Check_Multiple_Outputs)
EXPECT_EQ
(
0u
,
gm
.
metadata
(
p
.
out_nhs
[
1
]
->
inEdges
().
front
()).
get
<
cv
::
gimpl
::
Output
>
().
port
);
EXPECT_EQ
(
1u
,
gm
.
metadata
(
p
.
out_nhs
[
2
]
->
inEdges
().
front
()).
get
<
cv
::
gimpl
::
Output
>
().
port
);
EXPECT_EQ
(
0u
,
gm
.
metadata
(
p
.
out_nhs
[
3
]
->
inEdges
().
front
()).
get
<
cv
::
gimpl
::
Output
>
().
port
);
for
(
const
auto
&
it
:
ade
::
util
::
indexed
(
p
.
out_nhs
))
for
(
const
auto
it
:
ade
::
util
::
indexed
(
p
.
out_nhs
))
{
const
auto
&
out_nh
=
ade
::
util
::
value
(
it
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录