diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2019-06-17 13:32:41 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2019-06-17 13:32:41 -0700 |
commit | 9c51ce9c40c1eadd20e943f74f0694a0a6a05ae1 (patch) | |
tree | 52c89b89aa45a5843b20ca668af415d90a6afe29 /node/Path.hpp | |
parent | 97975402120d565dd211f9d470e7b192641712c5 (diff) | |
download | infinitytier-9c51ce9c40c1eadd20e943f74f0694a0a6a05ae1.tar.gz infinitytier-9c51ce9c40c1eadd20e943f74f0694a0a6a05ae1.zip |
Windows build fixes, fix double/float types to get rid of warnings.
Diffstat (limited to 'node/Path.hpp')
-rw-r--r-- | node/Path.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/node/Path.hpp b/node/Path.hpp index 5b966f6b..9203eee3 100644 --- a/node/Path.hpp +++ b/node/Path.hpp @@ -440,7 +440,7 @@ public: uint64_t id = it->first; memcpy(qosBuffer, &id, sizeof(uint64_t)); qosBuffer+=sizeof(uint64_t); - uint16_t holdingTime = (now - it->second); + uint16_t holdingTime = (uint16_t)(now - it->second); memcpy(qosBuffer, &holdingTime, sizeof(uint16_t)); qosBuffer+=sizeof(uint16_t); len+=sizeof(uint64_t)+sizeof(uint16_t); @@ -592,11 +592,11 @@ public: float throughput_cv = _throughputSamples.mean() > 0 ? _throughputSamples.stddev() / _throughputSamples.mean() : 1; // Form an exponential cutoff and apply contribution weights - float pdv_contrib = exp((-1)*normalized_pdv) * ZT_PATH_CONTRIB_PDV; - float latency_contrib = exp((-1)*normalized_la) * ZT_PATH_CONTRIB_LATENCY; + float pdv_contrib = expf((-1.0f)*normalized_pdv) * (float)ZT_PATH_CONTRIB_PDV; + float latency_contrib = expf((-1.0f)*normalized_la) * (float)ZT_PATH_CONTRIB_LATENCY; // Throughput Disturbance Coefficient - float throughput_disturbance_contrib = exp((-1)*throughput_cv) * ZT_PATH_CONTRIB_THROUGHPUT_DISTURBANCE; + float throughput_disturbance_contrib = expf((-1.0f)*throughput_cv) * (float)ZT_PATH_CONTRIB_THROUGHPUT_DISTURBANCE; _throughputDisturbanceSamples.push(throughput_cv); _lastComputedThroughputDistCoeff = _throughputDisturbanceSamples.mean(); |