Ignore:
Timestamp:
Oct 1, 2015, 4:09:25 PM (9 years ago)
Author:
alain
Message:

Adapt the following application to the POSIX threads API

  • convol
  • classif
  • raycast
  • coproc
  • display
  • gameoflife
  • transpose
  • shell
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/gameoflife/gameoflife.py

    r669 r708  
    1010#  This file describes the mapping of the multi-threaded "gameoflife"
    1111#  application on a multi-clusters, multi-processors architecture.
    12 #  This include both the mapping of virtual segments on the clusters,
    13 #  and the mapping of tasks on processors.
    14 #  There is one task per processor.
     12#  There is one thread per processor.
    1513#  The mapping of virtual segments is the following:
    1614#    - There is one shared data vseg in cluster[0][0]
     
    102100            if ( mapping.clusters[cluster_id].procs ):
    103101                for p in xrange( nprocs ):
    104                     trdid = (((x * y_size) + y) * nprocs) + p
     102                    if (x == 0) and (y == 0) and (p == 0) :   # main thread
     103                        startid = 1
     104                        is_main = True
     105                    else :                                    # other threads
     106                        startid = 0
     107                        is_main = False
    105108
    106                     mapping.addTask( vspace, 'gol_%d_%d_%d' % (x,y,p),
    107                                      trdid, x, y, p,
    108                                      'gol_stack_%d_%d_%d' % (x,y,p),
    109                                      'gol_heap_%d_%d' %(x,y) , 0 ) 
     109                    mapping.addThread( vspace,
     110                                       'gol_%d_%d_%d' % (x,y,p),
     111                                       is_main,
     112                                       x, y, p,
     113                                       'gol_stack_%d_%d_%d' % (x,y,p),
     114                                       'gol_heap_%d_%d' % (x,y),
     115                                       startid )
    110116
    111117    # extend mapping name
Note: See TracChangeset for help on using the changeset viewer.