aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/fasttime.cpp
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:25 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:25 +0300
commit344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/system/fasttime.cpp
parent706b83ed7de5a473436620367af31fc0ceecde07 (diff)
downloadydb-344ea37b4a345701ab0e67de2266a1c1bd7baf2d.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 2 of 2.
Diffstat (limited to 'util/system/fasttime.cpp')
-rw-r--r--util/system/fasttime.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/util/system/fasttime.cpp b/util/system/fasttime.cpp
index d885592a81..057a814f0a 100644
--- a/util/system/fasttime.cpp
+++ b/util/system/fasttime.cpp
@@ -130,35 +130,35 @@ namespace {
{
}
- inline void Add(const A& a, const B& b) noexcept {
+ inline void Add(const A& a, const B& b) noexcept {
Add(TSample(a, b));
}
- inline void Add(const TSample& s) noexcept {
+ inline void Add(const TSample& s) noexcept {
S_[(C_++) % N] = s;
if (C_ > 1) {
ReCalc();
}
}
- inline B Predict(A a) const noexcept {
+ inline B Predict(A a) const noexcept {
return A_ + a * B_;
}
- inline size_t Size() const noexcept {
+ inline size_t Size() const noexcept {
return C_;
}
- inline bool Enough() const noexcept {
+ inline bool Enough() const noexcept {
return Size() >= N;
}
- inline A LastX() const noexcept {
+ inline A LastX() const noexcept {
return S_[(C_ - 1) % N].first;
}
private:
- inline void ReCalc() noexcept {
+ inline void ReCalc() noexcept {
const size_t n = Min(N, C_);
double sx = 0;