Re: [eigen] Blas performance on mapped matrices

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


On Mon, Jan 9, 2012 at 9:35 PM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
>> Along the same lines if I have a symmetric matrix A and matrices B and
>> C whose product I know will be symmetric.
>
> A.block(r,c, rsize, csize).triangularView<Eigen::Upper>() += B * C;
>
> will do the job, but as you noticed for small matrices this is not
> necessarily faster than doing the whole product because of the higher
> logic complexity and lack of vectorization nearby the diagonal.

Block<Mat,9,9>(A,i,j).triangularView<Upper>() -= (Map<
Matrix<Scalar,9,3,RowMajor> >(dat1) .lazyProduct( Map<
Matrix<Scalar,3,9,RowMajor> >(dat2)) );

works pretty well here, slightly faster than doing the whole product.

gael



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/