![]() |
OTB
10.0.0
Orfeo Toolbox
|
#include <otbPipelineMemoryPrintCalculator.h>
Public Types | |
using | ConstPointer = itk::SmartPointer< const Self > |
using | DataObjectPointerType = DataObjectType::Pointer |
using | DataObjectType = itk::DataObject |
using | MemoryPrintType = std::uint64_t |
using | Pointer = itk::SmartPointer< Self > |
using | ProcessObjectPointerSetType = std::set< const ProcessObjectType * > |
using | ProcessObjectPointerType = ProcessObjectType::Pointer |
using | ProcessObjectType = itk::ProcessObject |
using | Self = PipelineMemoryPrintCalculator |
using | Superclass = itk::Object |
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual MemoryPrintType | GetMemoryPrint () |
virtual const char * | GetNameOfClass () const |
Static Public Member Functions | |
static Pointer | New () |
static const double | ByteToMegabyte |
static const double | MegabyteToByte |
MemoryPrintType | m_MemoryPrint |
DataObjectPointerType | m_DataToWrite |
double | m_BiasCorrectionFactor |
ProcessObjectPointerSetType | m_VisitedProcessObjects |
virtual void | SetBiasCorrectionFactor (double _arg) |
virtual double | GetBiasCorrectionFactor () |
virtual void | SetDataToWrite (DataObjectType *_arg) |
void | Compute (bool propagate=true) |
MemoryPrintType | EvaluateDataObjectPrint (DataObjectType *data) |
static unsigned long | EstimateOptimalNumberOfStreamDivisions (MemoryPrintType memoryPrint, MemoryPrintType availableMemory) |
PipelineMemoryPrintCalculator () | |
~PipelineMemoryPrintCalculator () override | |
void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
MemoryPrintType | EvaluateProcessObjectPrintRecursive (ProcessObjectType *process) |
PipelineMemoryPrintCalculator (const Self &)=delete | |
void | operator= (const Self &)=delete |
Estimate pipeline memory usage and optimal stream divisions.
This class allows estimating the memory usage of a given pipeline by tracing back pipeline from a given data (in general, this data should be set to the data to write) and examining each filter to determine its memory footprint. To do so, it performs a dry run of the requested region pipeline negotiation.
The SetDataToWrite() method allows setting the data candidate for writing, and for which memory usage estimation should be performed.
Additionally, this class allows computing the optimal number of stream division to write the data. To do so, the available memory can be set via the SetAvailableMemory() method, and an optional bias correction factor can be applied to weight the estimate memory usage in case a bias occurs between estimated and real memory usage. The optimal number of stream divisions can be retrieved using the GetOptimalNumberOfStreamDivisions().
Please note that for now this calculator suffers from the following limitations:
Definition at line 68 of file otbPipelineMemoryPrintCalculator.h.
using otb::PipelineMemoryPrintCalculator::ConstPointer = itk::SmartPointer<const Self> |
Definition at line 75 of file otbPipelineMemoryPrintCalculator.h.
using otb::PipelineMemoryPrintCalculator::DataObjectPointerType = DataObjectType::Pointer |
Definition at line 81 of file otbPipelineMemoryPrintCalculator.h.
using otb::PipelineMemoryPrintCalculator::DataObjectType = itk::DataObject |
Definition at line 80 of file otbPipelineMemoryPrintCalculator.h.
using otb::PipelineMemoryPrintCalculator::MemoryPrintType = std::uint64_t |
Definition at line 82 of file otbPipelineMemoryPrintCalculator.h.
using otb::PipelineMemoryPrintCalculator::Pointer = itk::SmartPointer<Self> |
Definition at line 74 of file otbPipelineMemoryPrintCalculator.h.
using otb::PipelineMemoryPrintCalculator::ProcessObjectPointerSetType = std::set<const ProcessObjectType*> |
Definition at line 83 of file otbPipelineMemoryPrintCalculator.h.
using otb::PipelineMemoryPrintCalculator::ProcessObjectPointerType = ProcessObjectType::Pointer |
Definition at line 79 of file otbPipelineMemoryPrintCalculator.h.
using otb::PipelineMemoryPrintCalculator::ProcessObjectType = itk::ProcessObject |
Useful typedefs
Definition at line 78 of file otbPipelineMemoryPrintCalculator.h.
Standard class typedefs
Definition at line 72 of file otbPipelineMemoryPrintCalculator.h.
using otb::PipelineMemoryPrintCalculator::Superclass = itk::Object |
Definition at line 73 of file otbPipelineMemoryPrintCalculator.h.
|
protected |
Constructor
|
overrideprotected |
Destructor
|
privatedelete |
Const conversion factor
void otb::PipelineMemoryPrintCalculator::Compute | ( | bool | propagate = true | ) |
Compute pipeline memory print
virtual::itk::LightObject::Pointer otb::PipelineMemoryPrintCalculator::CreateAnother | ( | void | ) | const |
|
static |
Get the optimal number of stream division
MemoryPrintType otb::PipelineMemoryPrintCalculator::EvaluateDataObjectPrint | ( | DataObjectType * | data | ) |
Evaluate the print (in bytes) of a single data object
|
protected |
Recursive method to evaluate memory print in bytes
|
virtual |
Const conversion factor
|
virtual |
Get the total memory print (in bytes)
|
virtual |
Run-time type information (and related methods).
|
static |
Method for creation through the object factory.
Referenced by otb::StreamingManager< TImage >::EstimateOptimalNumberOfDivisions().
|
privatedelete |
Const conversion factor
|
overrideprotected |
PrintSelf method
|
virtual |
Set/Get the bias correction factor which will weight the estimated memory print (allows compensating bias between estimated and real memory print, default is 1., i.e. no correction)
|
virtual |
Set last pipeline filter
|
static |
Const conversion factor
Definition at line 111 of file otbPipelineMemoryPrintCalculator.h.
|
private |
Bias correction factor
Definition at line 141 of file otbPipelineMemoryPrintCalculator.h.
|
private |
Pointer to the last pipeline filter
Definition at line 138 of file otbPipelineMemoryPrintCalculator.h.
|
private |
The total memory print of the pipeline
Definition at line 135 of file otbPipelineMemoryPrintCalculator.h.
|
private |
Visited ProcessObject set
Definition at line 144 of file otbPipelineMemoryPrintCalculator.h.
|
static |
Const conversion factor
Definition at line 112 of file otbPipelineMemoryPrintCalculator.h.