Files
Upsilon/apps/shared/float_pair_store.h
Émilie Feral f0a776a670 [apps] Operations in double when precision required
Change-Id: I7168a861a76178f0bf81841e9378f7399f67914a
2017-08-17 09:31:53 +02:00

31 lines
678 B
C++

#ifndef SHARED_FLOAT_PAIR_STORE_H
#define SHARED_FLOAT_PAIR_STORE_H
#include <stdint.h>
namespace Shared {
class FloatPairStore {
public:
FloatPairStore();
// Delete the implicit copy constructor: the object is heavy
FloatPairStore(const FloatPairStore&) = delete;
double get(int i, int j);
void set(double f, int i, int j);
int numberOfPairs();
void deletePairAtIndex(int j);
void deleteAllPairs();
void resetColumn(int i);
double sumOfColumn(int i);
uint32_t storeChecksum();
constexpr static int k_maxNumberOfPairs = 100;
protected:
virtual double defaultValue(int i);
int m_numberOfPairs;
double m_data[2][k_maxNumberOfPairs];
};
}
#endif