Changeset 596 for trunk/user/sort
- Timestamp:
- Nov 10, 2018, 2:53:23 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/sort/sort.c
r588 r596 24 24 #include <stdio.h> 25 25 #include <stdlib.h> 26 #include <unistd.h> 26 27 #include <pthread.h> 27 28 #include <almosmkh.h> … … 157 158 ///////////////////////////////// 158 159 pthread_barrier_wait( &barrier ); 159 printf("\n[SORT] thread[%d] exit barrier \n", thread_uid );160 printf("\n[SORT] thread[%d] exit barrier 0\n", thread_uid ); 160 161 161 162 // the number of threads contributing to sort … … 192 193 ///////////////////////////////// 193 194 pthread_barrier_wait( &barrier ); 194 printf("\n[SORT] thread[%d] exit barrier \n", thread_uid);195 printf("\n[SORT] thread[%d] exit barrier %d\n", thread_uid , i ); 195 196 196 197 } … … 223 224 pthread_barrierattr_t barrier_attr; // barrier attributes 224 225 225 // compute number of threads (one thread per proc)226 // compute number of threads (one thread per core) 226 227 get_config( &x_size , &y_size , &ncores ); 227 228 threads = x_size * y_size * ncores; … … 268 269 for ( n = 0 ; n < ARRAY_LENGTH ; n++ ) 269 270 { 270 array0[n] = rand();271 array0[n] = ARRAY_LENGTH - n - 1; 271 272 } 272 273 … … 315 316 } 316 317 } 317 318 #if INTERACTIVE_MODE319 idbg();320 #endif321 318 } 322 319 }
Note: See TracChangeset
for help on using the changeset viewer.