From 8bc248c8e59e87aa6fc1d7ddfb9291c60f74f15a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20L=C3=BCbke?= Date: Mon, 2 Oct 2023 13:08:41 +0200 Subject: [PATCH] rename data to mem --- matrix.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/matrix.hpp b/matrix.hpp index d0d321a..20356f5 100644 --- a/matrix.hpp +++ b/matrix.hpp @@ -12,11 +12,11 @@ template struct Matrix { std::uint32_t rows; std::uint32_t cols; - std::vector data; + std::vector mem; Matrix(std::uint32_t _rows, std::uint32_t _cols) : rows(_rows), cols(_cols) { - data.resize(rows * cols); + mem.resize(rows * cols); } Matrix(const char *filepath) { @@ -39,17 +39,17 @@ template struct Matrix { } T &operator()(std::uint32_t row_i, std::uint32_t col_j) { - return data[row_i * cols + col_j]; + return mem[row_i * cols + col_j]; } const T &operator()(std::uint32_t row_i, std::uint32_t col_j) const { - return data[row_i * cols + col_j]; + return mem[row_i * cols + col_j]; } Matrix &operator=(const Matrix &mat) { this->rows = mat.rows; this->cols = mat.cols; - this->data = data; + this->data = mem; return *this; } @@ -66,7 +66,7 @@ template struct Matrix { XXH32_hash_t chksum() const { constexpr XXH32_hash_t HASH_SEED = 42; - return XXH32(this->data.data(), data.size(), HASH_SEED); + return XXH32(this->data.data(), mem.size(), HASH_SEED); } };