[Scilab-Dev] Gmp in scilab revisited.

Jonathan Blanchard BlanchardJ at ieee.org
Mon Sep 29 21:28:42 CEST 2008


Well I mean it's manipulating a new type. I do not see a way of adding
a new type in Scilab from a toolbox perspective. Anyone correct me on
that.

Right now my "hack" I made for myself was to use the  Scilab Matrix of
double as a carrier for the gmp structure. It kind of work but is not
really a distributable solution. (It's also a huge party of (void*)
pointer which tend to make computers crash).

All in all it all come down to memory management. Gmp have a major
shortcoming in that you can't deny it any memory operation so i'm
using the system malloc to allocate memory. If one want the entire gmp
operand to be in the scilab stack it must be copied into the Scilab
stack after each operations. The operand can also stay in the heap but
then the scilab clear function and everything that destroy a Scilab
variabl must be sure to de-allocate the memory used by the operand.

I tried to resume what I found, hope you all can understand it.

Jonathan Blanchard



On Mon, Sep 29, 2008 at 4:18 PM, Sylvestre Ledru
<sylvestre.ledru at inria.fr> wrote:
> Le lundi 29 septembre 2008 à 16:13 -0300, Jonathan Blanchard a écrit :
>> Sorry to bother everyone on the list again about this subject.
>>
>> I have a question to Ledru you said yes to my question earlier but I'm
>> not sure which. Is there any plan for gmp/mpr in scilab in the future
>> and is there a developer currently looking at this?
> No and no ;)
> At least, as far I know. Yann is the one who added this idea to the
> Wiki. Maybe he knows someone who is working on it.
>
>> I also didn't listen to your warning and hacked myself a way to use
>> gmp in scilab.
> Seems you did the right choice ;)
>
>> Sadly because of the nature of gmp it is impossible to
>> create a toolbox for Scilab 5 as I would have loved to create one.
> Why is it impossible ? Too tightly linked with Scilab's internal stuff?
>
> Sylvestre
>
>
>



More information about the dev mailing list