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
6b44f839
"vscode:/vscode.git/clone" did not exist on "62dd95870c812d87418e53229eb3fdee95c8a067"
Commit
6b44f839
authored
May 17, 2018
by
Paul
Browse files
Formatting
parent
11dfd0df
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
15 deletions
+7
-15
include/rtg/operators.hpp
include/rtg/operators.hpp
+2
-8
include/rtg/streamutils.hpp
include/rtg/streamutils.hpp
+4
-5
test/eval_test.cpp
test/eval_test.cpp
+1
-2
No files found.
include/rtg/operators.hpp
View file @
6b44f839
...
@@ -18,10 +18,7 @@ struct convolution
...
@@ -18,10 +18,7 @@ struct convolution
std
::
array
<
std
::
size_t
,
2
>
padding
=
{{
0
,
0
}};
std
::
array
<
std
::
size_t
,
2
>
padding
=
{{
0
,
0
}};
std
::
array
<
std
::
size_t
,
2
>
stride
=
{{
1
,
1
}};
std
::
array
<
std
::
size_t
,
2
>
stride
=
{{
1
,
1
}};
std
::
array
<
std
::
size_t
,
2
>
dilation
=
{{
1
,
1
}};
std
::
array
<
std
::
size_t
,
2
>
dilation
=
{{
1
,
1
}};
std
::
string
name
()
const
std
::
string
name
()
const
{
return
"convolution"
;
}
{
return
"convolution"
;
}
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
{
{
if
(
inputs
.
size
()
!=
2
)
if
(
inputs
.
size
()
!=
2
)
...
@@ -74,10 +71,7 @@ struct pooling
...
@@ -74,10 +71,7 @@ struct pooling
std
::
array
<
std
::
size_t
,
2
>
padding
=
{{
0
,
0
}};
std
::
array
<
std
::
size_t
,
2
>
padding
=
{{
0
,
0
}};
std
::
array
<
std
::
size_t
,
2
>
stride
=
{{
1
,
1
}};
std
::
array
<
std
::
size_t
,
2
>
stride
=
{{
1
,
1
}};
std
::
array
<
std
::
size_t
,
2
>
lengths
=
{{
1
,
1
}};
std
::
array
<
std
::
size_t
,
2
>
lengths
=
{{
1
,
1
}};
std
::
string
name
()
const
std
::
string
name
()
const
{
return
"pooling"
;
}
{
return
"pooling"
;
}
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
{
{
if
(
inputs
.
empty
())
if
(
inputs
.
empty
())
...
...
include/rtg/streamutils.hpp
View file @
6b44f839
...
@@ -6,13 +6,11 @@
...
@@ -6,13 +6,11 @@
namespace
rtg
{
namespace
rtg
{
template
<
class
T
>
template
<
class
T
>
struct
stream_range_container
struct
stream_range_container
{
{
const
T
*
r
;
const
T
*
r
;
stream_range_container
(
const
T
&
x
)
stream_range_container
(
const
T
&
x
)
:
r
(
&
x
)
{}
:
r
(
&
x
)
{}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
stream_range_container
&
sr
)
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
stream_range_container
&
sr
)
{
{
...
@@ -20,7 +18,8 @@ struct stream_range_container
...
@@ -20,7 +18,8 @@ struct stream_range_container
if
(
!
sr
.
r
->
empty
())
if
(
!
sr
.
r
->
empty
())
{
{
os
<<
sr
.
r
->
front
();
os
<<
sr
.
r
->
front
();
std
::
for_each
(
std
::
next
(
sr
.
r
->
begin
()),
sr
.
r
->
end
(),
[
&
](
auto
&&
x
)
{
os
<<
", "
<<
x
;
});
std
::
for_each
(
std
::
next
(
sr
.
r
->
begin
()),
sr
.
r
->
end
(),
[
&
](
auto
&&
x
)
{
os
<<
", "
<<
x
;
});
}
}
return
os
;
return
os
;
}
}
...
...
test/eval_test.cpp
View file @
6b44f839
...
@@ -154,7 +154,6 @@ void insert_replace_test()
...
@@ -154,7 +154,6 @@ void insert_replace_test()
EXPECT
(
result
!=
rtg
::
literal
{
5
});
EXPECT
(
result
!=
rtg
::
literal
{
5
});
}
}
void
target_test
()
void
target_test
()
{
{
rtg
::
program
p
;
rtg
::
program
p
;
...
...
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