Changeset 2006


Ignore:
Timestamp:
Apr 8, 2012, 9:47:30 AM (7 years ago)
Author:
cameron
Message:

clean out old _ci, _ci_co wrappers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/carryQ.hpp

    r2005 r2006  
    3737// Abstract Base Class
    3838class ICarryQueue {
    39 
    40         IDISA_ALWAYS_INLINE BitBlock BitBlock_advance_ci_co(BitBlock strm, uint16_t carryno);
    41         IDISA_ALWAYS_INLINE BitBlock BitBlock_advance_co(BitBlock strm, uint16_t carryno);
    42         IDISA_ALWAYS_INLINE BitBlock BitBlock_add_ci_co(BitBlock strm1, BitBlock strm2, const uint16_t carryno);
    43         IDISA_ALWAYS_INLINE BitBlock BitBlock_add_co(BitBlock strm1, BitBlock strm2, uint16_t carryno);
    44         IDISA_ALWAYS_INLINE BitBlock BitBlock_sub_ci_co(BitBlock strm1, BitBlock strm2, uint16_t carryno);
    45         IDISA_ALWAYS_INLINE BitBlock BitBlock_sub_co(BitBlock strm1, BitBlock strm2, uint16_t carryno);
    46         IDISA_ALWAYS_INLINE BitBlock BitBlock_scantofirst(BitBlock charclass, uint16_t carryno);
    47         IDISA_ALWAYS_INLINE BitBlock BitBlock_scanthru_ci_co(BitBlock markers0, BitBlock charclass, uint16_t carryno);
    48         IDISA_ALWAYS_INLINE BitBlock BitBlock_scanthru_co(BitBlock markers0, BitBlock charclass, uint16_t carryno);
    49         IDISA_ALWAYS_INLINE BitBlock BitBlock_advance32_ci_co(BitBlock strm, uint32_t & pending);
    50         IDISA_ALWAYS_INLINE BitBlock BitBlock_advance32_co(BitBlock strm, uint32_t & pending);
    5139
    5240        IDISA_ALWAYS_INLINE BitBlock BitBlock_advance_ci_co(BitBlock strm, BitBlock carryin, uint16_t carryno);
     
    8977        }
    9078        ~CarryArray() {}
    91 
    92         IDISA_ALWAYS_INLINE BitBlock BitBlock_advance_ci_co(BitBlock strm, uint16_t carryno)
    93         {
    94                 BitBlock rslt;
    95                 advance_with_carry(strm, cq[carryno], rslt);
    96                 return rslt;
    97         }
    98 
    99         IDISA_ALWAYS_INLINE BitBlock BitBlock_advance_co(BitBlock strm, uint16_t carryno)
    100         {
    101                 BitBlock rslt;
    102                 cq[carryno] = Carry0;
    103                 advance_with_carry(strm, cq[carryno], rslt);
    104                 return rslt;
    105         }
    106 
    107         IDISA_ALWAYS_INLINE BitBlock BitBlock_add_ci_co(BitBlock strm1, BitBlock strm2, const uint16_t carryno)
    108         {
    109                 BitBlock sum;
    110                 adc(strm1, strm2, cq[carryno], sum);
    111                 return sum;
    112         }
    113 
    114         IDISA_ALWAYS_INLINE BitBlock BitBlock_add_co(BitBlock strm1, BitBlock strm2, uint16_t carryno)
    115         {
    116                 BitBlock sum;
    117                 cq[carryno] = Carry0;
    118                 adc(strm1, strm2, cq[carryno], sum);
    119                 return sum;
    120         }
    121 
    122         IDISA_ALWAYS_INLINE BitBlock BitBlock_sub_ci_co(BitBlock strm1, BitBlock strm2, uint16_t carryno)
    123         {
    124                 BitBlock diff;
    125                 sbb(strm1, strm2, cq[carryno], diff);
    126                 return diff;
    127         }
    128 
    129         IDISA_ALWAYS_INLINE BitBlock BitBlock_sub_co(BitBlock strm1, BitBlock strm2, uint16_t carryno)
    130         {
    131                 BitBlock diff;
    132                 cq[carryno] = Carry0;
    133                 sbb(strm1, strm2, cq[carryno], diff);
    134                 return diff;
    135         }
    136 
    137         IDISA_ALWAYS_INLINE BitBlock BitBlock_scantofirst(BitBlock charclass, uint16_t carryno)
    138         {
    139                 BitBlock marker;
    140                 BitBlock c = carry_flip(cq[carryno]);
    141                 adc(simd<BLOCK_SIZE>::constant<0>(), simd_not(charclass), c, marker);
    142                 cq[carryno] = carry_flip(c);
    143                 return simd_and(marker, charclass);
    144         }
    145 
    146         IDISA_ALWAYS_INLINE BitBlock BitBlock_scanthru_ci_co(BitBlock markers0, BitBlock charclass, uint16_t carryno)
    147         {
    148                 BitBlock markers1;
    149                 adc(markers0, charclass, cq[carryno], markers1);
    150                 return simd_andc(markers1, charclass);
    151         }
    152 
    153         IDISA_ALWAYS_INLINE BitBlock BitBlock_scanthru_co(BitBlock markers0, BitBlock charclass, uint16_t carryno)
    154         {
    155                 BitBlock markers1;
    156                 cq[carryno] = Carry0;
    157                 adc(markers0, charclass, cq[carryno], markers1);
    158                 return simd_andc(markers1, charclass);
    159         }
    160 
    161         IDISA_ALWAYS_INLINE BitBlock BitBlock_advance32_ci_co(BitBlock strm, uint32_t & pending)
    162         {
    163                 uint32_t temp = pending;
    164                 pending = (uint32_t) mvmd<32>::extract< (sizeof(BitBlock)/sizeof(pending))-1 >(strm);
    165                 return simd_or(simd<BLOCK_SIZE>::slli<32>(strm), mvmd<BLOCK_SIZE>::fill((uint64_t)temp));
    166         }
    167 
    168         /*
    169         static inline BitBlock BitBlock_advance32_ci_co(BitBlock strm, uint32_t & pending){
    170                 uint32_t temp = pending;
    171                 pending = sisd_to_int(sisd_srli(strm,96));
    172                 return simd_or(sisd_slli(strm, 32), sisd_from_int(temp));
    173         }
    174         */
    175 
    176         IDISA_ALWAYS_INLINE BitBlock BitBlock_advance32_co(BitBlock strm, uint32_t & pending)
    177         {
    178                 pending = (uint32_t) mvmd<32>::extract<(sizeof(BitBlock)/sizeof(pending))-1>(strm);
    179                 return mvmd<32>::slli<1>(strm);
    180         }
    181 
    182         /*
    183         static inline BitBlock BitBlock_advance32_co(BitBlock strm, uint32_t & pending) {
    184                 pending = sisd_to_int(sisd_srli(strm,96));
    185                 return sisd_slli(strm, 32);
    186         }
    187         */
    18879
    18980        IDISA_ALWAYS_INLINE BitBlock BitBlock_advance_ci_co(BitBlock strm, BitBlock carryin, uint16_t carryno)
Note: See TracChangeset for help on using the changeset viewer.