Beispiel #1
0
int main()
{
   unsigned long x = 3;
   touch(x);
   if (CountLeadingZeros(x) == NTL_BITS_PER_LONG-2)
      return 0;
   else
      return -1;
}
Beispiel #2
0
inline unsigned int BitCountNeededToEncode(unsigned int data)
{
#if defined(_X360)
	return (32 - CountLeadingZeros(data+1)) - 1;
#else
	unsigned long firstBit;
	_BitScanReverse(&firstBit,data+1);
	return firstBit;
#endif
}
Beispiel #3
0
int32 Shader::GetAttributeIndex(eVertexFormat vertexFormat)
{
    return vertexFormatAttribIndeces[CountLeadingZeros(vertexFormat)];
}