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

signmask strategy using packss

File:
1 edited

Legend:

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

    r1870 r1872  
    20362036}
    20372037
    2038 //The total number of operations is 4.0
     2038//The total number of operations is 2.0
    20392039template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<16>::signmask(bitblock128_t arg1)
    20402040{
    2041         return hsimd128<(8)>::signmask(hsimd128<16>::packh(simd128<16>::constant<0>(), arg1));
    2042 }
    2043 
    2044 //The total number of operations is 4.0
     2041        return hsimd128<(8)>::signmask(hsimd128<16>::packss(simd128<16>::constant<0>(), arg1));
     2042}
     2043
     2044//The total number of operations is 3.0
    20452045template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<32>::signmask(bitblock128_t arg1)
    20462046{
    2047         uint64_t tmpAns1 = hsimd128<(64)>::signmask(esimd128<32>::mergeh(arg1, simd128<32>::constant<0>()));
    2048         uint64_t tmpAns2 = hsimd128<(64)>::signmask(esimd128<32>::mergel(arg1, simd128<32>::constant<0>()));
    2049         return ((tmpAns1<<(2))+tmpAns2);
     2047        return hsimd128<(16)>::signmask(hsimd128<32>::packss(simd128<32>::constant<0>(), arg1));
    20502048}
    20512049
Note: See TracChangeset for help on using the changeset viewer.