 |
LibraryLink Utilities
3.0.1
Modern C++ wrapper over LibraryLink and WSTP
|
Go to the documentation of this file.
6 #ifndef LLU_PROGRESSMONITOR_H
7 #define LLU_PROGRESSMONITOR_H
58 void set(
double progressValue);
112 static constexpr
double defaultStep = .1;
122 #endif // LLU_PROGRESSMONITOR_H
ProgressMonitor(const ProgressMonitor &)=delete
Copy-constructor is disabled because ProgressMonitor shares a Tensor with WL Kernel.
Tensor< double > SharedTensor
A type to represent a buffer shared between LLU and the Kernel which is used to report progress.
Definition: ProgressMonitor.h:24
ProgressMonitor & operator--()
Decrement current progress value by step.
Definition: ProgressMonitor.cpp:49
Main namespace of LibraryLink Utilities.
Definition: Queue.h:13
double getStep() const
Get current step value.
Definition: ProgressMonitor.cpp:24
ProgressMonitor(ProgressMonitor &&)=default
Default move-constructor.
ProgressMonitor & operator+=(double progress)
Increment current progress value by a given number.
Definition: ProgressMonitor.cpp:44
ProgressMonitor(SharedTensor sharedIndicator, double step=defaultStep)
Construct a new ProgressMonitor.
Definition: ProgressMonitor.cpp:13
ProgressMonitor & operator=(ProgressMonitor &&)=default
Default move-assignment operator.
void setStep(double stepValue)
Change step value to a given number.
Definition: ProgressMonitor.cpp:28
static void checkAbort()
Check whether user requested to abort the computation in WL Kernel.
Definition: ProgressMonitor.cpp:33
ProgressMonitor & operator++()
Increment current progress value by step.
Definition: ProgressMonitor.cpp:39
void set(double progressValue)
Set current progress value.
Definition: ProgressMonitor.cpp:19
static constexpr double getDefaultStep() noexcept
Return default step for the ProgressMonitor.
Definition: ProgressMonitor.h:107
ProgressMonitor & operator-=(double progress)
Decrement current progress value by a given number.
Definition: ProgressMonitor.cpp:54
ProgressMonitor & operator=(const ProgressMonitor &)=delete
Copy-assignment is disabled because ProgressMonitor shares a Tensor with WL Kernel.
Templated C++ wrapper for MTensor.
Stores and updates current progress of computation in a location shared between the library and WL Ke...
Definition: ProgressMonitor.h:21
~ProgressMonitor()=default
Default destructor.
double get() const
Get current value of the progress.
Definition: ProgressMonitor.cpp:15