Ignore:
Timestamp:
Oct 22, 2011, 3:38:20 PM (8 years ago)
Author:
cameron
Message:

bitblock::popcount; clean libgen/idisa_lib out

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/idisa_cpp/idisa_sse4_2.cpp

    r1548 r1556  
    4848        static IDISA_ALWAYS_INLINE bitblock128_t add_hl(bitblock128_t arg1, bitblock128_t arg2);
    4949        static IDISA_ALWAYS_INLINE bitblock128_t packss(bitblock128_t arg1, bitblock128_t arg2);
     50        static IDISA_ALWAYS_INLINE bitblock128_t packh(bitblock128_t arg1, bitblock128_t arg2);
    5051        static IDISA_ALWAYS_INLINE uint64_t signmask(bitblock128_t arg1);
    51         static IDISA_ALWAYS_INLINE bitblock128_t packh(bitblock128_t arg1, bitblock128_t arg2);
    5252        static IDISA_ALWAYS_INLINE bitblock128_t packl(bitblock128_t arg1, bitblock128_t arg2);
    5353        static IDISA_ALWAYS_INLINE bitblock128_t min_hl(bitblock128_t arg1, bitblock128_t arg2);
     
    9191        static IDISA_ALWAYS_INLINE bool all(bitblock128_t arg1);
    9292        static IDISA_ALWAYS_INLINE bool any(bitblock128_t arg1);
     93        static IDISA_ALWAYS_INLINE uint64_t popcount(bitblock128_t arg1);
    9394};
    9495
     
    30023003}
    30033004
     3005//The total number of operations is 20
     3006IDISA_ALWAYS_INLINE uint64_t bitblock128::popcount(bitblock128_t arg1)
     3007{
     3008        return mvmd128<64>::extract<0>(simd128<128>::popcount(arg1));
     3009}
     3010
    30043011//The total number of operations is 2
    30053012IDISA_ALWAYS_INLINE bool bitblock128::all(bitblock128_t arg1)
Note: See TracChangeset for help on using the changeset viewer.