|Re: [eigen] Matrix decompositions|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] Matrix decompositions
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Thu, 28 Feb 2013 21:50:41 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=zg8ojCwx3ijGZUT/YTLTObpjLuETc+YC0zlWgmGRPbU=; b=X3G7S5hLVJAnLJLKqOsCxlyZLKxje4rYapmmaw+Gls2+c8xv3GsUyN4RxB3FtPJ7dv Nvx/Gxis/azTidG6VhTo6V0qChgChxlLCPn61JihQ6xGb3/5TfyawsNQBQ/kHAEmiKQF SzxdeVo3kuCIqY739d8kMdjcqKkffSYSbPpt20VhWeRRZRNF8TCtH3Xf8PDKgosxyTbZ dd+7KuwWD/sO1NVHPj1sNMaOaBbY+qTwnl2V0ZmR3DbaQ8Ll+7G952C8asVZM9XrkeO7 MJrs1PFG4lO9u1PX2LyHrl/7D3VKEMKLiotkqzxcss9UBAgwQ3rFY4ekO+ToSNL+a1xq LusQ==
On Thu, Feb 28, 2013 at 8:28 PM, Sameer Agarwal
> 1. What if any impact does the row/column major storage have on the various
> matrix decomposition algorithms in Eigen? I imagine, that QR factorization
> for example will do better if the storage is column major.
For Cholesky and LU, the storage order should not matter much, for QR,
a column major storage is clearly preferable.
> 2. Are the matrix decomposition algorithms affected by the alignment of the
> underlying storage, or more generally, do the matrix decompositions use SIMD
> vectorization which in turns require alignment of the underlying data?
Yes, the factorizations do exploit SIMD, but no, the alignement does
not matter. This is because such algorithms work on sub matrices which
are not aligned even if the (0,0) coeff is.
> In this case I did do some benchmarking, where I used an eigen Matrix and a
> block of memory allocated using new and wrapped inside a Map object, and
> performed cholesky factorization on numerically identical (row major
> matrices) and did not notice any difference. Thus the curiosity. It is
> entirely possible that my benchmark is broken.