Ejemplo n.º 1
0
MemoryUnitPtr DataSource::getData( const NodeId& nodeId )
{
    if( !nodeId.isValid( ))
        return MemoryUnitPtr();

    const LODNode& lodNode = getNode( nodeId );
    if( !lodNode.isValid( ))
        return MemoryUnitPtr();

    return _impl->plugin->getData( lodNode );
}
Ejemplo n.º 2
0
MemoryUnitPtr _scale( const uint8_t* ptr, const size_t size )
{
    const ssize_t nElems = size / sizeof( O );
    auto memory = MemoryUnitPtr( new AllocMemoryUnit( size ));
    const I* in = reinterpret_cast< const I* >( ptr );
    O* out = memory->getData< O >();

    _scale( in, out, nElems );
    return memory;
}