Ignore:
Timestamp:
Dec 19, 2013, 9:36:48 AM (11 years ago)
Author:
alain
Message:

Introducing support for TSAR fixed format cluster index (cluster_xy)
We have now 4 parameters defined in map.xml:

  • X_WIDTH, Y_WIDTH define the fixed format (typically X_WIDTH = 4 / Y_WIDTH = 4)
  • X_SIZE, Y_SIZE define the actual TSAR 2D mesh variable size (from 1 to 16)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/gameoflife/main.c

    r251 r263  
    125125
    126126
    127 /////////////
     127////////////////////////////////////////
    128128__attribute__((constructor)) void main()
    129129{
    130    unsigned int proc_id          = giet_procid();                  // processor id
    131    unsigned int nlocal_procs     = (unsigned int) NB_PROCS_MAX;    // number of processors per cluster
    132    unsigned int nclusters        = (unsigned int) NB_CLUSTERS;     // 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
     130   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
    136136   size_t i;
    137137
    138    size_t       nb_line          = HEIGHT / nglobal_procs;
    139    size_t       base_line        = nb_line * proc_id;
     138   size_t       nb_line       = HEIGHT / nglobal_procs;
     139   size_t       base_line     = nb_line * proc_id;
    140140   
    141141   PRINTF("*** Starting init at cycle %d ***\n", giet_proctime());
Note: See TracChangeset for help on using the changeset viewer.