Changeset 248 for trunk/softs/soft_transpose_giet/main.c
- Timestamp:
- Aug 9, 2012, 10:57:23 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/softs/soft_transpose_giet/main.c
r244 r248 9 9 #define NB_CLUSTER_MAX 256 10 10 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 12 14 13 15 /////////////////////////////////////////// … … 104 106 105 107 106 PRINTF("*** starting barrier init at cycle %d ***\n", proctime());108 PRINTF("*** Starting barrier init at cycle %d ***\n", proctime()); 107 109 108 110 // barriers initialization … … 111 113 barrier_init(2, nglobal_procs); 112 114 113 PRINTF("*** completing barrier init at cycle %d ***\n", proctime());115 PRINTF("*** Completing barrier init at cycle %d ***\n", proctime()); 114 116 115 117 // Main loop (on frames) … … 127 129 LOAD_START[cluster_id][p] = date; 128 130 } 129 tty_printf(" block_device offset : %d\n", nblocks * cluster_id / nclusters);130 131 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"); 132 133 exit(); 133 134 } 134 135 if (ioc_completed()){ 135 tty_printf("echec ioc_completed\n");136 PRINTF("echec ioc_completed\n"); 136 137 exit(); 137 138 } … … 150 151 // (p,l) are the (x,y) pixel coordinates in the source frame 151 152 153 #ifndef DISPLAY_ONLY 152 154 date = proctime(); 153 155 PRINTF("\n*** Starting transpose for frame %d at cycle %d\n", frame, date); … … 173 175 PRINTF("*** Completing transpose for frame %d at cycle %d\n", frame, date); 174 176 TRSP_END[cluster_id][local_id] = date; 175 176 177 barrier_wait(1); 178 #endif 177 179 178 180 // parallel display from B[c] to frame buffer … … 184 186 185 187 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); 188 192 exit(); 189 193 } 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); 194 197 exit(); 195 198 } 196 197 PRINTF(" After fb_write and before fb_completed\n"); 199 #endif 198 200 199 201 if (fb_completed()){ 200 tty_printf("[%d]: echec fb_completed\n", proc_id);202 PRINTF("[%d]: echec fb_completed\n", proc_id); 201 203 exit(); 202 204 }
Note: See TracChangeset
for help on using the changeset viewer.