Ignore:
Timestamp:
May 16, 2012, 3:02:58 PM (7 years ago)
Author:
ksherdy
Message:

Added bit / byte strategy. Added length test to hash table.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/symbol_table/src/compare_strategy.hpp

    r2103 r2106  
    22#define COMPARE_STRATEGY_HPP
    33
    4 #include "types.hpp"
     4#include "strategy_types.hpp"
    55
    66///////////////////////////////////////////////////////////////////////////////
     
    187187
    188188///////////////////////////////////////////////////////////////////////////////
    189 // Single specialized
    190 ///////////////////////////////////////////////////////////////////////////////
    191 template<> class compare_strategy_t<0,single> {
    192 public:
    193     static IDISA_ALWAYS_INLINE bool compare(uint8_t * x, uint8_t * y, const uint32_t lgth) {
    194         return overlap_compare<uint8_t>(x,y,lgth);
     189// Bit Byte specialized
     190///////////////////////////////////////////////////////////////////////////////
     191template<> class compare_strategy_t<0,bit_byte> {
     192public:
     193    static IDISA_ALWAYS_INLINE bool compare(uint8_t * x, uint8_t * y, const uint32_t lgth) {
     194        return overlap_compare<uint64_t>(x,y,lgth);
     195    }
     196};
     197
     198template<> class compare_strategy_t<7,bit_byte> {
     199public:
     200    static IDISA_ALWAYS_INLINE bool compare(uint8_t * x, uint8_t * y, const uint32_t lgth) {
     201        return mem_compare(x,y,lgth); //overlap_compare<uint8_t>(x,y,lgth);
    195202    }
    196203};
Note: See TracChangeset for help on using the changeset viewer.