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 D626FBBBB for ; Sat, 1 Apr 2006 12:30:07 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k31AU7jf028986 for ; Sat, 1 Apr 2006 12:30:07 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA07349 for ; Sat, 1 Apr 2006 12:30:06 +0200 (MET DST) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.199]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k31AU569028968 for ; Sat, 1 Apr 2006 12:30:06 +0200 Received: by zproxy.gmail.com with SMTP id 4so568051nzn for ; Sat, 01 Apr 2006 02:30:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=iYJGuX9agj/MKXvK9CBaKp1xQ4zJjD2kt485DktozdItyabaM3B/cYfbvl2fo4f3W3s4DFTZfkjarldSy9Qzi1mX4gRKey4SsFs5SIcQr8r+pgDsCsv0Jr23zaOwA45cg0GanIzQIzNRfKrvgSoKae/IsZaFSUdACjO8u/ehpx4= Received: by 10.36.84.15 with SMTP id h15mr1121032nzb; Sat, 01 Apr 2006 02:30:05 -0800 (PST) Received: by 10.36.118.4 with HTTP; Sat, 1 Apr 2006 02:30:05 -0800 (PST) Message-ID: Date: Sat, 1 Apr 2006 22:30:05 +1200 From: "Jonathan Roewen" To: "=?ISO-8859-1?Q?Li-Thiao-T=E9_S=E9bastien?=" Subject: Re: [Caml-list] Documentation request: allocation of bigarrays in C Cc: "Dmitry Bely" , caml-list@inria.fr In-Reply-To: <442E5314.9080804@crans.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <442D3667.90904@crans.org> <442E5314.9080804@crans.org> X-Miltered: at nez-perce with ID 442E562F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 442E562D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; bigarrays:01 arrays:01 bigarrays:01 ocaml:01 reordering:01 higher-level:01 ocaml:01 parsing:01 bigarray:01 bigarray:01 caml-list:01 functions:01 data:02 floats:02 string:02 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=RCVD_BY_IP autolearn=disabled version=3.0.3 > In my case, I want to read a relatively big file (50MB) containing > arrays of floats . I use C functions for the raw speed then pass the > bigarrays to OCaml to do some reordering of the data, and higher-level > processing. > > I do not open the file in Ocaml then send a string to C for parsing, but > rather open the file in C and return the bigarray list to Ocaml. (cf my > previous mistake on creating Ocaml lists in C on this mailing-list) Does Bigarray.X.map_file not serve the purpose? Kindest Regards, Jonathan