Skip to content

Commit

Permalink
Fix windows openmp build failure (apache#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
reminisce authored and Olivier committed Jun 15, 2017
1 parent c32ba68 commit e4e1b05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/kvstore/comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,13 @@ class CommCPU : public Comm {

uniq_row_idx->resize(total_num_rows);
int nthreads = omp_get_max_threads();
size_t offset = 0;
int offset = 0;
for (const auto& nd : nds) {
if (nd.storage_initialized()) {
const IType* nd_row_idx = nd.aux_data(kIdx).dptr<IType>();
const size_t num_rows = nd.aux_shape(kIdx).Size();
const int num_rows = nd.aux_shape(kIdx).Size();
#pragma omp parallel for num_threads(nthreads)
for (size_t i = 0; i < num_rows; ++i) {
for (int i = 0; i < num_rows; ++i) {
(*uniq_row_idx)[offset+i] = nd_row_idx[i];
}
offset += num_rows;
Expand Down

0 comments on commit e4e1b05

Please sign in to comment.