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 90AF6BB81 for ; Sun, 27 Nov 2005 23:48:20 +0100 (CET) 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 jARMmJtQ013697 for ; Sun, 27 Nov 2005 23:48:20 +0100 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 XAA00273 for ; Sun, 27 Nov 2005 23:48:19 +0100 (MET) Received: from mail.physik.uni-muenchen.de (mail.physik.uni-muenchen.de [192.54.42.129]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jARMmIs0013692 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sun, 27 Nov 2005 23:48:19 +0100 Received: from localhost (unknown [127.0.0.1]) by mail.physik.uni-muenchen.de (Postfix) with ESMTP id 28FBE2000C; Sun, 27 Nov 2005 23:48:16 +0100 (CET) Received: from mail.physik.uni-muenchen.de ([127.0.0.1]) by localhost (mail.physik.uni-muenchen.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 26453-01-37; Sun, 27 Nov 2005 23:48:16 +0100 (CET) Received: from mailhost.cip.physik.uni-muenchen.de (kaiser.cip.physik.uni-muenchen.de [141.84.136.1]) by mail.physik.uni-muenchen.de (Postfix) with ESMTP id 1140420003; Sun, 27 Nov 2005 23:48:16 +0100 (CET) Received: from eiger.cip.physik.uni-muenchen.de (eiger.cip.physik.uni-muenchen.de [141.84.136.54]) by mailhost.cip.physik.uni-muenchen.de (Postfix) with ESMTP id B528826E89; Sun, 27 Nov 2005 23:48:15 +0100 (CET) Received: by eiger.cip.physik.uni-muenchen.de (Postfix, from userid 3092) id 93ACC34FFF; Sun, 27 Nov 2005 23:48:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by eiger.cip.physik.uni-muenchen.de (Postfix) with ESMTP id 8A05B22163; Sun, 27 Nov 2005 23:48:15 +0100 (CET) Date: Sun, 27 Nov 2005 23:48:15 +0100 (CET) From: Thomas Fischbacher To: Dmitry Bely Cc: caml-list@inria.fr Subject: Re: [Caml-list] Bigarray question In-Reply-To: Message-ID: References: X-BOFH: Daemons did it MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: amavisd-new at physik.uni-muenchen.de X-Miltered: at nez-perce with ID 438A37B3.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 438A37B2.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 bigarray:01 bigarray:01 pointer:01 pointer:01 externally:01 alloc:01 cip:98 cip:98 lambda:01 lambda:01 wrote:01 writes:01 dmitry:01 explicitly:01 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 On Fri, 25 Nov 2005, Dmitry Bely wrote: > Thomas Fischbacher writes: > > > As far as I can see from the documentation, it is not explicitly permitted > > to change a once allocated bigarray data structure in such a way that one > > replaces the data pointer by some other data pointer (while retaining > > size and type). This would, however, be quite useful in some situations. > > Is your bigarray a wrapper around some externally allocated data, created > via alloc_bigarray() C call? It's a somewhat special case of just that situation, yes. I supposed I may just do so, however, the specification (documentation) does not give me any guarantee that this is valid, so, at least the documentation has to be changed before I can rely on this. There is a subtle difference between "just accidentally works" and "works because it is guaranteed by specification". -- regards, tf@cip.physik.uni-muenchen.de (o_ Thomas Fischbacher - http://www.cip.physik.uni-muenchen.de/~tf //\ (lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y) V_/_ (if (= x 0) y (g g (- x 1) (* x y)))) n 1)) (Debian GNU)