Re-sync with upstream.

这个提交包含在:
Alex Voicu
2018-02-12 20:20:24 +00:00
当前提交 a704bd8b44
修改 38 个文件,包含 2903 行新增116 行删除
+4 -5
查看文件
@@ -151,7 +151,7 @@ namespace
lock_guard<mutex> lck{mtx};
if (globals().find(x) != globals().cend()) return;
globals().emplace(x, (void*)(it1->second.first));
void* p = nullptr;
hsa_amd_memory_lock(
reinterpret_cast<void*>(it1->second.first),
@@ -163,7 +163,6 @@ namespace
hsa_executable_agent_global_variable_define(
executable, agent, x.c_str(), p);
globals().emplace(x, RAII_global{p, hsa_amd_memory_unlock});
}
}
@@ -444,9 +443,9 @@ namespace hip_impl
return r;
}
unordered_map<string, RAII_global>& globals()
unordered_map<string, void*>& globals()
{
static unordered_map<string, RAII_global> r;
static unordered_map<string, void*> r;
static once_flag f;
call_once(f, []() { r.reserve(symbol_addresses().size()); });
@@ -473,4 +472,4 @@ namespace hip_impl
return executable;
}
} // Namespace hip_impl.
} // Namespace hip_impl.