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_ssse3.cpp

    r1870 r1872  
    20382038}
    20392039
    2040 //The total number of operations is 4.0
     2040//The total number of operations is 2.0
    20412041template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<16>::signmask(bitblock128_t arg1)
    20422042{
    2043         return hsimd128<(8)>::signmask(hsimd128<16>::packh(simd128<16>::constant<0>(), arg1));
    2044 }
    2045 
    2046 //The total number of operations is 4.0
     2043        return hsimd128<(8)>::signmask(hsimd128<16>::packss(simd128<16>::constant<0>(), arg1));
     2044}
     2045
     2046//The total number of operations is 3.0
    20472047template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<32>::signmask(bitblock128_t arg1)
    20482048{
    2049         uint64_t tmpAns1 = hsimd128<(64)>::signmask(esimd128<32>::mergeh(arg1, simd128<32>::constant<0>()));
    2050         uint64_t tmpAns2 = hsimd128<(64)>::signmask(esimd128<32>::mergel(arg1, simd128<32>::constant<0>()));
    2051         return ((tmpAns1<<(2))+tmpAns2);
     2049        return hsimd128<(16)>::signmask(hsimd128<32>::packss(simd128<32>::constant<0>(), arg1));
    20522050}
    20532051
Note: See TracChangeset for help on using the changeset viewer.