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
a6f56554
"docker/git@developer.sourcefind.cn:wangsen/mineru.git" did not exist on "c7a609fa7a7807e6ee0fa2d11ce5909893888890"
Commit
a6f56554
authored
Apr 30, 2019
by
Khalique
Browse files
formatting
parent
f26d3d2d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
src/include/migraphx/op/clip.hpp
src/include/migraphx/op/clip.hpp
+3
-3
src/targets/cpu/lowering.cpp
src/targets/cpu/lowering.cpp
+3
-2
No files found.
src/include/migraphx/op/clip.hpp
View file @
a6f56554
...
@@ -18,7 +18,6 @@ namespace migraphx {
...
@@ -18,7 +18,6 @@ namespace migraphx {
inline
namespace
MIGRAPHX_INLINE_NS
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
op
{
namespace
op
{
struct
clip
:
unary
<
clip
>
struct
clip
:
unary
<
clip
>
{
{
float
max_val
=
std
::
numeric_limits
<
float
>::
max
();
float
max_val
=
std
::
numeric_limits
<
float
>::
max
();
...
@@ -30,9 +29,10 @@ struct clip : unary<clip>
...
@@ -30,9 +29,10 @@ struct clip : unary<clip>
{
{
auto
&
max
=
max_val
;
auto
&
max
=
max_val
;
auto
&
min
=
min_val
;
auto
&
min
=
min_val
;
return
[
max
,
min
](
auto
x
)
{
return
[
max
,
min
](
auto
x
)
{
using
type
=
decltype
(
x
);
using
type
=
decltype
(
x
);
return
std
::
min
(
std
::
max
(
type
(
min
),
x
),
type
(
max
));
};
return
std
::
min
(
std
::
max
(
type
(
min
),
x
),
type
(
max
));
};
}
}
template
<
class
Self
,
class
F
>
template
<
class
Self
,
class
F
>
...
...
src/targets/cpu/lowering.cpp
View file @
a6f56554
...
@@ -148,9 +148,10 @@ struct clip_op
...
@@ -148,9 +148,10 @@ struct clip_op
{
{
auto
&
max
=
op
.
max_val
;
auto
&
max
=
op
.
max_val
;
auto
&
min
=
op
.
min_val
;
auto
&
min
=
op
.
min_val
;
return
[
max
,
min
](
auto
x
)
{
return
[
max
,
min
](
auto
x
)
{
using
type
=
decltype
(
x
);
using
type
=
decltype
(
x
);
return
std
::
min
(
std
::
max
(
type
(
min
),
x
),
type
(
max
));
};
return
std
::
min
(
std
::
max
(
type
(
min
),
x
),
type
(
max
));
};
}
}
};
};
...
...
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