Hello,
This is a request to CUDA language designers.
CUDA has two following type reinterpretation functions between float and int:
__float_as_int, __int_as_float
Would be nice to have unsigned int versions of them.
The reason is the following:
operation __float_as_int(f) >> 1
does integer division by 2, i.e. preserves sign.
In order to do logical shift, I need to cast to unsigned int:
(unsigned int)( __float_as_int(f) ) >> 1
__float_as_unsignedint() function would allow for cleaner code, since no cast is needed.
Thanks