Skip to content

Commit 16bf461

Browse files
executors: fix CUDA constexpr dtor mismatch and memory ordering
- Restored non-constexpr dtor consistency for CUDA/NVCC builds. - Upgraded mask reclamation to use acq_rel ordering for safe deletion.
1 parent 0331efb commit 16bf461

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

libs/core/executors/include/hpx/executors/parallel_executor.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ namespace hpx::execution {
180180
first_core_ = rhs.first_core_;
181181
num_cores_ = rhs.num_cores_;
182182
auto* old_mask =
183-
mask_.exchange(nullptr, std::memory_order_relaxed);
183+
mask_.exchange(nullptr, std::memory_order_acq_rel);
184184
delete old_mask; // force recomputing cached pu mask
185185

186186
#if defined(HPX_HAVE_THREAD_DESCRIPTION)
@@ -481,7 +481,7 @@ namespace hpx::execution {
481481
parallel_policy_executor&&) = default;
482482

483483
#if defined(__NVCC__) || defined(__CUDACC__)
484-
constexpr ~parallel_policy_executor() {}
484+
~parallel_policy_executor() {}
485485
#endif
486486

487487
private:

0 commit comments

Comments
 (0)