Changeset 459 for trunk/user/sort/sort.c
- Timestamp:
- Aug 13, 2018, 1:43:20 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/sort/sort.c
r457 r459 26 26 #include <pthread.h> 27 27 #include <almosmkh.h> 28 #include <hal_macros.h> 28 29 29 30 #define ARRAY_LENGTH 0x400 // 1024 values … … 33 34 #define DISPLAY_ARRAY 0 34 35 #define INTERACTIVE_MODE 0 35 36 ///////////////////////////////////////////////////////37 // macros for fixed format cxy <=> (x,y) translation38 // TODO these macros are only for TSAR architecture...39 ///////////////////////////////////////////////////////40 41 #define CXY_FROM_XY( x , y ) ((x<<4) + y)42 43 #define X_FROM_CXY( cxy ) ((cxy>>4) & 0xF)44 45 #define Y_FROM_CXY( cxy ) (cxy & 0xF)46 36 47 37 ///////////////////////////////////////////////////////////// … … 239 229 // get core coordinates and user index for the main thread 240 230 get_core( &main_cxy , & main_lid ); 241 main_x = X_FROM_CXY( main_cxy );242 main_y = Y_FROM_CXY( main_cxy );231 main_x = HAL_X_FROM_CXY( main_cxy ); 232 main_y = HAL_Y_FROM_CXY( main_cxy ); 243 233 main_uid = (((main_x * y_size) + main_y) * ncores) + main_lid; 244 234 … … 308 298 // set thread attributes for all threads 309 299 attr[thread_uid].attributes = PT_ATTR_CLUSTER_DEFINED | PT_ATTR_CORE_DEFINED; 310 attr[thread_uid].cxy = CXY_FROM_XY( x , y );300 attr[thread_uid].cxy = HAL_CXY_FROM_XY( x , y ); 311 301 attr[thread_uid].lid = lid; 312 302
Note: See TracChangeset
for help on using the changeset viewer.