Re: [eigen] Should I care about col major vs. row major for dense matrices |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Should I care about col major vs. row major for dense matrices
- From: Rohit Garg <rpg.314@xxxxxxxxx>
- Date: Fri, 3 Jul 2009 12:22:56 -0700
- 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=IYcuDtVqCm9yANDUDCxiYNifkBPFVUsenGN5XduFOVc=; b=IERatw7tk/noiZfXPMivDDyDIHPXDah7Sr+hVxlUEAS3t5TnvAocEuIS5/Dy/iqqPD VPlJVhjlpRL1J6trTre638fWS1aCNMcz2JExcIAsy0OZK7UhVJ0f+d2OptdsaP8UIsr1 TlcuwqJqZN5Ot7EgV6S7gtiYW/zRDH9hJPxVU=
- 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=XLita6AOCNQy9WpHqBnjg0DtZXN3WbOcNK9MlTo8rqUx/4Ez+KjoASNe3KJY/MMqjS iU8UsXiU/lKuaEn+WwMEuOcfby3kL4wlF2KfUjsukfAbmGTxXcbfTg+F0UhI2O9n66as URS71L2SGIhqGa0APy0YIdc8/tzRPvjzeCOko=
This is unlikely to be a major issue. Matrix algorithms, AFAIK, can be
written to favor both row major and column major storage styles. I
don't know how it is done in eigen (ie, whether both styles are
implemented). Otherwise it may involve silent transposes, which are
going to be costly if your matrices are big.
On Fri, Jul 3, 2009 at 2:37 AM, Jens Mueller<jens.k.mueller@xxxxxx> wrote:
> Hi all,
>
> I'm missing some implications for the storage order of dense matrices. I
> know that for sparse matrices you can only use let's say row(), if the
> matrix is row major.
> But for dense matrices you can use both (independent of the storage
> order). Are there any performance implications by doing so? I'm assuming
> yes, since I doubt that the compiler can optimize this.
> But I'm very unsure. In essence, I want to speed up my code but I'm not
> sure whether this is a real issue.
>
> Regards,
> Jens
>
>
>
--
Rohit Garg
http://rpg-314.blogspot.com/
Senior Undergraduate
Department of Physics
Indian Institute of Technology
Bombay