Re: [eigen] Re: recent improvements in the products |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Re: recent improvements in the products
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Tue, 28 Jul 2009 08:24:27 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=k+89gozVRJXUiEIrcDJWTnAIPRY5X9vx9hK3h5E8AA0=; b=GyRDPwv3jPNktbTgzTN8Pgz4ilOsbZzUz7fSmBHoI6M+lmdEMnaWOHx3ChwwnZdI8G R5dhtyi4ZtZSIcocRNK4EcHf74T5+A8sVbwjh0BxmCo0W+eJgJ40Ne8UO6sBBRlmAb/y aBAErdivt9n0LB22W6Uvp8zLI/qHAIecs32v8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=HD13Y1LFAoKVaB62gg1AMI37Rq7ZIMvSlCuFyh4tfuL9hk//5NDNqRK8JHJzGqKMut CN8aNiLrNmFkKfulI8OcDWZjFHTaj4Cnnioox2HzO9fU78eXvzZjB5RPCxYzaPfd6+yZ Fq+nIrH8UqYIQBEYTkn2JQNABomAHny/Q2pKA=
2009/7/28 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>:
>
> In case some peoples are interested by high performance on large matrices,
> I've almost finished to implement fast routines covering the complete BLAS
> API. Those include:
>
> * fast triangular * general matrix/vector (TRVM / TRMM), e.g.:
> m3 += s1 * m1.adjoint().triangularView<UnitUpperTriangular>() * m2;
> m3 -= s1 * m2 * m1.triangularView<LowerTriangular>();
>
> * fast triangular solver for multiple right hand sides (TRSV / TRSM):
> m1.adjoint().triangularView<UnitUpperTriangular>().solveInPlace(m2);
>
> * fast selfadjoint * general matrix/vector (SYMV / SYMM / HEMM), e.g.:
> m3 += s1 * m1.selfadjointView<UpperTriangular>() * m2;
> m3 -= s1 * m2 * m1.selfadjointView<LowerTriangular>();
>
> * fast rank 1 / rank K update of a selfadjoint matrix (SYR / SYRK), e.g.:
> m1.selfadjointView<UpperTriangular>().rankUpdate(u,s); // m1 += s * u *
> u^T
> m1.selfadjointView<UpperTriangular>().rankUpdate(m2.adjoint(),s); // m1 +=
> s * m2.adjoint() * m2
>
> * fast rank 2 update of a selfadjoint matrix (SYR2), e.g.:
> m1.selfadjointView<UpperTriangular>().rankUpdate(u,v,s); // m1 += s * u *
> v^T + s * v * u^T
>
>
> Some remarks/questions:
>
> * all these new routines are just high level blocking algorithms built on
> top of a single highly optimized product kernel.
>
> * they all work at full speed in all configurations (storage orders).
>
> * are you ok with the new api to deal with triangular/selfadjoint matrices ?
I'm OK, at least I cant think of a better one
>
> * do you prefer the shorter triangular<> / selfadjoint<> instead of
> triangularView<> / selfadjointView<> ?
I think the View helps potentially disambiguate
>
> * are you ok with the rankUpdate() API ? do you have any better idea to
> expose this ?
No experience with this so I cant say if that sounds natural to a
specialist. At least i cant think of a better name.
>
> * currently we can only solve for X = M^1 * Y, but we also need X = Y *
> M^-1. Implementation wise we just have to transpose everything, so actually,
> the user can probably already do:
> m1.transpose().triangularView<UpperTriangular>(m2.transpose());
> but that's not very nice API wise. The only solution I see is to add an
> option to TriangularView::solveInPlace(), e.g., solveInPlace(m2, Right);
Yes and then i'd call that OnTheRight.
>
> * these new special products are lazy by default.
Why? No risk of aliasing effects, somehow?
Benoit