Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
684a64bd
Commit
684a64bd
authored
Sep 25, 2018
by
Scott Thornton
Browse files
Fixed some clang-tidy stuff
parent
5dfeb457
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/include/migraph/operators.hpp
src/include/migraph/operators.hpp
+8
-8
No files found.
src/include/migraph/operators.hpp
View file @
684a64bd
...
...
@@ -291,10 +291,10 @@ struct slice
auto
fix_index
(
const
std
::
vector
<
std
::
size_t
>&
lens
,
std
::
size_t
axis
,
int64_t
index
)
const
{
std
::
size
_t
r
=
std
::
min
(
index
,
static_cast
<
int64_t
>
(
lens
[
axis
]));
int64
_t
r
=
std
::
min
(
index
,
static_cast
<
int64_t
>
(
lens
[
axis
]));
if
(
r
<
0
)
r
+=
lens
[
axis
];
return
r
;
return
std
::
size_t
(
r
)
;
}
auto
compute_offset
(
const
shape
&
s
)
const
...
...
@@ -302,7 +302,7 @@ struct slice
const
std
::
vector
<
std
::
size_t
>&
lens
=
s
.
lens
();
const
std
::
vector
<
std
::
size_t
>&
strides
=
s
.
strides
();
auto
offset
=
0
;
if
(
axes
.
size
()
>
0
)
if
(
!
axes
.
empty
()
)
{
for
(
std
::
size_t
i
=
0
;
i
<
axes
.
size
();
i
++
)
{
...
...
@@ -324,8 +324,8 @@ struct slice
{
auto
input_shape
=
inputs
[
0
];
auto
t
=
input_shape
.
type
();
auto
old_lens
=
input_shape
.
lens
();
auto
old_strides
=
input_shape
.
strides
();
const
auto
&
old_lens
=
input_shape
.
lens
();
const
auto
&
old_strides
=
input_shape
.
strides
();
// std::vector<int64_t> t_axes(old_lens.size());
// if(axes.size() == 0)
// {
...
...
@@ -373,7 +373,7 @@ struct squeeze
}
}
std
::
vector
<
std
::
size_t
>
new_lens
;
if
(
axes
.
size
()
==
0
)
if
(
axes
.
empty
()
)
{
for
(
std
::
size_t
i
=
0
;
i
<
old_lens
.
size
();
i
++
)
{
...
...
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