Skip to content

Commit

Permalink
rng: only use <execution> header if it's present (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
evetsso authored Mar 8, 2024
1 parent ac92ec1 commit cab9488
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions library/src/rng/system.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
#include <hip/hip_runtime.h>

#include <algorithm>
#ifdef ROCRAND_PARALLEL_STL
#if defined(ROCRAND_PARALLEL_STL) && __has_include(<execution>)
#define ROCRAND_USE_PARALLEL_STL
#include <execution>
#endif
#include <new>
Expand Down Expand Up @@ -130,7 +131,7 @@ struct rocrand_system_host
};

std::for_each(
#ifdef ROCRAND_PARALLEL_STL
#ifdef ROCRAND_USE_PARALLEL_STL
std::execution::par_unseq,
#endif
cpp_utils::threedim_iterator::begin(num_blocks),
Expand Down

0 comments on commit cab9488

Please sign in to comment.