Skip to content

Commit

Permalink
Introduce __make_future as free function to create __future<sycl::event>
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Kopienko <[email protected]>
  • Loading branch information
SergeyKopienko committed Aug 14, 2024
1 parent 888d61e commit 25e8c32
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 @@ -370,7 +370,7 @@ struct __parallel_scan_submitter<_CustomName, __internal::__optional_kernel_name
});
});

return __future<sycl::event, __result_and_scratch_storage_t>(std::move(__final_event), std::move(__result_and_scratch));
return __make_future(std::move(__final_event), std::move(__result_and_scratch));
}
};

Expand Down Expand Up @@ -639,7 +639,7 @@ struct __parallel_copy_if_static_single_group_submitter<_Size, _ElemsPerItem, _W
}
});
});
return __future<sycl::event, __result_and_scratch_storage_t>(std::move(__event), std::move(__result));
return __make_future(std::move(__event), std::move(__result));
}
};

Expand Down Expand Up @@ -695,7 +695,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<sycl::event, __result_and_scratch_storage_t>(std::move(__event), std::move(__dummy_result_and_scratch));
return __make_future(std::move(__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 @@ -729,7 +729,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<sycl::event, __result_and_scratch_storage_t>(std::move(__event), std::move(__dummy_result_and_scratch));
return __make_future(std::move(__event), std::move(__dummy_result_and_scratch));
}
}

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

return __future<sycl::event, __result_and_scratch_storage_t>(std::move(__reduce_event), std::move(__scratch_container));
return __make_future(std::move(__reduce_event), std::move(__scratch_container));
}
}; // struct __parallel_transform_reduce_small_submitter

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

return __future<sycl::event, __result_and_scratch_storage_t>(std::move(__reduce_event), std::move(__scratch_container));
return __make_future(std::move(__reduce_event), std::move(__scratch_container));
}
}; // struct __parallel_transform_reduce_work_group_kernel_submitter

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

return __future<sycl::event, __result_and_scratch_storage_t>(std::move(__reduce_event), std::move(__scratch_container));
return __make_future(std::move(__reduce_event), std::move(__scratch_container));
}
}; // struct __parallel_transform_reduce_impl

Expand Down

0 comments on commit 25e8c32

Please sign in to comment.