Issue with stack in a toolbox
Vincent Lejeune
vincent.lejeune at institutoptique.fr
Fri May 15 23:17:12 CEST 2009
Hi,
I am facing another problem in my journey inside the writing of a toolbox.
I need to create a custom type that need to be manipuled with SciLab command
line. In fact this is a pointer (to a matrix of double stored in gpu
memory), so I used the CreateVarFromPtr() function to store it in the stack.
But when I'm trying to retrieve it afterward, SciLab is complaining about a
stack overflow, and ask me to change its size. However, this is just a lone
pointer, it shouldnt eat all the stack by itself...
The code is in attachment. Further investigations shows that the line :
"CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);"
is making trouble, but I suspect that the source of the problem is lying in
a misuse of the retrieve of the value, as my custom "fromGPU" function
doesnt work as planed (in debug mode).
By the way, how can I print something to the SciLab prompt ?
Thx for help !
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sci_toGPU.c
URL: <https://lists.scilab.org/pipermail/dev/attachments/20090515/a54cdead/attachment.c>
More information about the dev
mailing list