Skip to content

Commit

Permalink
fix Intel omp collapsed reduction issues
Browse files Browse the repository at this point in the history
  • Loading branch information
upsj committed Apr 29, 2020
1 parent c26b175 commit 64df3c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion omp/matrix/ell_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void count_nonzeros(std::shared_ptr<const OmpExecutor> exec,
const auto max_nnz_per_row = source->get_num_stored_elements_per_row();
const auto stride = source->get_stride();

#pragma omp parallel for collapse(2) reduction(+ : nonzeros)
#pragma omp parallel for reduction(+ : nonzeros)
for (size_type row = 0; row < num_rows; row++) {
for (size_type i = 0; i < max_nnz_per_row; i++) {
nonzeros += (source->val_at(row, i) != zero<ValueType>());
Expand Down

0 comments on commit 64df3c1

Please sign in to comment.