From: Richard Jones <rich@annexia.org>
To: "Bauer, Christoph" <Christoph.Bauer@lms-gmbh.de>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Double+Int Records (C-Interface) and Double_array_tag
Date: Thu, 19 Jan 2006 11:25:12 +0000 [thread overview]
Message-ID: <20060119112512.GA24486@furbychan.cocan.org> (raw)
In-Reply-To: <26EB47FDD566A7469FC862DAF373792F07D72B@kaiserslautern1.lmsintl.com>
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
prev parent reply other threads:[~2006-01-19 10:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-19 10:24 Bauer, Christoph
2006-01-19 10:59 ` [Caml-list] " Frederic van der Plancke
2006-01-19 11:25 ` Richard Jones [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060119112512.GA24486@furbychan.cocan.org \
--to=rich@annexia.org \
--cc=Christoph.Bauer@lms-gmbh.de \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox