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
a609bfaa
Commit
a609bfaa
authored
May 17, 2023
by
Po-Yen, Chen
Browse files
Replace unsigne char by std::byte
parent
a8d4294c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
include/ck/utility/readfirstlane.hpp
include/ck/utility/readfirstlane.hpp
+3
-2
No files found.
include/ck/utility/readfirstlane.hpp
View file @
a609bfaa
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#include "ck/utility/functional2.hpp"
#include "ck/utility/functional2.hpp"
#include "ck/utility/math.hpp"
#include "ck/utility/math.hpp"
#include <cstddef>
#include <cstdint>
#include <cstdint>
#include <type_traits>
#include <type_traits>
...
@@ -54,9 +55,9 @@ __device__ auto readfirstlane(const Object& obj)
...
@@ -54,9 +55,9 @@ __device__ auto readfirstlane(const Object& obj)
using
Sgpr
=
detail
::
get_signed_int_t
<
SgprSize
>
;
using
Sgpr
=
detail
::
get_signed_int_t
<
SgprSize
>
;
alignas
(
Object
)
unsigned
char
memory
[
ObjectSize
];
alignas
(
Object
)
std
::
byte
memory
[
ObjectSize
];
const
auto
*
from
=
reinterpret_cast
<
const
unsigned
char
*>
(
&
obj
);
const
auto
*
from
=
reinterpret_cast
<
const
std
::
byte
*>
(
&
obj
);
static_for
<
0
,
ObjectSize
,
SgprSize
>
{}([
&
](
auto
offset
)
{
static_for
<
0
,
ObjectSize
,
SgprSize
>
{}([
&
](
auto
offset
)
{
*
reinterpret_cast
<
Sgpr
*>
(
memory
+
offset
)
=
*
reinterpret_cast
<
Sgpr
*>
(
memory
+
offset
)
=
readfirstlane
(
*
reinterpret_cast
<
const
Sgpr
*>
(
from
+
offset
));
readfirstlane
(
*
reinterpret_cast
<
const
Sgpr
*>
(
from
+
offset
));
...
...
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