Changeset 2169 for trunk


Ignore:
Timestamp:
May 28, 2012, 12:43:26 PM (7 years ago)
Author:
ksherdy
Message:

Added buffer constants to template.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/symbol_table/main_template.cpp

    r2150 r2169  
    7575    PERF_SEC_INIT(parser_timer);
    7676
     77        ///////////////////////////////////////////////////////////////////////////
     78        // Buffer Constants
     79        ///////////////////////////////////////////////////////////////////////////
     80        //
     81        // NOTE:    Buffer segments are defined as multiples of BLOCK_SIZE.
     82        //              BLOCK_SIZE defined as a number of bytes.
     83        #define PADDING_BLOCKS 1
     84        #define PADDING_SIZE (BLOCK_SIZE * PADDING_BLOCKS)
     85        #define COPYBACK_BLOCKS 3
     86        #define COPYBACK_SIZE (BLOCK_SIZE * COPYBACK_BLOCKS)
     87        #define LOOKAHEAD_BLOCKS 1
     88        #define LOOKAHEAD_SIZE (BLOCK_SIZE * LOOKAHEAD_BLOCKS)
     89        #define SEGMENT_BLOCKS  12
     90        #define SEGMENT_SIZE (BLOCK_SIZE * SEGMENT_BLOCKS)
     91
     92        #define BUFFER_SIZE (COPYBACK_SIZE + SEGMENT_SIZE + LOOKAHEAD_SIZE + PADDING_SIZE)
     93
    7794    ///////////////////////////////////////////////////////////////////////////
    7895    // Parallel Data Streams with optional CopyBack
     
    8198    uint8_t * src_buffer;
    8299    ALLOC_STATIC_ALIGNED_BYTE_BUFFER_WITH_COPYBACK(COPYBACK, src_buffer);
    83 //      ATTRIBUTE_SIMD_ALIGN BitBlock aligned_base[BUFFER_SIZE];
    84 //      COPYBACK = (uint8_t *)aligned_base;
    85 //      memset(COPYBACK,0,COPYBACK_SIZE);
    86 //      src_buffer = &COPYBACK[COPYBACK_SIZE];
    87100
    88101    // hash 0
     
    115128    Groups groups[SEGMENT_BLOCKS];
    116129
     130        ///////////////////////////////////////////////////////////////////////////
    117131    // Symbol Table
    118     gid<SEGMENT_SIZE> gids;
     132        ///////////////////////////////////////////////////////////////////////////
     133        gid<SEGMENT_SIZE> gids;
    119134    symbol_table<gid<SEGMENT_SIZE>, fast_pool_allocator<1024> > st;
    120135
Note: See TracChangeset for help on using the changeset viewer.