Ignore:
Timestamp:
Feb 14, 2015, 5:13:06 PM (9 years ago)
Author:
alain
Message:

Cosmetic.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/transpose/main.c

    r507 r515  
    241241        sqt_barrier_wait( &barrier );
    242242
    243         // optional parallel display from local buf_out to frame buffer
    244         // all processors contribute to display using memcpy...
    245243
    246244        if ( USE_FBF )  // external frame buffer available
    247245        {
     246            // parallel display from local buf_out to frame buffer
     247            // all processors contribute to display using memcpy...
     248
    248249            DISP_START[cluster_id][lpid] = giet_proctime();
    249250
     
    264265            sqt_barrier_wait( &barrier );
    265266        }
    266 
    267         // checksum done by processor (lpid == 0) in each cluster
    268 
    269         if ( lpid == 0 )
    270         {
    271             unsigned int success = 1;
    272             unsigned int start   = cluster_id * nlc;
    273             unsigned int stop    = start + nlc;
    274 
    275             for ( l = start ; l < stop ; l++ )
     267        else         // checksum by processor(x,y,0) in each cluster
     268        {
     269            if ( lpid == 0 )
    276270            {
    277                 check_line_after[l] = 0;
    278 
    279                 for ( p = 0 ; p < NN ; p++ )
     271                unsigned int success = 1;
     272                unsigned int start   = cluster_id * nlc;
     273                unsigned int stop    = start + nlc;
     274
     275                for ( l = start ; l < stop ; l++ )
    280276                {
    281                     // read one byte in remote buffer
    282                     src_cluster = p / nlc;
    283                     src_index   = (p % nlc)*NN + l;
    284 
    285                     unsigned char byte = buf_out[src_cluster][src_index];
    286 
    287                     check_line_after[l] = check_line_after[l] + byte;
     277                    check_line_after[l] = 0;
     278
     279                    for ( p = 0 ; p < NN ; p++ )
     280                    {
     281                        // read one byte in remote buffer
     282                        src_cluster = p / nlc;
     283                        src_index   = (p % nlc)*NN + l;
     284
     285                        unsigned char byte = buf_out[src_cluster][src_index];
     286
     287                        check_line_after[l] = check_line_after[l] + byte;
     288                    }
     289
     290                    if ( check_line_before[l] != check_line_after[l] ) success = 0;
    288291                }
    289292
    290                 if ( check_line_before[l] != check_line_after[l] ) success = 0;
    291             }
    292 
    293             if ( success )
    294             {
    295                 giet_shr_printf("\n[TRANSPOSE] proc [%d,%d,0] checksum OK"
    296                                 " for image %d at cycle %d\n",
    297                                 x, y, image, giet_proctime() );
    298             }
    299             else
    300             {
    301                 giet_shr_printf("\n[TRANSPOSE] proc [%d,%d,0] checksum KO"
    302                                 " for image %d at cycle %d\n",
    303                                 x, y, image, giet_proctime() );
    304             }
     293                if ( success )
     294                {
     295                    giet_shr_printf("\n[TRANSPOSE] proc [%d,%d,0] checksum OK"
     296                                    " for image %d at cycle %d\n",
     297                                    x, y, image, giet_proctime() );
     298                }
     299                else
     300                {
     301                    giet_shr_printf("\n[TRANSPOSE] proc [%d,%d,0] checksum KO"
     302                                    " for image %d at cycle %d\n",
     303                                    x, y, image, giet_proctime() );
     304                }
     305            }
    305306        }
    306307
Note: See TracChangeset for help on using the changeset viewer.