Skip to content
Merged
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
22 changes: 13 additions & 9 deletions .github/workflows/ci.cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ jobs:
fail-fast: false
matrix:
include:
- { name: "CPU (clang 16, Debug)", build: "Debug", tag: llvm16-cuda12.9, cxxflags: "-stdlib=libc++" }
- { name: "CPU (clang 16, Release)", build: "Release", tag: llvm16-cuda12.9, cxxflags: "-stdlib=libc++" }
- { name: "CPU (clang 16, Release, ASAN)", build: "Release", tag: llvm16-cuda12.9, cxxflags: "-stdlib=libc++ -fsanitize=address -fsanitize-ignorelist=/home/coder/stdexec/sanitizer-ignorelist.txt" }
- { name: "CPU (gcc 11, Debug)", build: "Debug", tag: gcc11-cuda12.9, cxxflags: "", }
- { name: "CPU (gcc 11, Release)", build: "Release", tag: gcc11-cuda12.9, cxxflags: "", }
- { name: "CPU (gcc 11, Release, ASAN)", build: "Release", tag: gcc11-cuda12.9, cxxflags: "-fsanitize=address" }
- { name: "CPU (gcc 12, Release, TSAN)", build: "Release", tag: gcc12-cuda12.9, cxxflags: "-fsanitize=thread" }
- { name: "CPU (gcc 13, Debug)", build: "Release", tag: gcc13-cuda12.9, cxxflags: "", }
- { name: "CPU (gcc 14, Release, LEAK)", build: "Release", tag: gcc14-cuda12.9, cxxflags: "-fsanitize=leak", }
- { name: "CPU (clang 16, Debug)", build: "Debug", tag: llvm16-cuda12.9, cxxstd: "20", cxxflags: "-stdlib=libc++" }
- { name: "CPU (clang 16, Debug, c++23)", build: "Debug", tag: llvm16-cuda12.9, cxxstd: "23", cxxflags: "-stdlib=libc++" }
- { name: "CPU (clang 16, Release)", build: "Release", tag: llvm16-cuda12.9, cxxstd: "20", cxxflags: "-stdlib=libc++" }
- { name: "CPU (clang 16, Release, ASAN)", build: "Release", tag: llvm16-cuda12.9, cxxstd: "20", cxxflags: "-stdlib=libc++ -fsanitize=address -fsanitize-ignorelist=/home/coder/stdexec/sanitizer-ignorelist.txt" }
- { name: "CPU (gcc 11, Debug)", build: "Debug", tag: gcc11-cuda12.9, cxxstd: "20", cxxflags: "", }
- { name: "CPU (gcc 11, Release)", build: "Release", tag: gcc11-cuda12.9, cxxstd: "20", cxxflags: "", }
- { name: "CPU (gcc 11, Release, ASAN)", build: "Release", tag: gcc11-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=address" }
- { name: "CPU (gcc 12, Release, TSAN)", build: "Release", tag: gcc12-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=thread" }
- { name: "CPU (gcc 13, Debug)", build: "Release", tag: gcc13-cuda12.9, cxxstd: "20", cxxflags: "", }
- { name: "CPU (gcc 14, Release, LEAK)", build: "Release", tag: gcc14-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=leak", }
- { name: "CPU (gcc 14, Release, c++23)", build: "Release", tag: gcc14-cuda12.9, cxxstd: "23", cxxflags: "", }
container:
options: -u root
image: rapidsai/devcontainers:26.02-cpp-${{ matrix.tag }}
Expand Down Expand Up @@ -100,6 +102,8 @@ jobs:
-DSTDEXEC_ENABLE_TBB:BOOL=${{ !contains(matrix.cxxflags, '-fsanitize') }} \
-DSTDEXEC_ENABLE_ASIO:BOOL=TRUE \
-DSTDEXEC_ASIO_IMPLEMENTATION:STRING=boost \
-DCMAKE_CXX_STANDARD=${{ matrix.cxxstd }} \
-DCMAKE_CXX_EXTENSIONS=OFF \
;

# Compile
Expand Down
8 changes: 5 additions & 3 deletions include/exec/async_scope.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ namespace experimental::execution

~__future_state_base()
{
[[maybe_unused]]
std::unique_lock __guard{__mutex_};
if (__step_ == __future_step::__created)
{
Expand All @@ -511,11 +512,12 @@ namespace experimental::execution
}
}

constexpr void __step_from_to_(std::unique_lock<std::mutex>& __guard,
__future_step __from,
__future_step __to)
constexpr void __step_from_to_([[maybe_unused]] std::unique_lock<std::mutex>& __guard,
[[maybe_unused]] __future_step __from,
__future_step __to)
{
STDEXEC_ASSERT(__guard.owns_lock());
[[maybe_unused]]
auto actual = std::exchange(__step_, __to);
STDEXEC_ASSERT(actual == __from);
}
Expand Down
11 changes: 7 additions & 4 deletions include/exec/linux/io_uring_context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# include <linux/io_uring.h>

# include "../../stdexec/__detail/__atomic.hpp"
# include "../../stdexec/__detail/__utility.hpp"
# include "../../stdexec/execution.hpp"
# include "../timed_scheduler.hpp"

Expand Down Expand Up @@ -1109,7 +1110,9 @@ namespace experimental::execution
auto secs = std::chrono::duration_cast<std::chrono::seconds>(dur);
dur -= secs;
secs = (std::max) (secs, std::chrono::seconds{0});
dur = std::clamp(dur, std::chrono::nanoseconds{0}, std::chrono::nanoseconds{999'999'999});
dur = STDEXEC::__clamp(dur,
std::chrono::nanoseconds{0},
std::chrono::nanoseconds{999'999'999});
return __kernel_timespec{secs.count(), dur.count()};
}
# else
Expand All @@ -1125,9 +1128,9 @@ namespace experimental::execution
__nsec = std::chrono::nanoseconds{__timerspec.it_value.tv_nsec} + __nsec;
auto __sec = std::chrono::duration_cast<std::chrono::seconds>(__nsec);
__nsec -= __sec;
__nsec = std::clamp(__nsec,
std::chrono::nanoseconds{0},
std::chrono::nanoseconds{999'999'999});
__nsec = STDEXEC::__clamp(__nsec,
std::chrono::nanoseconds{0},
std::chrono::nanoseconds{999'999'999});
__timerspec.it_value.tv_sec += __sec.count();
__timerspec.it_value.tv_nsec = __nsec.count();
STDEXEC_ASSERT(0 <= __timerspec.it_value.tv_nsec
Expand Down
8 changes: 6 additions & 2 deletions include/stdexec/__detail/__any.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
#include <type_traits>
#include <utility>

STDEXEC_PRAGMA_PUSH()
STDEXEC_PRAGMA_IGNORE_GNU("-Wredundant-consteval-if")

namespace STDEXEC::__any
{

Expand Down Expand Up @@ -1698,10 +1701,9 @@ namespace STDEXEC::__any
if (__empty(__other))
{
return;
// NOLINTNEXTLINE(bugprone-branch-clone)
}
else if constexpr (_Other::__root_kind == __root_kind::__reference || !__ptr_convertible)
{
{ // NOLINT(bugprone-branch-clone)
return __other.__slice_to_(*this);
}
else if (__other.__in_situ_())
Expand Down Expand Up @@ -2012,3 +2014,5 @@ namespace STDEXEC::__any
};

} // namespace STDEXEC::__any

STDEXEC_PRAGMA_POP()
2 changes: 1 addition & 1 deletion include/stdexec/__detail/__config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ namespace STDEXEC

#define STDEXEC_ASSERT(_XP) \
do { \
static_assert(noexcept(_XP)); \
/*static_assert(noexcept(_XP));*/ \
STDEXEC_ASSERT_FN(_XP); \
} while (false)

Expand Down
3 changes: 2 additions & 1 deletion include/stdexec/__detail/__task.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ namespace STDEXEC
// promise object. We now use that allocator to deallocate the entire block of
// memory:
size_t const __promise_blocks = __task::__divmod(__bytes, sizeof(__memblock));
void* const __alloc_loc = static_cast<__memblock*>(__ptr) + __promise_blocks;
[[maybe_unused]]
void* const __alloc_loc = static_cast<__memblock*>(__ptr) + __promise_blocks;
// the number of blocks needed to store an object of type __palloc_t:
static constexpr size_t __alloc_blocks =
__task::__divmod(sizeof(__task::__any_alloc<_PAlloc>), sizeof(__task::__memblock));
Expand Down
7 changes: 7 additions & 0 deletions include/stdexec/__detail/__utility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,13 @@ namespace STDEXEC
return static_cast<__copy_cvref_t<_Ty&&, STDEXEC_REMOVE_REFERENCE(_Uy)>>(__uy);
}

template <class _Ty>
constexpr _Ty const & __clamp(_Ty const & v, _Ty const & lo, _Ty const & hi)
{
STDEXEC_ASSERT(!(hi < lo));
return v < lo ? lo : hi < v ? hi : v; // NOLINT(bugprone-return-const-ref-from-parameter)
}

STDEXEC_PRAGMA_PUSH()
STDEXEC_PRAGMA_IGNORE_GNU("-Wold-style-cast")

Expand Down
Loading