Changeset 431 for soft/giet_vm/giet_libs/barrier.c
- Timestamp:
- Oct 4, 2014, 3:35:35 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_libs/barrier.c
r382 r431 31 31 void barrier_wait( giet_barrier_t* barrier ) 32 32 { 33 34 #if GIET_DEBUG_BARRIER 35 unsigned int x; 36 unsigned int y; 37 unsigned int p; 38 giet_proc_xyp( &x, &y, &p ); 39 giet_shr_printf("[DEBUG BARRIER] proc[%d,%d,%d] enters barrier_wait()\n", x, y, p ); 40 #endif 41 33 42 // compute expected sense value 34 43 unsigned int expected; … … 75 84 76 85 asm volatile ("sync" ::: "memory"); 86 87 #if GIET_DEBUG_BARRIER 88 giet_shr_printf("[DEBUG BARRIER] proc[%d,%d,%d] exit barrier_wait()\n", x, y, p ); 89 #endif 90 77 91 } 78 92 … … 162 176 barrier->ntasks = ntasks; 163 177 164 #if GIET_DEBUG_ SBT165 giet_shr_printf("\n[DEBUG SBT] SBTnodes allocation / ntasks = %d\n", ntasks );178 #if GIET_DEBUG_BARRIER 179 giet_shr_printf("\n[DEBUG BARRIER] sbt_nodes allocation / ntasks = %d\n", ntasks ); 166 180 #endif 167 181 … … 188 202 barrier->node[x][y][l] = remote_malloc( SBT_NODE_SIZE, x, y ); 189 203 190 #if GIET_DEBUG_ SBT204 #if GIET_DEBUG_BARRIER 191 205 giet_shr_printf("[DEBUG SBT] node[%d][%d][%d] : vaddr = %x\n", 192 206 x, y, l, (unsigned int)barrier->node[x][y][l] ); … … 197 211 } 198 212 199 #if GIET_DEBUG_ SBT213 #if GIET_DEBUG_BARRIER 200 214 giet_shr_printf("\n[DEBUG SBT] SBT nodes initialisation\n"); 201 215 #endif … … 211 225 { 212 226 // compute cluster coordinates for the calling task 213 unsigned int procid = giet_procid();214 unsigned int cluster_xy = procid / NB_PROCS_MAX;215 unsigned int x = cluster_xy >> Y_WIDTH;216 unsigned int y = cluster_xy & ((1<<Y_WIDTH)-1);227 unsigned int x; 228 unsigned int y; 229 unsigned int lpid; 230 giet_proc_xyp( &x, &y, &lpid ); 217 231 218 232 // recursively decrement count from bottom to root … … 247 261 node->child1 = NULL; 248 262 249 #if GIET_DEBUG_ SBT250 giet_shr_printf("[DEBUG SBT] initializenode[%d][%d][%d] :"263 #if GIET_DEBUG_BARRIER 264 giet_shr_printf("[DEBUG BARRIER] initialize sbt_node[%d][%d][%d] :" 251 265 " arity = %d / child0 = %x / child1 = %x\n", 252 266 x, y, level, … … 288 302 node->child1 = barrier->node[x1][y1][level-1]; 289 303 290 #if GIET_DEBUG_ SBT291 giet_shr_printf("[DEBUG SBT] initializenode[%d][%d][%d] :"304 #if GIET_DEBUG_BARRIER 305 giet_shr_printf("[DEBUG BARRIER] initialize sbt_node[%d][%d][%d] :" 292 306 " arity = %d / child0 = %x / child1 = %x\n", 293 307 x, y, level,
Note: See TracChangeset
for help on using the changeset viewer.