Changeset 2838


Ignore:
Timestamp:
Sep 17, 2012, 1:12:53 AM (10 years ago)
Author:
Peter
Message:

merge release 0.9 into trunk

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/NEWS

    r2823 r2838  
    88  http://dev.thep.lu.se/yat/query?status=closed&milestone=yat+0.10
    99
    10 yat A.B.x series from http://dev.thep.lu.se/yat/svn/branches/0.9-stable
    11 
    12 version 0.9 (released NOT YET)
     10yat 0.9.x series from http://dev.thep.lu.se/yat/svn/branches/0.9-stable
     11
     12version 0.9 (released 16 September 2012)
    1313  - utility::SmithWaterman is deprecated (ticket #706)
    1414  - yat now depends on boost thread and system library (ticket #568 and #714)
    1515  - utility::SmartPtr was marked internal (see r2778)
    1616  - ssearch now takes parameter setting mismatch (r2792)
     17  - RNG class is not multithread safe (ticket #568)
     18  - The build system now uses a non-recursive Makefile (ticket #703)
    1719
    1820  A complete list of closed tickets can be found here [[br]]
  • trunk/configure.ac

    r2827 r2838  
    198198  AX_BOOST_THREAD
    199199  AX_BOOST_SYSTEM
    200 ])
    201 YAT_CPP_ADD_FLAG([CPPFLAGS], [$BOOST_CPPFLAGS])
    202 YAT_LD_ADD_FLAG([LDFLAGS], [$BOOST_LDFLAGS])
     200  YAT_CPP_ADD_FLAG([CPPFLAGS], [$BOOST_CPPFLAGS])
     201  YAT_LD_ADD_FLAG([LDFLAGS], [$BOOST_LDFLAGS])
     202  # boost tests above only test compilation, so let's try link in the libs
     203  save_LIBS=$LIBS
     204  LIBS="$LIBS $BOOST_THREAD_LIB $BOOST_SYSTEM_LIB"
     205  AC_MSG_CHECKING([for thread_specific_ptr])
     206  AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <boost/thread/tss.hpp>],
     207                                  [boost::thread_specific_ptr<int> x;
     208                                   x.reset(new int(1));])],
     209                 [AC_MSG_RESULT([yes])],
     210                 [AC_MSG_RESULT([no])
     211                  boost_ok=no])
     212  LIBS=$save_LIBS
     213])
    203214
    204215# see tickets #648 #687
  • trunk/m4/version.m4

    r2823 r2838  
    5555# yat-0.5.5  2:4:0
    5656# yat-0.5.6  2:5:0
    57 # yat-0.6.0  3:0:0
     57# yat-0.6    3:0:0
    5858# yat-0.6.1  3:1:0
    5959# yat-0.6.2  3:2:0
    6060# yat-0.6.3  3:3:0
    61 # yat-0.7.0  4:0:0
     61# yat-0.7    4:0:0
    6262# yat-0.7.1  4:1:0
    6363# yat-0.7.2  4:2:0
    6464# yat-0.7.3  4:3:0
    65 # yat-0.8.0  5:0:0
     65# yat-0.8    5:0:0
    6666# yat-0.8.1  5:1:0
    6767# yat-0.8.2  5:2:0
     68# yat-0.9    6:0:0
    6869#
    6970# *Accidently, the libtool number was not updated for yat 0.5
  • trunk/yat/random/random.cc

    r2804 r2838  
    2424#include "yat/statistics/Histogram.h"
    2525#include "yat/utility/Exception.h"
     26
     27#include <boost/thread/locks.hpp>
    2628
    2729#include <cassert>
     
    9395    if (!rng)
    9496      throw utility::GSL_error("RNG failed to allocate memory");
     97    boost::unique_lock<boost::mutex> lock(mutex_);
    9598    gsl_rng_set(rng, seed_);
    9699    // bump seed to avoid subsequent gsl_rng to be identical
     
    98101    // rng_ owns rng and takes care of deallocation
    99102    rng_.reset(rng);
    100   }
     103  } // lock is released here
    101104
    102105
    103106  void RNG::seed(unsigned long s) const
    104107  {
     108    boost::unique_lock<boost::mutex> lock(mutex_);
    105109    gsl_rng_set(rng(),s);
    106110    seed_ = s+1;
    107   }
     111  } // lock is released here
    108112
    109113
  • trunk/yat/random/random.h

    r2804 r2838  
    2828
    2929#include <boost/concept_check.hpp>
     30#include <boost/thread.hpp>
    3031#include <boost/thread/tss.hpp>
    3132
     
    193194    mutable boost::thread_specific_ptr<gsl_rng> rng_;
    194195    mutable unsigned long seed_;
     196    // guard needs to be mutable because major mission for it is to protect seed_ against multi-access, and seed_ is mutable...
     197    mutable boost::mutex mutex_;
    195198  };
    196199
  • trunk/yat/statistics/ROC.cc

    r2722 r2838  
    151151  size_t ROC::nof_points(const Averager& a) const
    152152  {
    153     return a.sum_x()*a.sum_x()/a.sum_xx();
     153    return static_cast<size_t>(a.sum_x()*a.sum_x()/a.sum_xx());
    154154  }
    155155
Note: See TracChangeset for help on using the changeset viewer.