-
Notifications
You must be signed in to change notification settings - Fork 115
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
Optimization of __serial_merge
function
#1970
Conversation
…optimization of __serial_merge function Signed-off-by: Sergey Kopienko <sergey.kopienko@intel.com>
Signed-off-by: Sergey Kopienko <sergey.kopienko@intel.com>
bcc6675
to
d3d863d
Compare
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good to me, excepting one minor comment, see above.
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge_sort.h
Outdated
Show resolved
Hide resolved
…fix review comment: The uninitialized variables... Signed-off-by: Sergey Kopienko <sergey.kopienko@intel.com>
Signed-off-by: Sergey Kopienko <sergey.kopienko@intel.com>
Signed-off-by: Sergey Kopienko <sergey.kopienko@intel.com>
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h
Outdated
Show resolved
Hide resolved
…pienko/serial_merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also looks good to me. Below are some minor suggestions.
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h
Outdated
Show resolved
Hide resolved
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h
Outdated
Show resolved
Hide resolved
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h
Outdated
Show resolved
Hide resolved
…fix review comment: __rng3_idx is redefined in the loop below. Signed-off-by: Sergey Kopienko <sergey.kopienko@intel.com>
…fix review comment: Let's use _Index instead of auto, because the type is known. Signed-off-by: Sergey Kopienko <sergey.kopienko@intel.com>
…fix review comment: A nitpick: __rng1_idx_less__n1 -> __rng1_idx_less_n1 Signed-off-by: Sergey Kopienko <sergey.kopienko@intel.com>
…fix review comment: rewrite to one ternary operator Signed-off-by: Sergey Kopienko <sergey.kopienko@intel.com>
…fix review comment: rewrite to one ternary operator with additional ( and ) Signed-off-by: Sergey Kopienko <sergey.kopienko@intel.com>
…fix self review comment: declare __start1 and __start2 as const Signed-off-by: Sergey Kopienko <sergey.kopienko@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM on my side.
….h - fix review comment: remove auto for __find_start_point return type Signed-off-by: Sergey Kopienko <sergey.kopienko@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending green CI, thanks
….h - apply GitHUB clang format Signed-off-by: Sergey Kopienko <sergey.kopienko@intel.com>
cbba810
Unfortunately clang-formatting has been fixed. So approves required again. |
In this PR we make optimization of
__serial_merge
function.The justification: previous implementation is too complicated:
With this new implementation of
__serial_merge
function we have significant performance profit formerge
andmerge_sort
algorithms on all data sizes.