Ignore:
Timestamp:
Nov 2, 2011, 8:16:21 PM (8 years ago)
Author:
vla24
Message:

SymbolTable?: Integrated symbol table with the new IDISA architecture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/SymbolTable/symtab_pbgs_identity_template.cpp

    r1499 r1648  
    1 #define TEMPLATED_SIMD_LIB
    2 
    3 #define USE_MASK_COMPARE    //Comparison using masking technique.
    4 
    5 #include <stdio.h>
    6 #include <stdlib.h>
    7 #include <errno.h>
    8 #include <sys/types.h>
    9 #include <sys/stat.h>
    10 #include <../lib_simd.h>
     1#include "../symtab_global.h"
    112#include <pbgs_identity_symbol_table.h>
    12 #include <queue>
    13 #include <string>
    14 using namespace std;
    15 
    16 #define DEBUG 0
    17 #define BLOCK_SIZE (sizeof(SIMD_type) * 8)
    18 #define SEGMENT_BLOCKS 12
    19 #define BUFFER_SIZE (BLOCK_SIZE * SEGMENT_BLOCKS)
    20 #define OVERLAP_BUFSIZE 2*(sizeof(SIMD_type))
    21 
    22 #include <../carryQ.h>
    23 #include <xmldecl.h>
    24 #include <namechars.h>
    25 #include <../perflib/perfsec.h>
    26 #include <../s2p.h>
    27 
    28 #include <TagMatcher.h>
    29 #include <LineColTracker.h>
    30 #include <ErrorUtil.h>
    31 #include <ErrorTracker.h>
    32 #include <XMLTestSuiteError.h>
    333
    344#ifdef BUFFER_PROFILING
     
    5222LineColTracker tracker;
    5323TagMatcher matcher;
    54 BitBlock EOF_mask = simd_const_1(1);
     24BitBlock EOF_mask = simd<1>::constant<1>();
    5525ErrorTracker error_tracker;
    5626
     
    151121{
    152122    BitBlock s = block[0];
    153     BitBlock temp = simd_and( s, simd_not(simd<128>::sll(simd<2>::constant<3>(), sisd_from_int(pos))) );
     123    BitBlock temp = simd_and( s, simd_not(simd<128>::sll(simd<2>::constant<3>(), convert(pos))) );
    154124
    155125    if (bitblock_has_bit(temp))
    156126    {
    157127        // sizeof (BitBlock)*8 - cbzl( s & ~(~0 << pos)) - 1;
    158         return BLOCK_SIZE - count_backward_zeroes (temp) - 1;
     128        return BLOCK_SIZE - count_reverse_zeroes (temp) - 1;
    159129    }
    160130    else
     
    461431
    462432    // Store the last starting position in case we hit boundary case
    463     previous_block_last_elem_start = - count_backward_zeroes (elem_starts);
     433    previous_block_last_elem_start = - count_reverse_zeroes (elem_starts);
    464434
    465435    //copy current hash value data as previous one.
     
    662632    block_base = block_pos;
    663633    if (remaining > 0 || @any_carry) {
    664           EOF_mask = sisd_srl(simd_const_1(1),sisd_from_int(BLOCK_SIZE-remaining));
     634          EOF_mask = bitblock::srl(simd<1>::constant<1>(), convert(BLOCK_SIZE-remaining));
    665635          s2p_do_final_block((BytePack *) &srcbuf[block_pos], basis_bits, EOF_mask);
    666636          @final_block_stmts
Note: See TracChangeset for help on using the changeset viewer.