Changeset 15 for trunk/src/bitlex.c


Ignore:
Timestamp:
Jan 11, 2008, 6:16:25 AM (11 years ago)
Author:
cameron
Message:

Bytespace scanning in XML declarations; various updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bitlex.c

    r14 r15  
    1313#include "transpose.h"
    1414
    15 
     15#include "stdlib.h"
    1616
    1717Lexer::Lexer(XML_Buffer *b, ParallelStreamSet *p) {
    1818  xml_buf = b;
     19  if (posix_memalign((void **) &bit_group, sizeof(BitBlock), sizeof(BitBlockGroup)) != 0) {
     20    printf("Allocation failure for local BitBlockGroup in Lexer\n");
     21    exit(-1);
     22  }
     23  for (int i = 0; i < 8; i++) (*bit_group)[0].bit[i] = simd_const_1(0);
    1924  parsing_engine_data = p;
    2025};
     
    105110/* A temporary structure for internal use in ComputeLexicalItemStreams. */
    106111typedef struct {
    107   BitBlock bit[8];
    108112  BitBlock LexicalItems[LexicalItemCount];
    109113} LexicalItemBlock;
     
    113117  LexicalItemBlock lx_blk[BUFFER_BLOCKS];
    114118  for (int i = 0; i < new_blocks; i++) {
    115     s2p_bytepack(&(parsing_engine_data->x8data[i * 8]), lx_blk[i].bit);
    116     ComputeLexicalItemBlocks(lx_blk[i].bit, lx_blk[i].LexicalItems);
     119    s2p_bytepack(&(parsing_engine_data->x8data[i * 8]), (*bit_group)[i+1].bit);
     120    ComputeLexicalItemBlocks((*bit_group)[i+1].bit, lx_blk[i].LexicalItems);
    117121  }
    118122#ifdef BUFFER_PROFILING
Note: See TracChangeset for help on using the changeset viewer.