SWDEV-441237 - Move hipMemcpyHtoD out of the initialization loop in module_api_global

Change-Id: If68b2aadb16fece429fcab2da0a92ce995c437f6
Tá an tiomantas seo le fáil i:
Ioannis Assiouras tiomanta 2024-10-18 04:38:05 -04:00
1 tuismitheoir eec4fec7d4
tiomantas 958d0e4d73
1 comhad athraithe
+1 -1
+1 -1
Féach ar an gComhad
@@ -80,8 +80,8 @@ int main() {
checkHipErrors(hipModuleGetGlobal((void**)&myDeviceGlobalArray, &myDeviceGlobalArraySize, Module, "myDeviceGlobalArray"));
for (int i = 0; i < ARRAY_SIZE; i++) {
myDeviceGlobalArray_h[i] = i * 1000.0f;
checkHipErrors(hipMemcpyHtoD(hipDeviceptr_t(myDeviceGlobalArray), &myDeviceGlobalArray_h, myDeviceGlobalArraySize));
}
checkHipErrors(hipMemcpyHtoD(hipDeviceptr_t(myDeviceGlobalArray), &myDeviceGlobalArray_h, myDeviceGlobalArraySize));
struct {
void* _Ad;