Changeset 441 for trunk/user/sort
- Timestamp:
- May 9, 2018, 3:13:56 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/sort/sort.c
r440 r441 156 156 unsigned int main_uid = ptr->main_uid; 157 157 158 printf("\n### core[%x,%d] enter sort : threads %d / thread_uid %x / main_uid %x / cycle %d\n",159 cxy, lid, threads, thread_uid, main_uid, (int)cycle );160 161 while( 1 ) { asm volatile("nop"); }162 163 158 unsigned int items = ARRAY_LENGTH / threads; 164 159 unsigned int stages = __builtin_ctz( threads ) + 1; … … 316 311 if( thread_uid != main_uid ) 317 312 { 318 319 get_cycle( &cycle );320 printf("\n### main creates thread_uid %d / &sort_arg %x / cycle %d\n",321 thread_uid, &arg[thread_uid], (unsigned int)cycle );322 323 313 if ( pthread_create( &trdid, // not used because no join 324 314 &attr[thread_uid], // thread attributes … … 344 334 sort( &arg[main_uid] ); 345 335 336 while( 1 ) asm volatile( "nop" ); 337 346 338 // Check result 347 339 int success = 1; … … 352 344 (threads==512) ) ? array1 : array0; 353 345 354 for( n=0 ; n<(ARRAY_LENGTH- 1) ; n++ )346 for( n=0 ; n<(ARRAY_LENGTH-2) ; n++ ) 355 347 { 356 348 if ( res_array[n] > res_array[n+1] )
Note: See TracChangeset
for help on using the changeset viewer.