Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Use constexpr if in case it's available
Browse files Browse the repository at this point in the history
  • Loading branch information
gevtushenko committed Oct 15, 2021
1 parent e53cb3c commit f7e39a8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions thrust/system/cuda/detail/sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ namespace __merge_sort {
return cudaSuccess;
}

if (STABLE::value)
THRUST_IF_CONSTEXPR(STABLE::value)
{
if (SORT_ITEMS::value)
THRUST_IF_CONSTEXPR(SORT_ITEMS::value)
{
return cub::DeviceMergeSort::StableSortPairs(d_temp_storage,
temp_storage_bytes,
Expand All @@ -103,7 +103,7 @@ namespace __merge_sort {
}
else
{
if (SORT_ITEMS::value)
THRUST_IF_CONSTEXPR(SORT_ITEMS::value)
{
return cub::DeviceMergeSort::SortPairs(d_temp_storage,
temp_storage_bytes,
Expand All @@ -125,6 +125,8 @@ namespace __merge_sort {
debug_sync);
}
}

return cudaSuccess;
}

template <typename SORT_ITEMS,
Expand Down

0 comments on commit f7e39a8

Please sign in to comment.