Changeset 1557 for trunk/lib


Ignore:
Timestamp:
Oct 22, 2011, 5:03:53 PM (8 years ago)
Author:
cameron
Message:

New strategies for ugt, ult

Location:
trunk/lib/idisa_cpp
Files:
6 edited

Legend:

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

    r1556 r1557  
    723723}
    724724
    725 //The total number of operations is 131
     725//The total number of operations is 124
    726726template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::gt(bitblock256_t arg1, bitblock256_t arg2)
    727727{
     
    730730}
    731731
    732 //The total number of operations is 63
     732//The total number of operations is 60
    733733template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::gt(bitblock256_t arg1, bitblock256_t arg2)
    734734{
     
    737737}
    738738
    739 //The total number of operations is 29
     739//The total number of operations is 28
    740740template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::gt(bitblock256_t arg1, bitblock256_t arg2)
    741741{
     
    875875}
    876876
    877 //The total number of operations is 187
     877//The total number of operations is 186
    878878template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::ult(bitblock256_t arg1, bitblock256_t arg2)
    879879{
    880         return simd_or(simd_and(simd256<(2)>::himask(), simd256<(2)>::ult(simd_and(simd256<(2)>::himask(), arg1), simd_and(simd256<(2)>::himask(), arg2))), simd_and(simd256<(2)>::lomask(), simd256<(2)>::ult(simd_and(simd256<(2)>::lomask(), arg1), simd_and(simd256<(2)>::lomask(), arg2))));
     880        return simd256<1>::ifh(simd256<(2)>::himask(), simd256<(2)>::ult(arg1, simd_and(simd256<(2)>::himask(), arg2)), simd256<(2)>::ult(simd_andc(arg1, simd256<(2)>::himask()), simd_andc(arg2, simd256<(2)>::himask())));
    881881}
    882882
     
    889889}
    890890
    891 //The total number of operations is 49
     891//The total number of operations is 48
    892892template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::ult(bitblock256_t arg1, bitblock256_t arg2)
    893893{
    894         return simd_or(simd_and(simd256<(8)>::himask(), simd256<(8)>::ult(simd_and(simd256<(8)>::himask(), arg1), simd_and(simd256<(8)>::himask(), arg2))), simd_and(simd256<(8)>::lomask(), simd256<(8)>::ult(simd_and(simd256<(8)>::lomask(), arg1), simd_and(simd256<(8)>::lomask(), arg2))));
     894        return simd256<1>::ifh(simd256<(8)>::himask(), simd256<(8)>::ult(arg1, simd_and(simd256<(8)>::himask(), arg2)), simd256<(8)>::ult(simd_andc(arg1, simd256<(8)>::himask()), simd_andc(arg2, simd256<(8)>::himask())));
    895895}
    896896
     
    938938}
    939939
    940 //The total number of operations is 189
     940//The total number of operations is 188
    941941template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::lt(bitblock256_t arg1, bitblock256_t arg2)
    942942{
     
    953953}
    954954
    955 //The total number of operations is 51
     955//The total number of operations is 50
    956956template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::lt(bitblock256_t arg1, bitblock256_t arg2)
    957957{
     
    11061106}
    11071107
    1108 //The total number of operations is 129
     1108//The total number of operations is 122
    11091109template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::ugt(bitblock256_t arg1, bitblock256_t arg2)
    11101110{
    1111         return simd_or(simd_and(simd256<(2)>::himask(), simd256<(2)>::ugt(simd_and(simd256<(2)>::himask(), arg1), simd_and(simd256<(2)>::himask(), arg2))), simd_and(simd256<(2)>::lomask(), simd256<(2)>::ugt(simd_and(simd256<(2)>::lomask(), arg1), simd_and(simd256<(2)>::lomask(), arg2))));
    1112 }
    1113 
    1114 //The total number of operations is 61
     1111        return simd256<1>::ifh(simd256<(2)>::himask(), simd256<(2)>::ugt(simd_and(simd256<(2)>::himask(), arg1), arg2), simd256<(2)>::ugt(simd_andc(arg1, simd256<(2)>::himask()), simd_andc(arg2, simd256<(2)>::himask())));
     1112}
     1113
     1114//The total number of operations is 58
    11151115template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::ugt(bitblock256_t arg1, bitblock256_t arg2)
    11161116{
    1117         return simd_or(simd_and(simd256<(4)>::himask(), simd256<(4)>::ugt(simd_and(simd256<(4)>::himask(), arg1), simd_and(simd256<(4)>::himask(), arg2))), simd_and(simd256<(4)>::lomask(), simd256<(4)>::ugt(simd_and(simd256<(4)>::lomask(), arg1), simd_and(simd256<(4)>::lomask(), arg2))));
    1118 }
    1119 
    1120 //The total number of operations is 27
     1117        return simd256<1>::ifh(simd256<(4)>::himask(), simd256<(4)>::ugt(simd_and(simd256<(4)>::himask(), arg1), arg2), simd256<(4)>::ugt(simd_andc(arg1, simd256<(4)>::himask()), simd_andc(arg2, simd256<(4)>::himask())));
     1118}
     1119
     1120//The total number of operations is 26
    11211121template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::ugt(bitblock256_t arg1, bitblock256_t arg2)
    11221122{
    1123         return simd_or(simd_and(simd256<(8)>::himask(), simd256<(8)>::ugt(simd_and(simd256<(8)>::himask(), arg1), simd_and(simd256<(8)>::himask(), arg2))), simd_and(simd256<(8)>::lomask(), simd256<(8)>::ugt(simd_and(simd256<(8)>::lomask(), arg1), simd_and(simd256<(8)>::lomask(), arg2))));
     1123        return simd256<1>::ifh(simd256<(8)>::himask(), simd256<(8)>::ugt(simd_and(simd256<(8)>::himask(), arg1), arg2), simd256<(8)>::ugt(simd_andc(arg1, simd256<(8)>::himask()), simd_andc(arg2, simd256<(8)>::himask())));
    11241124}
    11251125
     
    20522052}
    20532053
    2054 //The total number of operations is 226
     2054//The total number of operations is 219
    20552055template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::abs(bitblock256_t arg1)
    20562056{
     
    20652065}
    20662066
    2067 //The total number of operations is 52
     2067//The total number of operations is 51
    20682068template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::abs(bitblock256_t arg1)
    20692069{
     
    22072207}
    22082208
    2209 //The total number of operations is 546
     2209//The total number of operations is 534
    22102210template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<2>::packss(bitblock256_t arg1, bitblock256_t arg2)
    22112211{
     
    22152215}
    22162216
    2217 //The total number of operations is 322
     2217//The total number of operations is 318
    22182218template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<4>::packss(bitblock256_t arg1, bitblock256_t arg2)
    22192219{
  • trunk/lib/idisa_cpp/idisa_sse2.cpp

    r1556 r1557  
    656656}
    657657
    658 //The total number of operations is 43
     658//The total number of operations is 42
    659659template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::gt(bitblock128_t arg1, bitblock128_t arg2)
    660660{
     
    784784}
    785785
    786 //The total number of operations is 41
     786//The total number of operations is 40
    787787template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ult(bitblock128_t arg1, bitblock128_t arg2)
    788788{
    789         return simd_or(simd_and(simd128<(2)>::himask(), simd128<(2)>::ult(simd_and(simd128<(2)>::himask(), arg1), simd_and(simd128<(2)>::himask(), arg2))), simd_and(simd128<(2)>::lomask(), simd128<(2)>::ult(simd_and(simd128<(2)>::lomask(), arg1), simd_and(simd128<(2)>::lomask(), arg2))));
     789        return simd128<1>::ifh(simd128<(2)>::himask(), simd128<(2)>::ult(arg1, simd_and(simd128<(2)>::himask(), arg2)), simd128<(2)>::ult(simd_andc(arg1, simd128<(2)>::himask()), simd_andc(arg2, simd128<(2)>::himask())));
    790790}
    791791
     
    801801template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ult(bitblock128_t arg1, bitblock128_t arg2)
    802802{
    803         bitblock128_t high_bit = simd128<4>::constant<(8)>();
    804         return simd128<4>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
     803        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::ult(arg1, simd_and(simd128<(8)>::himask(), arg2)), simd128<(8)>::ult(simd_andc(arg1, simd128<(8)>::himask()), simd_andc(arg2, simd128<(8)>::himask())));
    805804}
    806805
     
    841840}
    842841
    843 //The total number of operations is 43
     842//The total number of operations is 42
    844843template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::lt(bitblock128_t arg1, bitblock128_t arg2)
    845844{
     
    1000999}
    10011000
    1002 //The total number of operations is 41
     1001//The total number of operations is 40
    10031002template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ugt(bitblock128_t arg1, bitblock128_t arg2)
    10041003{
    1005         return simd_or(simd_and(simd128<(2)>::himask(), simd128<(2)>::ugt(simd_and(simd128<(2)>::himask(), arg1), simd_and(simd128<(2)>::himask(), arg2))), simd_and(simd128<(2)>::lomask(), simd128<(2)>::ugt(simd_and(simd128<(2)>::lomask(), arg1), simd_and(simd128<(2)>::lomask(), arg2))));
     1004        return simd128<1>::ifh(simd128<(2)>::himask(), simd128<(2)>::ugt(simd_and(simd128<(2)>::himask(), arg1), arg2), simd128<(2)>::ugt(simd_andc(arg1, simd128<(2)>::himask()), simd_andc(arg2, simd128<(2)>::himask())));
    10061005}
    10071006
     
    10171016template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ugt(bitblock128_t arg1, bitblock128_t arg2)
    10181017{
    1019         bitblock128_t high_bit = simd128<4>::constant<(8)>();
    1020         return simd128<4>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
     1018        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::ugt(simd_and(simd128<(8)>::himask(), arg1), arg2), simd128<(8)>::ugt(simd_andc(arg1, simd128<(8)>::himask()), simd_andc(arg2, simd128<(8)>::himask())));
    10211019}
    10221020
     
    18481846}
    18491847
    1850 //The total number of operations is 72
     1848//The total number of operations is 71
    18511849template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::abs(bitblock128_t arg1)
    18521850{
  • trunk/lib/idisa_cpp/idisa_sse3.cpp

    r1556 r1557  
    656656}
    657657
    658 //The total number of operations is 43
     658//The total number of operations is 42
    659659template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::gt(bitblock128_t arg1, bitblock128_t arg2)
    660660{
     
    784784}
    785785
    786 //The total number of operations is 41
     786//The total number of operations is 40
    787787template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ult(bitblock128_t arg1, bitblock128_t arg2)
    788788{
    789         return simd_or(simd_and(simd128<(2)>::himask(), simd128<(2)>::ult(simd_and(simd128<(2)>::himask(), arg1), simd_and(simd128<(2)>::himask(), arg2))), simd_and(simd128<(2)>::lomask(), simd128<(2)>::ult(simd_and(simd128<(2)>::lomask(), arg1), simd_and(simd128<(2)>::lomask(), arg2))));
     789        return simd128<1>::ifh(simd128<(2)>::himask(), simd128<(2)>::ult(arg1, simd_and(simd128<(2)>::himask(), arg2)), simd128<(2)>::ult(simd_andc(arg1, simd128<(2)>::himask()), simd_andc(arg2, simd128<(2)>::himask())));
    790790}
    791791
     
    801801template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ult(bitblock128_t arg1, bitblock128_t arg2)
    802802{
    803         bitblock128_t high_bit = simd128<4>::constant<(8)>();
    804         return simd128<4>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
     803        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::ult(arg1, simd_and(simd128<(8)>::himask(), arg2)), simd128<(8)>::ult(simd_andc(arg1, simd128<(8)>::himask()), simd_andc(arg2, simd128<(8)>::himask())));
    805804}
    806805
     
    841840}
    842841
    843 //The total number of operations is 43
     842//The total number of operations is 42
    844843template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::lt(bitblock128_t arg1, bitblock128_t arg2)
    845844{
     
    1000999}
    10011000
    1002 //The total number of operations is 41
     1001//The total number of operations is 40
    10031002template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ugt(bitblock128_t arg1, bitblock128_t arg2)
    10041003{
    1005         return simd_or(simd_and(simd128<(2)>::himask(), simd128<(2)>::ugt(simd_and(simd128<(2)>::himask(), arg1), simd_and(simd128<(2)>::himask(), arg2))), simd_and(simd128<(2)>::lomask(), simd128<(2)>::ugt(simd_and(simd128<(2)>::lomask(), arg1), simd_and(simd128<(2)>::lomask(), arg2))));
     1004        return simd128<1>::ifh(simd128<(2)>::himask(), simd128<(2)>::ugt(simd_and(simd128<(2)>::himask(), arg1), arg2), simd128<(2)>::ugt(simd_andc(arg1, simd128<(2)>::himask()), simd_andc(arg2, simd128<(2)>::himask())));
    10061005}
    10071006
     
    10171016template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ugt(bitblock128_t arg1, bitblock128_t arg2)
    10181017{
    1019         bitblock128_t high_bit = simd128<4>::constant<(8)>();
    1020         return simd128<4>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
     1018        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::ugt(simd_and(simd128<(8)>::himask(), arg1), arg2), simd128<(8)>::ugt(simd_andc(arg1, simd128<(8)>::himask()), simd_andc(arg2, simd128<(8)>::himask())));
    10211019}
    10221020
     
    18481846}
    18491847
    1850 //The total number of operations is 72
     1848//The total number of operations is 71
    18511849template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::abs(bitblock128_t arg1)
    18521850{
  • trunk/lib/idisa_cpp/idisa_sse4_1.cpp

    r1556 r1557  
    662662}
    663663
    664 //The total number of operations is 43
     664//The total number of operations is 42
    665665template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::gt(bitblock128_t arg1, bitblock128_t arg2)
    666666{
     
    790790}
    791791
    792 //The total number of operations is 41
     792//The total number of operations is 40
    793793template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ult(bitblock128_t arg1, bitblock128_t arg2)
    794794{
    795         return simd_or(simd_and(simd128<(2)>::himask(), simd128<(2)>::ult(simd_and(simd128<(2)>::himask(), arg1), simd_and(simd128<(2)>::himask(), arg2))), simd_and(simd128<(2)>::lomask(), simd128<(2)>::ult(simd_and(simd128<(2)>::lomask(), arg1), simd_and(simd128<(2)>::lomask(), arg2))));
     795        return simd128<1>::ifh(simd128<(2)>::himask(), simd128<(2)>::ult(arg1, simd_and(simd128<(2)>::himask(), arg2)), simd128<(2)>::ult(simd_andc(arg1, simd128<(2)>::himask()), simd_andc(arg2, simd128<(2)>::himask())));
    796796}
    797797
     
    807807template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ult(bitblock128_t arg1, bitblock128_t arg2)
    808808{
    809         bitblock128_t high_bit = simd128<4>::constant<(8)>();
    810         return simd128<4>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
     809        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::ult(arg1, simd_and(simd128<(8)>::himask(), arg2)), simd128<(8)>::ult(simd_andc(arg1, simd128<(8)>::himask()), simd_andc(arg2, simd128<(8)>::himask())));
    811810}
    812811
     
    847846}
    848847
    849 //The total number of operations is 43
     848//The total number of operations is 42
    850849template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::lt(bitblock128_t arg1, bitblock128_t arg2)
    851850{
     
    10061005}
    10071006
    1008 //The total number of operations is 41
     1007//The total number of operations is 40
    10091008template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ugt(bitblock128_t arg1, bitblock128_t arg2)
    10101009{
    1011         return simd_or(simd_and(simd128<(2)>::himask(), simd128<(2)>::ugt(simd_and(simd128<(2)>::himask(), arg1), simd_and(simd128<(2)>::himask(), arg2))), simd_and(simd128<(2)>::lomask(), simd128<(2)>::ugt(simd_and(simd128<(2)>::lomask(), arg1), simd_and(simd128<(2)>::lomask(), arg2))));
     1010        return simd128<1>::ifh(simd128<(2)>::himask(), simd128<(2)>::ugt(simd_and(simd128<(2)>::himask(), arg1), arg2), simd128<(2)>::ugt(simd_andc(arg1, simd128<(2)>::himask()), simd_andc(arg2, simd128<(2)>::himask())));
    10121011}
    10131012
     
    10231022template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ugt(bitblock128_t arg1, bitblock128_t arg2)
    10241023{
    1025         bitblock128_t high_bit = simd128<4>::constant<(8)>();
    1026         return simd128<4>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
     1024        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::ugt(simd_and(simd128<(8)>::himask(), arg1), arg2), simd128<(8)>::ugt(simd_andc(arg1, simd128<(8)>::himask()), simd_andc(arg2, simd128<(8)>::himask())));
    10271025}
    10281026
     
    18511849}
    18521850
    1853 //The total number of operations is 72
     1851//The total number of operations is 71
    18541852template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::abs(bitblock128_t arg1)
    18551853{
  • trunk/lib/idisa_cpp/idisa_sse4_2.cpp

    r1556 r1557  
    658658}
    659659
    660 //The total number of operations is 43
     660//The total number of operations is 42
    661661template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::gt(bitblock128_t arg1, bitblock128_t arg2)
    662662{
     
    782782}
    783783
    784 //The total number of operations is 41
     784//The total number of operations is 40
    785785template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ult(bitblock128_t arg1, bitblock128_t arg2)
    786786{
    787         return simd_or(simd_and(simd128<(2)>::himask(), simd128<(2)>::ult(simd_and(simd128<(2)>::himask(), arg1), simd_and(simd128<(2)>::himask(), arg2))), simd_and(simd128<(2)>::lomask(), simd128<(2)>::ult(simd_and(simd128<(2)>::lomask(), arg1), simd_and(simd128<(2)>::lomask(), arg2))));
     787        return simd128<1>::ifh(simd128<(2)>::himask(), simd128<(2)>::ult(arg1, simd_and(simd128<(2)>::himask(), arg2)), simd128<(2)>::ult(simd_andc(arg1, simd128<(2)>::himask()), simd_andc(arg2, simd128<(2)>::himask())));
    788788}
    789789
     
    799799template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ult(bitblock128_t arg1, bitblock128_t arg2)
    800800{
    801         bitblock128_t high_bit = simd128<4>::constant<(8)>();
    802         return simd128<4>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
     801        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::ult(arg1, simd_and(simd128<(8)>::himask(), arg2)), simd128<(8)>::ult(simd_andc(arg1, simd128<(8)>::himask()), simd_andc(arg2, simd128<(8)>::himask())));
    803802}
    804803
     
    840839}
    841840
    842 //The total number of operations is 43
     841//The total number of operations is 42
    843842template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::lt(bitblock128_t arg1, bitblock128_t arg2)
    844843{
     
    998997}
    999998
    1000 //The total number of operations is 41
     999//The total number of operations is 40
    10011000template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ugt(bitblock128_t arg1, bitblock128_t arg2)
    10021001{
    1003         return simd_or(simd_and(simd128<(2)>::himask(), simd128<(2)>::ugt(simd_and(simd128<(2)>::himask(), arg1), simd_and(simd128<(2)>::himask(), arg2))), simd_and(simd128<(2)>::lomask(), simd128<(2)>::ugt(simd_and(simd128<(2)>::lomask(), arg1), simd_and(simd128<(2)>::lomask(), arg2))));
     1002        return simd128<1>::ifh(simd128<(2)>::himask(), simd128<(2)>::ugt(simd_and(simd128<(2)>::himask(), arg1), arg2), simd128<(2)>::ugt(simd_andc(arg1, simd128<(2)>::himask()), simd_andc(arg2, simd128<(2)>::himask())));
    10041003}
    10051004
     
    10151014template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ugt(bitblock128_t arg1, bitblock128_t arg2)
    10161015{
    1017         bitblock128_t high_bit = simd128<4>::constant<(8)>();
    1018         return simd128<4>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
     1016        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::ugt(simd_and(simd128<(8)>::himask(), arg1), arg2), simd128<(8)>::ugt(simd_andc(arg1, simd128<(8)>::himask()), simd_andc(arg2, simd128<(8)>::himask())));
    10191017}
    10201018
     
    18331831}
    18341832
    1835 //The total number of operations is 72
     1833//The total number of operations is 71
    18361834template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::abs(bitblock128_t arg1)
    18371835{
  • trunk/lib/idisa_cpp/idisa_ssse3.cpp

    r1556 r1557  
    661661}
    662662
    663 //The total number of operations is 43
     663//The total number of operations is 42
    664664template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::gt(bitblock128_t arg1, bitblock128_t arg2)
    665665{
     
    789789}
    790790
    791 //The total number of operations is 41
     791//The total number of operations is 40
    792792template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ult(bitblock128_t arg1, bitblock128_t arg2)
    793793{
    794         return simd_or(simd_and(simd128<(2)>::himask(), simd128<(2)>::ult(simd_and(simd128<(2)>::himask(), arg1), simd_and(simd128<(2)>::himask(), arg2))), simd_and(simd128<(2)>::lomask(), simd128<(2)>::ult(simd_and(simd128<(2)>::lomask(), arg1), simd_and(simd128<(2)>::lomask(), arg2))));
     794        return simd128<1>::ifh(simd128<(2)>::himask(), simd128<(2)>::ult(arg1, simd_and(simd128<(2)>::himask(), arg2)), simd128<(2)>::ult(simd_andc(arg1, simd128<(2)>::himask()), simd_andc(arg2, simd128<(2)>::himask())));
    795795}
    796796
     
    806806template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ult(bitblock128_t arg1, bitblock128_t arg2)
    807807{
    808         bitblock128_t high_bit = simd128<4>::constant<(8)>();
    809         return simd128<4>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
     808        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::ult(arg1, simd_and(simd128<(8)>::himask(), arg2)), simd128<(8)>::ult(simd_andc(arg1, simd128<(8)>::himask()), simd_andc(arg2, simd128<(8)>::himask())));
    810809}
    811810
     
    846845}
    847846
    848 //The total number of operations is 43
     847//The total number of operations is 42
    849848template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::lt(bitblock128_t arg1, bitblock128_t arg2)
    850849{
     
    10051004}
    10061005
    1007 //The total number of operations is 41
     1006//The total number of operations is 40
    10081007template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ugt(bitblock128_t arg1, bitblock128_t arg2)
    10091008{
    1010         return simd_or(simd_and(simd128<(2)>::himask(), simd128<(2)>::ugt(simd_and(simd128<(2)>::himask(), arg1), simd_and(simd128<(2)>::himask(), arg2))), simd_and(simd128<(2)>::lomask(), simd128<(2)>::ugt(simd_and(simd128<(2)>::lomask(), arg1), simd_and(simd128<(2)>::lomask(), arg2))));
     1009        return simd128<1>::ifh(simd128<(2)>::himask(), simd128<(2)>::ugt(simd_and(simd128<(2)>::himask(), arg1), arg2), simd128<(2)>::ugt(simd_andc(arg1, simd128<(2)>::himask()), simd_andc(arg2, simd128<(2)>::himask())));
    10111010}
    10121011
     
    10221021template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ugt(bitblock128_t arg1, bitblock128_t arg2)
    10231022{
    1024         bitblock128_t high_bit = simd128<4>::constant<(8)>();
    1025         return simd128<4>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
     1023        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::ugt(simd_and(simd128<(8)>::himask(), arg1), arg2), simd128<(8)>::ugt(simd_andc(arg1, simd128<(8)>::himask()), simd_andc(arg2, simd128<(8)>::himask())));
    10261024}
    10271025
     
    18531851}
    18541852
    1855 //The total number of operations is 72
     1853//The total number of operations is 71
    18561854template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::abs(bitblock128_t arg1)
    18571855{
Note: See TracChangeset for help on using the changeset viewer.