From: Christophe TROESTLER <Christophe.Troestler@umh.ac.be>
To: "O'Caml Mailing List" <caml-list@inria.fr>
Subject: Alternative allocation of bigarrays
Date: Sun, 20 Feb 2005 20:38:13 +0100 (CET) [thread overview]
Message-ID: <20050220.203813.26280962.Christophe.Troestler@umh.ac.be> (raw)
Hi,
I am interfacing OCaml with a C library that needs special allocation
functions for full speed (for alignment reasons). I am wondering
about the best course to follow to create bigarrays with these new
malloc/free functions.
What I am doing now is to define a special "bigarray_create" based on
a spacial "alloc_bigarray" using tailored custom_operations.
Specifically, "alloc_bigarray" uses the new malloc and
"bigarray_finalize" of the "custom_operations" use the new free. So
far I suppose there is no problem and they can share the OCaml
Bigarray types. However I also changed the "custom_operations"'s
"identifier" and "bigarray_deserialize" so these bigarrays are
deserialized with the new malloc. Can I still use the standard
bigarray types with these new arrays ? (I would guess so but I'd like
a confirmation here.)
Also, if better approaches are possible, I will be happy to know them.
(The current solution requires to duplicate a lot of bigarray.c code.)
Regards,
ChriS
reply other threads:[~2005-02-20 19:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20050220.203813.26280962.Christophe.Troestler@umh.ac.be \
--to=christophe.troestler@umh.ac.be \
--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