Ignore:
Timestamp:
Aug 9, 2012, 10:57:23 AM (12 years ago)
Author:
meunier
Message:

Updates in the soft_filter application (bug corrections, formatting, and adaptation to the architecture generic_mmu)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/soft_transpose_giet/main.c

    r244 r248  
    99#define NB_CLUSTER_MAX  256
    1010
    11 #define PRINTF(...)      ({ if (local_id == 0) { tty_printf(__VA_ARGS__); } })
     11#define PRINTF(...)      ({ if (proc_id == 0) { tty_printf(__VA_ARGS__); } })
     12
     13//#define DISPLAY_ONLY
    1214
    1315///////////////////////////////////////////
     
    104106
    105107
    106    PRINTF("*** starting barrier init at cycle %d ***\n", proctime());
     108   PRINTF("*** Starting barrier init at cycle %d ***\n", proctime());
    107109
    108110   //  barriers initialization
     
    111113   barrier_init(2, nglobal_procs);
    112114
    113    PRINTF("*** completing barrier init at cycle %d ***\n", proctime());
     115   PRINTF("*** Completing barrier init at cycle %d ***\n", proctime());
    114116
    115117   // Main loop (on frames)
     
    127129            LOAD_START[cluster_id][p] = date;
    128130         }
    129          tty_printf("    block_device offset : %d\n", nblocks * cluster_id / nclusters);
    130131         if (ioc_read(frame * nblocks + nblocks * cluster_id / nclusters, A[cluster_id], nblocks / nclusters)){
    131             tty_printf("echec ioc_read\n");
     132            PRINTF("echec ioc_read\n");
    132133            exit();
    133134         }
    134135         if (ioc_completed()){
    135             tty_printf("echec ioc_completed\n");
     136            PRINTF("echec ioc_completed\n");
    136137            exit();
    137138         }
     
    150151      // (p,l) are the (x,y) pixel coordinates in the source frame
    151152
     153#ifndef DISPLAY_ONLY
    152154      date = proctime();
    153155      PRINTF("\n*** Starting transpose for frame %d at cycle %d\n", frame, date);
     
    173175      PRINTF("*** Completing transpose for frame %d at cycle %d\n", frame, date);
    174176      TRSP_END[cluster_id][local_id] = date;
    175 
    176177      barrier_wait(1);
     178#endif
    177179
    178180      // parallel display from B[c] to frame buffer
     
    184186
    185187      unsigned int npxt = npixels / nglobal_procs;   // number of pixels per proc
    186       if (npixels - npxt * nglobal_procs != 0){
    187          tty_printf("*** Error line %d\n", __LINE__);
     188
     189#ifndef DISPLAY_ONLY
     190      if (fb_write(npxt * proc_id, B[cluster_id] + npxt * local_id, npxt)){
     191         PRINTF("[%d]: echec fb_sync_write\n", proc_id);
    188192         exit();
    189193      }
    190       tty_printf("    npxt : %d\n", npxt);
    191 
    192       if (fb_write(npxt * proc_id, B[cluster_id] + npxt * local_id, npxt)){
    193          tty_printf("[%d]: echec fb_sync_write\n", proc_id);
     194#else
     195      if (fb_write(npxt * proc_id, A[cluster_id] + npxt * local_id, npxt)){
     196         PRINTF("[%d]: echec fb_sync_write\n", proc_id);
    194197         exit();
    195198      }
    196      
    197       PRINTF("    After fb_write and before fb_completed\n");
     199#endif
    198200
    199201      if (fb_completed()){
    200          tty_printf("[%d]: echec fb_completed\n", proc_id);
     202         PRINTF("[%d]: echec fb_completed\n", proc_id);
    201203         exit();
    202204      }
Note: See TracChangeset for help on using the changeset viewer.