Optix Code/Optix7.3.0LightFIeldViewer/SDK/lib/DemandLoading/Util/DeviceSet.cpp
// Return the number of bits set in a
Return the number of bits set in a
Return the number of bits set in a
inline unsigned int popCount( unsigned int a )
{
    unsigned int c;
    c = ( a & 0x55555555 ) + ( ( a >> 1 ) & 0x55555555 );
    c = ( c & 0x33333333 ) + ( ( c >> 2 ) & 0x33333333 );
    c = ( c & 0x0f0f0f0f ) + ( ( c >> 4 ) & 0x0f0f0f0f );
    c = ( c & 0x00ff00ff ) + ( ( c >> 8 ) & 0x00ff00ff );
    c = ( c & 0x0000ffff ) + ( c >> 16 );
    return c;
}
inline unsigned int popCount ( unsigned int a ) { unsigned int c ; c = ( a & 0x55555555 ) + ( ( a >> 1 ) & 0x55555555 ) ; c = ( c & 0x33333333 ) + ( ( c >> 2 ) & 0x33333333 ) ; c = ( c & 0x0f0f0f0f ) + ( ( c >> 4 ) & 0x0f0f0f0f ) ; c = ( c & 0x00ff00ff ) + ( ( c >> 8 ) & 0x00ff00ff ) ; c = ( c & 0x0000ffff ) + ( c >> 16 ) ; return c ; }
Return the number of bits set in a
Return the number of bits set in a