« il: 29 Novembre 2013, 00:41:24 »
Vi riporto questa discussione apparsa nella M.L. ufficiale:
"
I'm porting a VB6 program that does Structural Calculations
https://sourceforge.net/projects/estru3d/
wich uses a lots of matrix operations plus a ecuations solver for band matrixes.
I've made a DLL for the win32 enviroment 10 years ago that speeded up x100 then solver.
Here's my battery of questions:
can Gambas pass 2D arrays to C?
assuming YES, how is the 2D array stored in gambas?
suppose a 3x3 array: row1row2row3 or col1col2col3?
it is possible to pass HUGE arrays, 100.000 8byte float elements?
Thanks in advance.
PD:
the program is being ported in the spanish specializad gambas forge
http://forge.gambas-es.org/projects/estru3d
I'm having the help of guys who are too BASIC like me, so any help is welcome
we're also planning to translate it to other languages
(we're hiring, by the way )
I need to make a C++ library for matrix operations
Saludos
Martin "
"
If you pass an array to an extern function written C, the function will
receive a pointer to the beginning of the array data, so as soon as
elements are ordered the same way in Gambas and in C, everything will work.
Note that there is a gb.gsl component based on libgsl that implements
(among other things) matrix operations. Maybe you can take a look at it,
see if it can be useful for you.
And If you need something in the libgsl that is not implemented in the
component, tell me.
Regards,
--
Benoît Minisini "
"
by a moment i see a hope to alternative to fucking etabs software, but
its sometihgn right?
> wich uses a lots of matrix operations plus a ecuations solver for band matrixes.
gambas have a special modulo for mathematis calculation, see gb.gsl
for the scientific calculation using gambas languaje
or can u made extern operation directly on the library "LibGSL"
http://www.gnu.org/software/gsl/ but of course more
> can Gambas pass 2D arrays to C?
gambasdoc.org/help/howto/extern?es&v3
> assuming YES, how is the 2D array stored in gambas?
> suppose a 3x3 array: row1row2row3 or col1col2col3?
gambasdoc.org/help/lang/array?en&v3
gambasdoc.org/help/comp/gb/variant[]/_get?v3
of course Variant only are a example
> it is possible to pass HUGE arrays, 100.000 8byte float elements?
use extern with external library, fou u'r calculation gambas will gert
more that 2 hours to calculate.. if u use slower distributions like
winbutnu... i think 3 hours if u'r model of matrix have lot of points
PICCORO McKAY Lenz "
« Ultima modifica: 29 Novembre 2013, 00:43:16 da vuott »
Registrato
« Chiunque, non ricorrendo lo stato di necessità, nel proprio progetto Gambas fa uso delle istruzioni Shell o Exec, è punito con la sanzione pecuniaria da euro 20,00 a euro 60,00. »