Changeset 796
 Timestamp:
 Mar 12, 2007, 11:18:55 PM (16 years ago)
 Location:
 trunk
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/matrix_test.cc
r793 r796 376 376 *error << "error operator*=(matrix) 2" << std::endl; 377 377 } 378 m6*= utility::matrix(3,4,1.0); 379 m6*= utility::matrix(4,3,1.0); 380 m6*= utility::matrix(3,5,2.0); 381 m6*= utility::matrix(5,5,2.0); 382 m6*= utility::matrix(5,3,2.0); 383 m6*= unit3x3; 378 384 379 385 if (error!=&std::cerr) 
trunk/yat/utility/matrix.cc
r794 r796 174 174 else if (m_) 175 175 gsl_matrix_free(m_); 176 if (blas_result_) {177 gsl_matrix_free(blas_result_);178 blas_result_=NULL;179 }180 176 proxy_m_=m_=NULL; 181 177 … … 191 187 proxy_m_ = m_ = other.create_gsl_matrix_copy(); 192 188 189 // no need to delete blas_result_ if the number of rows fit, it 190 // may be useful later. 191 if (blas_result_ && (blas_result_>size1!=rows())) { 192 gsl_matrix_free(blas_result_); 193 blas_result_=NULL; 194 } 193 195 } 194 196 return *this; … … 433 435 { 434 436 assert(m_); 437 if ( blas_result_ && ((blas_result_>size1!=rows())  438 (blas_result_>size2!=other.columns())) ) { 439 gsl_matrix_free(blas_result_); 440 blas_result_=NULL; 441 } 435 442 if (!blas_result_) { 436 443 blas_result_ = gsl_matrix_alloc(rows(),other.columns());
Note: See TracChangeset
for help on using the changeset viewer.