From: "Daniel Bünzli" <daniel.buenzli@epfl.ch>
To: brjackson@blueyonder.co.uk
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Constructing all float tuples in C
Date: Fri, 5 Aug 2005 16:41:45 +0200 [thread overview]
Message-ID: <D2F0C023-9373-4F8B-976D-66FF422340DB@epfl.ch> (raw)
In-Reply-To: <5160.195.188.213.34.1123251372.squirrel@195.188.213.34>
You are allocating an array of floats. But a tuple of floats is not
an array of floats. In a tuple of floats, floats are boxed. Floats
are unboxed only in records with float fields only or in arrays of
floats.
So it should your code should be something like :
CAMLlocal1(t);
t = alloc_tuple (3);
Store_field (t, 0, copy_double(obj[0]));
Store_field (t, 1, copy_double(obj[1]));
Store_field (t, 2, copy_double(obj[2]));
Daniel
prev parent reply other threads:[~2005-08-05 14:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-05 14:16 brjackson
2005-08-05 14:41 ` Daniel Bünzli [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=D2F0C023-9373-4F8B-976D-66FF422340DB@epfl.ch \
--to=daniel.buenzli@epfl.ch \
--cc=brjackson@blueyonder.co.uk \
--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;
as well as URLs for NNTP newsgroup(s).