Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
uni20::run_context Class Reference

Parser-independent run state. More...

#include <run_context.hpp>

Classes

class  computation_scope
 

Public Member Functions

computation_scope computation ()
 
metadata_document const & finish (run_outcome outcome, metadata_document summary={})
 Freeze the final summary, sampling before its rendering or output flush.
 
bool finished () const
 
std::vector< std::string > const & invocation () const
 
template<typename F >
decltype(auto) measure (F &&function)
 
metadata_document & metadata ()
 
run_context & operator= (run_context const &)=delete
 
presentation::program_info const & program () const
 
 run_context (presentation::program_info program, run_context_options options={})
 
 run_context (run_context const &)=delete
 
metadata_document snapshot () const
 

Detailed Description

Parser-independent run state.

Snapshots own their metadata and remain stable after edits.

Timing uses process CPU and monotonic elapsed time. Computation scopes are non-nested, single-caller intervals; they must include asynchronous completion, not just submission.

Constructor & Destructor Documentation

◆ run_context() [1/2]

uni20::run_context::run_context ( presentation::program_info  program,
run_context_options  options = {} 
)
explicit

◆ run_context() [2/2]

uni20::run_context::run_context ( run_context const &  )
delete

Member Function Documentation

◆ computation()

computation_scope uni20::run_context::computation ( )
inline

◆ finish()

metadata_document const & uni20::run_context::finish ( run_outcome  outcome,
metadata_document  summary = {} 
)

Freeze the final summary, sampling before its rendering or output flush.

The scientific outcome is independent of any subsequent output-session failure.

◆ finished()

bool uni20::run_context::finished ( ) const
inline

◆ invocation()

std::vector< std::string > const & uni20::run_context::invocation ( ) const
inline

◆ measure()

template<typename F >
decltype(auto) uni20::run_context::measure ( F &&  function)
inline

◆ metadata()

metadata_document & uni20::run_context::metadata ( )

◆ operator=()

run_context & uni20::run_context::operator= ( run_context const &  )
delete

◆ program()

presentation::program_info const & uni20::run_context::program ( ) const
inline

◆ snapshot()

metadata_document uni20::run_context::snapshot ( ) const
inline

The documentation for this class was generated from the following files: