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

[pre-commit.ci] pre-commit autoupdate #1928

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
rev: v18.1.8
hooks:
- id: clang-format
types_or: [file]
Expand Down
29 changes: 15 additions & 14 deletions cub/cub/agent/agent_merge_sort.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -346,20 +346,21 @@ struct AgentPartition
OffsetT partition_at = (cub::min)(keys2_end - keys1_beg, items_per_tile * local_tile_idx);

OffsetT partition_diag =
ping ? MergePath<KeyT>(
keys_ping + keys1_beg,
keys_ping + keys2_beg,
keys1_end - keys1_beg,
keys2_end - keys2_beg,
partition_at,
compare_op)
: MergePath<KeyT>(
keys_pong + keys1_beg,
keys_pong + keys2_beg,
keys1_end - keys1_beg,
keys2_end - keys2_beg,
partition_at,
compare_op);
ping
? MergePath<KeyT>(
keys_ping + keys1_beg,
keys_ping + keys2_beg,
keys1_end - keys1_beg,
keys2_end - keys2_beg,
partition_at,
compare_op)
: MergePath<KeyT>(
keys_pong + keys1_beg,
keys_pong + keys2_beg,
keys1_end - keys1_beg,
keys2_end - keys2_beg,
partition_at,
compare_op);

merge_partitions[partition_idx] = keys1_beg + partition_diag;
}
Expand Down
132 changes: 66 additions & 66 deletions cub/cub/block/block_radix_sort.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -674,9 +674,9 @@ public:
//! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`)
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
Sort(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
Sort(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit)
{
NullType values[ITEMS_PER_THREAD];

Expand Down Expand Up @@ -733,9 +733,9 @@ public:
//! modify members of the key.
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
Sort(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
Sort(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer)
{
Sort(keys, decomposer, 0, detail::radix::traits_t<KeyT>::default_end_bit(decomposer));
}
Expand Down Expand Up @@ -874,13 +874,13 @@ public:
//! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`)
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
Sort(KeyT (&keys)[ITEMS_PER_THREAD],
ValueT (&values)[ITEMS_PER_THREAD],
DecomposerT decomposer,
int begin_bit,
int end_bit)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
Sort(KeyT (&keys)[ITEMS_PER_THREAD],
ValueT (&values)[ITEMS_PER_THREAD],
DecomposerT decomposer,
int begin_bit,
int end_bit)
{
SortBlocked(keys, values, begin_bit, end_bit, Int2Type<false>(), Int2Type<KEYS_ONLY>(), decomposer);
}
Expand Down Expand Up @@ -943,9 +943,9 @@ public:
//! modify members of the key.
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
Sort(KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
Sort(KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer)
{
Sort(keys, values, decomposer, 0, detail::radix::traits_t<KeyT>::default_end_bit(decomposer));
}
Expand Down Expand Up @@ -1064,9 +1064,9 @@ public:
//! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`)
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescending(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescending(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit)
{
NullType values[ITEMS_PER_THREAD];

Expand Down Expand Up @@ -1123,9 +1123,9 @@ public:
//! modify members of the key.
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescending(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescending(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer)
{
NullType values[ITEMS_PER_THREAD];

Expand Down Expand Up @@ -1271,13 +1271,13 @@ public:
//! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`)
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescending(KeyT (&keys)[ITEMS_PER_THREAD],
ValueT (&values)[ITEMS_PER_THREAD],
DecomposerT decomposer,
int begin_bit,
int end_bit)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescending(KeyT (&keys)[ITEMS_PER_THREAD],
ValueT (&values)[ITEMS_PER_THREAD],
DecomposerT decomposer,
int begin_bit,
int end_bit)
{
SortBlocked(keys, values, begin_bit, end_bit, Int2Type<true>(), Int2Type<KEYS_ONLY>(), decomposer);
}
Expand Down Expand Up @@ -1340,9 +1340,9 @@ public:
//! modify members of the key.
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescending(KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescending(KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer)
{
SortBlocked(
keys,
Expand Down Expand Up @@ -1473,9 +1473,9 @@ public:
//! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`)
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit)
{
NullType values[ITEMS_PER_THREAD];

Expand Down Expand Up @@ -1533,9 +1533,9 @@ public:
//! modify members of the key.
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer)
{
NullType values[ITEMS_PER_THREAD];

Expand Down Expand Up @@ -1677,13 +1677,13 @@ public:
//! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`)
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD],
ValueT (&values)[ITEMS_PER_THREAD],
DecomposerT decomposer,
int begin_bit,
int end_bit)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD],
ValueT (&values)[ITEMS_PER_THREAD],
DecomposerT decomposer,
int begin_bit,
int end_bit)
{
SortBlockedToStriped(keys, values, begin_bit, end_bit, Int2Type<false>(), Int2Type<KEYS_ONLY>(), decomposer);
}
Expand Down Expand Up @@ -1742,9 +1742,9 @@ public:
//! modify members of the key.
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer)
{
SortBlockedToStriped(
keys,
Expand Down Expand Up @@ -1871,9 +1871,9 @@ public:
//! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`)
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescendingBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescendingBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit)
{
NullType values[ITEMS_PER_THREAD];

Expand Down Expand Up @@ -1931,9 +1931,9 @@ public:
//! modify members of the key.
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescendingBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescendingBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer)
{
NullType values[ITEMS_PER_THREAD];

Expand Down Expand Up @@ -2075,14 +2075,14 @@ public:
//! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`)
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescendingBlockedToStriped(
KeyT (&keys)[ITEMS_PER_THREAD],
ValueT (&values)[ITEMS_PER_THREAD],
DecomposerT decomposer,
int begin_bit,
int end_bit)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescendingBlockedToStriped(
KeyT (&keys)[ITEMS_PER_THREAD],
ValueT (&values)[ITEMS_PER_THREAD],
DecomposerT decomposer,
int begin_bit,
int end_bit)
{
SortBlockedToStriped(keys, values, begin_bit, end_bit, Int2Type<true>(), Int2Type<KEYS_ONLY>(), decomposer);
}
Expand Down Expand Up @@ -2141,10 +2141,10 @@ public:
//! modify members of the key.
template <class DecomposerT>
_CCCL_DEVICE _CCCL_FORCEINLINE //
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescendingBlockedToStriped(
KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer)
typename ::cuda::std::enable_if< //
!::cuda::std::is_convertible<DecomposerT, int>::value>::type
SortDescendingBlockedToStriped(
KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer)
{
SortBlockedToStriped(
keys,
Expand Down
12 changes: 6 additions & 6 deletions cub/cub/block/radix_rank_sort_operations.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@ private:
public:
template <class DecomposerT = detail::identity_decomposer_t>
static _CCCL_HOST_DEVICE _CCCL_FORCEINLINE //
bit_ordered_type
In(bit_ordered_type key, DecomposerT decomposer = {})
bit_ordered_type
In(bit_ordered_type key, DecomposerT decomposer = {})
{
key = bit_ordered_conversion_policy::to_bit_ordered(decomposer, key);
_CCCL_IF_CONSTEXPR (IS_DESCENDING)
Expand All @@ -596,8 +596,8 @@ public:

template <class DecomposerT = detail::identity_decomposer_t>
static _CCCL_HOST_DEVICE _CCCL_FORCEINLINE //
bit_ordered_type
Out(bit_ordered_type key, DecomposerT decomposer = {})
bit_ordered_type
Out(bit_ordered_type key, DecomposerT decomposer = {})
{
_CCCL_IF_CONSTEXPR (IS_DESCENDING)
{
Expand All @@ -609,8 +609,8 @@ public:

template <class DecomposerT = detail::identity_decomposer_t>
static _CCCL_HOST_DEVICE _CCCL_FORCEINLINE //
bit_ordered_type
DefaultKey(DecomposerT decomposer = {})
bit_ordered_type
DefaultKey(DecomposerT decomposer = {})
{
return IS_DESCENDING ? traits::min_raw_binary_key(decomposer) : traits::max_raw_binary_key(decomposer);
}
Expand Down
22 changes: 11 additions & 11 deletions cub/cub/detail/nvtx3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1958,17 +1958,17 @@ NVTX3_INLINE_IF_REQUESTED namespace NVTX3_VERSION_NAMESPACE
*/
constexpr event_attributes() noexcept
: attributes_{
NVTX_VERSION, // version
sizeof(nvtxEventAttributes_t), // size
0, // category
NVTX_COLOR_UNKNOWN, // color type
0, // color value
NVTX_PAYLOAD_UNKNOWN, // payload type
0, // reserved 4B
{0}, // payload value (union) // NOTE(bgruber): added braces
NVTX_MESSAGE_UNKNOWN, // message type
{0} // message value (union) // NOTE(bgruber): added braces
}
NVTX_VERSION, // version
sizeof(nvtxEventAttributes_t), // size
0, // category
NVTX_COLOR_UNKNOWN, // color type
0, // color value
NVTX_PAYLOAD_UNKNOWN, // payload type
0, // reserved 4B
{0}, // payload value (union) // NOTE(bgruber): added braces
NVTX_MESSAGE_UNKNOWN, // message type
{0} // message value (union) // NOTE(bgruber): added braces
}
{}

/**
Expand Down
Loading
Loading