Commit 3c4a5291 authored by Lynn Garren's avatar Lynn Garren
Browse files

Merge branch 'develop'

parents 6b465eee 65bf9e32
......@@ -31,7 +31,7 @@ cmake_minimum_required(VERSION 2.6)
# project name
project(CLHEP)
set( VERSION 2.2.0.5 )
set( VERSION 2.2.0.6 )
set(CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules
......
......@@ -9,7 +9,7 @@
# ----------------------------------------------------------------------
AC_PREREQ(2.59)
AC_INIT(CLHEP Cast, 2.2.0.5, http://savannah.cern.ch/projects/clhep/, Cast)
AC_INIT(CLHEP Cast, 2.2.0.6, http://savannah.cern.ch/projects/clhep/, Cast)
AC_CONFIG_AUX_DIR(autotools)
AC_CANONICAL_TARGET
AC_CONFIG_SRCDIR([src/itos.cc])
......
==============================
27.05.15 Release CLHEP-2.2.0.6
==============================
2015-05-27 Lynn Garren <garren@fnal.gov>
* use __attribute__((unused)) for variables only used in assert inside a test
affects Geometry, Random, Utility, and Vector
* Random/Random/Randomize.h: protect against unused variable warning
* Utility/Utility/memory.h: protect against non virtual destructor warning
* Random/Random/RandGaussZiggurat.h, Random/src/RandGaussZiggurat.cc: use std::abs
* deal with shadowing variables in GenericFunctions, Random/test, and Utility/test
* Evaluator/src/Evaluator.cc: protect against maybe-uninitialized warning
* GenericFunctions/src/DefiniteIntegral.cc: fix shadowing found by clang
==============================
10.02.15 Release CLHEP-2.2.0.5
==============================
......
==============================
27.05.15 Release CLHEP-2.2.0.6
==============================
==============================
10.02.15 Release CLHEP-2.2.0.5
==============================
==============================
......
......@@ -9,7 +9,7 @@
# ----------------------------------------------------------------------
AC_PREREQ(2.59)
AC_INIT(CLHEP Evaluator, 2.2.0.5, http://savannah.cern.ch/projects/clhep/, Evaluator)
AC_INIT(CLHEP Evaluator, 2.2.0.6, http://savannah.cern.ch/projects/clhep/, Evaluator)
AC_CONFIG_AUX_DIR(autotools)
AC_CANONICAL_TARGET
AC_CONFIG_SRCDIR([src/Evaluator.cc])
......
......@@ -105,6 +105,18 @@ static int variable(const string & name, double & result,
}
}
#if defined __GNUC__
#if __GNUC__ > 3 && __GNUC_MINOR__ > 6
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#if __GNUC__ > 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#endif
static int function(const string & name, stack<double> & par,
double & result, const dic_type & dictionary)
/***********************************************************************
......@@ -159,6 +171,14 @@ static int function(const string & name, stack<double> & par,
}
return (errno == 0) ? EVAL::OK : EVAL::ERROR_CALCULATION_ERROR;
}
#if defined __GNUC__
#if __GNUC__ > 3 && __GNUC_MINOR__ > 6
#pragma GCC diagnostic pop
#endif
#if __GNUC__ > 4
#pragma GCC diagnostic pop
#endif
#endif
static int operand(pchar begin, pchar end, double & result,
pchar & endp, const dic_type & dictionary)
......
==============================
27.05.15 Release CLHEP-2.2.0.6
==============================
==============================
10.02.15 Release CLHEP-2.2.0.5
==============================
==============================
......
......@@ -9,7 +9,7 @@
# ----------------------------------------------------------------------
AC_PREREQ(2.59)
AC_INIT(CLHEP Exceptions, 2.2.0.5, http://savannah.cern.ch/projects/clhep/, Exceptions)
AC_INIT(CLHEP Exceptions, 2.2.0.6, http://savannah.cern.ch/projects/clhep/, Exceptions)
AC_CONFIG_AUX_DIR(autotools)
AC_CANONICAL_TARGET
AC_CONFIG_SRCDIR([src/ZMerrno.cc])
......
==============================
27.05.15 Release CLHEP-2.2.0.6
==============================
==============================
10.02.15 Release CLHEP-2.2.0.5
==============================
==============================
......
......@@ -9,7 +9,7 @@
# ----------------------------------------------------------------------
AC_PREREQ(2.57)
AC_INIT(CLHEP Fields, 2.2.0.5, CLHEP@cern.ch, Fields)
AC_INIT(CLHEP Fields, 2.2.0.6, CLHEP@cern.ch, Fields)
AC_CONFIG_AUX_DIR(autotools)
AC_CANONICAL_TARGET
AC_CONFIG_SRCDIR([src/XF.cc])
......
==============================
27.05.15 Release CLHEP-2.2.0.6
==============================
==============================
10.02.15 Release CLHEP-2.2.0.5
==============================
==============================
......
......@@ -25,6 +25,10 @@ namespace Genfun {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#endif
#if __GNUC__ > 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#endif
#endif
#ifdef __clang__
#pragma clang diagnostic push
......@@ -56,6 +60,9 @@ namespace Genfun {
#if __GNUC__ > 3 && __GNUC_MINOR__ > 6
#pragma GCC diagnostic pop
#endif
#if __GNUC__ > 4
#pragma GCC diagnostic pop
#endif
#endif
#ifdef __clang__
#pragma clang diagnostic pop
......
......@@ -34,6 +34,10 @@ namespace Genfun {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#endif
#if __GNUC__ > 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#endif
#endif
#ifdef __clang__
#pragma clang diagnostic push
......@@ -65,6 +69,9 @@ namespace Genfun {
#if __GNUC__ > 3 && __GNUC_MINOR__ > 6
#pragma GCC diagnostic pop
#endif
#if __GNUC__ > 4
#pragma GCC diagnostic pop
#endif
#endif
#ifdef __clang__
#pragma clang diagnostic pop
......
......@@ -9,7 +9,7 @@
# ----------------------------------------------------------------------
AC_PREREQ(2.59)
AC_INIT(CLHEP GenericFunctions, 2.2.0.5, http://savannah.cern.ch/projects/clhep/, GenericFunctions)
AC_INIT(CLHEP GenericFunctions, 2.2.0.6, http://savannah.cern.ch/projects/clhep/, GenericFunctions)
AC_CONFIG_AUX_DIR(autotools)
AC_CANONICAL_TARGET
AC_CONFIG_SRCDIR([src/Abs.cc])
......
......@@ -185,7 +185,7 @@ namespace Genfun {
void DefiniteIntegral::Clockwork::polint(std::vector<double>::iterator xArray, std::vector<double>::iterator yArray, double x, double & y, double & deltay) const {
double dif = fabs(x-xArray[1]),dift;
std::vector<double> c(K+1),d(K+1);
std::vector<double> cc(K+1),d(K+1);
unsigned int ns=1;
for (unsigned int i=1;i<=K;i++) {
dift=fabs(x-xArray[i]);
......@@ -193,14 +193,14 @@ namespace Genfun {
ns=i;
dif=dift;
}
c[i]=d[i]=yArray[i];
cc[i]=d[i]=yArray[i];
}
y = yArray[ns--];
for (unsigned int m=1;m<K;m++) {
for (unsigned int i=1;i<=K-m;i++) {
double ho = xArray[i]-x;
double hp= xArray[i+m]-x;
double w=c[i+1]-d[i];
double w=cc[i+1]-d[i];
double den=ho-hp;
if (den==0)
std::cerr
......@@ -208,9 +208,9 @@ namespace Genfun {
<< std::endl;
den=w/den;
d[i]=hp*den;
c[i]=ho*den;
cc[i]=ho*den;
}
deltay = 2*ns < (K-m) ? c[ns+1]: d[ns--];
deltay = 2*ns < (K-m) ? cc[ns+1]: d[ns--];
y += deltay;
}
}
......@@ -220,40 +220,40 @@ namespace Genfun {
}
// Quadrature rules:
double DefiniteIntegral::Clockwork::TrapezoidQuadratureRule::integrate(const AbsFunction & function, double a, double b, unsigned int n) const {
double DefiniteIntegral::Clockwork::TrapezoidQuadratureRule::integrate(const AbsFunction & function, double aa, double bb, unsigned int n) const {
unsigned int it, j;
if (n==1) {
retVal = 0.5*(b-a)*(function(a)+function(b));
retVal = 0.5*(bb-aa)*(function(aa)+function(bb));
nFunctionCalls+=2;
}
else {
for (it=1,j=1;j<n-1;j++) it <<=1;
double tnm=it;
double del = (b-a)/tnm;
double x=a+0.5*del;
double del = (bb-aa)/tnm;
double x=aa+0.5*del;
double sum;
for (sum=0.0,j=1;j<=it;j++,x+=del) {
sum +=function(x);
nFunctionCalls++;
}
retVal = 0.5*(retVal+(b-a)*sum/tnm);
retVal = 0.5*(retVal+(bb-aa)*sum/tnm);
}
return retVal;
}
// Quadrature rules:
double DefiniteIntegral::Clockwork::XtMidpointQuadratureRule::integrate(const AbsFunction & function, double a, double b, unsigned int n) const {
double DefiniteIntegral::Clockwork::XtMidpointQuadratureRule::integrate(const AbsFunction & function, double aa, double bb, unsigned int n) const {
unsigned int it, j;
if (n==1) {
retVal = (b-a)*(function((a+b)/2.0));
retVal = (bb-aa)*(function((aa+bb)/2.0));
nFunctionCalls+=1;
}
else {
for (it=1,j=1;j<n-1;j++) it *=3;
double tnm=it;
double del = (b-a)/(3.0*tnm);
double del = (bb-aa)/(3.0*tnm);
double ddel = del+del;
double x=a+0.5*del;
double x=aa+0.5*del;
double sum=0;
for (j=1;j<=it;j++) {
sum +=function(x);
......@@ -262,7 +262,7 @@ namespace Genfun {
x+=del;
nFunctionCalls+=2;
}
retVal = (retVal+(b-a)*sum/tnm)/3.0;
retVal = (retVal+(bb-aa)*sum/tnm)/3.0;
}
return retVal;
}
......
==============================
27.05.15 Release CLHEP-2.2.0.6
==============================
==============================
10.02.15 Release CLHEP-2.2.0.5
==============================
==============================
......
......@@ -9,7 +9,7 @@
# ----------------------------------------------------------------------
AC_PREREQ(2.59)
AC_INIT(CLHEP Geometry, 2.2.0.5, http://savannah.cern.ch/projects/clhep/, Geometry)
AC_INIT(CLHEP Geometry, 2.2.0.6, http://savannah.cern.ch/projects/clhep/, Geometry)
AC_CONFIG_AUX_DIR(autotools)
AC_CANONICAL_TARGET
AC_CONFIG_SRCDIR([src/Plane3D.cc])
......
remove_definitions(-DNDEBUG)
clhep_test( testBasicVector3D )
clhep_test( testBug6740 SIMPLE )
......@@ -38,7 +38,7 @@ using namespace HepGeom;
\
/* Check conversion to array */ \
const point p05(1,2,3); \
const type * a = p05; \
const type * a __attribute__((unused)) = p05; \
assert(a[0] == 1 && a[1] == 2 && a[2] == 3); \
point p06(4,5,6); \
a = p06; \
......@@ -223,34 +223,12 @@ using namespace HepGeom;
assert(p121 != Normal3D<type> (2,4,7)); \
// don't generate warnings about unused variables inside assert
#if defined __GNUC__
#if __GNUC__ > 3 && __GNUC_MINOR__ > 6
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
#endif
#ifdef __clang__
#if __clang_major__ < 4
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-but-set-variable"
#endif
#endif
void CheckPointFloat() { CHECK(Point3D<float> , float) }
void CheckVectorFloat() { CHECK(Vector3D<float> , float) }
void CheckNormalFloat() { CHECK(Normal3D<float> , float) }
void CheckPointDouble() { CHECK(Point3D<double> , double) }
void CheckVectorDouble() { CHECK(Vector3D<double>, double) }
void CheckNormalDouble() { CHECK(Normal3D<double>, double) }
#if defined __GNUC__
#if __GNUC__ > 3 && __GNUC_MINOR__ > 6
#pragma GCC diagnostic pop
#endif
#endif
#ifdef __clang__
#if __clang_major__ < 4
#pragma clang diagnostic pop
#endif
#endif
int main()
{
......
==============================
27.05.15 Release CLHEP-2.2.0.6
==============================
==============================
10.02.15 Release CLHEP-2.2.0.5
==============================
==============================
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment