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

Commit

Permalink
Merge pull request #418 from robertmaynard/remove_gcc11_warnings
Browse files Browse the repository at this point in the history
Tell gcc this sizeof division is intended ( -Wsizeof-array-div )
  • Loading branch information
alliepiper committed Jan 19, 2022
2 parents 66e2be6 + 4081ff8 commit d4e8d5c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cub/util_type.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -682,10 +682,9 @@ struct Uninitialized
/// Biggest memory-access word that T is a whole multiple of and is not larger than the alignment of T
typedef typename UnitWord<T>::DeviceWord DeviceWord;

enum
{
WORDS = sizeof(T) / sizeof(DeviceWord)
};
static constexpr std::size_t DATA_SIZE = sizeof(T);
static constexpr std::size_t WORD_SIZE = sizeof(DeviceWord);
static constexpr std::size_t WORDS = DATA_SIZE / WORD_SIZE;

/// Backing storage
DeviceWord storage[WORDS];
Expand Down

0 comments on commit d4e8d5c

Please sign in to comment.