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
fc3df3ba
Commit
fc3df3ba
authored
May 29, 2023
by
Po-Yen, Chen
Browse files
Remove std:: qualifier from standard types
parent
48feb286
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 @
fc3df3ba
...
...
@@ -14,33 +14,33 @@
namespace
ck
{
namespace
detail
{
template
<
std
::
size_t
Size
>
template
<
size_t
Size
>
struct
get_unsigned_int
;
template
<
>
struct
get_unsigned_int
<
1
>
{
using
type
=
std
::
uint8_t
;
using
type
=
uint8_t
;
};
template
<
>
struct
get_unsigned_int
<
2
>
{
using
type
=
std
::
uint16_t
;
using
type
=
uint16_t
;
};
template
<
>
struct
get_unsigned_int
<
4
>
{
using
type
=
std
::
uint32_t
;
using
type
=
uint32_t
;
};
template
<
std
::
size_t
Size
>
template
<
size_t
Size
>
using
get_unsigned_int_t
=
typename
get_unsigned_int
<
Size
>::
type
;
}
// namespace detail
__device__
inline
std
::
int32_t
readfirstlane
(
std
::
int32_t
value
)
__device__
inline
int32_t
readfirstlane
(
int32_t
value
)
{
return
__builtin_amdgcn_readfirstlane
(
value
);
}
...
...
@@ -50,8 +50,8 @@ template <
typename
=
std
::
enable_if_t
<
std
::
is_class_v
<
Object
>
&&
std
::
is_trivially_copyable_v
<
Object
>>>
__device__
auto
readfirstlane
(
const
Object
&
obj
)
{
constexpr
std
::
size_t
SgprSize
=
4
;
constexpr
std
::
size_t
ObjectSize
=
sizeof
(
Object
);
constexpr
size_t
SgprSize
=
4
;
constexpr
size_t
ObjectSize
=
sizeof
(
Object
);
using
Sgpr
=
detail
::
get_unsigned_int_t
<
SgprSize
>
;
...
...
@@ -59,8 +59,8 @@ __device__ auto readfirstlane(const Object& obj)
auto
*
const
from_obj
=
reinterpret_cast
<
const
std
::
byte
*>
(
&
obj
);
constexpr
std
::
size_t
RemainedSize
=
ObjectSize
%
SgprSize
;
constexpr
std
::
size_t
CompleteSgprCopyBoundary
=
ObjectSize
-
RemainedSize
;
constexpr
size_t
RemainedSize
=
ObjectSize
%
SgprSize
;
constexpr
size_t
CompleteSgprCopyBoundary
=
ObjectSize
-
RemainedSize
;
static_for
<
0
,
CompleteSgprCopyBoundary
,
SgprSize
>
{}([
&
](
auto
offset
)
{
*
reinterpret_cast
<
Sgpr
*>
(
to_obj
+
offset
)
=
readfirstlane
(
*
reinterpret_cast
<
const
Sgpr
*>
(
from_obj
+
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