Ignore:
Timestamp:
06/06/17 15:12:34 (7 years ago)
Author:
yushan
Message:

test_remap OK with openmp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan_merged/extern/remap/src/node.cpp

    r923 r1155  
    254254NodePtr insert(NodePtr thIs, NodePtr node) 
    255255{ 
    256         int la = thIs->level; // node to be inserted 
    257         int lb = node->level; // node where insertation 
    258         assert(la < lb); // node to be inserted must have lower level then parent 
    259         //if (thIs->parent) assert(find_in_tree1(thIs) == true); 
    260         NodePtr q = NULL; 
    261         NodePtr chd = NULL; 
    262         node->move(thIs); 
    263         if (la == lb - 1) 
    264         { 
     256  int la = thIs->level; // node to be inserted 
     257  int lb = node->level; // node where insertation 
     258  assert(la < lb); // node to be inserted must have lower level then parent 
     259  //if (thIs->parent) assert(find_in_tree1(thIs) == true); 
     260  NodePtr q = NULL; 
     261  NodePtr chd = NULL; 
     262  node->move(thIs); 
     263  if (la == lb - 1) 
     264  { 
    265265    node->child.push_back(thIs); 
    266                 thIs->parent = node; 
    267                 if (node->child.size() > MAX_NODE_SZ &&  node->tree->canSplit() ) // with us as additional child `node` is now too large :( 
    268                         return (node->reinserted || node->parent == NULL) ? split(node) : reinsert(node); 
    269         } 
    270         else // la < lb - 1 
    271         { 
    272                 chd = thIs->closest(node->child); 
    273                 q = insert(thIs, chd); 
    274         } 
    275         if ((node->updateCount + 1) % UPDATE_EVERY == 0) 
    276                 node->update(); 
    277         else 
    278         { 
    279                 if (q) node->remove(q); 
    280                 node->inflate(chd); 
    281         } 
    282  
     266    thIs->parent = node; 
     267    if (node->child.size() > MAX_NODE_SZ &&  node->tree->canSplit() ) // with us as additional child `node` is now too large :( 
     268    return (node->reinserted || node->parent == NULL) ? split(node) : reinsert(node); 
     269  } 
     270  else // la < lb - 1 
     271  { 
     272    chd = thIs->closest(node->child); 
     273    q = insert(thIs, chd); 
     274  } 
     275  if ((node->updateCount + 1) % UPDATE_EVERY == 0) 
     276    node->update(); 
     277  else 
     278  { 
     279    if (q) node->remove(q); 
     280    node->inflate(chd); 
     281  } 
    283282 
    284283  return q; 
Note: See TracChangeset for help on using the changeset viewer.