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
15 changes: 11 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ if (NOT STDEXEC_NAMESPACE STREQUAL "stdexec")
target_compile_definitions(stdexec INTERFACE STDEXEC_NAMESPACE=${STDEXEC_NAMESPACE})
endif()

if (NOT STDEXEC_BUILD_PARALLEL_SCHEDULER)
target_compile_definitions(stdexec INTERFACE STDEXEC_PARALLEL_SCHEDULER_HEADER_ONLY)
endif()

option(STDEXEC_ENABLE_EXTRA_TYPE_CHECKING "Enable extra type checking that is costly at compile-time" OFF)
if (STDEXEC_ENABLE_EXTRA_TYPE_CHECKING)
target_compile_definitions(stdexec INTERFACE STDEXEC_ENABLE_EXTRA_TYPE_CHECKING)
Expand Down Expand Up @@ -455,12 +459,15 @@ if(STDEXEC_BUILD_PARALLEL_SCHEDULER)
$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/Zc:__cplusplus /Zc:preprocessor /Zc:externConstexpr>
)
target_link_libraries(parallel_scheduler PUBLIC stdexec)

add_library(STDEXEC::parallel_scheduler ALIAS parallel_scheduler)
add_library(system_context ALIAS parallel_scheduler)
add_library(STDEXEC::system_context ALIAS parallel_scheduler)
else()
add_library(parallel_scheduler INTERFACE)
target_link_libraries(parallel_scheduler INTERFACE stdexec)
endif()

add_library(STDEXEC::parallel_scheduler ALIAS parallel_scheduler)
add_library(system_context ALIAS parallel_scheduler)
add_library(STDEXEC::system_context ALIAS parallel_scheduler)

option(STDEXEC_ENABLE_IO_URING "Enable the use of the io_uring scheduler on Linux" OFF)

if(STDEXEC_ENABLE_IO_URING)
Expand Down
9 changes: 4 additions & 5 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ function(def_example example)
$<$<CXX_COMPILER_ID:GNU>:-Wno-maybe-uninitialized> # warnings being emitted from stdlib headers, why?
$<$<CXX_COMPILER_ID:Clang>:-Wno-gnu-line-marker>
)
target_compile_definitions(${target} PRIVATE
$<$<PLATFORM_ID:Windows>:NOMINMAX>
)
target_link_libraries(${target}
PRIVATE STDEXEC::stdexec
stdexec_executable_flags
Expand Down Expand Up @@ -72,11 +75,7 @@ foreach(example ${stdexec_examples})
def_example(${example})
endforeach()

if (STDEXEC_BUILD_PARALLEL_SCHEDULER)
target_link_libraries(example.sudoku PRIVATE STDEXEC::parallel_scheduler)
else()
target_compile_definitions(example.sudoku PRIVATE STDEXEC_PARALLEL_SCHEDULER_HEADER_ONLY)
endif()
target_link_libraries(example.sudoku PRIVATE STDEXEC::parallel_scheduler)

if(STDEXEC_ENABLE_CUDA)
add_subdirectory(nvexec)
Expand Down
2 changes: 1 addition & 1 deletion examples/scope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ auto main() -> int

{
sender auto nest = scope.nest(begin);
auto op = connect(std::move(nest), noop_receiver{});
auto op = stdexec::connect(std::move(nest), noop_receiver{});
(void) op;
}
sync_wait(scope.on_empty());
Expand Down
4 changes: 0 additions & 4 deletions include/exec/libdispatch_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#pragma once

#if __has_include(<dispatch/dispatch.h>)

// TODO: This is needed for libdispatch to compile with GCC. Need to look for
// workaround.
# ifndef __has_feature
Expand Down Expand Up @@ -524,5 +522,3 @@ namespace experimental::execution
} // namespace experimental::execution

namespace exec = experimental::execution;

#endif // __has_include(<dispatch/dispatch.h>)
4 changes: 2 additions & 2 deletions include/stdexec/__detail/__env.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ namespace STDEXEC
noexcept(__nothrow_queryable_with<__1st_env_t<_Query, _Args...>, _Query, _Args...>)
-> __query_result_t<__1st_env_t<_Query, _Args...>, _Query, _Args...>
{
auto const &__env = __detail::__get_1st_env<_Query, _Args...>()(*this);
return __query<_Query>()(__env, static_cast<_Args &&>(__args)...);
return __query<_Query>()(__detail::__get_1st_env<_Query, _Args...>()(*this),
static_cast<_Args &&>(__args)...);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ namespace STDEXEC::parallel_scheduler_replacement
{
/// Get the backend for the parallel scheduler.
/// Users might replace this function.
STDEXEC_ATTRIBUTE(weak)
auto query_parallel_scheduler_backend() -> std::shared_ptr<parallel_scheduler_backend>;

/// The type of a factory that can create `parallel_scheduler_backend` instances.
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ set_target_properties(common_test_settings PROPERTIES
)
target_include_directories(common_test_settings INTERFACE "${CMAKE_CURRENT_LIST_DIR}")
target_compile_definitions(common_test_settings INTERFACE
STDEXEC_NAMESPACE=std::execution
$<$<PLATFORM_ID:Windows>:NOMINMAX>
)
target_compile_options(common_test_settings INTERFACE
Expand All @@ -114,6 +113,7 @@ add_compile_diagnostics(test.stdexec)
target_link_libraries(test.stdexec
PUBLIC
STDEXEC::stdexec
STDEXEC::parallel_scheduler
stdexec_executable_flags
Catch2::Catch2WithMain
PRIVATE
Expand Down
4 changes: 2 additions & 2 deletions test/stdexec/schedulers/test_parallel_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

#include <thread>

#define STDEXEC_PARALLEL_SCHEDULER_HEADER_ONLY 1

#include <stdexec/execution.hpp>

#include <stdexec/__detail/__parallel_scheduler_default_impl.hpp>

#include <exec/async_scope.hpp>
#include <exec/inline_scheduler.hpp>
#include <exec/static_thread_pool.hpp>
Expand Down