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
d3577ab3
"include/vscode:/vscode.git/clone" did not exist on "3da5c19e629174c234fe86c17ebd04732ea548b7"
Commit
d3577ab3
authored
Jan 16, 2023
by
guangzlu
Browse files
fixed incr() in philox_rand.hpp
parent
1a634aca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
19 deletions
+22
-19
include/ck/utility/philox_rand.hpp
include/ck/utility/philox_rand.hpp
+22
-19
No files found.
include/ck/utility/philox_rand.hpp
View file @
d3577ab3
...
@@ -97,25 +97,28 @@ class philox
...
@@ -97,25 +97,28 @@ class philox
{
{
uint4
res
;
uint4
res
;
uint4
tmp
;
// uint4 tmp;
// res.x = ctr.x + 1;
// asm volatile("v_mov_b32 %8 1; \n"
asm
volatile
(
"v_mov_b32 %8 1;
\n
"
// "v_mov_b32 %9 0; \n"
"v_mov_b32 %9 0;
\n
"
// "v_mov_b32 %10 0; \n"
"v_mov_b32 %10 0;
\n
"
// "v_mov_b32 %11 0; \n"
"v_mov_b32 %11 0;
\n
"
// "v_add_co_u32 %0, %4, %8; "
"v_add_co_u32 %0, %4, %8; "
// "v_addc_co_u32 %1, %5, %9; "
"v_addc_co_u32 %1, %5, %9; "
// "v_addc_co_u32 %2, %6, %10; "
"v_addc_co_u32 %2, %6, %10; "
// "v_addc_u32 %3, %7, %11; "
"v_addc_u32 %3, %7, %11; "
// : "=v"(res.x), "=v"(res.y), "=v"(res.z), "=v"(res.w)
:
"=v"
(
res
.
x
),
"=v"
(
res
.
y
),
"=v"
(
res
.
z
),
"=v"
(
res
.
w
)
// : "v"(ctr.x),
:
"v"
(
ctr
.
x
),
// "v"(ctr.y),
"v"
(
ctr
.
y
),
// "v"(ctr.z),
"v"
(
ctr
.
z
),
// "v"(ctr.w),
"v"
(
ctr
.
w
),
// "v"(tmp.x),
"v"
(
tmp
.
x
),
// "v"(tmp.y),
"v"
(
tmp
.
y
),
// "v"(tmp.z),
"v"
(
tmp
.
z
),
// "v"(tmp.w));
"v"
(
tmp
.
w
));
res
.
x
=
ctr
.
x
+
1
;
res
.
y
=
ctr
.
y
;
res
.
z
=
ctr
.
z
;
res
.
w
=
ctr
.
w
;
return
res
;
return
res
;
}
}
...
...
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