Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
uni20::linalg::dispatch_diagnostics Namespace Reference

Classes

struct  event
 Structured result of one ordered kernel-dispatch walk. More...
 
class  scoped_sink
 Temporarily replace the diagnostic sink and restore it on destruction. More...
 

Typedefs

using sink = std::function< void(event const &)>
 Callable receiving structured dispatch events after backend walks.
 

Functions

sink current_sink ()
 Return a copy of the active diagnostic sink.
 
bool enabled () noexcept
 Return whether runtime kernel-dispatch diagnostics are enabled.
 
void reset_sink ()
 Disable runtime kernel-dispatch diagnostics.
 
void set_sink (sink replacement)
 Replace the process-wide kernel-dispatch diagnostic sink.
 

Typedef Documentation

◆ sink

using uni20::linalg::dispatch_diagnostics::sink = typedef std::function<void(event const&)>

Callable receiving structured dispatch events after backend walks.

Function Documentation

◆ current_sink()

sink uni20::linalg::dispatch_diagnostics::current_sink ( )

Return a copy of the active diagnostic sink.

◆ enabled()

bool uni20::linalg::dispatch_diagnostics::enabled ( )
inlinenoexcept

Return whether runtime kernel-dispatch diagnostics are enabled.

Disabled dispatches pay one relaxed atomic flag check and do not construct diagnostic records, allocate, lock, or invoke a sink.

◆ reset_sink()

void uni20::linalg::dispatch_diagnostics::reset_sink ( )

Disable runtime kernel-dispatch diagnostics.

◆ set_sink()

void uni20::linalg::dispatch_diagnostics::set_sink ( sink  replacement)

Replace the process-wide kernel-dispatch diagnostic sink.

Passing an empty callable disables diagnostics.