Skip to content

Commit b5f96ab

Browse files
zhuyuegongchensu
authored andcommitted
Fix omp compile problems.
1 parent 3e21725 commit b5f96ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/infiniop/ops/all_equal/cpu/all_equal_cpu.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ infiniStatus_t Descriptor::calculate(
5757
auto c_ptr = reinterpret_cast<bool *>(c);
5858
*c_ptr = true;
5959
#pragma omp parallel for
60-
for (size_t i = 0; i < total_size; i++) {
60+
for (int i = 0; i < static_cast<int>(total_size); i++) {
6161
auto a_ptr = reinterpret_cast<const char *>(a);
6262
auto b_ptr = reinterpret_cast<const char *>(b);
63-
size_t rem = i;
64-
for (int d = _info.ndim - 1; d >= 0; d--) {
63+
size_t rem = static_cast<size_t>(i);
64+
for (int d = static_cast<int>(_info.ndim) - 1; d >= 0; d--) {
6565
size_t dim_index = rem / contiguous_strides[d];
6666
rem = rem % contiguous_strides[d];
6767
a_ptr += dim_index * _info.a_strides[d];

0 commit comments

Comments
 (0)