Changeset 796 for trunk/yat/utility/matrix.cc
 Timestamp:
 Mar 12, 2007, 11:18:55 PM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

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.