@@ -116,7 +116,7 @@ class short_key_verification_helper
116116private:
117117 using key_t = KeyT;
118118 // The histogram size of the keys being sorted for later verification
119- static constexpr auto max_histo_size = 1ULL << ( 8 * sizeof ( key_t )) ;
119+ const std:: int64_t max_histo_size = std:: int64_t { 1 } << ::cuda::std::numeric_limits< key_t >::digits ;
120120
121121 // Holding the histogram of the keys being sorted for verification
122122 c2h::host_vector<std::size_t > keys_histogram{};
@@ -170,28 +170,28 @@ private:
170170 c2h::host_vector<int > compute_histogram_of_series (std::size_t segment_offset, std::size_t segment_end) const
171171 {
172172 // The i-th full cycle begins after segment_offset
173- std:: size_t start_cycle = cuda::ceil_div (segment_offset, sequence_length);
173+ const auto start_cycle = cuda::ceil_div (segment_offset, sequence_length);
174174
175175 // The last full cycle ending before segment_end
176- std:: size_t end_cycle = segment_end / sequence_length;
176+ const auto end_cycle = segment_end / sequence_length;
177177
178178 // Number of full cycles repeating the sequence
179- int full_cycles = (end_cycle > start_cycle) ? static_cast <int >(end_cycle - start_cycle) : 0 ;
179+ const int full_cycles = (end_cycle > start_cycle) ? static_cast <int >(end_cycle - start_cycle) : 0 ;
180180
181181 // Add contributions from full cycles
182182 c2h::host_vector<int > histogram (sequence_length, full_cycles);
183183
184184 // Partial cycles preceding the first full cycle
185185 for (std::size_t j = segment_offset; j < start_cycle * sequence_length; ++j)
186186 {
187- std:: size_t value = j % sequence_length;
187+ const auto value = j % sequence_length;
188188 histogram[value]++;
189189 }
190190
191191 // Partial cycles following the last full cycle
192192 for (std::size_t j = end_cycle * sequence_length; j < segment_end; ++j)
193193 {
194- std:: size_t value = j % sequence_length;
194+ const auto value = j % sequence_length;
195195 histogram[value]++;
196196 }
197197 return histogram;
0 commit comments