Этот коммит содержится в:
Alex Voicu
2018-02-12 20:20:24 +00:00
родитель b29c8461e1 4b8ae78891
Коммит baf50a5311
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.