Le 24/09/2012 22:46, Paul Carrico a écrit :

Dear all,

May I ask some advice in matrix calculation issue, in order to optimize the code ?

The matrix hereafter is the first trial in treating a (m x 6) matrix where :

-The first line is the upper part of a symmetrical 6x6 tensor (the 3 first components are the diagonal terms)

-m may correspond to millions of lines

-(each line is independent from the other)

I had a look in some function (such as schur, spec, bdiag and so on) in order to see if I can use this symmetrical specificity ... but I don't see anything èAm I wrong ?

The schur, spec, bdiag function internally check if the matrix is symmetric and if yes apply specific algorithm. But the matrix must be passed in its full form.

Several calculations will be done: Eigen values calculation for each submatrix, summation, multiplication and so on ...

Vectorization can be useful to improve speedup ?

I did not see any possible vectorization (there is no way to compute several schur decompositions with only one call to a primitive function)
If you have a multicore processor you can try the parallel_run function.

Serge Steer
INRIA

Any advices ?

Thanks in advance

Paul

PS : M is made from a text file ... its structure can be change in order to be as efficient as possible ...

Mat = [

9.315 9.315 28.41 - 0.0000999 - 3.169 - 3.169 ; 2.945 2.945 28.45 0.04826 - 3.175 - 3.175 ; 8.486 9.341 25.73 0.0101 - 3.179 - 3.189 ; 2.043 2.939 25.73 0.038 - 3.185 - 3.182 ; 9.341 8.486 25.73 0.0101 - 3.189 - 3.179 ; 2.939 2.043 25.73 0.038 - 3.182 - 3.185 ; 8.492 8.492 23. 0.02036 - 3.179 - 3.179 ; 2.018 2.018 22.97 0.02779 - 3.172 - 3.172 ; 9.108 8.179 25.01 0.01326 - 3.197 - 1.608 ; 4.695 2.302 25.04 0.0905 - 3.199 - 1.61 ; 8.271 8.186 22.27 0.02824 - 3.212 - 1.601 ; 3.842 2.302 22.29 0.07548 - 3.214 - 1.599 ; 9.134 8.128 24.91 0.01554 - 3.278 - 1.61 ; 4.675 2.145 24.9 0.08819 - 3.276 - 1.612 ;

    ...

    ...
8.291 8.129 22.16 0.03055 - 3.263 - 1.598 ] ;

sub11 sub22 sub33 sub12 sub23 sub13 ... where sub is a submatrix == 1 line



_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to