Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/benchmark/static_thread_pool_bulk_enqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "./common.hpp"
#include <exec/static_thread_pool.hpp>

#if STDEXEC_HAS_STD_RANGES()
#if !STDEXEC_NO_STDCPP_RANGES()
# include <exec/sequence/ignore_all_values.hpp>
# include <ranges>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "./common.hpp"
#include <exec/static_thread_pool.hpp>

#if STDEXEC_HAS_STD_RANGES()
#if !STDEXEC_NO_STDCPP_RANGES()
# include <exec/sequence/ignore_all_values.hpp>
# include <ranges>

Expand Down
2 changes: 1 addition & 1 deletion examples/hello_coro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// Pull in the reference implementation of P2300:
#include <stdexec/execution.hpp>

#if !STDEXEC_NO_STD_COROUTINES() && !STDEXEC_NVHPC()
#if !STDEXEC_NO_STDCPP_COROUTINES() && !STDEXEC_NVHPC()
# include <exec/task.hpp>

using namespace stdexec;
Expand Down
4 changes: 2 additions & 2 deletions examples/nvexec/maxwell/stdpar.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

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

#if STDEXEC_HAS_PARALLEL_ALGORITHMS()
#if !STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS()

# if STDEXEC_CUDA_COMPILATION()
# include "../include/nvexec/detail/throw_on_cuda_error.cuh"
Expand Down Expand Up @@ -81,4 +81,4 @@ void run_stdpar(float dt,
});
}

#endif
#endif // !STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS()
4 changes: 2 additions & 2 deletions examples/nvexec/maxwell_cpu_mt.cu
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ auto main(int argc, char *argv[]) -> int
<< "\t--write-vtk\n"
<< "\t--iterations\n"
<< "\t--run-std\n"
<< (STDEXEC_HAS_PARALLEL_ALGORITHMS() ? "\t--run-stdpar\n" : "")
<< (STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS() ? "" : "\t--run-stdpar\n")
<< "\t--run-thread-pool-scheduler\n"
<< "\t--N\n"
<< std::endl;
Expand Down Expand Up @@ -79,7 +79,7 @@ auto main(int argc, char *argv[]) -> int
run_std(dt, write_vtk, n_iterations, grid, "CPU (std)");
}

# if STDEXEC_HAS_PARALLEL_ALGORITHMS()
# if !STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS()
if (value(params, "run-stdpar"))
{
bool const gpu = is_gpu_policy(stdexec::par_unseq);
Expand Down
6 changes: 3 additions & 3 deletions examples/nvexec/maxwell_gpu_s.cu
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ auto main(int argc, char *argv[]) -> int
std::cout << "Usage: " << argv[0] << " [OPTION]...\n"
<< "\t--write-vtk\n"
<< "\t--iterations\n"
<< (STDEXEC_HAS_PARALLEL_ALGORITHMS() ? "\t--run-stdpar\n" : "") //
<< (STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS() ? "" : "\t--run-stdpar\n") //
<< "\t--run-cuda\n"
<< "\t--run-stream-scheduler\n"
<< "\t--N\n"
Expand Down Expand Up @@ -75,7 +75,7 @@ auto main(int argc, char *argv[]) -> int
run_snr_on("GPU (snr cuda stream)", stream_ctx.get_scheduler());
}

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

run_stdpar(dt, write_vtk, n_iterations, grid, stdexec::par_unseq, method);
}
# endif // STDEXEC_HAS_PARALLEL_ALGORITHMS()
# endif // !STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS()
}

#endif // !defined(STDEXEC_CLANGD_INVOKED)
4 changes: 2 additions & 2 deletions examples/server_theme/let_value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#include "exec/start_detached.hpp"
#include "exec/static_thread_pool.hpp"

#if !STDEXEC_NO_STD_EXCEPTIONS()
#if !STDEXEC_NO_STDCPP_EXCEPTIONS()
namespace ex = stdexec;

struct http_request
Expand Down Expand Up @@ -177,4 +177,4 @@ int main()
std::cout << "This example requires C++ exceptions to be enabled.\n";
return 0;
}
#endif // !STDEXEC_NO_STD_EXCEPTIONS()
#endif // !STDEXEC_NO_STDCPP_EXCEPTIONS()
7 changes: 4 additions & 3 deletions include/exec/detail/bit_cast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,20 @@
#if __has_include(<bit>)
# include <bit>
# if __cpp_lib_bit_cast >= 2018'06L
# define STDEXEC_HAS_BIT_CAST
# define STDEXEC_NO_STDCPP_BIT_CAST() 0
# else
# define STDEXEC_NO_STDCPP_BIT_CAST() 1
# endif
#endif

#include <cstring>

namespace experimental::execution
{

template <class _Ty>
concept __trivially_copyable = STDEXEC_IS_TRIVIALLY_COPYABLE(_Ty);

#if defined(STDEXEC_HAS_BIT_CAST)
#if !STDEXEC_NO_STDCPP_BIT_CAST()
using std::bit_cast;
#else
template <__trivially_copyable _To, __trivially_copyable _From>
Expand Down
4 changes: 2 additions & 2 deletions include/exec/sequence/iterate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

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

#if STDEXEC_HAS_STD_RANGES()
#if !STDEXEC_NO_STDCPP_RANGES()

# include "../../stdexec/__detail/__optional.hpp"
# include "../../stdexec/execution.hpp"
Expand Down Expand Up @@ -241,4 +241,4 @@ namespace experimental::execution

namespace exec = experimental::execution;

#endif // STDEXEC_HAS_STD_RANGES()
#endif // !STDEXEC_NO_STDCPP_RANGES()
2 changes: 1 addition & 1 deletion include/exec/sequence_senders.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ namespace experimental::execution
struct _FAILED_TO_COMPUTE_SEQUENCE_ITEM_TYPES_
{};

#if STDEXEC_NO_STD_CONSTEXPR_EXCEPTIONS()
#if STDEXEC_NO_STDCPP_CONSTEXPR_EXCEPTIONS()

template <class... _What, class... _Values>
[[nodiscard]]
Expand Down
12 changes: 6 additions & 6 deletions include/exec/static_thread_pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ namespace experimental::execution
return std::make_pair(static_cast<Shape>(begin), static_cast<Shape>(end));
}

#if STDEXEC_HAS_STD_RANGES()
#if !STDEXEC_NO_STDCPP_RANGES()
namespace schedule_all_
{
template <class Range>
Expand Down Expand Up @@ -252,7 +252,7 @@ namespace experimental::execution
_static_thread_pool& pool_;
};

#if STDEXEC_HAS_STD_RANGES()
#if !STDEXEC_NO_STDCPP_RANGES()
struct _transform_iterate
{
template <class Range>
Expand Down Expand Up @@ -300,7 +300,7 @@ namespace experimental::execution
}
}

#if STDEXEC_HAS_STD_RANGES()
#if !STDEXEC_NO_STDCPP_RANGES()
template <sender_expr_for<exec::iterate_t> Sender, class Env>
constexpr auto
transform_sender(STDEXEC::set_value_t, Sender&& sndr, const Env& env) const noexcept
Expand Down Expand Up @@ -1564,7 +1564,7 @@ namespace experimental::execution
{}
};

#if STDEXEC_HAS_STD_RANGES()
#if !STDEXEC_NO_STDCPP_RANGES()
namespace schedule_all_
{
template <class Rcvr>
Expand Down Expand Up @@ -1823,7 +1823,7 @@ namespace experimental::execution

struct static_thread_pool : private _pool_::_static_thread_pool
{
#if STDEXEC_HAS_STD_RANGES()
#if !STDEXEC_NO_STDCPP_RANGES()
friend struct _pool_::schedule_all_t;
#endif
using task_base = _pool_::task_base;
Expand Down Expand Up @@ -1858,7 +1858,7 @@ namespace experimental::execution
using _pool_::_static_thread_pool::params;
};

#if STDEXEC_HAS_STD_RANGES()
#if !STDEXEC_NO_STDCPP_RANGES()
namespace _pool_
{
struct schedule_all_t
Expand Down
2 changes: 1 addition & 1 deletion include/stdexec/__detail/__as_awaitable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

namespace STDEXEC
{
#if !STDEXEC_NO_STD_COROUTINES()
#if !STDEXEC_NO_STDCPP_COROUTINES()
namespace __detail
{
template <std::size_t _Count>
Expand Down
2 changes: 1 addition & 1 deletion include/stdexec/__detail/__awaitable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace STDEXEC
{
#if !STDEXEC_NO_STD_COROUTINES()
#if !STDEXEC_NO_STDCPP_COROUTINES()
// Define some concepts and utilities for working with awaitables
template <class _Tp>
concept __await_suspend_result = __one_of<_Tp, void, bool>
Expand Down
4 changes: 2 additions & 2 deletions include/stdexec/__detail/__completion_signatures.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ namespace STDEXEC
using __completion_signature_ptrs_t = decltype(__cmplsigs::__repack_completions(
static_cast<_SigPtrs>(nullptr)...));

#if STDEXEC_NO_STD_CONSTEXPR_EXCEPTIONS()
#if STDEXEC_NO_STDCPP_CONSTEXPR_EXCEPTIONS()

template <class, class... _What, class... _Values>
[[nodiscard]]
Expand Down Expand Up @@ -561,7 +561,7 @@ namespace STDEXEC
// }
// else

#if STDEXEC_NO_STD_CONSTEXPR_EXCEPTIONS()
#if STDEXEC_NO_STDCPP_CONSTEXPR_EXCEPTIONS()

# define STDEXEC_COMPLSIGS_LET(_ID, ...) \
if constexpr ([[maybe_unused]] \
Expand Down
11 changes: 2 additions & 9 deletions include/stdexec/__detail/__concepts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@
#include <utility> // IWYU pragma: keep for std::swap
#include <version>

// Perhaps the stdlib lacks support for concepts though:
#if __has_include(<concepts>) && __cpp_lib_concepts >= 2020'02L
# define STDEXEC_HAS_STD_CONCEPTS_HEADER() 1
#else
# define STDEXEC_HAS_STD_CONCEPTS_HEADER() 0
#endif

#if STDEXEC_HAS_STD_CONCEPTS_HEADER()
#if !STDEXEC_NO_STDCPP_CONCEPTS_HEADER()
# include <concepts>
#else
# include <type_traits>
Expand Down Expand Up @@ -112,7 +105,7 @@ namespace STDEXEC
template <class _Ap, class _Bp>
concept same_as = __same_as<_Ap, _Bp> && __same_as<_Bp, _Ap>;

#if STDEXEC_HAS_STD_CONCEPTS_HEADER()
#if !STDEXEC_NO_STDCPP_CONCEPTS_HEADER()

using std::integral;
using std::derived_from;
Expand Down
Loading