Unverified Commit 6dd619dd authored by PanZezhong1725's avatar PanZezhong1725 Committed by GitHub
Browse files

issue/700 support default tensor

parent 8c16b808
......@@ -75,6 +75,7 @@ public:
const DataType &dtype,
const Device &device);
Tensor() = default;
Tensor(const Tensor &) = default;
Tensor(Tensor &&) = default;
Tensor &operator=(const Tensor &) = default;
......@@ -84,7 +85,7 @@ public:
const TensorImpl *operator->() const;
protected:
explicit Tensor(std::shared_ptr<TensorImpl> impl) : impl_(std::move(impl)) {}
Tensor(std::shared_ptr<TensorImpl> impl) : impl_(std::move(impl)) {}
std::shared_ptr<TensorImpl> impl_;
friend class TensorImpl;
};
......
......@@ -21,6 +21,8 @@ _TEST_CASES_DATA = [
((4, 10), (2, 10), (2,), False),
((1, 1024), (3072, 1024), (3072,), True),
((5, 1024), (3072, 1024), (3072,), False),
((2, 5, 1024), (3072, 1024), (3072,), True),
((10, 5, 1024), (3072, 1024), (3072,), False),
]
# Tolerance configuration
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment