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:
committed by
Rakesh Roy
orang tua
2ca5a8e73c
melakukan
48fa72f9f4
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user