ADD: added other eigen lib

This commit is contained in:
Henry Winkel
2022-12-21 16:19:04 +01:00
parent a570766dc6
commit 9e56c7f2c0
832 changed files with 36586 additions and 20006 deletions

View File

@@ -0,0 +1,28 @@
// A Scalar with internal representation T+1 so that zero is internally
// represented by T(1). This is used to test memory fill.
//
template<typename T>
class OffByOneScalar {
public:
OffByOneScalar() : val_(1) {}
OffByOneScalar(const OffByOneScalar& other) {
*this = other;
}
OffByOneScalar& operator=(const OffByOneScalar& other) {
val_ = other.val_;
return *this;
}
OffByOneScalar(T val) : val_(val + 1) {}
OffByOneScalar& operator=(T val) {
val_ = val + 1;
}
operator T() const {
return val_ - 1;
}
private:
T val_;
};