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 8B78CBB9C for ; Thu, 19 Jan 2006 11:58:41 +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 k0JAwfTr011934 for ; Thu, 19 Jan 2006 11:58:41 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA03532 for ; Thu, 19 Jan 2006 11:58:40 +0100 (MET) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k0JAwdGD030869 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 19 Jan 2006 11:58:40 +0100 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1EzXui-000750-00; Thu, 19 Jan 2006 11:25:12 +0000 Date: Thu, 19 Jan 2006 11:25:12 +0000 To: "Bauer, Christoph" Cc: caml-list@inria.fr Subject: Re: [Caml-list] Double+Int Records (C-Interface) and Double_array_tag Message-ID: <20060119112512.GA24486@furbychan.cocan.org> References: <26EB47FDD566A7469FC862DAF373792F07D72B@kaiserslautern1.lmsintl.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26EB47FDD566A7469FC862DAF373792F07D72B@kaiserslautern1.lmsintl.com> User-Agent: Mutt/1.5.9i From: Richard Jones X-Miltered: at nez-perce with ID 43CF70E1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 43CF70DF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 c-interface:01 unboxed:01 aligned:01 notepad:01 wrote:01 int:01 int:01 floats:02 floats:02 float:03 float:03 bytes:03 bytes:03 christoph:04 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 Thu, Jan 19, 2006 at 11:24:54AM +0100, Bauer, Christoph wrote: > given a type like > > type t = { > i : int; > f0 : float; > f1 : float; > ... > f100 : float; > } > > A value from this type is constructed in C-code. Is > it possible to create a block with a Double_array_tag? > (Because there are only unboxed values in this record.) On a 32 bit machine, the int is 4 bytes long and the floats are 8 bytes long, so the floats wouldn't be aligned. How about simply: type t = { i : int; f : float array; } Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.com