Changeset 263 for soft/giet_vm/gameoflife
- Timestamp:
- Dec 19, 2013, 9:36:48 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/gameoflife/main.c
r251 r263 125 125 126 126 127 ///////////// 127 //////////////////////////////////////// 128 128 __attribute__((constructor)) void main() 129 129 { 130 unsigned int proc_id = giet_procid();// processor id131 unsigned int nlocal_procs = (unsigned int) NB_PROCS_MAX; // number ofprocessors per cluster132 unsigned int nclusters = (unsigned int) NB_CLUSTERS;// number of clusters133 unsigned int local_id = proc_id % nlocal_procs;// local processor id134 unsigned int cluster_id = proc_id / nlocal_procs;// cluster id135 unsigned int nglobal_procs = nclusters * nlocal_procs;// number of tasks130 unsigned int proc_id = giet_procid(); // processor id 131 unsigned int nlocal_procs = NB_PROCS_MAX; // processors per cluster 132 unsigned int nclusters = X_SIZE*Y_SIZE; // number of clusters 133 unsigned int local_id = proc_id % nlocal_procs; // local processor id 134 unsigned int cluster_id = proc_id / nlocal_procs; // cluster id 135 unsigned int nglobal_procs = nclusters * nlocal_procs; // number of tasks 136 136 size_t i; 137 137 138 size_t nb_line 139 size_t base_line 138 size_t nb_line = HEIGHT / nglobal_procs; 139 size_t base_line = nb_line * proc_id; 140 140 141 141 PRINTF("*** Starting init at cycle %d ***\n", giet_proctime());
Note: See TracChangeset
for help on using the changeset viewer.