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
composable_kernel
Commits
f01e608c
Commit
f01e608c
authored
Jun 01, 2023
by
Po-Yen, Chen
Browse files
Add missing __device__ specifier
parent
1b146563
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
include/ck/utility/amd_wave_read_first_lane.hpp
include/ck/utility/amd_wave_read_first_lane.hpp
+5
-7
No files found.
include/ck/utility/amd_wave_read_first_lane.hpp
View file @
f01e608c
...
@@ -42,25 +42,23 @@ struct get_carrier<3>
...
@@ -42,25 +42,23 @@ struct get_carrier<3>
static_assert
(
sizeof
(
bytes
)
<=
sizeof
(
value_type
));
static_assert
(
sizeof
(
bytes
)
<=
sizeof
(
value_type
));
public:
public:
inline
carrier
(
value_type
value
)
noexcept
__device__
inline
carrier
(
value_type
value
)
noexcept
{
{
auto
const
from
=
reinterpret_cast
<
const
std
::
byte
*>
(
&
value
);
std
::
copy_n
(
reinterpret_cast
<
const
std
::
byte
*>
(
&
value
),
bytes
.
size
(),
bytes
.
data
());
std
::
copy_n
(
from
,
bytes
.
size
(),
bytes
.
data
());
}
}
// method to trigger template substitution failure
// method to trigger template substitution failure
inline
carrier
&
operator
=
(
const
carrier
&
other
)
noexcept
__device__
inline
carrier
&
operator
=
(
const
carrier
&
other
)
noexcept
{
{
std
::
copy_n
(
other
.
bytes
.
data
(),
bytes
.
size
(),
bytes
.
data
());
std
::
copy_n
(
other
.
bytes
.
data
(),
bytes
.
size
(),
bytes
.
data
());
return
*
this
;
return
*
this
;
}
}
inline
operator
value_type
()
const
noexcept
__device__
inline
operator
value_type
()
const
noexcept
{
{
value_type
value
{};
value_type
value
{};
auto
const
to
=
reinterpret_cast
<
std
::
byte
*>
(
&
value
);
std
::
copy_n
(
bytes
.
data
(),
bytes
.
size
(),
reinterpret_cast
<
std
::
byte
*>
(
&
value
));
std
::
copy_n
(
bytes
.
data
(),
bytes
.
size
(),
to
);
return
value
;
return
value
;
}
}
...
...
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