Skip to content

Conversation

@viralbhadeshiya
Copy link
Contributor

@viralbhadeshiya viralbhadeshiya commented Dec 8, 2025

Description

  • Include basic smoke tests for exclusive_scan

See #6486

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Dec 8, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Dec 8, 2025
@viralbhadeshiya
Copy link
Contributor Author

@miscco this is the PR for exclusive_scan algorithm :)

Copy link
Contributor

@miscco miscco left a comment

Choose a reason for hiding this comment

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

Thanks a lot for adding this test, I would like to see a test with a custom binary operator. Maybe one that does lhs + rhs + 1 ?

}

// exclusive_scan with default initial value (0)
std::exclusive_scan(std::execution::par, in.begin(), in.end(), out.begin(), 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

We should replace this test by one that provides an init value and a suitable binary operator

Comment on lines +13 to +16
for (std::size_t i = 0; i < N; ++i)
{
in[i] = static_cast<int>(i + 1);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This should just be

Suggested change
for (std::size_t i = 0; i < N; ++i)
{
in[i] = static_cast<int>(i + 1);
}
std::iota(in.begin(), in.end(), 1);

@github-project-automation github-project-automation bot moved this from In Review to In Progress in CCCL Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants