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
fb7b72a6
Commit
fb7b72a6
authored
Apr 23, 2018
by
Paul
Browse files
Fix compiler warnings
parent
2dfd93ae
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
9 deletions
+10
-9
include/rtg/builtin.hpp
include/rtg/builtin.hpp
+4
-4
include/rtg/operand.hpp
include/rtg/operand.hpp
+2
-2
include/rtg/raw_data.hpp
include/rtg/raw_data.hpp
+1
-1
include/rtg/stringutils.hpp
include/rtg/stringutils.hpp
+1
-1
include/rtg/tensor_view.hpp
include/rtg/tensor_view.hpp
+2
-1
No files found.
include/rtg/builtin.hpp
View file @
fb7b72a6
...
@@ -13,11 +13,11 @@ struct literal
...
@@ -13,11 +13,11 @@ struct literal
{
{
return
"@literal"
;
return
"@literal"
;
}
}
shape
compute_shape
(
std
::
vector
<
shape
>
input
)
const
shape
compute_shape
(
std
::
vector
<
shape
>
)
const
{
{
throw
"builtin"
;
throw
"builtin"
;
}
}
argument
compute
(
std
::
vector
<
argument
>
input
)
const
argument
compute
(
std
::
vector
<
argument
>
)
const
{
{
throw
"builtin"
;
throw
"builtin"
;
}
}
...
@@ -30,11 +30,11 @@ struct param
...
@@ -30,11 +30,11 @@ struct param
{
{
return
"@param:"
+
parameter
;
return
"@param:"
+
parameter
;
}
}
shape
compute_shape
(
std
::
vector
<
shape
>
input
)
const
shape
compute_shape
(
std
::
vector
<
shape
>
)
const
{
{
throw
"builtin"
;
throw
"builtin"
;
}
}
argument
compute
(
std
::
vector
<
argument
>
input
)
const
argument
compute
(
std
::
vector
<
argument
>
)
const
{
{
throw
"builtin"
;
throw
"builtin"
;
}
}
...
...
include/rtg/operand.hpp
View file @
fb7b72a6
...
@@ -81,7 +81,7 @@ struct operand
...
@@ -81,7 +81,7 @@ struct operand
{
{
template
<
typename
TypeErased_U_
=
TypeErased_T_
>
template
<
typename
TypeErased_U_
=
TypeErased_T_
>
handle_type_
(
TypeErased_T_
value
,
handle_type_
(
TypeErased_T_
value
,
typename
std
::
enable_if
<
std
::
is_reference
<
TypeErased_U_
>::
value
>::
type
*
=
0
)
typename
std
::
enable_if
<
std
::
is_reference
<
TypeErased_U_
>::
value
>::
type
*
=
nullptr
)
:
value_
(
value
)
:
value_
(
value
)
{
{
}
}
...
@@ -89,7 +89,7 @@ struct operand
...
@@ -89,7 +89,7 @@ struct operand
template
<
typename
TypeErased_U_
=
TypeErased_T_
>
template
<
typename
TypeErased_U_
=
TypeErased_T_
>
handle_type_
(
TypeErased_T_
value
,
handle_type_
(
TypeErased_T_
value
,
typename
std
::
enable_if
<!
std
::
is_reference
<
TypeErased_U_
>::
value
,
int
>::
type
*
=
typename
std
::
enable_if
<!
std
::
is_reference
<
TypeErased_U_
>::
value
,
int
>::
type
*
=
0
)
noexcept
:
value_
(
std
::
move
(
value
))
nullptr
)
noexcept
:
value_
(
std
::
move
(
value
))
{
{
}
}
...
...
include/rtg/raw_data.hpp
View file @
fb7b72a6
...
@@ -74,7 +74,7 @@ struct raw_data
...
@@ -74,7 +74,7 @@ struct raw_data
T
result
;
T
result
;
this
->
visit_at
([
&
](
auto
x
)
{
this
->
visit_at
([
&
](
auto
x
)
{
result
=
x
;
result
=
x
;
});
}
,
n
);
return
result
;
return
result
;
}
}
};
};
...
...
include/rtg/stringutils.hpp
View file @
fb7b72a6
...
@@ -82,4 +82,4 @@ inline std::string to_string(const Range& r)
...
@@ -82,4 +82,4 @@ inline std::string to_string(const Range& r)
}
// namespace rtg
}
// namespace rtg
#endif
#endif
\ No newline at end of file
include/rtg/tensor_view.hpp
View file @
fb7b72a6
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#define RTG_GUARD_TENSOR_VIEW_HPP
#define RTG_GUARD_TENSOR_VIEW_HPP
#include <rtg/shape.hpp>
#include <rtg/shape.hpp>
#include <rtg/float_equal.hpp>
#include <iostream>
#include <iostream>
...
@@ -123,7 +124,7 @@ struct tensor_view
...
@@ -123,7 +124,7 @@ struct tensor_view
{
{
for
(
std
::
size_t
i
=
0
;
i
<
x
.
shape_
.
elements
();
i
++
)
for
(
std
::
size_t
i
=
0
;
i
<
x
.
shape_
.
elements
();
i
++
)
{
{
if
(
x
[
i
]
!=
y
[
i
])
return
false
;
if
(
!
float_equal
(
x
[
i
]
,
y
[
i
])
)
return
false
;
}
}
return
true
;
return
true
;
}
}
...
...
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