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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 41C01BC69; Wed, 19 Dec 2007 20:15:53 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAALD8aEfAXQImh2dsb2JhbACPfwEBAQgKKZoJ X-IronPort-AV: E=Sophos;i="4.24,185,1196636400"; d="scan'208";a="7040737" Received: from discorde.inria.fr ([192.93.2.38]) by mail3-smtp-sop.national.inria.fr with ESMTP; 19 Dec 2007 20:15:53 +0100 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id lBJJFqwm015903 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK); Wed, 19 Dec 2007 20:15:52 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAEz8aEfU436unmdsb2JhbACPfwEBAQEHBAYpmgk X-IronPort-AV: E=Sophos;i="4.24,185,1196636400"; d="scan'208";a="20525247" Received: from moutng.kundenserver.de ([212.227.126.174]) by mail4-smtp-sop.national.inria.fr with ESMTP; 19 Dec 2007 20:15:51 +0100 Received: from [86.146.99.244] (babylon.cip.physik.uni-muenchen.de [141.84.136.30]) by mrelayeu.kundenserver.de (node=mrelayeu1) with ESMTP (Nemesis) id 0MKwpI-1J54OU4Bue-0004Jo; Wed, 19 Dec 2007 20:15:51 +0100 Message-ID: <47696DE3.4090302@functionality.de> Date: Wed, 19 Dec 2007 19:15:47 +0000 From: Thomas Fischbacher User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20060904 Debian/1.7.8-1sarge7.2.2 X-Accept-Language: en MIME-Version: 1.0 To: Xavier Leroy Cc: Caml-list List Subject: Re: [Caml-list] Bigarray question References: <476806F9.4030100@functionality.de> <47695924.8090202@inria.fr> In-Reply-To: <47695924.8090202@inria.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+Ra8FiT+2onfU4WIpb1htexlxEeFw/gC0urSe G0uD1lkTZU9qSudCZzG/9ndA9bvs4jmkLWZLdduzkMOrWHlffs j3qLPEVn+LVjnl6EQaE2w== X-Miltered: at discorde with ID 47696DE8.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; bigarray:01 bigarray:01 pointer:01 pointer:01 dims:01 dynamically:01 caml-list:01 explicitly:02 explicitly:02 data:02 data:02 caml:02 shape:96 problem:05 xavier:06 Xavier, >>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. >>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? > > I see no reason why this would cause problems, as long as the data > pointer points to C data of the right shape and dimensions. (Of > course, you could update the dimensions of the bigarray as > appropriate, if needed.) I don't think I would document this, as I > wouldn't quite know how to word it in the docs, but you have my > encouragements to try and report problems if any. Just adding a line to the documentation which states that "it is permitted to dynamically change the data and dims fields of the bigarray data structure from within C" would be sufficient. -- best regards, Thomas Fischbacher t.fischbacher@soton.ac.uk