diff --git a/matrix.hpp b/matrix.hpp index 20356f5..da56d3d 100644 --- a/matrix.hpp +++ b/matrix.hpp @@ -1,6 +1,7 @@ #ifndef MATRIX_H_ #define MATRIX_H_ +#include #include #include #include @@ -68,6 +69,8 @@ template struct Matrix { constexpr XXH32_hash_t HASH_SEED = 42; return XXH32(this->data.data(), mem.size(), HASH_SEED); } + + std::size_t bytes() const { return this->mem.size() * sizeof(T); } }; template std::ostream &operator<<(std::ostream &os, Matrix &mat) {