From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 10756BB84 for ; Thu, 20 Apr 2006 16:02:59 +0200 (CEST) Received: from mail.libertysurf.net (mx-out.libertysurf.net [213.36.80.91]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k3KE2uvE030451 for ; Thu, 20 Apr 2006 16:02:58 +0200 Received: from dyn-83-156-175-234.ppp.tiscali.fr (83.156.175.234) by mail.libertysurf.net (7.2.071) id 4432766300272892 for caml-list@yquem.inria.fr; Thu, 20 Apr 2006 16:02:56 +0200 From: Florent Monnier Organization: l'Association Linux-Nantes To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: Bigarray.c_layout Date: Thu, 20 Apr 2006 16:03:39 +0200 User-Agent: KMail/1.8.2 References: <200604141604.29147.fmonnier@linux-nantes.fr.eu.org> <200604142007.54690.fmonnier@linux-nantes.fr.eu.org> <9B63C7CE-6D35-4E5E-B838-94AF9753C0F7@inria.fr> In-Reply-To: <9B63C7CE-6D35-4E5E-B838-94AF9753C0F7@inria.fr> X-Face: #L_Y84Xu>Uii")W[x~M|kDXQ"7%\'1D_ybO)a'+{"'/%k9)|Sp|OcG`x0rzWb/Z[]^2=YjB 4BVs.BzlQt]}bW<3(}hEogE*O^~7>gK"-|G[HjY{[/SO5S'hf\aNcc?<[$bSq.2o>Lw dp43:s|Qwm-9JBS1~J45M sh,'|6.4>3o4BI>+dH(5B47Cz6/cX3NZ^TG{ES MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604201603.39533.fmonnier@linux-nantes.fr.eu.org> X-Miltered: at nez-perce with ID 44479490.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; bigarray:01 reordering:01 2006:98 caml-list:01 caml-list:01 reorder:02 reorder:02 caml:02 fortran:02 library:03 translate:04 problem:05 layout:05 layout:05 inria:06 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 > > 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 ? (which reorder function is in my first post: http://caml.inria.fr/pub/ml-archives/caml-list/2006/04/64769096fc5b2f076911f60d1ce44c98.fr.html ) The problem with reordering the datas is that it is far too slow. --