Changeset 2916


Ignore:
Timestamp:
Mar 6, 2013, 3:23:53 PM (6 years ago)
Author:
cameron
Message:

Add pabloSupport

Location:
proto/CSV/csv2xml
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • proto/CSV/csv2xml/pablo_template.cpp

    r2663 r2916  
    1313#include "../lib/carryQ.hpp"
    1414#include "../lib/bitblock_iterator.hpp"
     15#include "../lib/pabloSupport.hpp"
    1516#include "../lib/s2p.hpp"
    1617#include "../lib/perflib/perfsec.h"
  • proto/CSV/csv2xml/src/csv.cpp

    r2663 r2916  
    1313#include "../lib/carryQ.hpp"
    1414#include "../lib/bitblock_iterator.hpp"
     15#include "../lib/pabloSupport.hpp"
    1516#include "../lib/s2p.hpp"
    1617#include "../lib/perflib/perfsec.h"
     
    123124                BitBlock temp11, temp12, temp13, temp14, temp15, temp16, temp17, temp18;
    124125                BitBlock temp19, temp20, temp21, temp22, temp23, temp24;
     126
    125127
    126128
     
    167169
    168170
     171
    169172        temp1 = simd_andc(basis_bits.bit_1, basis_bits.bit_0);
    170173        temp2 = simd_andc(basis_bits.bit_3, basis_bits.bit_2);
     
    201204        lex.AndSymbol = simd_and(temp9, temp24);
    202205  }
    203   void do_segment(Basis_bits basis_bits[], Lex lex[], int segment_blocks) {
    204   int i;
    205   for (i = 0; i < segment_blocks; i++)
    206     do_block(basis_bits[i], lex[i]);
    207   }
    208206 
    209207  };
     
    215213                BitBlock odd, even, start, even_start, even_final, escape, odd_start;
    216214                BitBlock odd_final;
     215
    217216                BitBlock tempvar0, tempvar1;
    218217
     
    220219        odd = Simd_const_odd;
    221220        even = Simd_const_even;
    222         tempvar0 = carryQ.BitBlock_advance_ci_co(lex.BackSlash, carryQ.get_carry_in(0), 0);
     221        carryQ.cq[0] = bitblock::srli<127>(pablo_blk_Advance(lex.BackSlash, carryQ.get_carry_in(0), tempvar0));
    223222        start = simd_andc(lex.BackSlash, tempvar0);
    224223        even_start = simd_and(start, even);
    225         even_final = carryQ.BitBlock_scanthru_ci_co(even_start, lex.BackSlash, carryQ.get_carry_in(1), 1);
     224        carryQ.cq[1] = bitblock::srli<127>(pablo_blk_ScanThru(even_start, lex.BackSlash, carryQ.get_carry_in(1), even_final));
    226225        escape = simd_and(even_final, odd);
    227226        odd_start = simd_and(start, odd);
    228         odd_final = carryQ.BitBlock_scanthru_ci_co(odd_start, lex.BackSlash, carryQ.get_carry_in(2), 2);
     227        carryQ.cq[2] = bitblock::srli<127>(pablo_blk_ScanThru(odd_start, lex.BackSlash, carryQ.get_carry_in(2), odd_final));
    229228        marker.escape = simd_or(escape, simd_and(odd_final, even));
    230229        marker.quote = simd_andc(lex.DQuote, marker.escape);
     
    240239        }
    241240        marker.eol = simd_andc(simd_or(lex.CR, lex.LF), marker.quote_mask);
    242         tempvar1 = carryQ.BitBlock_advance_ci_co(lex.CR, carryQ.get_carry_in(3), 3);
     241        carryQ.cq[3] = bitblock::srli<127>(pablo_blk_Advance(lex.CR, carryQ.get_carry_in(3), tempvar1));
    243242        marker.hide = simd_or(marker.quote, simd_andc(simd_and(tempvar1, lex.LF), marker.quote_mask));
    244243        marker.eol = simd_andc(marker.eol, marker.hide);
     
    248247                BitBlock odd, even, start, even_start, even_final, escape, odd_start;
    249248                BitBlock odd_final;
     249
    250250                BitBlock tempvar0, tempvar1;
    251251
     
    253253        odd = Simd_const_odd;
    254254        even = Simd_const_even;
    255         tempvar0 = carryQ.BitBlock_advance_ci_co(lex.BackSlash, carryQ.get_carry_in(0), 0);
     255        carryQ.cq[0] = bitblock::srli<127>(pablo_blk_Advance(lex.BackSlash, carryQ.get_carry_in(0), tempvar0));
    256256        start = simd_andc(lex.BackSlash, tempvar0);
    257257        even_start = simd_and(start, even);
    258         even_final = carryQ.BitBlock_scanthru_ci_co(even_start, lex.BackSlash, carryQ.get_carry_in(1), 1);
     258        carryQ.cq[1] = bitblock::srli<127>(pablo_blk_ScanThru(even_start, lex.BackSlash, carryQ.get_carry_in(1), even_final));
    259259        escape = simd_and(even_final, odd);
    260260        odd_start = simd_and(start, odd);
    261         odd_final = carryQ.BitBlock_scanthru_ci_co(odd_start, lex.BackSlash, carryQ.get_carry_in(2), 2);
     261        carryQ.cq[2] = bitblock::srli<127>(pablo_blk_ScanThru(odd_start, lex.BackSlash, carryQ.get_carry_in(2), odd_final));
    262262        marker.escape = simd_or(escape, simd_and(odd_final, even));
    263263        marker.quote = simd_andc(lex.DQuote, marker.escape);
     
    273273        }
    274274        marker.eol = simd_andc(simd_or(lex.CR, lex.LF), marker.quote_mask);
    275         tempvar1 = carryQ.BitBlock_advance_ci_co(lex.CR, carryQ.get_carry_in(3), 3);
     275        carryQ.cq[3] = bitblock::srli<127>(pablo_blk_Advance(lex.CR, carryQ.get_carry_in(3), tempvar1));
    276276        marker.hide = simd_or(marker.quote, simd_andc(simd_and(tempvar1, lex.LF), marker.quote_mask));
    277277        marker.eol = simd_andc(marker.eol, marker.hide);
    278   }
    279   void do_segment(Lex lex[], Marker marker[], int segment_blocks) {
    280   int i;
    281   for (i = 0; i < segment_blocks; i++)
    282     do_block(lex[i], marker[i]);
    283278  }
    284279  CarryArray<4, 0> carryQ;
     
    502497
    503498  struct Marker marker;
     499
    504500
    505501;
Note: See TracChangeset for help on using the changeset viewer.