Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use C99 VLA in C++ code #1030

Merged
merged 3 commits into from
Feb 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/sub_group/sub_group_semantics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ TEST_CASE("sub_group by-value semantics", "[sub_group]") {
TEST_CASE("Check sycl::sub_group equality", "[sub_group]") {
size_t code_count =
to_integral(common_by_value_semantics::current_check::size);
bool result[code_count];
std::fill(result, result + code_count, false);
// Avoid the std::vector<bool>
std::vector<char> result(code_count, false);
{
sycl::buffer<bool, 1> res_buf(result, sycl::range(code_count));
sycl::buffer<char, 1> res_buf(result);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bader Oops! Good catch.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bader Oops! Good catch.

It was CI, not me. ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was puzzled by AdaptiveCpp passing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto queue = once_per_unit::get_queue();
queue
.submit([&](sycl::handler& cgh) {
Expand Down