Skip to content

Commit ba86938

Browse files
authored
naming consistency for feature test macros (#1891)
* naming consistency for feature test macros
1 parent fa05bc3 commit ba86938

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+174
-169
lines changed

examples/benchmark/static_thread_pool_bulk_enqueue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "./common.hpp"
1818
#include <exec/static_thread_pool.hpp>
1919

20-
#if STDEXEC_HAS_STD_RANGES()
20+
#if !STDEXEC_NO_STDCPP_RANGES()
2121
# include <exec/sequence/ignore_all_values.hpp>
2222
# include <ranges>
2323

examples/benchmark/static_thread_pool_bulk_enqueue_nested.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "./common.hpp"
1818
#include <exec/static_thread_pool.hpp>
1919

20-
#if STDEXEC_HAS_STD_RANGES()
20+
#if !STDEXEC_NO_STDCPP_RANGES()
2121
# include <exec/sequence/ignore_all_values.hpp>
2222
# include <ranges>
2323

examples/hello_coro.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// Pull in the reference implementation of P2300:
1919
#include <stdexec/execution.hpp>
2020

21-
#if !STDEXEC_NO_STD_COROUTINES() && !STDEXEC_NVHPC()
21+
#if !STDEXEC_NO_STDCPP_COROUTINES() && !STDEXEC_NVHPC()
2222
# include <exec/task.hpp>
2323

2424
using namespace stdexec;

examples/nvexec/maxwell/stdpar.cuh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#include "common.cuh" // IWYU pragma: keep
2222

23-
#if STDEXEC_HAS_PARALLEL_ALGORITHMS()
23+
#if !STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS()
2424

2525
# if STDEXEC_CUDA_COMPILATION()
2626
# include "../include/nvexec/detail/throw_on_cuda_error.cuh"
@@ -81,4 +81,4 @@ void run_stdpar(float dt,
8181
});
8282
}
8383

84-
#endif
84+
#endif // !STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS()

examples/nvexec/maxwell_cpu_mt.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ auto main(int argc, char *argv[]) -> int
3535
<< "\t--write-vtk\n"
3636
<< "\t--iterations\n"
3737
<< "\t--run-std\n"
38-
<< (STDEXEC_HAS_PARALLEL_ALGORITHMS() ? "\t--run-stdpar\n" : "")
38+
<< (STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS() ? "" : "\t--run-stdpar\n")
3939
<< "\t--run-thread-pool-scheduler\n"
4040
<< "\t--N\n"
4141
<< std::endl;
@@ -79,7 +79,7 @@ auto main(int argc, char *argv[]) -> int
7979
run_std(dt, write_vtk, n_iterations, grid, "CPU (std)");
8080
}
8181

82-
# if STDEXEC_HAS_PARALLEL_ALGORITHMS()
82+
# if !STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS()
8383
if (value(params, "run-stdpar"))
8484
{
8585
bool const gpu = is_gpu_policy(stdexec::par_unseq);

examples/nvexec/maxwell_gpu_s.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ auto main(int argc, char *argv[]) -> int
3030
std::cout << "Usage: " << argv[0] << " [OPTION]...\n"
3131
<< "\t--write-vtk\n"
3232
<< "\t--iterations\n"
33-
<< (STDEXEC_HAS_PARALLEL_ALGORITHMS() ? "\t--run-stdpar\n" : "") //
33+
<< (STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS() ? "" : "\t--run-stdpar\n") //
3434
<< "\t--run-cuda\n"
3535
<< "\t--run-stream-scheduler\n"
3636
<< "\t--N\n"
@@ -75,7 +75,7 @@ auto main(int argc, char *argv[]) -> int
7575
run_snr_on("GPU (snr cuda stream)", stream_ctx.get_scheduler());
7676
}
7777

78-
# if STDEXEC_HAS_PARALLEL_ALGORITHMS()
78+
# if !STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS()
7979
if (value(params, "run-stdpar"))
8080
{
8181
bool const gpu = is_gpu_policy(stdexec::par_unseq);
@@ -87,7 +87,7 @@ auto main(int argc, char *argv[]) -> int
8787

8888
run_stdpar(dt, write_vtk, n_iterations, grid, stdexec::par_unseq, method);
8989
}
90-
# endif // STDEXEC_HAS_PARALLEL_ALGORITHMS()
90+
# endif // !STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS()
9191
}
9292

9393
#endif // !defined(STDEXEC_CLANGD_INVOKED)

examples/server_theme/let_value.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
#include "exec/start_detached.hpp"
5353
#include "exec/static_thread_pool.hpp"
5454

55-
#if !STDEXEC_NO_STD_EXCEPTIONS()
55+
#if !STDEXEC_NO_STDCPP_EXCEPTIONS()
5656
namespace ex = stdexec;
5757

5858
struct http_request
@@ -177,4 +177,4 @@ int main()
177177
std::cout << "This example requires C++ exceptions to be enabled.\n";
178178
return 0;
179179
}
180-
#endif // !STDEXEC_NO_STD_EXCEPTIONS()
180+
#endif // !STDEXEC_NO_STDCPP_EXCEPTIONS()

include/exec/detail/bit_cast.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,20 @@
2121
#if __has_include(<bit>)
2222
# include <bit>
2323
# if __cpp_lib_bit_cast >= 2018'06L
24-
# define STDEXEC_HAS_BIT_CAST
24+
# define STDEXEC_NO_STDCPP_BIT_CAST() 0
25+
# else
26+
# define STDEXEC_NO_STDCPP_BIT_CAST() 1
2527
# endif
2628
#endif
2729

2830
#include <cstring>
2931

3032
namespace experimental::execution
3133
{
32-
3334
template <class _Ty>
3435
concept __trivially_copyable = STDEXEC_IS_TRIVIALLY_COPYABLE(_Ty);
3536

36-
#if defined(STDEXEC_HAS_BIT_CAST)
37+
#if !STDEXEC_NO_STDCPP_BIT_CAST()
3738
using std::bit_cast;
3839
#else
3940
template <__trivially_copyable _To, __trivially_copyable _From>

include/exec/sequence/iterate.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include "../../stdexec/__detail/__config.hpp"
2020

21-
#if STDEXEC_HAS_STD_RANGES()
21+
#if !STDEXEC_NO_STDCPP_RANGES()
2222

2323
# include "../../stdexec/__detail/__optional.hpp"
2424
# include "../../stdexec/execution.hpp"
@@ -241,4 +241,4 @@ namespace experimental::execution
241241

242242
namespace exec = experimental::execution;
243243

244-
#endif // STDEXEC_HAS_STD_RANGES()
244+
#endif // !STDEXEC_NO_STDCPP_RANGES()

include/exec/sequence_senders.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ namespace experimental::execution
245245
struct _FAILED_TO_COMPUTE_SEQUENCE_ITEM_TYPES_
246246
{};
247247

248-
#if STDEXEC_NO_STD_CONSTEXPR_EXCEPTIONS()
248+
#if STDEXEC_NO_STDCPP_CONSTEXPR_EXCEPTIONS()
249249

250250
template <class... _What, class... _Values>
251251
[[nodiscard]]

0 commit comments

Comments
 (0)