Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CLHEP
CLHEP
Commits
6cd37268
Commit
6cd37268
authored
Sep 10, 2004
by
Lynn Garren
Browse files
disable allocator until it can be rewritten
parent
772f0495
Changes
8
Hide whitespace changes
Inline
Side-by-side
Matrix/Matrix/DiagMatrix.h
View file @
6cd37268
// -*- C++ -*-
// CLASSDOC OFF
// $Id: DiagMatrix.h,v 1.3.2.
2
2004/09/0
8
2
2
:5
1:0
5 garren Exp $
// $Id: DiagMatrix.h,v 1.3.2.
3
2004/09/
1
0 2
3
:5
2:5
5 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
def
ined __GNUC__ && (__GNUC__ < 3)
#ifdef
DISABLE_ALLOC
std
::
vector
<
double
>
m
;
#else
std
::
vector
<
double
,
Alloc
<
double
,
25
>
>
m
;
...
...
Matrix/Matrix/GenMatrix.h
View file @
6cd37268
// -*- C++ -*-
// CLASSDOC OFF
// $Id: GenMatrix.h,v 1.3.2.
3
2004/09/0
8
2
2
:5
1:0
5 garren Exp $
// $Id: GenMatrix.h,v 1.3.2.
4
2004/09/
1
0 2
3
:5
2:5
5 garren Exp $
// ---------------------------------------------------------------------------
// CLASSDOC ON
//
...
...
@@ -70,8 +70,8 @@ public:
virtual
~
HepGenMatrix
()
{}
#if
def
ined __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
def
ined __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
def
ined __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
>
>&
);
...
...
Matrix/Matrix/GenMatrix.icc
View file @
6cd37268
// -*- C++ -*-
// $Id: GenMatrix.icc,v 1.2.2.
2
2004/09/0
8
2
2
:5
1:0
5 garren Exp $
// $Id: GenMatrix.icc,v 1.2.2.
3
2004/09/
1
0 2
3
:5
2:5
5 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
def
ined __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;
}
...
...
Matrix/Matrix/Matrix.h
View file @
6cd37268
// -*- C++ -*-
// CLASSDOC OFF
// $Id: Matrix.h,v 1.3.2.
2
2004/09/0
8
2
2
:5
1:0
5 garren Exp $
// $Id: Matrix.h,v 1.3.2.
3
2004/09/
1
0 2
3
:5
2:5
5 garren Exp $
// ---------------------------------------------------------------------------
// CLASSDOC ON
//
...
...
@@ -428,7 +428,7 @@ private:
int
dfinv_matrix
(
int
*
ir
);
// invert the matrix. See CERNLIB DFINV.
#if
def
ined __GNUC__ && (__GNUC__ < 3)
#ifdef
DISABLE_ALLOC
std
::
vector
<
double
>
m
;
#else
std
::
vector
<
double
,
Alloc
<
double
,
25
>
>
m
;
...
...
Matrix/Matrix/SymMatrix.h
View file @
6cd37268
// -*- C++ -*-
// CLASSDOC OFF
// $Id: SymMatrix.h,v 1.3.2.
2
2004/09/0
8
2
2
:5
1:0
5 garren Exp $
// $Id: SymMatrix.h,v 1.3.2.
3
2004/09/
1
0 2
3
:5
2:5
5 garren Exp $
// ---------------------------------------------------------------------------
// CLASSDOC ON
//
...
...
@@ -300,7 +300,7 @@ private:
friend
HepSymMatrix
vT_times_v
(
const
HepVector
&
v
);
// Returns v * v.T();
#if
def
ined __GNUC__ && (__GNUC__ < 3)
#ifdef
DISABLE_ALLOC
std
::
vector
<
double
>
m
;
#else
std
::
vector
<
double
,
Alloc
<
double
,
25
>
>
m
;
...
...
Matrix/Matrix/Vector.h
View file @
6cd37268
// -*- C++ -*-
// CLASSDOC OFF
// $Id: Vector.h,v 1.3.2.
2
2004/09/0
8
2
2
:5
1:0
5 garren Exp $
// $Id: Vector.h,v 1.3.2.
3
2004/09/
1
0 2
3
:5
2:5
5 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
def
ined __GNUC__ && (__GNUC__ < 3)
#ifdef
DISABLE_ALLOC
std
::
vector
<
double
>
m
;
#else
std
::
vector
<
double
,
Alloc
<
double
,
25
>
>
m
;
...
...
Matrix/configure.in
View file @
6cd37268
...
...
@@ -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
...
...
Matrix/src/SymMatrix.cc
View file @
6cd37268
// -*- C++ -*-
// $Id: SymMatrix.cc,v 1.3.2.
3
2004/09/10 2
1:26:09
garren Exp $
// $Id: SymMatrix.cc,v 1.3.2.
4
2004/09/10 2
3: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
def
ined __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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment