Changeset 3907


Ignore:
Timestamp:
May 9, 2020, 5:14:49 AM (4 weeks ago)
Author:
Peter
Message:

remove checks for nullptr before calling gsl free function and require GSL version 1.13 (or newer). closes #945.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEWS

    r3893 r3907  
    44
    55version 0.18 (released NOT YET)
     6  - yat now requires GSL 1.8 or later (ticket #945)
    67  - Building against libbam is no longer supported (ticket #939)
    78  - configure option --withoyr-samtools is no longer supported; use
  • trunk/README

    r3883 r3907  
    6565
    6666GNU Scientific Library, [http://www.gnu.org/software/gsl/ GSL] version
    67 1.8 or later. If you have GSL installed in a non-standard location,
     671.13 or later. If you have GSL installed in a non-standard location,
    6868`./configure --with-gsl=DIR` can be useful to provide the location of
    6969GSL. The `gsl-config` script, which is used to retrieve needed
  • trunk/configure.ac

    r3900 r3907  
    273273
    274274# GNU Scientific Library, GSL http://www.gnu.org/software/gsl/, checks
    275 m4_define([YAT_REQUIRED_GSL_VERSION], [1.8])
     275m4_define([YAT_REQUIRED_GSL_VERSION], [1.13])
    276276YAT_CHECK_GSL([YAT_REQUIRED_GSL_VERSION], [],
    277277   [AC_MSG_FAILURE([dnl
  • trunk/yat/regression/MultiDimensional.cc

    r2919 r3907  
    4545  MultiDimensional::~MultiDimensional(void)
    4646  {
    47     if (work_)
    48       gsl_multifit_linear_free(work_);
     47    gsl_multifit_linear_free(work_);
    4948  }
    5049
     
    6261    covariance_.resize(x.columns(),x.columns());
    6362    fit_parameters_.resize(x.columns());
    64     if (work_)
    65       gsl_multifit_linear_free(work_);
     63    gsl_multifit_linear_free(work_);
    6664    if (!(work_=gsl_multifit_linear_alloc(x.rows(),fit_parameters_.size())))
    6765      throw utility::GSL_error("MultiDimensional::fit failed to allocate memory");
  • trunk/yat/regression/MultiDimensionalWeighted.cc

    r2919 r3907  
    4141  MultiDimensionalWeighted::~MultiDimensionalWeighted(void)
    4242  {
    43     if (work_)
    44       gsl_multifit_linear_free(work_);
     43    gsl_multifit_linear_free(work_);
    4544  }
    4645
     
    6059
    6160    covariance_.resize(x.columns(),x.columns());
    62     fit_parameters_ = utility::Vector(x.columns());
    63     if (work_)
    64       gsl_multifit_linear_free(work_);
     61    fit_parameters_.resize(x.columns());
     62    gsl_multifit_linear_free(work_);
    6563    if (!(work_=gsl_multifit_linear_alloc(x.rows(),fit_parameters_.size())))
    6664      throw utility::GSL_error("MultiDimensionalWeighted::fit failed to allocate memory");
  • trunk/yat/utility/BasicMatrix.cc

    r3652 r3907  
    9494  void deallocate(gsl_matrix*& p)
    9595  {
    96     if (p) { // needed for older GSL
    97       gsl_matrix_free(p);
    98       p = NULL;
    99     }
     96    gsl_matrix_free(p);
     97    p = NULL;
    10098  }
    10199
  • trunk/yat/utility/Vector.cc

    r3845 r3907  
    177177  void Vector::delete_allocated_memory(void)
    178178  {
    179     if (vec_)
    180       gsl_vector_free(vec_);
     179    gsl_vector_free(vec_);
    181180    const_vec_ = vec_ = NULL;
    182181  }
  • trunk/yat/utility/VectorExpression.h

    r3606 r3907  
    148148    void delete_allocated_memory(void)
    149149    {
    150       if (v_)
    151         gsl_vector_free(v_);
     150      gsl_vector_free(v_);
    152151      v_ = NULL;
    153152    }
Note: See TracChangeset for help on using the changeset viewer.