cuda::experimental::stf::sump::unwind_t#

struct unwind_t#

Forces the exception channel: the error leaves the sink as an exception.

On the exception channel it re-throws the in-flight exception, which coincides with fwd. On the code channel it throws status_traits<S>::to_exception(status, loc) (for CUDA statuses a cuda_exception); with exceptions disabled that throw reports and aborts. It never returns, so unwind & p is rejected like abort & p. The polling idiom if_equal(cudaErrorNotReady)(noop) | unwind yields the not-ready code and throws on anything else.

Public Functions

template<class _Fn>
inline nullval on_thrown(
const ::std::exception*,
const ::cuda::std::source_location,
_Fn&
) const#
template<class _Status, class _Fn>
inline nullval on_returned(
const _Status __status,
const ::cuda::std::source_location __loc,
_Fn&
) const#

The code-channel hook: throws the exception the status’s traits build.