| 17 | */ |
| 18 | template <typename T = dt_float32, typename Comparator = DefaultComparator<T>> |
| 19 | class Tensor { |
| 20 | public: |
| 21 | Tensor(Handle* handle, TensorLayout layout); |
| 22 | ~Tensor(); |
| 23 | |
| 24 | T* ptr(); |
| 25 | const T* ptr() const; |
| 26 | |
| 27 | TensorND tensornd() const { return m_tensornd; } |
| 28 | |
| 29 | TensorLayout layout() const; |
| 30 | |
| 31 | template <typename C> |
| 32 | void check_with(const Tensor<T, C>& rhs) const; |
| 33 | |
| 34 | private: |
| 35 | Handle* m_handle; |
| 36 | TensorND m_tensornd; |
| 37 | Comparator m_comparator; |
| 38 | }; |
| 39 | |
| 40 | /** |
| 41 | * \brief A wrapper over host and device tensor. |
no outgoing calls