Changeset 376 for soft/giet_vm/giet_libs
- Timestamp:
- Aug 2, 2014, 1:31:56 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_libs/barrier.c
r375 r376 246 246 node->child0 = NULL; 247 247 node->child1 = NULL; 248 249 #if GIET_DEBUG_SBT 250 giet_shr_printf("[DEBUG SBT] initialize node[%d][%d][%d] :" 251 " arity = %d / child0 = %x / child1 = %x\n", 252 x, y, level, 253 node->arity, node->child0, node->child1 ); 254 #endif 255 248 256 } 249 257 else // non terminal case … … 254 262 unsigned int y1; // y coordinate for child1; 255 263 256 // the child1 coordinates depends on the level value 264 // the child0 coordinates are equal to the parent coordinates 265 // the child1 coordinates are incremented depending on the level value 257 266 if ( level & 0x1 ) // odd level => X binary tree 258 267 { 259 268 x0 = x; 260 269 y0 = y; 261 x1 = x + (1 << ((level-1)>> 2));270 x1 = x + (1 << ((level-1)>>1)); 262 271 y1 = y; 263 272 } … … 267 276 y0 = y; 268 277 x1 = x; 269 y1 = y + (1 << ((level-1)>> 2));278 y1 = y + (1 << ((level-1)>>1)); 270 279 } 271 280 … … 279 288 node->child1 = barrier->node[x1][y1][level-1]; 280 289 281 // recursive calls for children nodes282 sbt_build( barrier , x0 , y0 , level-1 , node );283 sbt_build( barrier , x1 , y1 , level-1 , node );284 }285 286 290 #if GIET_DEBUG_SBT 287 291 giet_shr_printf("[DEBUG SBT] initialize node[%d][%d][%d] :" … … 290 294 node->arity, node->child0, node->child1 ); 291 295 #endif 296 297 // recursive calls for children nodes 298 sbt_build( barrier , x0 , y0 , level-1 , node ); 299 sbt_build( barrier , x1 , y1 , level-1 , node ); 300 } 292 301 293 302 } // end sbt_build()
Note: See TracChangeset
for help on using the changeset viewer.