From: "Remi Vanicat" <remi.vanicat@gmail.com>
To: "Florent Monnier" <fmonnier@linux-nantes.fr.eu.org>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Re: Bigarray.c_layout
Date: Thu, 20 Apr 2006 23:14:49 +0200 [thread overview]
Message-ID: <6b8a91420604201414q4180a0f3pfc43205fe73760a8@mail.gmail.com> (raw)
In-Reply-To: <200604201603.39533.fmonnier@linux-nantes.fr.eu.org>
2006/4/20, Florent Monnier <fmonnier@linux-nantes.fr.eu.org>:
> > > In the library I use the elements are ordered like this in the 1dim
> > > C array:
> > > 01 02 03 04 05 06
> > > 07 08 09 10 11 12
> > > 13 14 15 16 17 18
> > > 19 20 21 22 23 24
> > >
> > > but with the c_layout of big array the datas are ordered like this :
> > > 01 05 09 13 17 21
> > > 02 06 10 14 18 22
> > > 03 07 11 15 19 23
> > > 04 08 12 16 20 24
> >
> > Looks like you need to use fortran_layout, and shift the indices by 1
> > to translate between 0-based and 1-based.
>
> But it would be like the "reorder" function I use, isn't it ?
Nope, a biggarray with a fortran_layout is a biggaray with ordering as
in your first example, when c_layout is with the ordering as in you
second example.
The other difference is that with fortran_layout, array are from 1 to
n, not from 0 to n-1.
prev parent reply other threads:[~2006-04-20 21:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-14 14:04 Bigarray.c_layout Florent Monnier
[not found] ` <20060414.193255.24118599.debian00@tiscali.fr>
2006-04-14 18:07 ` Bigarray.c_layout Florent Monnier
2006-04-20 9:42 ` [Caml-list] Bigarray.c_layout Damien Doligez
2006-04-20 14:03 ` Florent Monnier
2006-04-20 21:14 ` Remi Vanicat [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6b8a91420604201414q4180a0f3pfc43205fe73760a8@mail.gmail.com \
--to=remi.vanicat@gmail.com \
--cc=caml-list@yquem.inria.fr \
--cc=fmonnier@linux-nantes.fr.eu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).