Skip to content

Commit

Permalink
Code style cleanup (pytorch#15854)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#15854

- Remove unnecessary `inline` keyword
- Add a TODO stating the intention for Blob::ShareExternal()

Reviewed By: dzhulgakov

Differential Revision: D13605258

fbshipit-source-id: c0bc85c74c4ca4b3811d42ac7f866182e159d840
  • Loading branch information
smessmer authored and facebook-github-bot committed Jan 18, 2019
1 parent 637b35b commit 68164c1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions aten/src/ATen/core/blob.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -155,6 +155,7 @@ class CAFFE2_API Blob final : public c10::intrusive_ptr_target {
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;
Expand All @@ -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();
Expand Down

0 comments on commit 68164c1

Please sign in to comment.