diff --git a/paddle/fluid/framework/tensor.h b/paddle/fluid/framework/tensor.h index 5a6b24bfafbe76c2c1a1ed309ece33d64cc969a7..6f878541e6de1deec1829145b1b325ecd176a034 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_;