Skip to content

Commit 788e8af

Browse files
committed
Correct ur_usm_desc_t initialization in USM alloc conformance tests.
1 parent 2620159 commit 788e8af

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

test/conformance/usm/urUSMDeviceAlloc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ TEST_P(urUSMDeviceAllocTest, SuccessWithDescriptors) {
4040

4141
ur_usm_device_desc_t usm_device_desc{UR_STRUCTURE_TYPE_USM_DEVICE_DESC,
4242
nullptr,
43-
/* device flags*/ 0};
43+
/* device flags */ 0};
4444

4545
ur_usm_desc_t usm_desc{UR_STRUCTURE_TYPE_USM_DESC, &usm_device_desc,
46-
/* common usm flags */ 0,
47-
/* mem advice flags*/ UR_USM_ADVICE_FLAG_DEFAULT};
46+
/* mem advice flags */ UR_USM_ADVICE_FLAG_DEFAULT,
47+
/* alignment */ 0};
4848
void *ptr = nullptr;
4949
size_t allocation_size = sizeof(int);
5050
ASSERT_SUCCESS(urUSMDeviceAlloc(context, device, &usm_desc, nullptr,

test/conformance/usm/urUSMHostAlloc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ TEST_P(urUSMHostAllocTest, Success) {
6060
TEST_P(urUSMHostAllocTest, SuccessWithDescriptors) {
6161

6262
ur_usm_host_desc_t usm_host_desc{UR_STRUCTURE_TYPE_USM_HOST_DESC, nullptr,
63-
/* host flags*/ 0};
63+
/* host flags */ 0};
6464

6565
ur_usm_desc_t usm_desc{UR_STRUCTURE_TYPE_USM_DESC, &usm_host_desc,
66-
/* common usm flags */ 0,
67-
/* mem advice flags*/ UR_USM_ADVICE_FLAG_DEFAULT};
66+
/* mem advice flags */ UR_USM_ADVICE_FLAG_DEFAULT,
67+
/* alignment */ 0};
6868
void *ptr = nullptr;
6969
size_t allocation_size = sizeof(int);
7070
ASSERT_SUCCESS(

test/conformance/usm/urUSMSharedAlloc.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ TEST_P(urUSMSharedAllocTest, SuccessWithDescriptors) {
4343

4444
ur_usm_device_desc_t usm_device_desc{UR_STRUCTURE_TYPE_USM_DEVICE_DESC,
4545
nullptr,
46-
/* device flags*/ 0};
46+
/* device flags */ 0};
4747

4848
ur_usm_host_desc_t usm_host_desc{UR_STRUCTURE_TYPE_USM_HOST_DESC,
4949
&usm_device_desc,
50-
/* host flags*/ 0};
50+
/* host flags */ 0};
5151

5252
ur_usm_desc_t usm_desc{UR_STRUCTURE_TYPE_USM_DESC, &usm_host_desc,
53-
/* common usm flags */ 0,
54-
/* mem advice flags*/ UR_USM_ADVICE_FLAG_DEFAULT};
53+
/* mem advice flags */ UR_USM_ADVICE_FLAG_DEFAULT,
54+
/* alignment */ 0};
5555
void *ptr = nullptr;
5656
size_t allocation_size = sizeof(int);
5757
ASSERT_SUCCESS(urUSMSharedAlloc(context, device, &usm_desc, nullptr,
@@ -70,9 +70,9 @@ TEST_P(urUSMSharedAllocTest, SuccessWithDescriptors) {
7070
TEST_P(urUSMSharedAllocTest, SuccessWithMultipleAdvices) {
7171
ur_usm_desc_t usm_desc{
7272
UR_STRUCTURE_TYPE_USM_DESC, nullptr,
73-
/* common usm flags */ 0,
74-
/* mem advice flags*/ UR_USM_ADVICE_FLAG_SET_READ_MOSTLY |
75-
UR_USM_ADVICE_FLAG_BIAS_CACHED};
73+
/* mem advice flags */ UR_USM_ADVICE_FLAG_SET_READ_MOSTLY |
74+
UR_USM_ADVICE_FLAG_BIAS_CACHED,
75+
/* alignment */ 0};
7676
void *ptr = nullptr;
7777
size_t allocation_size = sizeof(int);
7878
ASSERT_SUCCESS(urUSMSharedAlloc(context, device, &usm_desc, nullptr,

0 commit comments

Comments
 (0)