提交 536bf7d8 编写于 作者: L liaogang

fix poolAllocator unordered_map bug on Mac OS X

* using map to replace unordered_map on Mac
上级 9795e016
......@@ -19,6 +19,7 @@ limitations under the License. */
#include <mutex>
#include <vector>
#include <unordered_map>
#include <map>
#include "Allocator.h"
namespace paddle {
......@@ -52,7 +53,11 @@ private:
void printAll();
std::unique_ptr<Allocator> allocator_;
std::mutex mutex_;
#if defined(__APPLE__) || defined(__OSX__)
std::map<size_t, std::vector<void*>> pool_;
#else
std::unordered_map<size_t, std::vector<void*>> pool_;
#endif
size_t sizeLimit_;
size_t poolMemorySize_;
std::string name_;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册