Skip to content

Commit 5c5e364

Browse files
authored
[SYCL] [COMPAT]Fix the changing meaning of the declaration when building with -Wchanges-meaning (#19673)
Fix the header file compile failed when building with "-Wchanges-meaning". Signed-off-by: Chen, Sheng S <[email protected]>
1 parent c1c976f commit 5c5e364

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sycl/include/syclcompat/util.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ enum class group_type { work_group, sub_group, logical_group, root_group };
968968
template <int dimensions = 3> class group_base {
969969
public:
970970
group_base(sycl::nd_item<dimensions> item)
971-
: nd_item(item), logical_group(item) {}
971+
: nd_item(item), _logical_group(item) {}
972972
~group_base() {}
973973
/// Returns the number of work-items in the group.
974974
size_t get_local_linear_range() {
@@ -978,7 +978,7 @@ template <int dimensions = 3> class group_base {
978978
case group_type::sub_group:
979979
return nd_item.get_sub_group().get_local_linear_range();
980980
case group_type::logical_group:
981-
return logical_group.get_local_linear_range();
981+
return _logical_group.get_local_linear_range();
982982
default:
983983
return -1; // Unkonwn group type
984984
}
@@ -991,7 +991,7 @@ template <int dimensions = 3> class group_base {
991991
case group_type::sub_group:
992992
return nd_item.get_sub_group().get_local_linear_id();
993993
case group_type::logical_group:
994-
return logical_group.get_local_linear_id();
994+
return _logical_group.get_local_linear_id();
995995
default:
996996
return -1; // Unkonwn group type
997997
}
@@ -1013,7 +1013,7 @@ template <int dimensions = 3> class group_base {
10131013
}
10141014

10151015
protected:
1016-
logical_group<dimensions> logical_group;
1016+
logical_group<dimensions> _logical_group;
10171017
sycl::nd_item<dimensions> nd_item;
10181018
group_type type;
10191019
};

0 commit comments

Comments
 (0)