diff --git a/aten/src/ATen/core/blob.h b/aten/src/ATen/core/blob.h index 88f87f437dd04..60694160c7f11 100644 --- a/aten/src/ATen/core/blob.h +++ b/aten/src/ATen/core/blob.h @@ -51,14 +51,14 @@ class CAFFE2_API Blob final : public c10::intrusive_ptr_target { /** * Returns the meta info of the blob. */ - inline const TypeMeta& meta() const noexcept { + const TypeMeta& meta() const noexcept { return meta_; } /** * Returns a printable typename of the blob. */ - inline const char* TypeName() const noexcept { + const char* TypeName() const noexcept { return meta_.name(); } @@ -155,6 +155,7 @@ class CAFFE2_API Blob final : public c10::intrusive_ptr_target { TypeMeta::Make::type>())); } + // TODO Remove ShareExternal() and have Blob always own its content void* ShareExternal(void* allocated, const TypeMeta& meta) { free_(); meta_ = meta; @@ -166,7 +167,7 @@ class CAFFE2_API Blob final : public c10::intrusive_ptr_target { /** * Resets the Blob to an empty one. */ - inline void Reset() { + void Reset() { free_(); pointer_ = nullptr; meta_ = TypeMeta();