文件

忽略 .git-blame-ignore-revs 的修订。点击 绕过 并查看正常的 Blame 视图。

22 行
543 B
C++

#include <hip_test_common.hh>
TEST_CASE("Unit_hipMemset_4bytes") {
int* d_a;
auto res = hipMalloc(&d_a, sizeof(int));
REQUIRE(res == hipSuccess);
res = hipMemset(d_a, 0, sizeof(int));
REQUIRE(res == hipSuccess);
2022-10-10 16:15:08 +05:30
res = hipFree(d_a);
REQUIRE(res == hipSuccess);
}
TEST_CASE("Unit_hipMemset_4bytes_hostMem") {
int* d_a;
auto res = hipHostMalloc(&d_a, sizeof(int), 0);
REQUIRE(res == hipSuccess);
res = hipMemset(d_a, 0, sizeof(int));
REQUIRE(res == hipSuccess);
2022-10-10 16:15:08 +05:30
res = hipHostFree(d_a);
REQUIRE(res == hipSuccess);
}