Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15854
- Remove unnecessary `inline` keyword
- Add a TODO stating the intention for Blob::ShareExternal()
Reviewed By: dzhulgakov
Differential Revision:
D13605258
fbshipit-source-id:
c0bc85c74c4ca4b3811d42ac7f866182e159d840
/**
* 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();
}
TypeMeta::Make<typename std::remove_const<T>::type>()));
}
+ // TODO Remove ShareExternal() and have Blob always own its content
void* ShareExternal(void* allocated, const TypeMeta& meta) {
free_();
meta_ = meta;
/**
* Resets the Blob to an empty one.
*/
- inline void Reset() {
+ void Reset() {
free_();
pointer_ = nullptr;
meta_ = TypeMeta();