Packing a float in a uint

Hi all!

I use in a compute shader the glsl function floatBitsToUint that pack a float into uint AND keep the relation order :

with 2 floats a and b with a>b then floatBitsToUint(a)> floatBitsToUint(b) as uint comparaison

The function i found in the cuda documentation __float2uint_XX doesn’t keep the relation order.
Is there another way to do this?

__float2uint_r{z,n,u,d}() are conversion intrinsics. floatBitsToUint() would appear to be a re-interpretation function. So you would want to use something like this in CUDA:

unsigned int my_floatBitsToUint (float a)
{
    unsigned int res = (unsigned int)__float_as_int (a);
    return res;
}