fix poolAllocator unordered_map bug on Mac OS X

* using map to replace unordered_map on Mac
avx_docs
liaogang 9 years ago
parent 9795e01639
commit 536bf7d87f

@ -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_;

Loading…
Cancel
Save