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
Commit
a6f56554
authored
Apr 30, 2019
by
Khalique
Browse files
formatting
parent
f26d3d2d
Changes
2
Show 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
();
...
@@ -32,7 +31,8 @@ struct clip : unary<clip>
...
@@ -32,7 +31,8 @@ struct clip : unary<clip>
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
...
@@ -150,7 +150,8 @@ struct clip_op
...
@@ -150,7 +150,8 @@ struct clip_op
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