Skip to content

Conversation

upsj
Copy link
Member

@upsj upsj commented Apr 2, 2025

Extracted from the symbolic Cholesky (but might also be useful for other things, e.g. parallel OpenMP COO sorting)

@upsj upsj added the 1:ST:ready-for-review This PR is ready for review label Apr 2, 2025
@upsj upsj requested a review from a team April 2, 2025 16:08
@upsj upsj self-assigned this Apr 2, 2025
@ginkgo-bot ginkgo-bot added reg:build This is related to the build system. reg:testing This is related to testing. mod:cuda This is related to the CUDA module. mod:openmp This is related to the OpenMP module. mod:hip This is related to the HIP module. labels Apr 2, 2025
@upsj upsj mentioned this pull request Apr 3, 2025
1 task
const auto sums = tmp.get_data();
std::fill_n(sums, tmp_size, 0);
std::array<int64, num_buckets + 1> global_offsets{};
#pragma omp parallel
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#pragma omp parallel
#pragma omp parallel num_threads(num_threads)

}
}
std::copy_n(offsets.begin(), num_buckets, global_offsets.begin());
std::exclusive_scan(global_offsets.begin(), global_offsets.end(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be unsupported in one of the libstdc++ versions we are using (ROCm 4.5 job), but I think I would rather require a fully C++17 compliant compiler than work around this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1:ST:ready-for-review This PR is ready for review mod:cuda This is related to the CUDA module. mod:hip This is related to the HIP module. mod:openmp This is related to the OpenMP module. reg:build This is related to the build system. reg:testing This is related to testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants