void map( co::LocalNodePtr local, co::NodePtr remote ) { co::f_bool_t mapped = local->mapObject( this, getID(), remote ); BOOST_FOREACH( Object* child, children_ ) child->map( local, remote ); LBASSERT( mapped ); }
void VertexBufferDist::registerTree( co::LocalNodePtr node ) { EQASSERT( !isAttached() ); EQCHECK( node->registerObject( this )); if( _left ) _left->registerTree( node ); if( _right ) _right->registerTree( node ); }
ServerThread( co::LocalNodePtr server ) : _node( new co::LocalNode ) , _server( server ) { TEST( _node->listen( )); co::NodePtr node = new co::Node; co::ConnectionDescriptionPtr description = server->getConnectionDescriptions().front(); node->addConnectionDescription( description ); TEST( _node->connect( node )); }
void run() override { if( _master ) setName( "MasterWorker" ); else setName( "SlaveWorker" ); _registered.waitEQ( true ); if( _master ) { _barrier = new co::Barrier( _node, _barrierID ); _mapped = true; } else _mapped.waitEQ( true ); for( size_t i = 0; i < _numIterations; ++i ) { const co::uint128_t& version = _versions.pop(); { static lunchbox::SpinLock lock; lunchbox::ScopedFastWrite mutex( lock ); _barrier->sync( version ); } TEST( _barrier->isGood()); _barrier->enter(); } if( _master ) { _done = true; _versions.clear(); _node->releaseObject( _barrier ); delete _barrier; } }
void register_( co::LocalNodePtr node ) { node->registerObject( this ); BOOST_FOREACH( Object* child, children_ ) child->register_( node ); }
void unmap( co::LocalNodePtr local ) { local->unmapObject( this ); BOOST_FOREACH( Object* child, children_ ) child->unmap( local ); }