Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CLHEP
CLHEP
Commits
89d3e960
Commit
89d3e960
authored
Jun 11, 2018
by
Lynn Garren
Browse files
Merge branch 'release/CLHEP_2_4_0_5' into develop
parents
12aa9568
3f792cca
Changes
26
Hide whitespace changes
Inline
Side-by-side
Exceptions/test/exctest1.cc
View file @
89d3e960
...
...
@@ -28,10 +28,10 @@ int main() {
cerr
<<
"Got past: ZMthrow( Oops(
\"
Ouch
\"
) ) -- not good!"
<<
endl
;
#ifndef DEFECT_NO_EXCEPTIONS
}
catch
(
const
Oops
egad
)
{
catch
(
const
Oops
&
egad
)
{
cerr
<<
"Caught: Oops"
<<
endl
;
}
catch
(
const
ZMexception
egad
)
{
catch
(
const
ZMexception
&
egad
)
{
cerr
<<
"Caught: ZMexception"
<<
endl
;
}
catch
(
...
)
{
...
...
Exceptions/test/exctest4.cc
View file @
89d3e960
...
...
@@ -31,10 +31,10 @@ int main() {
cerr
<<
"Got past: ZMthrow( Oops(
\"
Ouch
\"
) ) -- not good!"
<<
endl
;
#ifndef DEFECT_NO_EXCEPTIONS
}
catch
(
const
Oops
egad
)
{
catch
(
const
Oops
&
egad
)
{
cerr
<<
"Caught: Oops"
<<
endl
;
}
catch
(
const
ZMexception
egad
)
{
catch
(
const
ZMexception
&
egad
)
{
cerr
<<
"Caught: ZMexception"
<<
endl
;
}
catch
(
...
)
{
...
...
Random/Random/DualRand.h
View file @
89d3e960
...
...
@@ -85,7 +85,8 @@ public:
void
showStatus
()
const
;
// Dumps the current engine status on the screen.
operator
float
();
// flat value, without worrying about filling bits
operator
double
();
// Returns same as flat()
operator
float
();
// flat value, without worrying about filling bits
operator
unsigned
int
();
// 32-bit flat value, quickest of all
virtual
std
::
ostream
&
put
(
std
::
ostream
&
os
)
const
;
...
...
Random/Random/Hurd160Engine.h
View file @
89d3e960
...
...
@@ -72,8 +72,9 @@ public:
void
showStatus
()
const
;
// Dumps the engine status on the screen
operator
float
();
// flat value, without worrying about filling bits
operator
unsigned
int
();
// 32-bit flat value, quickest of all
operator
double
();
// Returns same as flat()
operator
float
();
// flat value, without worrying about filling bits
operator
unsigned
int
();
// 32-bit flat value, quickest of all
virtual
std
::
ostream
&
put
(
std
::
ostream
&
os
)
const
;
virtual
std
::
istream
&
get
(
std
::
istream
&
is
);
...
...
Random/Random/Hurd288Engine.h
View file @
89d3e960
...
...
@@ -71,8 +71,9 @@ public:
void
showStatus
()
const
;
// Dumps the engine status on the screen
operator
float
();
// flat value, without worrying about filling bits
operator
unsigned
int
();
// 32-bit flat value, quickest of all
operator
double
();
// Returns same as flat()
operator
float
();
// flat value, without worrying about filling bits
operator
unsigned
int
();
// 32-bit flat value, quickest of all
virtual
std
::
ostream
&
put
(
std
::
ostream
&
os
)
const
;
virtual
std
::
istream
&
get
(
std
::
istream
&
is
);
...
...
Random/Random/JamesRandom.h
View file @
89d3e960
...
...
@@ -77,6 +77,10 @@ public:
void
showStatus
()
const
;
// Dumps the engine status on the screen.
operator
double
();
// Returns same as flat()
operator
float
();
// less precise flat, faster if possible
operator
unsigned
int
();
// 32-bit flat, but slower than double or float.
...
...
Random/Random/MTwistEngine.h
View file @
89d3e960
...
...
@@ -66,7 +66,8 @@ public:
void
showStatus
()
const
;
// Dumps the current engine status on the screen.
operator
float
();
// returns flat, without worrying about filling bits
operator
double
();
// Returns same as flat()
operator
float
();
// returns flat, without worrying about filling bits
operator
unsigned
int
();
// 32-bit flat, quickest of all
virtual
std
::
ostream
&
put
(
std
::
ostream
&
os
)
const
;
...
...
Random/Random/MixMaxRng.h
View file @
89d3e960
...
...
@@ -91,6 +91,10 @@ public:
void
showStatus
()
const
;
// Dumps the engine status on the screen.
operator
double
();
// Returns same as flat()
operator
float
();
// less precise flat, faster if possible
operator
unsigned
int
();
// 32-bit flat
...
...
@@ -179,7 +183,7 @@ private:
typedef
struct
rng_state_st
rng_state_t
;
// struct alias
rng_state_t
S
;
};
}
// namespace CLHEP
#endif
Random/Random/RandEngine.h
View file @
89d3e960
...
...
@@ -90,6 +90,8 @@ public:
void
showStatus
()
const
;
// Dumps the engine status on the screen.
operator
double
();
// Returns same as flat()
operator
float
();
// flat value, without worrying about filling bits
operator
unsigned
int
();
// 32-bit flat value, quickest of all.
virtual
std
::
ostream
&
put
(
std
::
ostream
&
os
)
const
;
...
...
Random/Random/RanecuEngine.h
View file @
89d3e960
...
...
@@ -85,6 +85,10 @@ public:
void
showStatus
()
const
;
// Dumps the engine status on the screen.
operator
double
();
// Returns same as flat()
operator
float
();
// less precise flat, faster if possible
operator
unsigned
int
();
// 32-bit int flat, faster in this case
...
...
Random/Random/RanluxEngine.h
View file @
89d3e960
...
...
@@ -92,6 +92,8 @@ public:
int
getLuxury
()
const
{
return
luxury
;
}
// Gets the luxury level.
operator
double
();
// Returns same as flat()
operator
float
();
// less precise flat, faster if possible
operator
unsigned
int
();
// 32-bit flat, but slower than double or float
virtual
std
::
ostream
&
put
(
std
::
ostream
&
os
)
const
;
...
...
Random/Random/RanshiEngine.h
View file @
89d3e960
...
...
@@ -84,20 +84,21 @@ public:
void
showStatus
()
const
;
// Dumps the engine status on the screen
operator
float
();
// flat value, without worrying about filling bits
operator
unsigned
int
();
// 32-bit flat value, quickest of all
operator
double
();
// Returns same as flat()
operator
float
();
// flat value, without worrying about filling bits
operator
unsigned
int
();
// 32-bit flat value, quickest of all
virtual
std
::
ostream
&
put
(
std
::
ostream
&
os
)
const
;
virtual
std
::
istream
&
get
(
std
::
istream
&
is
);
static
std
::
string
beginTag
(
);
virtual
std
::
istream
&
getState
(
std
::
istream
&
is
);
virtual
std
::
ostream
&
put
(
std
::
ostream
&
os
)
const
;
virtual
std
::
istream
&
get
(
std
::
istream
&
is
);
static
std
::
string
beginTag
(
);
virtual
std
::
istream
&
getState
(
std
::
istream
&
is
);
std
::
string
name
()
const
;
static
std
::
string
engineName
()
{
return
"RanshiEngine"
;}
std
::
string
name
()
const
;
static
std
::
string
engineName
()
{
return
"RanshiEngine"
;}
std
::
vector
<
unsigned
long
>
put
()
const
;
bool
get
(
const
std
::
vector
<
unsigned
long
>
&
v
);
bool
getState
(
const
std
::
vector
<
unsigned
long
>
&
v
);
std
::
vector
<
unsigned
long
>
put
()
const
;
bool
get
(
const
std
::
vector
<
unsigned
long
>
&
v
);
bool
getState
(
const
std
::
vector
<
unsigned
long
>
&
v
);
private:
enum
{
numBuff
=
512
};
...
...
Random/Random/TripleRand.h
View file @
89d3e960
...
...
@@ -83,8 +83,9 @@ public:
void
showStatus
()
const
;
// Dumps the current engine status on the screen.
operator
float
();
// flat value, without worrying about filling bits
operator
unsigned
int
();
// 32-bit flat value, quickest of all
operator
double
();
// Returns same as flat()
operator
float
();
// flat value, without worrying about filling bits
operator
unsigned
int
();
// 32-bit flat value, quickest of all
virtual
std
::
ostream
&
put
(
std
::
ostream
&
os
)
const
;
virtual
std
::
istream
&
get
(
std
::
istream
&
is
);
...
...
Random/src/DoubConv.cc
View file @
89d3e960
...
...
@@ -23,10 +23,6 @@ void DoubConv::fill_byte_order () {
z
*=
256
;
}
// x, in IEEE format, would now be 0x4330060504030201
union
DB8
{
unsigned
char
b
[
8
];
double
d
;
};
DB8
xb
;
xb
.
d
=
x
;
int
n
;
...
...
@@ -121,4 +117,4 @@ double DoubConv::longs2double (const std::vector<unsigned long> & v) {
return
db
.
d
;
}
}
// end namespace
HepMC
}
// end namespace
CLHEP
Random/src/DualRand.cc
View file @
89d3e960
...
...
@@ -216,6 +216,10 @@ void DualRand::showStatus() const {
std
::
cout
.
precision
(
pr
);
}
DualRand
::
operator
double
()
{
return
flat
();
}
DualRand
::
operator
float
()
{
return
(
float
)
(
(
integerCong
^
tausworthe
)
*
twoToMinus_32
()
+
nearlyTwoToMinus_54
()
);
...
...
Random/src/Hurd160Engine.cc
View file @
89d3e960
...
...
@@ -243,6 +243,10 @@ void Hurd160Engine::showStatus() const {
std
::
cout
.
precision
(
pr
);
}
Hurd160Engine
::
operator
double
()
{
return
flat
();
}
Hurd160Engine
::
operator
float
()
{
if
(
wordIndex
<=
1
)
{
// MF 9/15/98: skip word 0
advance
();
...
...
Random/src/Hurd288Engine.cc
View file @
89d3e960
...
...
@@ -263,6 +263,10 @@ void Hurd288Engine::showStatus() const {
std
::
cout
<<
"-------------------------------------------"
<<
std
::
endl
;
}
Hurd288Engine
::
operator
double
()
{
return
flat
();
}
Hurd288Engine
::
operator
float
()
{
if
(
wordIndex
<=
1
)
{
// MF 9/15/98: skip word 0
advance
();
...
...
Random/src/JamesRandom.cc
View file @
89d3e960
...
...
@@ -296,6 +296,14 @@ void HepJamesRandom::flatArray(const int size, double* vect)
}
}
HepJamesRandom
::
operator
double
()
{
return
flat
();
}
HepJamesRandom
::
operator
float
()
{
return
float
(
flat
()
);
}
HepJamesRandom
::
operator
unsigned
int
()
{
return
((
unsigned
int
)(
flat
()
*
exponent_bit_32
())
&
0xffffffff
)
|
(((
unsigned
int
)(
u
[
i97
]
*
exponent_bit_32
())
>>
16
)
&
0xff
);
...
...
Random/src/MTwistEngine.cc
View file @
89d3e960
...
...
@@ -231,6 +231,10 @@ void MTwistEngine::showStatus() const
std
::
cout
<<
"----------------------------------------"
<<
std
::
endl
;
}
MTwistEngine
::
operator
double
()
{
return
flat
();
}
MTwistEngine
::
operator
float
()
{
unsigned
int
y
;
...
...
Random/src/MixMaxRng.cc
View file @
89d3e960
...
...
@@ -339,6 +339,16 @@ void MixMaxRng::flatArray(const int size, double* vect )
for
(
int
i
=
0
;
i
<
size
;
++
i
)
{
vect
[
i
]
=
flat
();
}
}
MixMaxRng
::
operator
double
()
{
return
flat
();
}
MixMaxRng
::
operator
float
()
{
return
float
(
flat
()
);
}
MixMaxRng
::
operator
unsigned
int
()
{
return
static_cast
<
unsigned
int
>
(
get_next
());
...
...
@@ -706,7 +716,7 @@ myuint_t MixMaxRng::apply_bigskip( myuint_t* Vout, myuint_t* Vin, myID_t cluster
myuint_t
MixMaxRng
::
modadd
(
myuint_t
foo
,
myuint_t
bar
)
{
#if defined(__x86_64__) &&
defined(__GNUC__) && (!defined(__ICC))
#if defined(__x86_64__) && defined(__GNUC__) && (!defined(__ICC))
//#warning Using assembler routine in modadd
myuint_t
out
;
/* Assembler trick suggested by Andrzej Görlich */
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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