提交 a328c9a5 编写于 作者: W wangliu

remove std::mutex to shrink so size

上级 ec11393f
......@@ -22,7 +22,6 @@ namespace paddle_mobile {
namespace framework {
Scope &Scope::NewScope() const {
std::unique_lock<std::mutex> lock(mutex_);
kids_.push_back(new Scope(this));
return *kids_.back();
}
......@@ -72,7 +71,6 @@ std::vector<std::string> Scope::LocalVarNames() const {
}
void Scope::DeleteScope(Scope *scope) const {
std::unique_lock<std::mutex> lock(mutex_);
auto it = std::find(kids_.begin(), kids_.end(), scope);
kids_.erase(it);
delete scope;
......
......@@ -15,7 +15,6 @@ limitations under the License. */
#pragma once
#include <list>
#include <mutex>
#include <unordered_map>
#include "variable.h"
......@@ -71,7 +70,6 @@ class Scope {
mutable std::list<Scope *> kids_;
Scope const *parent_{nullptr};
mutable std::mutex mutex_;
};
} // namespace framework
} // namespace paddle_mobile
......@@ -14,7 +14,7 @@ limitations under the License. */
#pragma once
#include <common/enforce.h>
#include "common/enforce.h"
#include <cstdint>
#include <cstring>
#include <memory>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册