Changeset 602


Ignore:
Timestamp:
Sep 4, 2010, 2:07:37 PM (9 years ago)
Author:
cameron
Message:

Compute deletion information just once.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/u16u8/template.c

    r501 r602  
    133133}
    134134
    135 static inline void bit_del_16(BitBlock &s, BitBlock delmask){
    136         BitBlock del16_rshift1;
    137         BitBlock del16_rshift2;
    138         BitBlock del16_rshift4;
    139         BitBlock del16_rshift8;
     135static inline void delinfo_16(BitBlock & del16_rshift1, BitBlock & del16_rshift2, BitBlock & del16_rshift4,
     136                              BitBlock & del16_rshift8, BitBlock delmask){
    140137       
    141138        BitBlock del16_trans2;
     
    183180        shift_bits= simd_and(del16_rshift4,del16_rshift8);
    184181        del16_rshift8= simd_or(simd_srli_16(shift_bits,4),simd_xor(del16_rshift8,shift_bits));
    185        
     182}
     183
     184static inline void bit_del_16(BitBlock &s, BitBlock del16_rshift1, BitBlock del16_rshift2, BitBlock del16_rshift4,
     185                              BitBlock del16_rshift8, BitBlock delmask) {
    186186        s = simd_andc(s, delmask);
    187         do_right16_shifts (s, del16_rshift1, del16_rshift2, del16_rshift4,  del16_rshift8)
    188 
     187        do_right16_shifts (s, del16_rshift1, del16_rshift2, del16_rshift4,  del16_rshift8);
    189188}
    190189
     
    360359
    361360
     361
     362     BitBlock shft1, shft2, shft3, shft4;
     363     delinfo_16(shft1, shft2, shft3, shft4, delmask[0]);
    362364     for (int i=0; i< 32; i=i+4){
    363         bit_del_16(doublepair[i],delmask[0]);
    364         bit_del_16(doublepair[i+1],delmask[1]);
    365         bit_del_16(doublepair[i+2],delmask[2]);
    366         bit_del_16(doublepair[i+3],delmask[3]);
     365        bit_del_16(doublepair[i],shft1, shft2, shft3, shft4, delmask[0]);
     366     }
     367     delinfo_16(shft1, shft2, shft3, shft4, delmask[1]);
     368     for (int i=0; i< 32; i=i+4){
     369        bit_del_16(doublepair[i+1],shft1, shft2, shft3, shft4, delmask[1]);
     370     }
     371     delinfo_16(shft1, shft2, shft3, shft4, delmask[2]);
     372     for (int i=0; i< 32; i=i+4){
     373        bit_del_16(doublepair[i+2],shft1, shft2, shft3, shft4, delmask[2]);
     374     }
     375     delinfo_16(shft1, shft2, shft3, shft4, delmask[3]);
     376     for (int i=0; i< 32; i=i+4){
     377        bit_del_16(doublepair[i+3],shft1, shft2, shft3, shft4, delmask[3]);
    367378     }
    368379
Note: See TracChangeset for help on using the changeset viewer.