        auto& magma_singleton = MagmaSingleton::get_magma_singleton();
        magma_scopymatrix(m_, n_, mat.storage_.get(), m_, storage_.get(), m_,
            magma_singleton.queue_);
    }
}
#endif

template <typename DataType, typename MemorySpaceType>
void LocalMatrices<DataType, MemorySpaceType>::allocate()
{
    ptr_matrices_.resize(nmat_);