OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
Matrix.h
Go to the documentation of this file.
1/*****************************************************************/
8#pragma once
9#include <stdint.h>
10
11template <class T>
12class Matrix
13{
14public:
17 Matrix& operator=(const Matrix& other) = delete;
18 Matrix(const Matrix& other) = delete;
19 ~Matrix();
20
21 inline T GetValue(int64_t row, int64_t column) const;
22 inline void SetValue(int64_t row, int64_t column, T& value);
23 int64_t GetNumberOfRows();
24 int64_t GetNumberOfColumns();
25
26private:
27 T* _matrix = nullptr;
28
29 int64_t _rows;
30 int64_t _columns;
31 int64_t _numberOfEntries;
32
33 int64_t _columnStepWidth;
34 int64_t _rowStepWidth;
35
36 enum Alignment { CacheLine64 = 64, AVX = 128, AVX2 = 256, AVX512 = 512 };
37 int _defaultAlignment = Alignment::CacheLine64;
38};
39
40#include "Matrix.hpp"
bsoncxx::types::value value
Definition DocumentManager.h:16
Definition Matrix.h:13
void SetValue(int64_t row, int64_t column, T &value)
Definition Matrix.hpp:41
T GetValue(int64_t row, int64_t column) const
Definition Matrix.hpp:34
int64_t GetNumberOfRows()
Definition Matrix.hpp:48
Matrix(int64_t rows, int64_t columns, accessOptimizationDirection direction=accessOptimizationDirection::columnWiseAccess)
Definition Matrix.hpp:6
accessOptimizationDirection
Definition Matrix.h:15
@ rowWiseAccess
Definition Matrix.h:15
@ columnWiseAccess
Definition Matrix.h:15
int64_t GetNumberOfColumns()
Definition Matrix.hpp:54
~Matrix()
Definition Matrix.hpp:27
Matrix(const Matrix &other)=delete
Matrix & operator=(const Matrix &other)=delete