Ignore:
Timestamp:
Jan 21, 2012, 3:47:37 PM (7 years ago)
Author:
cameron
Message:

signmask strategy using packss

File:
1 edited

Legend:

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

    r1870 r1872  
    20262026}
    20272027
    2028 //The total number of operations is 4.0
     2028//The total number of operations is 2.0
    20292029template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<16>::signmask(bitblock128_t arg1)
    20302030{
    2031         return hsimd128<(8)>::signmask(hsimd128<16>::packh(simd128<16>::constant<0>(), arg1));
    2032 }
    2033 
    2034 //The total number of operations is 4.0
     2031        return hsimd128<(8)>::signmask(hsimd128<16>::packss(simd128<16>::constant<0>(), arg1));
     2032}
     2033
     2034//The total number of operations is 3.0
    20352035template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<32>::signmask(bitblock128_t arg1)
    20362036{
    2037         uint64_t tmpAns1 = hsimd128<(64)>::signmask(esimd128<32>::mergeh(arg1, simd128<32>::constant<0>()));
    2038         uint64_t tmpAns2 = hsimd128<(64)>::signmask(esimd128<32>::mergel(arg1, simd128<32>::constant<0>()));
    2039         return ((tmpAns1<<(2))+tmpAns2);
     2037        return hsimd128<(16)>::signmask(hsimd128<32>::packss(simd128<32>::constant<0>(), arg1));
    20402038}
    20412039
Note: See TracChangeset for help on using the changeset viewer.