Changeset 2056 for trunk


Ignore:
Timestamp:
Apr 27, 2012, 5:09:55 AM (7 years ago)
Author:
ksherdy
Message:

Updated div2 to support arbitrary lengths.

Location:
trunk/symbol_table
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/symbol_table/div2_group_strms.py

    r2055 r2056  
    6262
    6363        # Group symbols of length greater than equal to 17
    64         groups.ends_gte_17 = temp &~ groups.ends
     64        groups.ends_gte_17 = temp
    6565
    6666def Main(groups):
  • trunk/symbol_table/src/compare_strategy.hpp

    r2053 r2056  
    141141};
    142142
     143template<> class compare_strategy_t<16>: public compare_strategy {
     144public:
     145    static IDISA_ALWAYS_INLINE bool compare(uint8_t * x, uint8_t * y, const uint32_t lgth=0) {
     146        return overlap_compare<16, BitBlock>(x,y);
     147    }
     148};
     149
    143150///* Default */
    144151//class identity_strategy_d: public compare_strategy {
  • trunk/symbol_table/src/hash_table.hpp

    r2054 r2056  
    397397        // Even
    398398        ///////////////////////////////////////////////////////////////////////////
    399 /*      if (!div2_hash_table::is_delimeter(raw_bytes, index_of_last)) {
     399        if (!div2_hash_table::is_delimeter(raw_bytes, index_of_last)) {
    400400
    401401            if(lookup(bucket, raw_bytes, idx, lgth, h0, h1, gid)) {
     
    406406            return gid;
    407407
    408         } else*/ {
    409 
    410         ///////////////////////////////////////////////////////////////////////////
    411         // Odd
    412         ///////////////////////////////////////////////////////////////////////////
    413             ///lgth--;
    414 
     408        } else {
     409
     410            ///////////////////////////////////////////////////////////////////////////
     411            // Odd
     412            ///////////////////////////////////////////////////////////////////////////
    415413            if(this->hash_table_odd.lookup(bucket, raw_bytes, idx, lgth-1, h0, h1, gid)) {
    416414                return gid;
Note: See TracChangeset for help on using the changeset viewer.