Files
rocm-systems/projects/hip-tests/catch/unit/memory/memoryCommon.cc
T
systems-assistant[bot] 7105a89a51 Add 'projects/hip-tests/' from commit '5ce508401e1934053b127de5bf756dcd56a326a2'
git-subtree-dir: projects/hip-tests
git-subtree-mainline: cc7a96c46f
git-subtree-split: 5ce508401e
2025-08-10 02:09:49 +00:00

13 строки
299 B
C++

#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;
}