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
225c2d64
Commit
225c2d64
authored
Aug 21, 2018
by
Paul
Browse files
Formatting
parent
24cc6ea8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
src/generate.cpp
src/generate.cpp
+1
-3
src/include/migraph/generate.hpp
src/include/migraph/generate.hpp
+3
-3
src/include/migraph/literal.hpp
src/include/migraph/literal.hpp
+1
-1
No files found.
src/generate.cpp
View file @
225c2d64
...
@@ -27,9 +27,7 @@ literal generate_literal(shape s, unsigned long seed)
...
@@ -27,9 +27,7 @@ literal generate_literal(shape s, unsigned long seed)
// TODO: Move to literal.cpp
// TODO: Move to literal.cpp
literal
abs
(
literal
l
)
literal
abs
(
literal
l
)
{
{
return
transform
(
l
,
[](
auto
x
)
{
return
transform
(
l
,
[](
auto
x
)
{
return
std
::
fabs
(
x
);
});
return
std
::
fabs
(
x
);
});
}
}
}
// namespace migraph
}
// namespace migraph
src/include/migraph/generate.hpp
View file @
225c2d64
...
@@ -34,9 +34,9 @@ template <class T>
...
@@ -34,9 +34,9 @@ template <class T>
struct
xorshf96_generator
struct
xorshf96_generator
{
{
unsigned
long
seed
=
0
;
unsigned
long
seed
=
0
;
unsigned
long
x
=
123456789
;
unsigned
long
x
=
123456789
;
unsigned
long
y
=
362436069
;
unsigned
long
y
=
362436069
;
unsigned
long
z
=
521288629
^
seed
;
unsigned
long
z
=
521288629
^
seed
;
constexpr
T
operator
()()
noexcept
constexpr
T
operator
()()
noexcept
{
{
...
...
src/include/migraph/literal.hpp
View file @
225c2d64
...
@@ -94,7 +94,7 @@ struct literal : raw_data<literal>
...
@@ -94,7 +94,7 @@ struct literal : raw_data<literal>
}
}
};
};
template
<
class
F
>
template
<
class
F
>
literal
transform
(
literal
l
,
F
f
)
literal
transform
(
literal
l
,
F
f
)
{
{
literal
result
;
literal
result
;
...
...
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