Changeset 432 for soft/giet_vm/applications/gameoflife/main.c
- Timestamp:
- Oct 4, 2014, 4:33:31 PM (10 years ago)
- Location:
- soft/giet_vm/applications
- Files:
-
- 1 added
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/gameoflife/main.c
r388 r432 17 17 #define NB_ITERATION 1000000000 18 18 19 #define PRINTF(...) ({ if (giet_procid() ==0) { giet_tty_printf(__VA_ARGS__); } })19 #define PRINTF(...) ({ if ( proc_id==0) { giet_tty_printf(__VA_ARGS__); } }) 20 20 21 21 giet_barrier_t barriers[2]; … … 127 127 __attribute__((constructor)) void main() 128 128 { 129 unsigned int proc_id = giet_procid(); // processor id 129 // get processor identifier 130 unsigned int x; 131 unsigned int y; 132 unsigned int p; 133 giet_proc_xyp( &x, &y, &p ); 134 135 // compute continuous processor index 136 unsigned int proc_id = (((x * Y_SIZE) + y) * NB_PROCS_MAX) + p; 137 130 138 unsigned int nlocal_procs = NB_PROCS_MAX; // processors per cluster 131 139 unsigned int nclusters = X_SIZE*Y_SIZE; // number of clusters 132 unsigned int nglobal_procs = nclusters * nlocal_procs; // number of tasks140 unsigned int nglobal_procs = nclusters * nlocal_procs; // number of processors 133 141 size_t i; 134 142 … … 158 166 for (i = 0; i < NB_ITERATION; i++) 159 167 { 160 //PRINTF("\n*** Starting computation for iteration %d at cycle %d\n", i, giet_proctime());161 168 compute_new_gen(base_line, nb_line); 162 //PRINTF("\n*** Starting display for iteration %d at cycle %d\n", i, giet_proctime());163 169 grow_old_world(base_line, nb_line); 164 170 display_world(base_line, nb_line);
Note: See TracChangeset
for help on using the changeset viewer.