Changeset 3094 for proto/parabix2


Ignore:
Timestamp:
Apr 29, 2013, 7:03:12 PM (6 years ago)
Author:
cameron
Message:

Update length-sorted template to make bytedata accessible.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/pablo_template_lsst.cpp

    r3024 r3094  
    7474// @ global depends on 'error_tracker' and 'EOF_mask' definitions.
    7575//////////////////////////////////////////////////////////////////////////////////////////
     76typedef char * Bytedata;
    7677@global
    7778
     
    166167        //////////////////////////////////////////////////////////////////////////////////////////
    167168        //      BitBlock buf[(BUFFER_SIZE)/sizeof(BitBlock)];
    168         //      uint8_t * src_buffer = (uint8_t *)buf + COPYBACK_SIZE;
     169        //      char * src_buffer = (char *)buf + COPYBACK_SIZE;
    169170
    170171        #include <simd-lib/buffer.hpp>
    171         uint8_t * COPYBACK;
    172         uint8_t * src_buffer;
     172        char * COPYBACK;
     173        char * src_buffer;
    173174        ALLOC_STATIC_ALIGNED_BYTE_BUFFER_WITH_COPYBACK(COPYBACK, src_buffer);
     175        char * bytedata;
    174176
    175177#ifdef LSST
     
    263265        if (chars_avail >= SEGMENT_SIZE) chars_avail = SEGMENT_SIZE;
    264266
     267        Transpose transpose;
    265268        @stream_stmts
    266269
     
    279282          for (int blk = 0; blk < SEGMENT_BLOCKS; blk++) {
    280283                  block_base = blk*BLOCK_SIZE;
    281                   s2p_do_block((BytePack *) &src_buffer[block_base], basis_bits);
     284                  //s2p_do_block((BytePack *) &src_buffer[block_base], basis_bits);
     285                  bytedata = &src_buffer[block_base];
    282286
    283287                  @block_stmts
     
    310314          }
    311315                #ifdef LSST
    312                         st.resolve(src_buffer, groups_segment, starts, h0, h1, SEGMENT_BLOCKS, gids);
     316                        st.resolve((uint8_t *)src_buffer, groups_segment, starts, h0, h1, SEGMENT_BLOCKS, gids);
    313317
    314318                  #ifdef DUMP_SYMBOLS
     
    367371        while (remaining >= BLOCK_SIZE) {
    368372                  block_base = block_pos;
    369                   s2p_do_block((BytePack *) &src_buffer[block_pos], basis_bits);
     373                  //s2p_do_block((BytePack *) &src_buffer[block_pos], basis_bits);
     374                  bytedata = &src_buffer[block_base];
    370375                  @block_stmts
    371376
     
    408413                  EOF_mask = bitblock::srl(simd<1>::constant<1>(), convert(BLOCK_SIZE-remaining));
    409414                  s2p_do_final_block((BytePack *) &src_buffer[block_pos], basis_bits, EOF_mask);
     415                  bytedata = &src_buffer[block_pos];
    410416                  @final_block_stmts
    411417
     
    443449        #ifdef LSST
    444450                uint32_t segment_blocks = blk;
    445                 st.resolve(src_buffer, groups_segment, starts, h0, h1, segment_blocks, gids);
     451                st.resolve((uint8_t *)src_buffer, groups_segment, starts, h0, h1, segment_blocks, gids);
    446452
    447453                #ifdef DUMP_SYMBOLS
Note: See TracChangeset for help on using the changeset viewer.