Ignore:
Timestamp:
Oct 28, 2011, 7:07:10 AM (8 years ago)
Author:
cameron
Message:

Update u8u16 to work with new libraries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/u8u16/pablo_template.cpp

    r1590 r1592  
    7373        del8_trans2 = simd_and(del8_rshift1, delmask);
    7474        /* Odd number of transition positions to left. */
    75         del8_rshift2 = simd_xor(simd<8>::slli<>(del8_trans2, 1), simd<8>::slli<>(del8_trans2, 2));
    76         del8_rshift2 = simd_xor(del8_rshift2, simd<8>::slli<4>(del8_rshift2));
     75        del8_rshift2 = simd_xor(simd<8>::slli<1>(del8_trans2), simd<8>::slli<2>(del8_trans2));
     76        del8_rshift2 = simd_xor(del8_rshift2, simd<8>::slli<2>(del8_rshift2));
    7777        del8_rshift2 = simd_xor(del8_rshift2, simd<8>::slli<4>(del8_rshift2));
    7878        /* Transition positions: odd |del2count| to left, this one a transition to even. */
    7979        del8_trans4 = simd_and(del8_rshift2, del8_trans2);
    80         del8_rshift4 = simd_xor(simd<8>::slli<>(del8_trans4, 1), simd<8>::slli<2>(del8_trans4));
     80        del8_rshift4 = simd_xor(simd<8>::slli<1>(del8_trans4), simd<8>::slli<2>(del8_trans4));
    8181        del8_rshift4 = simd_xor(del8_rshift4, simd<8>::slli<2>(del8_rshift4));
    8282        del8_rshift4 = simd_xor(del8_rshift4, simd<8>::slli<4>(del8_rshift4));
     
    9696static inline void del_count(BitBlock delmask, unsigned char *u16_units_per_reg){
    9797
    98         delcounts_8 = simd<8>::popcount(delmask);
    99         bitblock::store_unaligned(simd<8>::sub(simd<8>::constant<8>(), delcounts_8),
    100                           (BytePack *) u16_units_per_reg);
     98        BitBlock delcounts_8 = simd<8>::popcount(delmask);
     99        bitblock::store_unaligned((BytePack *) u16_units_per_reg, simd<8>::sub(simd<8>::constant<8>(), delcounts_8));
    101100}
    102101
     
    110109  @decl
    111110
    112   SIMD_type u16l [8];
    113   SIMD_type u16h [8];
     111  BitBlock u16l [8];
     112  BitBlock u16h [8];
    114113
    115114
     
    177176        else *err = U_ILLEGAL_CHAR_FOUND;
    178177        BitBlock cutoff_mask = bitblock::sll(simd<1>::constant<1>(), convert(errpos));
    179         BitBlock errbit = simd_andc(error_mask, bitblock::slli(cutoff_mask, 1));
     178        BitBlock errbit = simd_andc(error_mask, bitblock::slli<1>(cutoff_mask));
    180179        u8advance = errpos;
    181180        if (bitblock::any(simd_and(u8.scope44, errbit))) {
     
    232231                        U16h[0], U16h[1],U16h[2] ,U16h[3] ,U16h[4] ,U16h[5] ,U16h[6] ,U16h[7]);
    233232      for (int i=0; i<8; i++) {
    234         U16s[2*i] = simd<8>::mergel(U16l[i], U16h[i]);
    235         U16s[2*i+1] = simd<8>::mergeh(U16l[i], U16h[i]);
     233        U16s[2*i] = esimd<8>::mergel(U16l[i], U16h[i]);
     234        U16s[2*i+1] = esimd<8>::mergeh(U16l[i], U16h[i]);
    236235      }
    237236       
     
    240239
    241240      for(int j=0; j<16; j++){
    242         bitblock::store_unaligned(U16s[j],(SIMD_type *) (*targetbuf));
     241        bitblock::store_unaligned((BitBlock *) (*targetbuf), U16s[j]);
    243242        *targetbuf += u16_units_per_reg[j];
    244243      }
Note: See TracChangeset for help on using the changeset viewer.