This is the mail archive of the
gsl-discuss@sourceware.org
mailing list for the GSL project.
column-major
- From: Z F <mail4me9999 at yahoo dot com>
- To: GSL Discuss Mailing List <gsl-discuss at sourceware dot org>
- Date: Thu, 17 Sep 2009 20:51:30 -0700 (PDT)
- Subject: column-major
--- On Tue, 9/15/09, Gerard Jungman <jungman@lanl.gov> wrote:
> We need to simply allow for the existence of the
> column-major
> world. It's only fair. And it's a simple variation to
> encode
> in any of our data structures.
>
> Every serious C++ vector/matrix library allows for both
> column-major
> and row-major layout, because they know people need it.
> Templates, or
> other gymnastics, are not required. You just have to decide
> that you
> want it.
>
>
Could someone, please, explain to me the difference between
column and row major data storage.
I understand it that a multi-dim data is stored in a memory block
which is accessed via
A[i,j,k] = (k*Nj+j)*Ni+i
A[i,j,k] = (i*Nj+j)*Nk+k
Is this correct? or there is more to it? which is which?
If this is correct, what is the big deal with this?
Package which supports one, supports the other automatically.
Left multiplication becomes right multiplication and vice versa. Am I wrong?
Thanks
ZF