MLIR 22.0.0git
mlir::TimingScope Class Reference

An RAII-style wrapper around a timer that ensures the timer is properly started and stopped. More...

#include "mlir/Support/Timing.h"

Public Member Functions

 TimingScope ()
 TimingScope (const Timer &other)
 TimingScope (Timer &&other)
 TimingScope (TimingScope &&other)
 ~TimingScope ()
TimingScopeoperator= (TimingScope &&other)
 operator bool () const
 Check if the timing scope actually contains a valid timer.
 TimingScope (const TimingScope &)=delete
TimingScopeoperator= (const TimingScope &)=delete
void stop ()
 Manually stop the timer early.
template<typename... Args>
TimingScope nest (Args... args)
 Create a nested timing scope.
void hide ()
 Hide the timer in timing reports and directly show its children.

Detailed Description

An RAII-style wrapper around a timer that ensures the timer is properly started and stopped.

Definition at line 272 of file Timing.h.

Constructor & Destructor Documentation

◆ TimingScope() [1/5]

mlir::TimingScope::TimingScope ( )
inline

Definition at line 274 of file Timing.h.

Referenced by nest(), operator=(), operator=(), TimingScope(), and TimingScope().

◆ TimingScope() [2/5]

mlir::TimingScope::TimingScope ( const Timer & other)
inline

Definition at line 275 of file Timing.h.

◆ TimingScope() [3/5]

mlir::TimingScope::TimingScope ( Timer && other)
inline

Definition at line 279 of file Timing.h.

◆ TimingScope() [4/5]

mlir::TimingScope::TimingScope ( TimingScope && other)
inline

Definition at line 283 of file Timing.h.

References TimingScope().

◆ ~TimingScope()

mlir::TimingScope::~TimingScope ( )
inline

Definition at line 284 of file Timing.h.

References stop().

◆ TimingScope() [5/5]

mlir::TimingScope::TimingScope ( const TimingScope & )
delete

References TimingScope().

Member Function Documentation

◆ hide()

void mlir::TimingScope::hide ( )
inline

Hide the timer in timing reports and directly show its children.

Definition at line 316 of file Timing.h.

◆ nest()

template<typename... Args>
TimingScope mlir::TimingScope::nest ( Args... args)
inline

Create a nested timing scope.

This returns a new TimingScope with a timer nested within the current scope. In this fashion, the time in this scope may be further subdivided in a more fine-grained fashion.

Definition at line 311 of file Timing.h.

References TimingScope().

Referenced by performActions().

◆ operator bool()

mlir::TimingScope::operator bool ( ) const
inlineexplicit

Check if the timing scope actually contains a valid timer.

Definition at line 293 of file Timing.h.

◆ operator=() [1/2]

TimingScope & mlir::TimingScope::operator= ( const TimingScope & )
delete

References TimingScope().

◆ operator=() [2/2]

TimingScope & mlir::TimingScope::operator= ( TimingScope && other)
inline

Definition at line 286 of file Timing.h.

References stop(), and TimingScope().

◆ stop()

void mlir::TimingScope::stop ( )
inline

Manually stop the timer early.

Definition at line 300 of file Timing.h.

Referenced by operator=(), performActions(), and ~TimingScope().


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