Changeset 1847 for trunk/lib/builtins.hpp
 Timestamp:
 Jan 14, 2012, 12:29:17 PM (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/lib/builtins.hpp
r1550 r1847 18 18 static IDISA_ALWAYS_INLINE unsigned long cfzl(unsigned long x); 19 19 static IDISA_ALWAYS_INLINE unsigned long cbzl(unsigned long x); 20 static IDISA_ALWAYS_INLINE unsigned long cfzll(unsigned long long x);21 static IDISA_ALWAYS_INLINE unsigned long cbzll(unsigned long long x);20 //static IDISA_ALWAYS_INLINE unsigned long cfzll(unsigned long long x); 21 //static IDISA_ALWAYS_INLINE unsigned long cbzll(unsigned long long x); 22 22 23 23 #if defined (_MSC_VER) … … 43 43 } 44 44 45 IDISA_ALWAYS_INLINE unsigned long cfzll(unsigned long long x) { // TODO  test46 unsigned __int64 zeroes;47 _BitScanForward(&zeroes, x);48 return zeroes;49 }45 // IDISA_ALWAYS_INLINE unsigned long cfzll(unsigned long long x) { // TODO  test 46 // unsigned __int64 zeroes; 47 // _BitScanForward(&zeroes, x); 48 // return zeroes; 49 // } 50 50 51 IDISA_ALWAYS_INLINE unsigned long cbzll(unsigned long long x) { // TODO  test52 unsigned __int64 zeroes;53 _BitScanReverse(&zeroes, x);54 return zeroes;55 }51 // IDISA_ALWAYS_INLINE unsigned long cbzll(unsigned long long x) { // TODO  test 52 // unsigned __int64 zeroes; 53 // _BitScanReverse(&zeroes, x); 54 // return zeroes; 55 // } 56 56 57 57 #elif defined (__GNUC__) … … 73 73 } 74 74 75 IDISA_ALWAYS_INLINE unsigned long cfzll(unsigned long long x) {76 return __builtin_ctzll(x);77 }75 // IDISA_ALWAYS_INLINE unsigned long cfzll(unsigned long long x) { 76 // return __builtin_ctzll(x); 77 // } 78 78 79 IDISA_ALWAYS_INLINE unsigned long cbzll(unsigned long long x) {80 return __builtin_clzll(x);81 }79 // IDISA_ALWAYS_INLINE unsigned long cbzll(unsigned long long x) { 80 // return __builtin_clzll(x); 81 // } 82 82 83 83 #endif
Note: See TracChangeset
for help on using the changeset viewer.