Changeset 718 for soft/giet_vm/applications/sort/sort.py
- Timestamp:
- Oct 9, 2015, 3:51:21 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/sort/sort.py
r669 r718 11 11 # application on a multi_clusters, multi-processors architecture. 12 12 # This include both the mapping of virtual segments on the clusters, 13 # and the mapping of t asks on processors.13 # and the mapping of threads on processors. 14 14 # This mapping uses 5 platform parameters, (obtained from the "mapping" argument) 15 15 # - x_size : number of clusters in a row … … 29 29 y_width = mapping.y_width 30 30 31 nt asks = x_size * y_size * nprocs31 nthreads = x_size * y_size * nprocs 32 32 33 33 # define vsegs base & size … … 64 64 local = True ) 65 65 66 # stacks vsegs : local (one stack per t ask)66 # stacks vsegs : local (one stack per thread) 67 67 for x in xrange (x_size): 68 68 for y in xrange (y_size): … … 79 79 local = True, big = True ) 80 80 81 # heap vsegs : distributed but non local (all t asks can access all heap vsegs)81 # heap vsegs : distributed but non local (all threads can access all heap vsegs) 82 82 for x in xrange (x_size): 83 83 for y in xrange (y_size): … … 91 91 local = False, big = True ) 92 92 93 # distributed t asks / one taskper processor93 # distributed threads / one thread per processor 94 94 for x in xrange (x_size): 95 95 for y in xrange (y_size): … … 97 97 if ( mapping.clusters[cluster_id].procs ): 98 98 for p in xrange( nprocs ): 99 trdid = (((x * y_size) + y) * nprocs) + p 99 if (x == 0) and (y == 0) and (p == 0) : # main thread 100 startid = 1 101 is_main = True 102 else : # other threads 103 startid = 0 104 is_main = False 100 105 101 mapping.addTask( vspace, 'sort_%d_%d_%d' % (x,y,p), 102 trdid, x, y, p, 103 'sort_stack_%d_%d_%d' % (x,y,p), 104 'sort_heap_%d_%d' % (x,y), 0 ) 106 mapping.addThread( vspace, 107 'sort_%d_%d_%d' % (x,y,p), 108 is_main, 109 x, y, p, 110 'sort_stack_%d_%d_%d' % (x,y,p), 111 'sort_heap_%d_%d' % (x,y), 112 startid ) 105 113 106 114 # extend mapping name
Note: See TracChangeset
for help on using the changeset viewer.