class ov::frontend::ProgressReporterExtension

Overview

#include <progress_reporter.hpp>

class ProgressReporterExtension: public ov::Extension
{
public:
    // typedefs

    typedef std::function<void(float, unsigned int, unsigned int)> progress_notifier_callback;

    // construction

    ProgressReporterExtension();
    ProgressReporterExtension(const progress_notifier_callback& callback);
    ProgressReporterExtension(progress_notifier_callback&& callback);

    // methods

    void report_progress(
        float progress,
        unsigned int total_steps,
        unsigned int completed_steps
        ) const;
};

Inherited Members

public:
    // typedefs

    typedef std::shared_ptr<Extension> Ptr;

Detailed Documentation

Typedefs

typedef std::function<void(float, unsigned int, unsigned int)> progress_notifier_callback

A progress reporting callback signature. A FunctionObject that matches this signature should be passed to the constructor of this extension. The extension will then invoke this as a callback each time the progress needs to be reported. The callback itself is responsible for consuming the reported values.

Parameters:

progress

A float value in the range [0.0, 1.0] indicating the total progress of an operation.

total_steps

The total number of steps that a given instance of this extension is tracking

completed_completed

The current number of completed steps (out of the total number of steps to take)

Construction

ProgressReporterExtension()

The default constructor which creates a reporter that doesn’t report progress.

Methods

void report_progress(
    float progress,
    unsigned int total_steps,
    unsigned int completed_steps
    ) const

The main method of this extension used to report the progress. This method forwards its arguments to the callback stored in this class.

Parameters:

progress

A float value in the range [0.0, 1.0] indicating the total progress of an operation.

total_steps

The total number of steps that a given instance of this extension is tracking

completed_steps

The current number of completed steps (out of the total number of steps to take)