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
48feb286
Commit
48feb286
authored
May 29, 2023
by
Po-Yen, Chen
Browse files
Rename type trait
parent
85829b33
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
include/ck/utility/readfirstlane.hpp
include/ck/utility/readfirstlane.hpp
+10
-10
No files found.
include/ck/utility/readfirstlane.hpp
View file @
48feb286
...
...
@@ -15,28 +15,28 @@ namespace ck {
namespace
detail
{
template
<
std
::
size_t
Size
>
struct
get_signed_int
;
struct
get_
un
signed_int
;
template
<
>
struct
get_signed_int
<
1
>
struct
get_
un
signed_int
<
1
>
{
using
type
=
std
::
int8_t
;
using
type
=
std
::
u
int8_t
;
};
template
<
>
struct
get_signed_int
<
2
>
struct
get_
un
signed_int
<
2
>
{
using
type
=
std
::
int16_t
;
using
type
=
std
::
u
int16_t
;
};
template
<
>
struct
get_signed_int
<
4
>
struct
get_
un
signed_int
<
4
>
{
using
type
=
std
::
int32_t
;
using
type
=
std
::
u
int32_t
;
};
template
<
std
::
size_t
Size
>
using
get_signed_int_t
=
typename
get_signed_int
<
Size
>::
type
;
using
get_
un
signed_int_t
=
typename
get_
un
signed_int
<
Size
>::
type
;
}
// namespace detail
...
...
@@ -53,7 +53,7 @@ __device__ auto readfirstlane(const Object& obj)
constexpr
std
::
size_t
SgprSize
=
4
;
constexpr
std
::
size_t
ObjectSize
=
sizeof
(
Object
);
using
Sgpr
=
detail
::
get_signed_int_t
<
SgprSize
>
;
using
Sgpr
=
detail
::
get_
un
signed_int_t
<
SgprSize
>
;
alignas
(
Object
)
std
::
byte
to_obj
[
ObjectSize
];
...
...
@@ -68,7 +68,7 @@ __device__ auto readfirstlane(const Object& obj)
if
constexpr
(
0
<
RemainedSize
)
{
using
Carrier
=
detail
::
get_signed_int_t
<
RemainedSize
>
;
using
Carrier
=
detail
::
get_
un
signed_int_t
<
RemainedSize
>
;
*
reinterpret_cast
<
Carrier
>
(
to_obj
+
CompleteSgprCopyBoundary
)
=
readfirstlane
(
*
reinterpret_cast
<
const
Carrier
*>
(
from_obj
+
CompleteSgprCopyBoundary
));
...
...
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