- Timestamp:
- Oct 9, 2015, 3:51:21 PM (9 years ago)
- Location:
- soft/giet_vm/applications
- Files:
-
- 1 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/convol/convol.c
r708 r718 727 727 unsigned int nthreads = nclusters * nprocs; 728 728 729 // get a shared TTY 730 giet_tty_alloc( 1 ); 731 lock_init( &tty_lock ); 732 733 // get FBF size 734 unsigned int width; 735 unsigned int height; 736 giet_fbf_size( &width , &height ); 737 729 738 // parameters checking 739 if ( (width != NP) || (height != NL) ) 740 giet_pthread_exit( "[CONVOL ERROR] FBF size must be NP * NL\n"); 730 741 if ((nprocs != 1) && (nprocs != 2) && (nprocs != 4) && (nprocs != 8)) 731 742 giet_pthread_exit( "[CONVOL ERROR] NB_PROCS_MAX must be 1, 2, 4 or 8\n"); … … 743 754 giet_pthread_exit( "[CONVOL ERROR] X_SIZE*Y_SIZE must be a divider of NP"); 744 755 745 // get a shared TTY 746 giet_tty_alloc( 1 ); 747 lock_init( &tty_lock ); 748 756 // get FBF ownership 757 giet_fbf_alloc(); 758 749 759 // initializes the distributed heap[x,y] 750 760 for ( cx = 0 ; cx < x_size ; cx++ ) -
soft/giet_vm/applications/sort/Makefile
r589 r718 2 2 APP_NAME = sort 3 3 4 OBJS = main.o4 OBJS = sort.o 5 5 6 6 LIBS = -L../../build/libs -luser -
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.