1 #ifndef FWCore_Concurrency_chain_first_h 2 #define FWCore_Concurrency_chain_first_h 27 #include <type_traits> 38 template <
class,
class =
void>
43 std::void_t<decltype(std::declval<T&>()(
44 static_cast<std::exception_ptr const*>(nullptr), edm::WaitingTaskHolder()))>>
56 h.doneWaiting(std::current_exception());
65 template <
typename E,
typename F>
75 h.doneWaiting(std::current_exception());
101 template <
typename...
T>
104 template <
typename F>
107 template <
typename F>
111 template <
typename...
T>
120 template <
typename F>
124 template <
typename...
T>
136 template <
typename...
T>
148 template <
typename...
T>
157 template <
typename U>
171 template <
typename V>
180 template <
typename U,
typename...
T>
183 : l_(
std::
move(iL)), f_{std::forward<U>(iU)} {}
201 template <
typename V>
211 template <
typename U,
typename...
T>
214 : l_(
std::
move(iL)), f_{std::forward<U>(iU)}, condition_(iCondition) {}
217 : l_(
std::
move(iL)), f_{std::move<U>(iC.f_)}, condition_(iC.condition_) {}
227 return l_.lastTask(iV);
242 template <
typename V>
254 namespace waiting_task::chain {
259 template <
typename F>
263 return WaitingTaskChain<F>(std::forward<F>(iF));
265 return WaitingTaskChain<AutoExceptionHandler<F>>(AutoExceptionHandler<F>(std::forward<F>(iF)));
276 template <
typename O>
280 return ThenAdaptor<O>(std::forward<O>(iO));
282 return ThenAdaptor<AutoExceptionHandler<O>>(AutoExceptionHandler<O>(std::forward<O>(iO)));
287 template <
typename O>
291 return ConditionalAdaptor<O>(iValue, std::forward<O>(iO));
293 return ConditionalAdaptor<AutoExceptionHandler<O>>(iValue, AutoExceptionHandler<O>(std::forward<O>(iO)));
306 template <
typename E>
void runLast(WaitingTaskHolder iV)
WaitingTaskHolder lastTask(WaitingTaskHolder iV)
constexpr WaitingTaskChain(U &&iU)
AutoExceptionHandler(F &&iF)
constexpr WaitingTaskChain(U &&iU, WaitingTaskChain< T... > iL)
constexpr ThenAdaptor(F &&iF)
WaitingTaskChain< T... > l_
constexpr auto first(F &&iF)
WaitingTaskHolder lastTask(WaitingTaskHolder iV)
constexpr auto then(O &&iO)
edm::WaitingTaskHolder task_
oneapi::tbb::task_group * group() const noexcept
ExplicitExceptionHandler(E &&iE, F &&iF)
WaitingTaskChain< T... > l_
friend auto operator|(WaitingTaskChain< U, T... > iChain, V &&iV)
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t V
auto runLast(edm::WaitingTaskHolder iTask)
constexpr auto pipe(WaitingTaskChain< T... > &&iChain)
constexpr void pipe(WaitingTaskChain< T... > &&iChain)
FunctorWaitingTask< F > * make_waiting_task(F f)
constexpr WaitingTaskChain(Conditional< U > iC, WaitingTaskChain< T... > iL)
constexpr auto ifThen(bool iValue, O &&iO)
Only runs this task if the condition (which is known at the call time) is true. If false...
friend auto operator|(WaitingTaskChain< Conditional< U >, T... > iChain, V &&iV)
WaitingTaskHolder lastTask(WaitingTaskHolder iV)
void runLast(WaitingTaskHolder iV)
void operator()(std::exception_ptr const *iPtr, edm::WaitingTaskHolder h) noexcept
constexpr auto ifException(E &&iE)
void runLast(WaitingTaskHolder iH)
constexpr IfExceptionAdapter(E &&iE)
constexpr WaitingTaskChain(bool iCondition, U &&iU, WaitingTaskChain< T... > iL)
edm::WaitingTaskHolder task_
constexpr auto pipe(WaitingTaskChain< T... > iChain)
constexpr auto else_(F &&iF)
friend auto operator|(WaitingTaskChain< U > iChain, V &&iV)
constexpr ConditionalAdaptor(bool iCond, F &&iF)
auto lastTask(edm::WaitingTaskHolder iTask)
void operator()(std::exception_ptr const *iPtr, edm::WaitingTaskHolder h) noexcept
RunLastAdaptor(edm::WaitingTaskHolder iT)
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
LastTaskAdaptor(edm::WaitingTaskHolder iT)
constexpr auto pipe(WaitingTaskChain< T... > iChain)