Skip to content

Commit

Permalink
Fix a clang warning on array size computation (#1942)
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber authored Jul 5, 2024
1 parent d6fe433 commit 20cd6ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cub/cub/block/block_load.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ InternalLoadDirectBlockedVectorized(int linear_tid, T* block_ptr, T (&items)[ITE
// Biggest memory access word that T is a whole multiple of
using DeviceWord = typename UnitWord<T>::DeviceWord;

_CCCL_DIAG_PUSH
# if defined(CUB_CLANG_VERSION) && CUB_CLANG_VERSION >= 100000
_CCCL_DIAG_SUPPRESS_CLANG("-Wsizeof-array-div")
# endif // defined(CUB_CLANG_VERSION) && CUB_CLANG_VERSION >= 100000
enum
{
TOTAL_WORDS = sizeof(items) / sizeof(DeviceWord),
Expand All @@ -204,6 +208,7 @@ InternalLoadDirectBlockedVectorized(int linear_tid, T* block_ptr, T (&items)[ITE

VECTORS_PER_THREAD = TOTAL_WORDS / VECTOR_SIZE,
};
_CCCL_DIAG_POP

// Vector type
using Vector = typename CubVector<DeviceWord, VECTOR_SIZE>::Type;
Expand Down

0 comments on commit 20cd6ce

Please sign in to comment.