Changeset 515


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

Cosmetic.

Location:
soft/giet_vm/applications
Files:
3 edited

Legend:

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

    r509 r515  
    1010// Each task compute HEIGHT/nbprocs lines.
    1111// Task running on processor P(0,0,0) initialises the barrier, and
    12 // control the chained buffer DMA controler, when it is used.
     12// the chained buffer DMA controler.
    1313//
    1414// The number of processors must be a power of 2 not larger than HEIGHT.
     
    210210      if ( proc_id == 0 ) giet_fbf_cma_display ( 1 );
    211211   
    212       PRINTF(" - step %d completed\n", 2*i );
     212      PRINTF(" - step %d\n", 2*i );
    213213   
    214214      // compute WORLD[0] from WORLD[1]
     
    224224      if ( proc_id == 0 ) giet_fbf_cma_display ( 0 );
    225225
    226       PRINTF(" - step %d completed\n", 2*i + 1 );
     226      PRINTF(" - step %d\n", 2*i + 1 );
    227227   } // end main loop
    228228
  • soft/giet_vm/applications/sort/main.c

    r502 r515  
    2626#include "user_barrier.h"
    2727
    28 #define ARRAY_LENGTH    4096
     28#define ARRAY_LENGTH    0x1000
    2929#define IPT             (ARRAY_LENGTH / threads) // ITEMS PER THREAD
    3030
     
    8585    unsigned int nprocs;
    8686    unsigned int threads;
     87
    8788    giet_procs_number( &x_size , &y_size , &nprocs );
    8889    threads = x_size * y_size * nprocs;
  • 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.