fix a bug when initializing a vector of hipFunction_t (#1949)

[ROCm/hip commit: 7c8b8d24ef]
Este commit está contenido en:
zhaozhangjian
2020-03-17 16:35:07 +08:00
cometido por GitHub
padre 7ab3583c60
commit 72e4677aae
+2 -2
Ver fichero
@@ -50,7 +50,7 @@ __hipRegisterFatBinary(const void* data)
return nullptr;
}
auto modules = new std::vector<hipModule_t>{g_deviceCnt};
auto modules = new std::vector<hipModule_t>(g_deviceCnt);
if (!modules) {
return nullptr;
}
@@ -133,7 +133,7 @@ extern "C" void __hipRegisterFunction(
int* wSize)
{
HIP_INIT_API(NONE, modules, hostFunction, deviceFunction, deviceName);
std::vector<hipFunction_t> functions{g_deviceCnt};
std::vector<hipFunction_t> functions(g_deviceCnt);
assert(modules && modules->size() >= g_deviceCnt);
for (int deviceId = 0; deviceId < g_deviceCnt; ++deviceId) {