Changeset 2585 in Sophya for trunk/SophyaLib/TArray
- Timestamp:
- Jul 30, 2004, 3:11:51 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tmatrix.cc
r2583 r2585 1 // $Id: tmatrix.cc,v 1.2 7 2004-07-30 10:24:12cmv Exp $1 // $Id: tmatrix.cc,v 1.28 2004-07-30 13:11:51 cmv Exp $ 2 2 // C.Magneville 04/99 3 3 #include "machdefs.h" … … 405 405 } 406 406 407 ////////////////////////////////////////////////////////// //////408 // **** Multiplication matricielle *****409 ////////////////////////////////////////////////////////// //////407 ////////////////////////////////////////////////////////// 408 /////////////// Multiplication matricielle /////////////// 409 ////////////////////////////////////////////////////////// 410 410 411 411 //! Return the matrix product C = (*this)*B … … 454 454 455 455 // Commentaire: pas de difference de vitesse notable selon le mapping de la matrice produit "rm" 456 if (mm == SameMemoryMapping) mm = GetMemoryMapping(); 456 if (mm == SameMemoryMapping) mm = GetMemoryMapping(); 457 457 TMatrix<T> rm(NRows(), b.NCols(), mm); 458 458 … … 515 515 516 516 if(stepa==1 && stepb==1) { 517 //cout<<"A.col packed && B.row notpacked "<<stepa<<" "<<stepb<<endl;518 T * pea = new T[ rm.NCols()];517 //cout<<"A.col packed && B.row packed "<<stepa<<" "<<stepb<<endl; 518 T * pea = new T[NCols()]; 519 519 const T * peb; 520 520 for(r=0; r<rm.NRows(); r++) { // Boucle sur les lignes de A … … 540 540 //cout<<"A.col packed && B.row not packed "<<stepa<<" "<<stepb<<endl; 541 541 const T * pea; 542 T * peb = new T[ rm.NCols()];542 T * peb = new T[NCols()]; 543 543 for(c=0; c<rm.NCols(); c++) { // Boucle sur les colonnes de B 544 544 pe = &(b(0,c)); … … 562 562 if(stepa!=1 && stepb==1) { 563 563 //cout<<"A.col not packed && B.row packed "<<stepa<<" "<<stepb<<endl; 564 T * pea = new T[ rm.NCols()];564 T * pea = new T[NCols()]; 565 565 const T * peb; 566 566 for(r=0; r<rm.NRows(); r++) { // Boucle sur les lignes de A … … 608 608 //cout<<"A.col not packed && B.row not packed ==> optimize on B "<<stepa<<" "<<stepb<<endl; 609 609 const T * pea; 610 T * peb = new T[ rm.NCols()];610 T * peb = new T[NCols()]; 611 611 for(c=0; c<rm.NCols(); c++) { // Boucle sur les colonnes de B 612 612 pe = &(b(0,c)); … … 627 627 if(stepa!=1 && stepb!=1) { 628 628 //cout<<"A.col not packed && B.row not packed ==> optimize on A "<<stepa<<" "<<stepb<<endl; 629 T * pea = new T[ rm.NCols()];629 T * pea = new T[NCols()]; 630 630 const T * peb; 631 631 for(r=0; r<rm.NRows(); r++) { // Boucle sur les lignes de A … … 650 650 throw(SzMismatchError("TMatrix<T>::Multiply(b) Optimize case not treated... Please report BUG !!! ") ); 651 651 return rm; 652 } 652 653 } 654 653 655 654 656 ///////////////////////////////////////////////////////////////
Note:
See TracChangeset
for help on using the changeset viewer.