Ignore:
Timestamp:
Apr 2, 2008, 3:44:45 PM (11 years ago)
Author:
cameron
Message:

Adaptations for MSVC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/altivec_simd.h

    r58 r87  
    266266
    267267
    268 static inline int count_forward_zeroes(SIMD_type bits) {
    269   union {SIMD_type vec; unsigned long elems[sizeof(SIMD_type)/LONG_BIT];} v;
    270   v.vec = bits;
    271   if (v.elems[0] != 0) return __builtin_clzl(v.elems[0]);
    272   else if (v.elems[1] != 0) return LONG_BIT + __builtin_clzl(v.elems[1]);
    273 #if LONG_BIT < 64
    274   else if (v.elems[2] != 0) return 2*LONG_BIT + __builtin_clzl(v.elems[2]);
    275   else if (v.elems[3] != 0) return 3*LONG_BIT + __builtin_clzl(v.elems[3]);
    276 #endif
    277   else return 8*sizeof(SIMD_type);
    278 }
    279 
    280 
    281 
    282 
    283268void print_bit_block(char * var_name, SIMD_type v) {
    284269  union {SIMD_type vec; unsigned char elems[16];} x;
Note: See TracChangeset for help on using the changeset viewer.