- Timestamp:
- Feb 14, 2015, 5:13:06 PM (10 years ago)
- Location:
- soft/giet_vm/applications
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/gameoflife/main.c
r509 r515 10 10 // Each task compute HEIGHT/nbprocs lines. 11 11 // 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. 13 13 // 14 14 // The number of processors must be a power of 2 not larger than HEIGHT. … … 210 210 if ( proc_id == 0 ) giet_fbf_cma_display ( 1 ); 211 211 212 PRINTF(" - step %d completed\n", 2*i );212 PRINTF(" - step %d\n", 2*i ); 213 213 214 214 // compute WORLD[0] from WORLD[1] … … 224 224 if ( proc_id == 0 ) giet_fbf_cma_display ( 0 ); 225 225 226 PRINTF(" - step %d completed\n", 2*i + 1 );226 PRINTF(" - step %d\n", 2*i + 1 ); 227 227 } // end main loop 228 228 -
soft/giet_vm/applications/sort/main.c
r502 r515 26 26 #include "user_barrier.h" 27 27 28 #define ARRAY_LENGTH 409628 #define ARRAY_LENGTH 0x1000 29 29 #define IPT (ARRAY_LENGTH / threads) // ITEMS PER THREAD 30 30 … … 85 85 unsigned int nprocs; 86 86 unsigned int threads; 87 87 88 giet_procs_number( &x_size , &y_size , &nprocs ); 88 89 threads = x_size * y_size * nprocs; -
soft/giet_vm/applications/transpose/main.c
r507 r515 241 241 sqt_barrier_wait( &barrier ); 242 242 243 // optional parallel display from local buf_out to frame buffer244 // all processors contribute to display using memcpy...245 243 246 244 if ( USE_FBF ) // external frame buffer available 247 245 { 246 // parallel display from local buf_out to frame buffer 247 // all processors contribute to display using memcpy... 248 248 249 DISP_START[cluster_id][lpid] = giet_proctime(); 249 250 … … 264 265 sqt_barrier_wait( &barrier ); 265 266 } 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 ) 276 270 { 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++ ) 280 276 { 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; 288 291 } 289 292 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 } 305 306 } 306 307
Note: See TracChangeset
for help on using the changeset viewer.