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

Tell gcc this sizeof division is intended ( -Wsizeof-array-div ) #418

Merged
merged 2 commits into from
Jan 19, 2022
Merged
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
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