Open3D (C++ API)  0.20.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Static Protected Attributes
open3d::utility::ProgressBar Class Reference

#include <ProgressBar.h>

Public Member Functions

 ProgressBar (std::size_t expected_count, std::string progress_info, bool active=false)
 
 ProgressBar (const ProgressBar &other)
 
ProgressBaroperator= (const ProgressBar &other)
 
void Reset (std::size_t expected_count, std::string progress_info, bool active)
 
ProgressBaroperator++ ()
 
virtual ProgressBaroperator+= (std::size_t n)
 
void SetCurrentCount (size_t n)
 
void UpdateBar ()
 
std::size_t GetCurrentCount () const
 
virtual ~ProgressBar ()=default
 

Protected Attributes

std::size_t expected_count_
 
std::atomic< std::size_t > current_count_ {0}
 
std::string progress_info_
 
std::atomic< std::size_t > progress_pixel_ {0}
 
bool active_
 
std::atomic< bool > finalized_ {false}
 

Static Protected Attributes

static constexpr size_t resolution_ = 40
 

Detailed Description

Thread-safe progress bar. Progress updates use relaxed atomics, so callers do not need to hold a mutex while incrementing it from parallel work.

Constructor & Destructor Documentation

◆ ProgressBar() [1/2]

open3d::utility::ProgressBar::ProgressBar ( std::size_t  expected_count,
std::string  progress_info,
bool  active = false 
)

◆ ProgressBar() [2/2]

open3d::utility::ProgressBar::ProgressBar ( const ProgressBar other)

◆ ~ProgressBar()

virtual open3d::utility::ProgressBar::~ProgressBar ( )
virtualdefault

Member Function Documentation

◆ GetCurrentCount()

std::size_t open3d::utility::ProgressBar::GetCurrentCount ( ) const

◆ operator++()

ProgressBar & open3d::utility::ProgressBar::operator++ ( )
inline

◆ operator+=()

ProgressBar & open3d::utility::ProgressBar::operator+= ( std::size_t  n)
virtual

◆ operator=()

ProgressBar & open3d::utility::ProgressBar::operator= ( const ProgressBar other)

◆ Reset()

void open3d::utility::ProgressBar::Reset ( std::size_t  expected_count,
std::string  progress_info,
bool  active 
)

◆ SetCurrentCount()

void open3d::utility::ProgressBar::SetCurrentCount ( size_t  n)

◆ UpdateBar()

void open3d::utility::ProgressBar::UpdateBar ( )

Field Documentation

◆ active_

bool open3d::utility::ProgressBar::active_
protected

◆ current_count_

std::atomic<std::size_t> open3d::utility::ProgressBar::current_count_ {0}
protected

◆ expected_count_

std::size_t open3d::utility::ProgressBar::expected_count_
protected

◆ finalized_

std::atomic<bool> open3d::utility::ProgressBar::finalized_ {false}
protected

◆ progress_info_

std::string open3d::utility::ProgressBar::progress_info_
protected

◆ progress_pixel_

std::atomic<std::size_t> open3d::utility::ProgressBar::progress_pixel_ {0}
protected

◆ resolution_

constexpr size_t open3d::utility::ProgressBar::resolution_ = 40
staticconstexprprotected

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