Changeset 955


Ignore:
Timestamp:
Mar 19, 2011, 2:15:29 PM (8 years ago)
Author:
cameron
Message:

Final block base calculation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/pablo_template.cpp

    r952 r955  
    280280
    281281  chars_read = fread((void *)srcbuf, 1, BUFFER_SIZE + OVERLAP_BUFSIZE, infile);
    282   chars_avail = min(chars_read,BUFFER_SIZE);
     282  chars_avail = chars_read;
     283  if (chars_avail > BUFFER_SIZE) chars_avail = BUFFER_SIZE;
    283284
    284285  matcher.setSrc(srcbuf);
     
    314315                chars_read = chars_read - e->content_start +
    315316                             fread(&srcbuf[chars_read-e->content_start], 1, e->content_start, infile);
    316                 chars_avail = min(chars_read,BUFFER_SIZE);
     317                chars_avail = chars_read;
     318                if (chars_avail > BUFFER_SIZE) chars_avail = BUFFER_SIZE;
    317319        }
    318320        else {
     
    342344      memmove(srcbuf, &srcbuf[BUFFER_SIZE], bytes_left);
    343345      chars_read = fread(&srcbuf[bytes_left],1, BUFFER_SIZE + OVERLAP_BUFSIZE - bytes_left, infile) + bytes_left;
    344       chars_avail = min(chars_read, BUFFER_SIZE);
     346      chars_avail = chars_read;
     347      if (chars_avail > BUFFER_SIZE) chars_avail = BUFFER_SIZE;
    345348      buf_pos += chars_avail;
    346349      buffer_base = buf_pos;
     
    360363          remaining -= BLOCK_SIZE;
    361364    }
     365    block_base = block_pos;
    362366    if (remaining > 0 || @any_carry) {
    363367          EOF_mask = sisd_srl(simd_const_1(1),sisd_from_int(BLOCK_SIZE-remaining));
Note: See TracChangeset for help on using the changeset viewer.