Commit 952bf539 authored by Lynn Garren's avatar Lynn Garren
Browse files

remove obsolete register keyword

parent d4116295
2014-02-24 Lynn Garren <garren@fnal.gov>
* Vector, Random, Matrix: remove register declaration of ints and doubles
use of register is now redundant and ignored by modern compilers
==============================
18.11.13 Release CLHEP-2.1.4.1
==============================
......
2014-02-24 Lynn Garren <garren@fnal.gov>
* remove register declaration of doubles
use of register is now redundant and ignored by modern compilers
==============================
14.11.13 Release CLHEP-2.1.4.1
==============================
......
......@@ -646,7 +646,7 @@ HepSymMatrix HepDiagMatrix::similarity(const HepMatrix &hm1) const
HepMatrix::mcIter mc = hm1.m.begin();
for(int c=1;c<=r;c++) {
HepMatrix::mcIter mi = m.begin();
register double tmp = 0;
double tmp = 0;
HepMatrix::mcIter mr = mrr;
for(int i=0;i<hm1.num_col();i++)
tmp+=*(mr++) * *(mc++) * *(mi++);
......@@ -658,7 +658,7 @@ HepSymMatrix HepDiagMatrix::similarity(const HepMatrix &hm1) const
double HepDiagMatrix::similarity(const HepVector &hm1) const
{
register double mret;
double mret;
CHK_DIM_1(num_row(),hm1.num_row(),similarity);
HepMatrix::mcIter mi = m.begin();
HepMatrix::mcIter mv = hm1.m.begin();
......@@ -687,7 +687,7 @@ HepSymMatrix HepDiagMatrix::similarityT(const HepMatrix &hm1) const
for(int c=1;c<=r;c++)
{
HepMatrix::mcIter mi = m.begin();
register double tmp = hm1(1,r)*hm1(1,c)* *(mi++);
double tmp = hm1(1,r)*hm1(1,c)* *(mi++);
for(int i=2;i<=hm1.num_row();i++)
tmp+=hm1(i,r)*hm1(i,c)* *(mi++);
mret.fast(r,c) = tmp;
......
......@@ -366,7 +366,7 @@ HepMatrix operator*(const HepMatrix &hm1,const HepMatrix &hm2)
{
for (int j=0; j<m1cols; j++)
{
register double temp = hm1.m[i*m1cols+j];
double temp = hm1.m[i*m1cols+j];
HepMatrix::mIter pt = mret.m.begin() + i*m2cols;
// Loop over k (the column index in matrix hm2)
......@@ -498,7 +498,7 @@ int HepMatrix::dfinv_matrix(int *ir) {
if (n==1) return 0;
double s31, s32;
register double s33, s34;
double s33, s34;
mIter hm11 = m.begin();
mIter hm12 = hm11 + 1;
......
......@@ -751,7 +751,7 @@ HepSymMatrix HepSymMatrix::similarity(const HepMatrix &hm1) const
for(int r=1;r<=mret.num_row();r++) {
HepMatrix::mcIter hm1c1 = hm1.m.begin();
for(int c=1;c<=r;c++) {
register double tmp = 0.0;
double tmp = 0.0;
HepMatrix::mIter tempri = tempr1;
HepMatrix::mcIter hm1ci = hm1c1;
for(int i=1;i<=hm1.num_col();i++) {
......@@ -781,7 +781,7 @@ HepSymMatrix HepSymMatrix::similarity(const HepSymMatrix &hm1) const
HepMatrix::mcIter hm1c1 = hm1.m.begin();
int c;
for(c=1;c<=r;c++) {
register double tmp = 0.0;
double tmp = 0.0;
HepMatrix::mIter tempri = tempr1;
HepMatrix::mcIter hm1ci = hm1c1;
int i;
......@@ -802,7 +802,7 @@ HepSymMatrix HepSymMatrix::similarity(const HepSymMatrix &hm1) const
double HepSymMatrix::similarity(const HepVector &hm1)
const {
register double mret = 0.0;
double mret = 0.0;
HepVector temp = (*this) *hm1;
// If hm1*(*this) has correct dimensions, then so will the hm1.T multiplication.
// So there is no need to check dimensions again.
......@@ -828,7 +828,7 @@ HepSymMatrix HepSymMatrix::similarityT(const HepMatrix &hm1) const
for(int r=1;r<=mret.num_row();r++) {
HepMatrix::mcIter m11c = hm1.m.begin();
for(int c=1;c<=r;c++) {
register double tmp = 0.0;
double tmp = 0.0;
for(int i=1;i<=hm1.num_row();i++) {
HepMatrix::mIter tempir = temp1r + n*(i-1);
HepMatrix::mcIter hm1ic = m11c + n*(i-1);
......
2014-02-24 Lynn Garren <garren@fnal.gov>
* remove register declaration of ints and doubles
use of register is now redundant and ignored by modern compilers
==============================
14.11.13 Release CLHEP-2.1.4.1
==============================
......
......@@ -104,7 +104,7 @@ Hurd160Engine::Hurd160Engine( int rowIndex, int colIndex )
Hurd160Engine::~Hurd160Engine() { }
void Hurd160Engine::advance() {
register unsigned int W0, W1, W2, W3, W4;
unsigned int W0, W1, W2, W3, W4;
W0 = words[0];
W1 = words[1];
......
......@@ -113,7 +113,7 @@ Hurd288Engine::~Hurd288Engine() { }
void Hurd288Engine::advance() {
register unsigned int W0, W1, W2, W3, W4, W5, W6, W7, W8;
unsigned int W0, W1, W2, W3, W4, W5, W6, W7, W8;
W0 = words[0];
W1 = words[1];
......
......@@ -108,7 +108,7 @@ double MTwistEngine::flat() {
unsigned int y;
if( count624 >= N ) {
register int i;
int i;
for( i=0; i < NminusM; ++i ) {
y = (mt[i] & 0x80000000) | (mt[i+1] & 0x7fffffff);
......@@ -223,7 +223,7 @@ MTwistEngine::operator float() {
unsigned int y;
if( count624 >= N ) {
register int i;
int i;
for( i=0; i < NminusM; ++i ) {
y = (mt[i] & 0x80000000) | (mt[i+1] & 0x7fffffff);
......@@ -254,7 +254,7 @@ MTwistEngine::operator unsigned int() {
unsigned int y;
if( count624 >= N ) {
register int i;
int i;
for( i=0; i < NminusM; ++i ) {
y = (mt[i] & 0x80000000) | (mt[i+1] & 0x7fffffff);
......
......@@ -101,7 +101,7 @@ double RandGaussQ::transformQuick (double r) {
sign = -1.0;
}
register int index;
int index;
double dx;
if ( r >= Table1step ) {
......
......@@ -110,8 +110,8 @@ void RandGeneral::prepareTable(const double* aProbFunc) {
theIntegralPdf.resize(nBins+1);
theIntegralPdf[0] = 0;
register int ptn;
register double weight;
int ptn;
double weight;
for ( ptn = 0; ptn<nBins; ++ptn ) {
weight = aProbFunc[ptn];
......@@ -231,7 +231,7 @@ double RandGeneral::mapRandom(double rand) const {
void RandGeneral::shootArray( HepRandomEngine* anEngine,
const int size, double* vect )
{
register int i;
int i;
for (i=0; i<size; ++i) {
vect[i] = shoot(anEngine);
......@@ -240,7 +240,7 @@ void RandGeneral::shootArray( HepRandomEngine* anEngine,
void RandGeneral::fireArray( const int size, double* vect )
{
register int i;
int i;
for (i=0; i<size; ++i) {
vect[i] = fire();
......
......@@ -240,7 +240,7 @@ void RanecuEngine::flatArray(const int size, double* vect)
long seed1 = table[index][0];
long seed2 = table[index][1];
int k1, k2;
register int i;
int i;
for (i=0; i<size; ++i)
{
......
......@@ -187,7 +187,7 @@ void Ranlux64Engine::update() {
// but we can treat the special case of endIters = 1 separately for superior
// efficiency in the cases of levels 0 and 2.
register double y1;
double y1;
if ( endIters == 1 ) { // Luxury levels 0 and 2 will go here
y1 = randoms[ 4] - randoms[11] - carry;
......@@ -252,10 +252,10 @@ void Ranlux64Engine::update() {
void Ranlux64Engine::advance(int dozens) {
register double y1, y2, y3;
register double cValue = twoToMinus_48();
register double zero = 0.0;
register double one = 1.0;
double y1, y2, y3;
double cValue = twoToMinus_48();
double zero = 0.0;
double one = 1.0;
// Technical note: We use Luscher's trick to only do the
// carry subtraction when we really have to. Like him, we use
......
......@@ -126,7 +126,7 @@ std::cout << "r = " << r << "sign negative \n";
// The following big if block will locate tptr, h, and dx from whichever
// table is applicable:
register int index;
int index;
if ( r >= Table4step ) {
......
2014-02-24 Lynn Garren <garren@fnal.gov>
* remove register declaration of doubles
use of register is now redundant and ignored by modern compilers
==============================
14.11.13 Release CLHEP-2.1.4.1
==============================
......
......@@ -233,10 +233,10 @@ inline bool HepBoost::isNear(const HepBoost & b, double epsilon) const{
// - Protected method:
inline HepLorentzVector
HepBoost::vectorMultiplication(const HepLorentzVector & p) const {
register double x = p.x();
register double y = p.y();
register double z = p.z();
register double t = p.t();
double x = p.x();
double y = p.y();
double z = p.z();
double t = p.t();
return HepLorentzVector( rep_.xx_*x + rep_.xy_*y + rep_.xz_*z + rep_.xt_*t,
rep_.xy_*x + rep_.yy_*y + rep_.yz_*z + rep_.yt_*t,
rep_.xz_*x + rep_.yz_*y + rep_.zz_*z + rep_.zt_*t,
......
......@@ -153,7 +153,7 @@ inline bool HepBoostX::isNear(const HepBoost & b,
// ---------- Properties:
inline double HepBoostX::norm2() const {
register double bg = beta_*gamma_;
double bg = beta_*gamma_;
return bg*bg;
}
......
......@@ -154,7 +154,7 @@ inline bool HepBoostY::isNear(const HepBoost & b,
// ---------- Properties:
double HepBoostY::norm2() const {
register double bg = beta_*gamma_;
double bg = beta_*gamma_;
return bg*bg;
}
......
......@@ -153,7 +153,7 @@ inline bool HepBoostZ::isNear(const HepBoost & b,
// ---------- Properties:
double HepBoostZ::norm2() const {
register double bg = beta_*gamma_;
double bg = beta_*gamma_;
return bg*bg;
}
......
......@@ -264,10 +264,10 @@ inline bool HepLorentzRotation::isIdentity() const {
inline HepLorentzVector
HepLorentzRotation::vectorMultiplication(const HepLorentzVector & p) const {
register double x(p.x());
register double y(p.y());
register double z(p.z());
register double t(p.t());
double x(p.x());
double y(p.y());
double z(p.z());
double t(p.t());
return HepLorentzVector(mxx*x + mxy*y + mxz*z + mxt*t,
myx*x + myy*y + myz*z + myt*t,
mzx*x + mzy*y + mzz*z + mzt*t,
......
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