Changeset 631 for proto/parabix2


Ignore:
Timestamp:
Sep 15, 2010, 2:14:50 PM (9 years ago)
Author:
cameron
Message:

Use aligned character buffer/aligned loads.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/template.c

    r630 r631  
    283283  int check_pos = 0;
    284284  int chars_read = 0;
    285   char buf[BUFFER_SIZE+BLOCK_SIZE+OVERLAP_BUFSIZE*2];
     285  //char buf[BUFFER_SIZE+BLOCK_SIZE+OVERLAP_BUFSIZE*2];
     286  BytePack buf[(BUFFER_SIZE+BLOCK_SIZE+OVERLAP_BUFSIZE*2)/sizeof(SIMD_type)];
    286287 
    287   char * srcbuf = buf + OVERLAP_BUFSIZE;
     288  char * srcbuf = ((char *) buf) + OVERLAP_BUFSIZE;
    288289  buffer_base = buf_pos;
    289290  source = srcbuf;
     
    351352          EOF_mask = sisd_srl(simd_const_1(1),sisd_from_int(BLOCK_SIZE-bytes));
    352353        }
    353         BytePack * U8pack = (BytePack *) &srcbuf[block_pos];
    354         U8[0] = sisd_load_unaligned(&U8pack[0]);
    355         U8[1] = sisd_load_unaligned(&U8pack[1]);
    356         U8[2] = sisd_load_unaligned(&U8pack[2]);
    357         U8[3] = sisd_load_unaligned(&U8pack[3]);
    358         U8[4] = sisd_load_unaligned(&U8pack[4]);
    359         U8[5] = sisd_load_unaligned(&U8pack[5]);
    360         U8[6] = sisd_load_unaligned(&U8pack[6]);
    361         U8[7] = sisd_load_unaligned(&U8pack[7]);
     354        BytePack * U8 = (BytePack *) &srcbuf[block_pos];
    362355       
    363356        s2p(U8[0], U8[1], U8[2], U8[3], U8[4], U8[5], U8[6], U8[7],
     
    421414        block_base = block_pos;
    422415         
    423         BytePack * U8pack = (BytePack *) &srcbuf[block_pos];
    424         U8[0] = sisd_load_unaligned(&U8pack[0]);
    425         U8[1] = sisd_load_unaligned(&U8pack[1]);
    426         U8[2] = sisd_load_unaligned(&U8pack[2]);
    427         U8[3] = sisd_load_unaligned(&U8pack[3]);
    428         U8[4] = sisd_load_unaligned(&U8pack[4]);
    429         U8[5] = sisd_load_unaligned(&U8pack[5]);
    430         U8[6] = sisd_load_unaligned(&U8pack[6]);
    431         U8[7] = sisd_load_unaligned(&U8pack[7]);
     416        BytePack * U8 = (BytePack *) &srcbuf[block_pos];
    432417       
    433418        s2p(U8[0], U8[1], U8[2], U8[3], U8[4], U8[5], U8[6], U8[7],
Note: See TracChangeset for help on using the changeset viewer.