mirror of
https://github.com/stevenrobertson/cuburn.git
synced 2025-02-05 11:40:04 -05:00
Be a little more particular about how mwc_11 is implemented
This commit is contained in:
parent
28c3c72bb8
commit
9d969476ec
@ -30,7 +30,12 @@ __device__ float mwc_next_01(mwc_st *st) {
|
||||
}
|
||||
|
||||
__device__ float mwc_next_11(mwc_st *st) {
|
||||
return ((int32_t) mwc_next(st)) * (1.0f / 2147483648.0f);
|
||||
uint32_t val = mwc_next(st);
|
||||
float ret;
|
||||
asm("cvt.rn.f32.s32 %0, %1;\n\t"
|
||||
"mul.f32 %0, %0, (1.0 / 2147483648.0);"
|
||||
: "=f"(ret) : "r"(val));
|
||||
return ret;
|
||||
}
|
||||
"""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user