forum.alglib.net
http://forum.alglib.net/

ALGLIB with Texas Instruments Code Composer Studio
http://forum.alglib.net/viewtopic.php?f=2&t=84
Page 3 of 3

Author:  norrizuan [ Thu Mar 03, 2011 4:04 pm ]
Post subject:  Re: ALGLIB with Texas Instruments Code Composer Studio

Hi Sergey!

I have one question to ask. Since ALGLIB use its own data type for 2D array (e.g. real_2d_array in C++ and ae_matrix in C), does the ALGLIB have any command to copy from these datatype to normal variable (e.g. int[][], double[][]). So far, I have been using for loops to assign these variables

e.g. alglib::real_2d_array array;
array.setlength(512, 512);
double input[512][512];
for(i=0; i<512; i++)
for (j=0; j<512; j++)
array[i][j] = input[i][j];

and for the C version,

array.ptr.pp_double[i][j] = input[i][j];

Having codes in embedded platform just to assign the variables are very expensive. I wonder there is syntax in ALGLIB to do this. Maybe there is, but I couldn't find any.

Many thanks, Sergey,

Regards,
Rizuan

Author:  Sergey.Bochkanov [ Sat Mar 05, 2011 9:35 am ]
Post subject:  Re: ALGLIB with Texas Instruments Code Composer Studio

Sorry for the late reply, I have been out of office for several days.

No, there is no easy way to copy values from "normal" C array to ALGLIB and vice versa. C++ wrapper has some convenience functions (setcontent), but low level computational core - has not.

Page 3 of 3 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/