summaryrefslogtreecommitdiff
path: root/performance-tests
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-17 21:40:47 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-17 21:40:47 +0000
commit69e95a27d7ff23db75a168b8800baaf1af38be57 (patch)
tree9279ef6f16c4275759b095b71ebfb0e169ef8ada /performance-tests
parent92f11f32e57f7c6c17ecb6ba4a39bd214f9ce6e0 (diff)
downloadATCD-69e95a27d7ff23db75a168b8800baaf1af38be57.tar.gz
added a few ACE_U64_TO_U32 explicit conversions
Diffstat (limited to 'performance-tests')
-rw-r--r--performance-tests/UDP/udp_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/performance-tests/UDP/udp_test.cpp b/performance-tests/UDP/udp_test.cpp
index 60ca2ba5d3f..2a11d756fae 100644
--- a/performance-tests/UDP/udp_test.cpp
+++ b/performance-tests/UDP/udp_test.cpp
@@ -313,7 +313,7 @@ Client::run (void)
#if defined (ACE_LACKS_FLOATING_POINT)
sample_mean = sum / nsamples;
#else /* ! ACE_LACKS_FLOATING_POINT */
- sample_mean = ((double)sum)/((double)nsamples);
+ sample_mean = ((double) ACE_U64_TO_U32 (sum)) / (double) nsamples;
#endif /* ! ACE_LACKS_FLOATING_POINT */
if (logfile)
@@ -358,8 +358,8 @@ Client::run (void)
#if ! defined (ACE_LACKS_FLOATING_POINT)
for (i = 0; i < (ACE_INT32) nsamples; i++)
{
- std_dev += ((double)Samples[i] - sample_mean) *
- ((double) Samples[i] - sample_mean);
+ std_dev += ((double) ACE_U64_TO_U32 (Samples[i]) - sample_mean) *
+ ((double) ACE_U64_TO_U32 (Samples[i]) - sample_mean);
d = (int)((Samples[i] - min)/window);
if (d < 0 || d > ndist)
@@ -374,7 +374,7 @@ Client::run (void)
if (logfile)
ACE_OS::fprintf (sampfp,
"%u\n",
- (ACE_UINT32) Samples[i]);
+ ACE_U64_TO_U32 (Samples[i]));
}
#endif /* ACE_LACKS_FLOATING_POINT */