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

[hipstdpar] Fix misuses of for_each, relocate header #368

Merged
merged 1 commit into from
Jan 24, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,7 @@
inline
void destroy(execution::parallel_unsequenced_policy, I f, I l)
{
return ::thrust::for_each(f, l, [](auto& x) {
destroy_at(addressof(x));
});
::thrust::for_each(f, l, [](auto& x) { destroy_at(addressof(x)); });
}

template<
Expand All @@ -740,7 +738,7 @@
inline
void destroy_n(execution::parallel_unsequenced_policy, I f, N n)
{
return ::thrust::for_each_n(f, n, [](auto& x) {
::thrust::for_each_n(f, n, [](auto& x) {
destroy_at(addressof(x));
});
}
Expand Down Expand Up @@ -1158,7 +1156,7 @@
inline
void for_each(execution::parallel_unsequenced_policy, I f, I l, F fn)
{
return ::thrust::for_each(::thrust::device, f, l, ::std::move(fn));
::thrust::for_each(::thrust::device, f, l, ::std::move(fn));
}

template<
Expand Down Expand Up @@ -3942,7 +3940,7 @@
void uninitialized_default_construct(
execution::parallel_unsequenced_policy, I f, I l)
{
return ::thrust::for_each(::thrust::device, f, l, [](auto& x) {
::thrust::for_each(::thrust::device, f, l, [](auto& x) {
auto p = const_cast<void*>(
static_cast<const volatile void*>((addressof(x))));
::new (p) typename iterator_traits<I>::value_type;
Expand Down Expand Up @@ -3973,7 +3971,7 @@
void uninitialized_default_construct_n(
execution::parallel_unsequenced_policy, I f, N n)
{
return ::thrust::for_each_n(::thrust::device, f, n, [](auto& x) {
::thrust::for_each_n(::thrust::device, f, n, [](auto& x) {
auto p = const_cast<void*>(
static_cast<const volatile void*>((addressof(x))));
::new (p) typename iterator_traits<I>::value_type;
Expand Down Expand Up @@ -4124,7 +4122,7 @@
void uninitialized_value_construct(
execution::parallel_unsequenced_policy, I f, I l)
{
return ::thrust::for_each(::thrust::device, f, l, [](auto& x) {
::thrust::for_each(::thrust::device, f, l, [](auto& x) {
auto p = const_cast<void*>(
static_cast<const volatile void*>((addressof(x))));
::new (p) typename iterator_traits<I>::value_type{};
Expand Down Expand Up @@ -4155,7 +4153,7 @@
void uninitialized_value_construct_n(
execution::parallel_unsequenced_policy, I f, N n)
{
return ::thrust::for_each_n(::thrust::device, f, n, [](auto& x) {
::thrust::for_each_n(::thrust::device, f, n, [](auto& x) {
auto p = const_cast<void*>(
static_cast<const volatile void*>((addressof(x))));
::new (p) typename iterator_traits<I>::value_type{};
Expand Down