MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / Tensor

Class Tensor

dnn/test/common/tensor.h:19–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 */
18template <typename T = dt_float32, typename Comparator = DefaultComparator<T>>
19class Tensor {
20public:
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
34private:
35 Handle* m_handle;
36 TensorND m_tensornd;
37 Comparator m_comparator;
38};
39
40/**
41 * \brief A wrapper over host and device tensor.

Callers 7

device_inputFunction · 0.50
device_input_outputFunction · 0.50
pinned_host_inputFunction · 0.50
load_from_path_run_cudaFunction · 0.50
TESTFunction · 0.50
tensor.hFile · 0.50
tensor.hFile · 0.50

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.40