From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 4F7DCBC69 for ; Tue, 18 Dec 2007 18:36:22 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAJOTZ0fAXQInh2dsb2JhbACQAQEBAQgKKZlm X-IronPort-AV: E=Sophos;i="4.24,180,1196636400"; d="scan'208";a="5791781" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 18 Dec 2007 18:36:22 +0100 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id lBIHaF9V006465 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 18 Dec 2007 18:36:22 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAANOTZ0fU436unmdsb2JhbACQAQEBAQEHAggHChiZZw X-IronPort-AV: E=Sophos;i="4.24,180,1196636400"; d="scan'208";a="6982893" Received: from moutng.kundenserver.de ([212.227.126.174]) by mail3-smtp-sop.national.inria.fr with ESMTP; 18 Dec 2007 18:36:19 +0100 Received: from [152.78.96.56] (babylon.cip.physik.uni-muenchen.de [141.84.136.30]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1J4gMd0O7U-00060S; Tue, 18 Dec 2007 18:36:19 +0100 Message-ID: <476806F9.4030100@functionality.de> Date: Tue, 18 Dec 2007 17:44:25 +0000 From: Thomas Fischbacher User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060607 Debian/1.7.12-1.2 X-Accept-Language: en MIME-Version: 1.0 To: Caml-list List Subject: Bigarray question Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX19BJCpTpqI7my7valQWPSgmeADUYJXNCEo3lDx dB2qsOWY5hM3Ye9AiV5YLG/ZDYB11xm9vKgAGvqsT65b+gE3Lb 7IcHCRXcIuDMkknUQwS3g== X-Miltered: at concorde with ID 4768050F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; bigarray:01 bigarray:01 pointer:01 low-level:01 algebra:01 bigarrays:01 pointer:01 explicitly:02 explicitly:02 linear:02 data:02 data:02 callback:02 caml:02 caml:02 Hello everybody, as far as I can tell, it is easy (but not explicitly allowed in the documentation) to allocate a Caml bigarray and change the data pointer inside that bigarray afterwards. What I am into right now is writing a function which allows me to walk a caml function over the entries of a sparse matrix operator managed by a low-level sparse matrix linear algebra C library. Therefore, it would be rather elegant to allocate bigarrays for index and data entries only once and pass them on to the ML callback for every row of the matrix. There is no problem in implementing this, technically speaking. But this would require a change to the ML documentation stating that it is explicitly considered as permissible to change the data pointer in a bigarray. Can I get that, please? -- best regards, Thomas Fischbacher t.fischbacher@soton.ac.uk