Skip to content

Commit

Permalink
Move __result_and_scratch_storage into __future
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Kopienko <[email protected]>
  • Loading branch information
SergeyKopienko committed Aug 12, 2024
1 parent 52efa5b commit 3b61d5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ struct __parallel_scan_submitter<_CustomName, __internal::__optional_kernel_name
});
});

return __future(__final_event, __result_and_scratch);
return __future(__final_event, std::move(__result_and_scratch));
}
};

Expand Down Expand Up @@ -640,7 +640,7 @@ struct __parallel_copy_if_static_single_group_submitter<_Size, _ElemsPerItem, _W
}
});
});
return __future(__event, __result);
return __future(__event, std::move(__result));
}
};

Expand Down Expand Up @@ -696,7 +696,7 @@ __parallel_transform_scan_single_group(oneapi::dpl::__internal::__device_backend
/* _IsFullGroup= */ ::std::false_type, _Inclusive, _CustomName>>>()(
::std::forward<_ExecutionPolicy>(__exec), std::forward<_InRng>(__in_rng),
std::forward<_OutRng>(__out_rng), __n, __init, __binary_op, __unary_op);
return __future(__event, __dummy_result_and_scratch);
return __future(__event, std::move(__dummy_result_and_scratch));
};
if (__n <= 16)
return __single_group_scan_f(std::integral_constant<::std::uint16_t, 16>{});
Expand Down Expand Up @@ -730,7 +730,7 @@ __parallel_transform_scan_single_group(oneapi::dpl::__internal::__device_backend
__parallel_transform_scan_dynamic_single_group_submitter<_Inclusive::value, _DynamicGroupScanKernel>()(
std::forward<_ExecutionPolicy>(__exec), std::forward<_InRng>(__in_rng),
std::forward<_OutRng>(__out_rng), __n, __init, __binary_op, __unary_op, __max_wg_size);
return __future(__event, __dummy_result_and_scratch);
return __future(__event, std::move(__dummy_result_and_scratch));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ struct __parallel_transform_reduce_small_submitter<_Tp, _Commutative, _VecSize,
});
});

return __future(__reduce_event, __scratch_container);
return __future(__reduce_event, std::move(__scratch_container));
}
}; // struct __parallel_transform_reduce_small_submitter

Expand Down Expand Up @@ -270,7 +270,7 @@ struct __parallel_transform_reduce_work_group_kernel_submitter<_Tp, _Commutative
});
});

return __future(__reduce_event, __scratch_container);
return __future(__reduce_event, std::move(__scratch_container));
}
}; // struct __parallel_transform_reduce_work_group_kernel_submitter

Expand Down Expand Up @@ -421,7 +421,7 @@ struct __parallel_transform_reduce_impl
__n_groups = oneapi::dpl::__internal::__dpl_ceiling_div(__n, __size_per_work_group);
} while (__n > 1);

return __future(__reduce_event, __scratch_container);
return __future(__reduce_event, std::move(__scratch_container));
}
}; // struct __parallel_transform_reduce_impl

Expand Down

0 comments on commit 3b61d5e

Please sign in to comment.