summaryrefslogtreecommitdiff
path: root/thirdparty/thekla_atlas/nvmath/KahanSum.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/thekla_atlas/nvmath/KahanSum.h')
-rw-r--r--thirdparty/thekla_atlas/nvmath/KahanSum.h39
1 files changed, 0 insertions, 39 deletions
diff --git a/thirdparty/thekla_atlas/nvmath/KahanSum.h b/thirdparty/thekla_atlas/nvmath/KahanSum.h
deleted file mode 100644
index 18d475e7cb..0000000000
--- a/thirdparty/thekla_atlas/nvmath/KahanSum.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// This code is in the public domain -- Ignacio Castaņo <castano@gmail.com>
-
-#pragma once
-#ifndef NV_MATH_KAHANSUM_H
-#define NV_MATH_KAHANSUM_H
-
-#include "nvmath.h"
-
-namespace nv
-{
-
- class KahanSum
- {
- public:
- KahanSum() : accum(0.0f), err(0) {};
-
- void add(float f)
- {
- float compensated = f + err;
- float tmp = accum + compensated;
- err = accum - tmp;
- err += compensated;
- accum = tmp;
- }
-
- float sum() const
- {
- return accum;
- }
-
- private:
- float accum;
- float err;
- };
-
-} // nv namespace
-
-
-#endif // NV_MATH_KAHANSUM_H