Skip to content

Commit a8ff97d

Browse files
committed
#1934: Fix NVCC warning related to unsigned variable
1 parent 0022c5b commit a8ff97d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/vt/utils/container/circular_phases_buffer.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,12 @@ struct CircularPhasesBuffer {
195195

196196
if (new_size > 0) {
197197
if (new_size < size()) {
198-
auto tmp_tail = head_ - new_size + 1;
199-
if (tmp_tail < 0) {
200-
tmp_tail += size();
198+
int tmp = head_ - new_size + 1;
199+
if (tmp < 0) {
200+
tmp += size();
201201
}
202202

203+
std::size_t tmp_tail = static_cast<std::size_t>(tmp);
203204
for (int i = 0; tmp_tail != getNextEntry(head_);) {
204205
new_vec[i++] = std::move(vector_[tmp_tail]);
205206
tmp_tail = getNextEntry(tmp_tail);

0 commit comments

Comments
 (0)