SWDEV-460144 - Adds test with inline static variable used in different translation unit

Change-Id: I9d5c8109f7264cdf469361b983b7a940706379c2


[ROCm/hip-tests commit: aed0782ee6]
This commit is contained in:
Satyanvesh Dittakavi
2024-05-15 13:31:48 +00:00
committed by Rakesh Roy
orang tua 2ca5a8e73c
melakukan 48fa72f9f4
5 mengubah file dengan 88 tambahan dan 0 penghapusan
@@ -0,0 +1,12 @@
#include "memoryCommon.hh"
#include "memoryGlobal.hh"
void set_value(int const value) {
HIP_CHECK(hipMemcpyToSymbol(HIP_SYMBOL(globalVar), &value, sizeof(value)));
}
int get_value() {
int value;
HIP_CHECK(hipMemcpyFromSymbol(&value, HIP_SYMBOL(globalVar), sizeof(value)));
return value;
}