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
3087a7a6
Commit
3087a7a6
authored
Oct 09, 2022
by
Paul
Browse files
Format
parent
694cb20a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
src/include/migraphx/serialize.hpp
src/include/migraphx/serialize.hpp
+4
-8
No files found.
src/include/migraphx/serialize.hpp
View file @
3087a7a6
...
@@ -64,9 +64,7 @@ template <class T>
...
@@ -64,9 +64,7 @@ template <class T>
auto
to_value_impl
(
rank
<
1
>
,
const
T
&
x
)
->
decltype
(
std
::
tuple_size
<
T
>
{},
value
{})
auto
to_value_impl
(
rank
<
1
>
,
const
T
&
x
)
->
decltype
(
std
::
tuple_size
<
T
>
{},
value
{})
{
{
value
result
=
value
::
array
{};
value
result
=
value
::
array
{};
repeat_c
<
std
::
tuple_size
<
T
>
{}
>
([
&
](
auto
i
)
{
repeat_c
<
std
::
tuple_size
<
T
>
{}
>
([
&
](
auto
i
)
{
result
.
push_back
(
to_value
(
std
::
get
<
i
>
(
x
)));
});
result
.
push_back
(
to_value
(
std
::
get
<
i
>
(
x
)));
});
return
result
;
return
result
;
}
}
...
@@ -147,12 +145,10 @@ void from_value_impl(rank<0>, const value& v, T& x)
...
@@ -147,12 +145,10 @@ void from_value_impl(rank<0>, const value& v, T& x)
}
}
template
<
class
T
>
template
<
class
T
>
auto
from_value_impl
(
rank
<
1
>
,
const
value
&
v
,
T
&
x
)
auto
from_value_impl
(
rank
<
1
>
,
const
value
&
v
,
T
&
x
)
->
decltype
(
std
::
tuple_size
<
T
>
{},
void
())
->
decltype
(
std
::
tuple_size
<
T
>
{},
void
())
{
{
repeat_c
<
std
::
tuple_size
<
T
>
{}
>
([
&
](
auto
i
)
{
repeat_c
<
std
::
tuple_size
<
T
>
{}
>
(
std
::
get
<
i
>
(
x
)
=
from_value
<
std
::
tuple_element_t
<
i
,
T
>>
(
v
[
i
]);
[
&
](
auto
i
)
{
std
::
get
<
i
>
(
x
)
=
from_value
<
std
::
tuple_element_t
<
i
,
T
>>
(
v
[
i
]);
});
});
}
}
template
<
class
T
>
template
<
class
T
>
...
...
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