예제 #1
0
 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 );
 }
예제 #2
0
void VertexBufferDist::registerTree( co::LocalNodePtr node )
{
    EQASSERT( !isAttached() );
    EQCHECK( node->registerObject( this ));

    if( _left )
        _left->registerTree( node );
    
    if( _right )
        _right->registerTree( node );
}
예제 #3
0
    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 ));
    }
예제 #4
0
    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;
        }
    }
예제 #5
0
 void register_( co::LocalNodePtr node )
 {
     node->registerObject( this );
     BOOST_FOREACH( Object* child, children_ )
         child->register_( node );
 }
예제 #6
0
 void unmap( co::LocalNodePtr local )
 {
     local->unmapObject( this );
     BOOST_FOREACH( Object* child, children_ )
         child->unmap( local );
 }