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
51724da5
Commit
51724da5
authored
May 30, 2018
by
Paul
Browse files
Formatting
parent
2211ade7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
src/include/rtg/argument.hpp
src/include/rtg/argument.hpp
+1
-1
src/include/rtg/raw_data.hpp
src/include/rtg/raw_data.hpp
+4
-7
src/include/rtg/shape.hpp
src/include/rtg/shape.hpp
+3
-2
No files found.
src/include/rtg/argument.hpp
View file @
51724da5
...
@@ -35,7 +35,7 @@ struct argument : raw_data<argument>
...
@@ -35,7 +35,7 @@ struct argument : raw_data<argument>
const
shape
&
get_shape
()
const
{
return
this
->
m_shape
;
}
const
shape
&
get_shape
()
const
{
return
this
->
m_shape
;
}
template
<
class
T
>
template
<
class
T
>
T
*
cast
()
const
T
*
cast
()
const
{
{
return
reinterpret_cast
<
T
*>
(
this
->
data
());
return
reinterpret_cast
<
T
*>
(
this
->
data
());
...
...
src/include/rtg/raw_data.hpp
View file @
51724da5
...
@@ -97,13 +97,13 @@ struct raw_data
...
@@ -97,13 +97,13 @@ struct raw_data
struct
auto_cast
struct
auto_cast
{
{
const
Derived
*
self
;
const
Derived
*
self
;
template
<
class
T
>
template
<
class
T
>
operator
T
()
operator
T
()
{
{
return
self
->
template
at
<
T
>();
return
self
->
template
at
<
T
>();
}
}
template
<
class
T
>
template
<
class
T
>
operator
T
*
()
operator
T
*
()
{
{
// TODO: Check type
// TODO: Check type
...
@@ -111,10 +111,7 @@ struct raw_data
...
@@ -111,10 +111,7 @@ struct raw_data
}
}
};
};
auto_cast
get
()
const
auto_cast
get
()
const
{
return
{
static_cast
<
const
Derived
*>
(
this
)};
}
{
return
{
static_cast
<
const
Derived
*>
(
this
)};
}
};
};
namespace
detail
{
namespace
detail
{
...
...
src/include/rtg/shape.hpp
View file @
51724da5
...
@@ -37,7 +37,8 @@ struct shape
...
@@ -37,7 +37,8 @@ struct shape
template
<
class
T
,
class
=
void
>
template
<
class
T
,
class
=
void
>
struct
get_type
:
std
::
integral_constant
<
type_t
,
any_type
>
struct
get_type
:
std
::
integral_constant
<
type_t
,
any_type
>
{};
{
};
#define RTG_SHAPE_GET_TYPE(x, t) \
#define RTG_SHAPE_GET_TYPE(x, t) \
template <class T> \
template <class T> \
struct get_type<t, T> : std::integral_constant<type_t, x> \
struct get_type<t, T> : std::integral_constant<type_t, x> \
...
...
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