OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
Tensor.h
Go to the documentation of this file.
1#pragma once
2#include "DataObject.h"
3#include <memory>
4#include <vector>
5
6template <class T>
7class Tensor : public DataObject
8{
9public:
10 Tensor(std::vector<uint32_t>& dimensions, uint32_t memoryOptimizedDimension);
11 Tensor(std::vector<uint32_t>&& dimensions, uint32_t memoryOptimizedDimension);
12
13private:
14 std::vector<uint32_t> _dimensions;
15 T* _data = nullptr;
16
17 enum Alignment { CacheLine64 = 64, AVX = 128, AVX2 = 256, AVX512 = 512 };
18 int _defaultAlignment = Alignment::CacheLine64;
19};
Definition DataObject.h:4
Definition Tensor.h:8
Tensor(std::vector< uint32_t > &&dimensions, uint32_t memoryOptimizedDimension)
Tensor(std::vector< uint32_t > &dimensions, uint32_t memoryOptimizedDimension)