Changeset 3573
- Timestamp:
- Nov 29, 2013, 12:03:24 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/idisa_cpp/idisa_sse2.cpp
r3526 r3573 555 555 IDISA_ALWAYS_INLINE bitblock128_t simd_not(bitblock128_t arg1) 556 556 { 557 return simd_xor(arg1, simd128<32>::constant< -1>());557 return simd_xor(arg1, simd128<32>::constant<4294967295>()); 558 558 } 559 559 … … 755 755 756 756 //The total number of operations is 51.75 757 template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::gt(bitblock128_t arg1, bitblock128_t arg2)757 /*template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::gt(bitblock128_t arg1, bitblock128_t arg2) 758 758 { 759 759 bitblock128_t hiAns = simd128<(64)>::gt(arg1, arg2); … … 762 762 mask = simd_or(mask, simd128<128>::slli<(64)>(mask)); 763 763 return simd_or(simd128<128>::srai<(64)>(hiAns), mask); 764 } 764 }*/ 765 765 766 766 //The total number of operations is 289.0 … … 1441 1441 1442 1442 //The total number of operations is 4.5 1443 template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::srai(bitblock128_t arg1)1443 /*template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::srai(bitblock128_t arg1) 1444 1444 { 1445 1445 return simd_or(simd_and(simd128<64>::himask(), simd128<(32)>::srai<((sh < (32)) ? sh : (32))>(arg1)), ((sh <= (32)) ? simd128<64>::srli<sh>(arg1) : simd128<(32)>::srai<(sh-(32))>(simd128<64>::srli<(32)>(arg1)))); 1446 } 1446 }*/ 1447 1447 1448 1448 //The total number of operations is 11.0833333333 1449 template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srai(bitblock128_t arg1)1449 /*template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srai(bitblock128_t arg1) 1450 1450 { 1451 1451 return simd_or(simd_and(simd128<128>::himask(), simd128<(64)>::srai<((sh < (64)) ? sh : (64))>(arg1)), ((sh <= (64)) ? simd128<128>::srli<sh>(arg1) : simd128<(64)>::srai<(sh-(64))>(simd128<128>::srli<(64)>(arg1)))); 1452 } 1452 }*/ 1453 1453 1454 1454 //The total number of operations is 10.0 … … 1572 1572 template <> template <FieldType<1>::T val> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::constant() 1573 1573 { 1574 return simd128< 32>::constant<(-1*val)>();1574 return simd128<2>::constant<(val+val+val)>(); 1575 1575 } 1576 1576 … … 1920 1920 template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::himask() 1921 1921 { 1922 return simd128<32>::constant< -65536>();1922 return simd128<32>::constant<4294901760>(); 1923 1923 } 1924 1924 … … 3169 3169 IDISA_ALWAYS_INLINE bool bitblock128::all(bitblock128_t arg1) 3170 3170 { 3171 return hsimd128<8>::signmask(simd128<8>::eq(arg1, simd128<8>::constant< -1>())) == 65535;3171 return hsimd128<8>::signmask(simd128<8>::eq(arg1, simd128<8>::constant<255>())) == 65535; 3172 3172 } 3173 3173
Note: See TracChangeset
for help on using the changeset viewer.