Skip to content

Commit

Permalink
Merge pull request #743 from aarongreig/aaron/correctUsmDescInit
Browse files Browse the repository at this point in the history
Correct ur_usm_desc_t initialization in USM alloc conformance tests.
  • Loading branch information
aarongreig committed Jul 25, 2023
2 parents d3fa9ca + 788e8af commit cb0047e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions test/conformance/usm/urUSMDeviceAlloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ TEST_P(urUSMDeviceAllocTest, SuccessWithDescriptors) {

ur_usm_device_desc_t usm_device_desc{UR_STRUCTURE_TYPE_USM_DEVICE_DESC,
nullptr,
/* device flags*/ 0};
/* device flags */ 0};

ur_usm_desc_t usm_desc{UR_STRUCTURE_TYPE_USM_DESC, &usm_device_desc,
/* common usm flags */ 0,
/* mem advice flags*/ UR_USM_ADVICE_FLAG_DEFAULT};
/* mem advice flags */ UR_USM_ADVICE_FLAG_DEFAULT,
/* alignment */ 0};
void *ptr = nullptr;
size_t allocation_size = sizeof(int);
ASSERT_SUCCESS(urUSMDeviceAlloc(context, device, &usm_desc, nullptr,
Expand Down
6 changes: 3 additions & 3 deletions test/conformance/usm/urUSMHostAlloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ TEST_P(urUSMHostAllocTest, Success) {
TEST_P(urUSMHostAllocTest, SuccessWithDescriptors) {

ur_usm_host_desc_t usm_host_desc{UR_STRUCTURE_TYPE_USM_HOST_DESC, nullptr,
/* host flags*/ 0};
/* host flags */ 0};

ur_usm_desc_t usm_desc{UR_STRUCTURE_TYPE_USM_DESC, &usm_host_desc,
/* common usm flags */ 0,
/* mem advice flags*/ UR_USM_ADVICE_FLAG_DEFAULT};
/* mem advice flags */ UR_USM_ADVICE_FLAG_DEFAULT,
/* alignment */ 0};
void *ptr = nullptr;
size_t allocation_size = sizeof(int);
ASSERT_SUCCESS(
Expand Down
14 changes: 7 additions & 7 deletions test/conformance/usm/urUSMSharedAlloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ TEST_P(urUSMSharedAllocTest, SuccessWithDescriptors) {

ur_usm_device_desc_t usm_device_desc{UR_STRUCTURE_TYPE_USM_DEVICE_DESC,
nullptr,
/* device flags*/ 0};
/* device flags */ 0};

ur_usm_host_desc_t usm_host_desc{UR_STRUCTURE_TYPE_USM_HOST_DESC,
&usm_device_desc,
/* host flags*/ 0};
/* host flags */ 0};

ur_usm_desc_t usm_desc{UR_STRUCTURE_TYPE_USM_DESC, &usm_host_desc,
/* common usm flags */ 0,
/* mem advice flags*/ UR_USM_ADVICE_FLAG_DEFAULT};
/* mem advice flags */ UR_USM_ADVICE_FLAG_DEFAULT,
/* alignment */ 0};
void *ptr = nullptr;
size_t allocation_size = sizeof(int);
ASSERT_SUCCESS(urUSMSharedAlloc(context, device, &usm_desc, nullptr,
Expand All @@ -70,9 +70,9 @@ TEST_P(urUSMSharedAllocTest, SuccessWithDescriptors) {
TEST_P(urUSMSharedAllocTest, SuccessWithMultipleAdvices) {
ur_usm_desc_t usm_desc{
UR_STRUCTURE_TYPE_USM_DESC, nullptr,
/* common usm flags */ 0,
/* mem advice flags*/ UR_USM_ADVICE_FLAG_SET_READ_MOSTLY |
UR_USM_ADVICE_FLAG_BIAS_CACHED};
/* mem advice flags */ UR_USM_ADVICE_FLAG_SET_READ_MOSTLY |
UR_USM_ADVICE_FLAG_BIAS_CACHED,
/* alignment */ 0};
void *ptr = nullptr;
size_t allocation_size = sizeof(int);
ASSERT_SUCCESS(urUSMSharedAlloc(context, device, &usm_desc, nullptr,
Expand Down

0 comments on commit cb0047e

Please sign in to comment.