Commit 6cd37268 authored by Lynn Garren's avatar Lynn Garren
Browse files

disable allocator until it can be rewritten

parent 772f0495
// -*- C++ -*-
// CLASSDOC OFF
// $Id: DiagMatrix.h,v 1.3.2.2 2004/09/08 22:51:05 garren Exp $
// $Id: DiagMatrix.h,v 1.3.2.3 2004/09/10 23:52:55 garren Exp $
// ---------------------------------------------------------------------------
// CLASSDOC ON
//
......@@ -214,7 +214,7 @@ private:
friend HepMatrix operator*(const HepMatrix &m1, const HepDiagMatrix &m2);
friend HepVector operator*(const HepDiagMatrix &m1, const HepVector &m2);
#if defined __GNUC__ && (__GNUC__ < 3)
#ifdef DISABLE_ALLOC
std::vector<double > m;
#else
std::vector<double,Alloc<double,25> > m;
......
// -*- C++ -*-
// CLASSDOC OFF
// $Id: GenMatrix.h,v 1.3.2.3 2004/09/08 22:51:05 garren Exp $
// $Id: GenMatrix.h,v 1.3.2.4 2004/09/10 23:52:55 garren Exp $
// ---------------------------------------------------------------------------
// CLASSDOC ON
//
......@@ -70,8 +70,8 @@ public:
virtual ~HepGenMatrix() {}
#if defined __GNUC__ && (__GNUC__ < 3) // redefining Alloc does not work in gcc 2.95
#else // redefine Alloc for all other compilers
#ifdef DISABLE_ALLOC // disable this non-compliant allocator
#else
template <class T, size_t size> class Alloc
{
......@@ -101,7 +101,7 @@ public:
};
#endif
#if defined __GNUC__ && (__GNUC__ < 3)
#ifdef DISABLE_ALLOC
typedef std::vector<double >::iterator mIter;
typedef std::vector<double >::const_iterator mcIter;
#else
......@@ -145,7 +145,7 @@ public:
// ** Note that the indexing starts from [0][0]. **
inline static void swap(int&,int&);
#if defined __GNUC__ && (__GNUC__ < 3)
#ifdef DISABLE_ALLOC
inline static void swap(std::vector<double >&, std::vector<double >&);
#else
inline static void swap(std::vector<double,Alloc<double,25> >&, std::vector<double,Alloc<double,25> >&);
......
// -*- C++ -*-
// $Id: GenMatrix.icc,v 1.2.2.2 2004/09/08 22:51:05 garren Exp $
// $Id: GenMatrix.icc,v 1.2.2.3 2004/09/10 23:52:55 garren Exp $
// ---------------------------------------------------------------------------
//
// This file is a part of the CLHEP - a Class Library for High Energy Physics.
......@@ -41,7 +41,7 @@ namespace CLHEP {
// swap
//
inline void HepGenMatrix::swap(int &i,int &j) {int t=i;i=j;j=t;}
#if defined __GNUC__ && (__GNUC__ < 3)
#ifdef DISABLE_ALLOC
inline void HepGenMatrix::swap(std::vector<double >& i, std::vector<double >& j) {
std::vector<double > t=i;i=j;j=t;
}
......
// -*- C++ -*-
// CLASSDOC OFF
// $Id: Matrix.h,v 1.3.2.2 2004/09/08 22:51:05 garren Exp $
// $Id: Matrix.h,v 1.3.2.3 2004/09/10 23:52:55 garren Exp $
// ---------------------------------------------------------------------------
// CLASSDOC ON
//
......@@ -428,7 +428,7 @@ private:
int dfinv_matrix(int *ir);
// invert the matrix. See CERNLIB DFINV.
#if defined __GNUC__ && (__GNUC__ < 3)
#ifdef DISABLE_ALLOC
std::vector<double > m;
#else
std::vector<double,Alloc<double,25> > m;
......
// -*- C++ -*-
// CLASSDOC OFF
// $Id: SymMatrix.h,v 1.3.2.2 2004/09/08 22:51:05 garren Exp $
// $Id: SymMatrix.h,v 1.3.2.3 2004/09/10 23:52:55 garren Exp $
// ---------------------------------------------------------------------------
// CLASSDOC ON
//
......@@ -300,7 +300,7 @@ private:
friend HepSymMatrix vT_times_v(const HepVector &v);
// Returns v * v.T();
#if defined __GNUC__ && (__GNUC__ < 3)
#ifdef DISABLE_ALLOC
std::vector<double > m;
#else
std::vector<double,Alloc<double,25> > m;
......
// -*- C++ -*-
// CLASSDOC OFF
// $Id: Vector.h,v 1.3.2.2 2004/09/08 22:51:05 garren Exp $
// $Id: Vector.h,v 1.3.2.3 2004/09/10 23:52:55 garren Exp $
// ---------------------------------------------------------------------------
// CLASSDOC ON
//
......@@ -196,7 +196,7 @@ private:
friend HepSymMatrix vT_times_v(const HepVector &v);
friend HepVector qr_solve(HepMatrix *, const HepVector &);
#if defined __GNUC__ && (__GNUC__ < 3)
#ifdef DISABLE_ALLOC
std::vector<double > m;
#else
std::vector<double,Alloc<double,25> > m;
......
......@@ -90,6 +90,12 @@ AH_VERBATIM([VERSION],[/* Version number of package */
#undef VERSION
#endif])
## disable allocator until it is fixed
AH_VERBATIM([DISABLE_ALLOC],[/* disable non-compliant allocator */
#ifndef DISABLE_ALLOC
#define DISABLE_ALLOC
#endif])
## backwards compatibility
AH_VERBATIM([ENABLE_BACKWARDS_COMPATIBILITY],[/* backwards compatibility will be enabled ONLY in CLHEP 1.9 */
#ifndef ENABLE_BACKWARDS_COMPATIBILITY
......
// -*- C++ -*-
// $Id: SymMatrix.cc,v 1.3.2.3 2004/09/10 21:26:09 garren Exp $
// $Id: SymMatrix.cc,v 1.3.2.4 2004/09/10 23:52:55 garren Exp $
// ---------------------------------------------------------------------------
//
// This file is a part of the CLHEP - a Class Library for High Energy Physics.
......@@ -992,7 +992,7 @@ void HepSymMatrix::invertBunchKaufman(int &ifail) {
static int * piv = new int[max_array];
// used to store details of exchanges
#if defined __GNUC__ && (__GNUC__ < 3)
#ifdef DISABLE_ALLOC
std::vector<double >* xvec = new std::vector<double>(max_array);
#else
std::vector<double,Alloc<double,25> >* xvec = new std::vector<double,Alloc<double,25> >(max_array);
......
Supports Markdown
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