From ff0d9341ead47b7880d8d34e600b6bcd6a31c52e Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Wed, 18 Apr 2018 18:46:21 +0800 Subject: [PATCH] remove not used code --- paddle/fluid/framework/tensor.h | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/paddle/fluid/framework/tensor.h b/paddle/fluid/framework/tensor.h index 5a6b24bfafb..6f878541e6d 100644 --- a/paddle/fluid/framework/tensor.h +++ b/paddle/fluid/framework/tensor.h @@ -176,34 +176,6 @@ class Tensor { std::type_index type_; }; - template - struct SharedPlaceholderImpl : public Placeholder { - SharedPlaceholderImpl(Place place, const uint8_t* data, size_t size, - std::type_index type) - : ptr_(data), place_(place), size_(size), type_(type) {} - - virtual size_t size() const { return size_; } - virtual platform::Place place() const { return place_; } - virtual void* ptr() const { - return const_cast(static_cast(ptr_)); - } - virtual std::type_index type() const { return type_; } - virtual void set_type(std::type_index type) { type_ = type; } - virtual void set_place(platform::Place place) { place_ = place; } - - /*! the pointer of memory block. */ - const uint8_t* ptr_; - - /*! the place of memory block. */ - platform::Place place_; - - /*! the size of memory block. */ - size_t size_; - - /* the current type of memory */ - std::type_index type_; - }; - /*! holds the memory block if allocated. */ std::shared_ptr holder_; -- GitLab