Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
66ce838c
Unverified
Commit
66ce838c
authored
Nov 13, 2019
by
Scott Cyphers
Committed by
GitHub
Nov 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Klockwork issues: (#3883)
Comparing size_t >= 0 |= for bools
parent
e5bc0854
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
8 deletions
+12
-8
gather.cpp
src/ngraph/op/gather.cpp
+1
-1
pad.cpp
src/ngraph/op/pad.cpp
+2
-4
softmax.cpp
src/ngraph/op/softmax.cpp
+1
-1
util.cpp
test/util.cpp
+8
-2
No files found.
src/ngraph/op/gather.cpp
View file @
66ce838c
...
@@ -134,7 +134,7 @@ void op::v1::Gather::validate_and_infer_types()
...
@@ -134,7 +134,7 @@ void op::v1::Gather::validate_and_infer_types()
if
(
input_rank
.
is_static
()
&&
axis
!=
AXIS_NOT_SET_VALUE
)
if
(
input_rank
.
is_static
()
&&
axis
!=
AXIS_NOT_SET_VALUE
)
{
{
NODE_VALIDATION_CHECK
(
this
,
NODE_VALIDATION_CHECK
(
this
,
axis
>=
0
&&
axis
<
static_cast
<
size_t
>
(
input_rank
),
axis
<
static_cast
<
size_t
>
(
input_rank
),
"The axis must => 0 and <= input_rank (axis: "
,
"The axis must => 0 and <= input_rank (axis: "
,
axis
,
axis
,
")."
);
")."
);
...
...
src/ngraph/op/pad.cpp
View file @
66ce838c
...
@@ -286,8 +286,7 @@ void op::v1::Pad::validate_and_infer_types()
...
@@ -286,8 +286,7 @@ void op::v1::Pad::validate_and_infer_types()
{
{
NODE_VALIDATION_CHECK
(
NODE_VALIDATION_CHECK
(
this
,
this
,
static_cast
<
size_t
>
(
pads_begin_shape
[
0
])
>=
0
&&
static_cast
<
size_t
>
(
pads_begin_shape
[
0
])
<=
static_cast
<
size_t
>
(
arg_shape_rank
),
static_cast
<
size_t
>
(
pads_begin_shape
[
0
])
<=
static_cast
<
size_t
>
(
arg_shape_rank
),
"Number of elements of pads_begin must be >= 0 and <= arg rank (pads_begin_shape[0]: "
,
"Number of elements of pads_begin must be >= 0 and <= arg rank (pads_begin_shape[0]: "
,
pads_begin_shape
[
0
],
pads_begin_shape
[
0
],
")."
);
")."
);
...
@@ -296,8 +295,7 @@ void op::v1::Pad::validate_and_infer_types()
...
@@ -296,8 +295,7 @@ void op::v1::Pad::validate_and_infer_types()
{
{
NODE_VALIDATION_CHECK
(
NODE_VALIDATION_CHECK
(
this
,
this
,
static_cast
<
size_t
>
(
pads_end_shape
[
0
])
>=
0
&&
static_cast
<
size_t
>
(
pads_end_shape
[
0
])
<=
static_cast
<
size_t
>
(
arg_shape_rank
),
static_cast
<
size_t
>
(
pads_end_shape
[
0
])
<=
static_cast
<
size_t
>
(
arg_shape_rank
),
"Number of elements of pads_end must be >= 0 and <= arg rank (pads_end_shape[0]: "
,
"Number of elements of pads_end must be >= 0 and <= arg rank (pads_end_shape[0]: "
,
pads_end_shape
[
0
],
pads_end_shape
[
0
],
")."
);
")."
);
...
...
src/ngraph/op/softmax.cpp
View file @
66ce838c
...
@@ -96,7 +96,7 @@ void op::v0::Softmax::validate_and_infer_types()
...
@@ -96,7 +96,7 @@ void op::v0::Softmax::validate_and_infer_types()
for
(
auto
axis
:
m_axes
)
for
(
auto
axis
:
m_axes
)
{
{
NODE_VALIDATION_CHECK
(
this
,
NODE_VALIDATION_CHECK
(
this
,
axis
>=
0
&&
axis
<
static_cast
<
size_t
>
(
input_shape
.
rank
()),
axis
<
static_cast
<
size_t
>
(
input_shape
.
rank
()),
"Reduction axis ("
,
"Reduction axis ("
,
axis
,
axis
,
") is out of bounds (argument shape: "
,
") is out of bounds (argument shape: "
,
...
...
test/util.cpp
View file @
66ce838c
...
@@ -678,8 +678,14 @@ TEST(util, clone_function_op_annotations)
...
@@ -678,8 +678,14 @@ TEST(util, clone_function_op_annotations)
{
{
if
(
auto
op_annotation
=
parameter
->
get_op_annotations
())
if
(
auto
op_annotation
=
parameter
->
get_op_annotations
())
{
{
found_A
|=
op_annotation
->
is_cacheable
();
if
(
op_annotation
->
is_cacheable
())
found_B
|=
!
op_annotation
->
is_cacheable
();
{
found_A
=
true
;
}
else
{
found_B
=
true
;
}
}
}
}
}
EXPECT_TRUE
(
found_A
);
EXPECT_TRUE
(
found_A
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment