Re: [Gambas-user] Long C routine

2014-02-02 Thread Ing Martín Cristiá
Emil, this is the basic code. For the test, the Wait 0.01 were erased.Also the functions Addbanda(), DeBanda(), are just to locate the (row,col) element of the matrix in the array that contains it. That array cant be embedded as suggested because its size us unknown. Public Function solucionarX

Re: [Gambas-user] Long C routine

2014-01-30 Thread Benoît Minisini
Le 31/01/2014 07:48, Benoît Minisini a écrit : > Le 31/01/2014 02:25, Emil Lenngren a écrit : >> How does your Gambas source code for the test look like? >> For the best speed when using JIT (Fast), you could try to use >> one-dimensional embedded arrays >> (http://gambasdoc.org/help/cat/arraydecl?

Re: [Gambas-user] Long C routine

2014-01-30 Thread Benoît Minisini
Le 31/01/2014 02:25, Emil Lenngren a écrit : > How does your Gambas source code for the test look like? > For the best speed when using JIT (Fast), you could try to use > one-dimensional embedded arrays (http://gambasdoc.org/help/cat/arraydecl?v3) > But then they must be fixed-sized... > > /Emil >

Re: [Gambas-user] Long C routine

2014-01-30 Thread Emil Lenngren
How does your Gambas source code for the test look like? For the best speed when using JIT (Fast), you could try to use one-dimensional embedded arrays (http://gambasdoc.org/help/cat/arraydecl?v3) But then they must be fixed-sized... /Emil 2014-01-31 Jussi Lahtinen > Did you make pre-run for J

Re: [Gambas-user] Long C routine

2014-01-30 Thread Jussi Lahtinen
Did you make pre-run for JIT benchmark? Otherwise first run is slower than subsequents... maybe it's insignificant. Perhaps this works: Pass callback function as an argument to your C lib (along with other arguments), and call it when some proportion of the work is done (example when variable i %

Re: [Gambas-user] Long C routine

2014-01-30 Thread martin p cristia
Just a FYI This is the benchmark result solving a ecuation system 1578 order ( 1.309.782.606 operations) Gambas 147 seg Gambas+Fast27 seg Gambas + C2 seg So I still need the C library giving signs of life -

Re: [Gambas-user] Long C routine

2014-01-30 Thread Jussi Lahtinen
> > Not backgroud, as the user cannot do much while that routine is working, > but I need the program look at least alive as Ubuntu blackens the window. > You can run it in background if you lock GUI (or at least buttons etc) and perhaps show progress bar etc. > Also, I read that in some cases

Re: [Gambas-user] Long C routine

2014-01-30 Thread Benoît Minisini
Le 30/01/2014 22:53, martin p cristia a écrit : >> So you need to run the routine as a background task? Try the Task class >> (there is an example of it in the Fractal example, IIRC). >> >> Regards, >> Tobi > Not backgroud, as the user cannot do much while that routine is working, > but I need the

Re: [Gambas-user] Long C routine

2014-01-30 Thread martin p cristia
> So you need to run the routine as a background task? Try the Task class > (there is an example of it in the Fractal example, IIRC). > > Regards, > Tobi Not backgroud, as the user cannot do much while that routine is working, but I need the program look at least alive as Ubuntu blackens the windo

Re: [Gambas-user] Long C routine

2014-01-30 Thread Tobias Boege
On Thu, 30 Jan 2014, martin p cristia wrote: > Hi: > > I need a way to keep the GUI alive while processing a EXTERNAL C routine: > > Public Extern M8gauss(mfMatriz As Float[], vfX As Float[], vfTermns As > Float[], lOrder As Long) As Long > > wich is a Gaussian ecuations system solver, and can

[Gambas-user] Long C routine

2014-01-30 Thread martin p cristia
Hi: I need a way to keep the GUI alive while processing a EXTERNAL C routine: Public Extern M8gauss(mfMatriz As Float[], vfX As Float[], vfTermns As Float[], lOrder As Long) As Long wich is a Gaussian ecuations system solver, and can take up to 10minutes ( 10^10 aritmetic operations). Any hel