From: Nicolas Joliot <Nicolas.Joliot@irisa.fr>
To: caml-list@inria.fr
Subject: Interfaçage C/CAML
Date: Thu, 10 Aug 2000 18:05:45 +0200 [thread overview]
Message-ID: <3992D2D9.906E0BA7@irisa.fr> (raw)
Je suis actuellement en train de travailler sur l'interfaçage pour CAML
de la bibliothèque ILOG CPLEX 6.5.
J'ai actuellement des problèmes lorsque j'invoque 2 de ces fonctions C
sous Caml, l'une me renvoyant un floatant, l'autre un tableau de
floatant.
Lorsqu'elles sont appelées séparément, je peux afficher les resulats
sans problème, mais lorsque les deux sont appelées successivement et que
j'essaye d'afficher le tableau de floatants, j'ai systématiquement un
"Bus Error".
Par contre, l'affichage du floatant simple ne pose pas de problème,
aussi je pense que l'erreur doit provenir de la façon dont j'ai
représenté le tableau de floatant dans le fichier interface .c :
- déclaration : CAMLlocal1(tableau_float)
- allocation : tableau_float=alloc(nb_element*2,Double_array_tag)
- Utilisation :Store_double_field(tableau_float,i,floatant_a_renvoyer)
_ retour sous CAML par CAMLreturn
La représentation de ce tableau de float de type value est-elle
correcte? Si oui, quel peut être l'explication de ce plantage
systématique? Si non, quel est la bonne représentation en type "value"
d'un tableau de floatant? ( qui est d'ailleurs assez mal expliquée sur
le manuel on-line de ocaml)
Par ailleurs, j'ai remarqué qu'un printf"%f" pour afficher les floatants
de ce tableau engendrait parfois un "Bus Error".
-----------------------------------------------------------
JOLIOT Nicolas.
IRISA-INRIA, Campus de Beaulieu, 35042 Rennes cedex, France
Tél: +33 (0) 2 99 84 71 00, Fax: +33 (0) 2 99 84 71 71
email : nicolas.joliot@irisa.fr
-----------------------------------------------------------
next reply other threads:[~2000-08-10 16:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-10 16:05 Nicolas Joliot [this message]
2000-08-10 17:14 ` Markus Mottl
2000-08-11 8:24 ` Xavier Leroy
2000-08-11 10:54 ` Markus Mottl
2000-08-11 8:58 ` David Mentré
2000-08-14 17:35 David McClain
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=3992D2D9.906E0BA7@irisa.fr \
--to=nicolas.joliot@irisa.fr \
--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