mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
[NFC] Fix -Wmissing-braces warnings (#1643)
The `cl_*` types need two levels of braces for initialization: the outer braces for the union and the inner braces for the array. Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
committed by
GitHub
parent
75db137822
commit
dc8ee495bd
@@ -75,7 +75,7 @@ template <typename Ty> struct BALLOT
|
||||
{
|
||||
v = genrand_int32(gMTdata);
|
||||
}
|
||||
cl_uint4 v4 = { v, 0, 0, 0 };
|
||||
cl_uint4 v4 = { { v, 0, 0, 0 } };
|
||||
t[wi_id + wg_offset] = v4;
|
||||
}
|
||||
}
|
||||
@@ -307,13 +307,13 @@ template <typename Ty, BallotOp operation> struct BALLOT_BIT_EXTRACT
|
||||
|
||||
if (wi_id & 1)
|
||||
{
|
||||
bit_value ? expected_result = { 1, 0, 0, 1 }
|
||||
: expected_result = { 0, 0, 0, 1 };
|
||||
bit_value ? expected_result = { { 1, 0, 0, 1 } }
|
||||
: expected_result = { { 0, 0, 0, 1 } };
|
||||
}
|
||||
else
|
||||
{
|
||||
bit_value ? expected_result = { 1, 0, 0, 2 }
|
||||
: expected_result = { 0, 0, 0, 2 };
|
||||
bit_value ? expected_result = { { 1, 0, 0, 2 } }
|
||||
: expected_result = { { 0, 0, 0, 2 } };
|
||||
}
|
||||
|
||||
device_result = my[wg_offset + wi_id];
|
||||
@@ -398,8 +398,8 @@ template <typename Ty, BallotOp operation> struct BALLOT_INVERSE
|
||||
for (wi_id = 0; wi_id < current_sbs; ++wi_id)
|
||||
{ // for each subgroup work item
|
||||
|
||||
wi_id & 1 ? expected_result = { 1, 0, 0, 1 }
|
||||
: expected_result = { 1, 0, 0, 2 };
|
||||
wi_id & 1 ? expected_result = { { 1, 0, 0, 1 } }
|
||||
: expected_result = { { 1, 0, 0, 2 } };
|
||||
|
||||
device_result = my[wg_offset + wi_id];
|
||||
if (!compare(device_result, expected_result))
|
||||
@@ -691,7 +691,7 @@ template <typename Ty, BallotOp operation> struct SMASK
|
||||
{
|
||||
int midx = 4 * wg_offset + 4 * wi_id;
|
||||
cl_uint max_sub_group_size = m[midx + 2];
|
||||
cl_uint4 expected_mask = { 0 };
|
||||
cl_uint4 expected_mask = { { 0 } };
|
||||
expected_mask = generate_bit_mask(
|
||||
wi_id, operation_names(operation), max_sub_group_size);
|
||||
set_value(t[wg_offset + wi_id], expected_mask);
|
||||
|
||||
Reference in New Issue
Block a user