summaryrefslogtreecommitdiff
path: root/c10
diff options
context:
space:
mode:
authorSebastian Messmer <messmer@fb.com>2019-04-16 23:59:02 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2019-04-17 00:02:27 -0700
commitdb611b7caf0369ba628c5ed8bba42cc22aadfb20 (patch)
treebaeb1dbd333b615bf3c05f7d957c0f2239a95393 /c10
parent33443d083e129d61f857bc0563ed1b7f8c8fab0b (diff)
downloadpytorch-db611b7caf0369ba628c5ed8bba42cc22aadfb20.tar.gz
pytorch-db611b7caf0369ba628c5ed8bba42cc22aadfb20.tar.bz2
pytorch-db611b7caf0369ba628c5ed8bba42cc22aadfb20.zip
Delete C10Tensor (#19328)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/19328 Plans changed and we don't want this class anymore. Reviewed By: dzhulgakov Differential Revision: D14966746 fbshipit-source-id: 09ea4c95b352bc1a250834d32f35a94e401f2347
Diffstat (limited to 'c10')
-rw-r--r--c10/core/Tensor.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/c10/core/Tensor.h b/c10/core/Tensor.h
deleted file mode 100644
index 461c1a8c6e..0000000000
--- a/c10/core/Tensor.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#pragma once
-
-#include <c10/core/TensorImpl.h>
-#include <c10/core/UndefinedTensorImpl.h>
-#include <c10/macros/Macros.h>
-
-namespace c10 {
-
-/**
- * This is a minimal Tensor class for use in c10 code.
- * The plan on record is to eventually merge at::Tensor and caffe2::Tensor
- * and move that merged class to c10, replacing this one.
- *
- * At time of writing this, we couldn't do that yet, because their APIs are
- * not clean enough to make it in c10 and because they have dependencies we want
- * to avoid, for example at::Tensor depends on at::Type.
- */
-class C10Tensor final {
-private:
- using TensorImplPtr = intrusive_ptr<TensorImpl, UndefinedTensorImpl>;
-public:
- explicit C10Tensor(TensorImplPtr impl) noexcept;
-
- C10Tensor(const C10Tensor&) = default;
- C10Tensor(C10Tensor&&) noexcept = default;
- C10Tensor& operator=(const C10Tensor&) = default;
- C10Tensor& operator=(C10Tensor&&) noexcept = default;
-
- const TensorImplPtr &impl() const & noexcept;
- TensorImplPtr&& impl() && noexcept;
-
- TensorTypeId type_id() const;
-
-private:
- TensorImplPtr impl_;
-};
-
-inline C10Tensor::C10Tensor(TensorImplPtr impl) noexcept
-: impl_(std::move(impl)) {}
-
-inline const C10Tensor::TensorImplPtr &C10Tensor::impl() const & noexcept {
- return impl_;
-}
-
-inline C10Tensor::TensorImplPtr&& C10Tensor::impl() && noexcept {
- return std::move(impl_);
-}
-
-inline TensorTypeId C10Tensor::type_id() const {
- return impl_->type_id();
-}
-
-} // namespace c10