OTB
9.0.0
Orfeo Toolbox
|
#include <otbPipelineMemoryPrintCalculator.h>
Public Types | |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef DataObjectType::Pointer | DataObjectPointerType |
typedef itk::DataObject | DataObjectType |
typedef ::itksysFundamentalType_UInt64 | MemoryPrintType |
typedef itk::SmartPointer< Self > | Pointer |
typedef std::set< const ProcessObjectType * > | ProcessObjectPointerSetType |
typedef ProcessObjectType::Pointer | ProcessObjectPointerType |
typedef itk::ProcessObject | ProcessObjectType |
typedef PipelineMemoryPrintCalculator | Self |
typedef itk::Object | Superclass |
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 73 of file otbPipelineMemoryPrintCalculator.h.
typedef itk::SmartPointer<const Self> otb::PipelineMemoryPrintCalculator::ConstPointer |
Definition at line 80 of file otbPipelineMemoryPrintCalculator.h.
typedef DataObjectType::Pointer otb::PipelineMemoryPrintCalculator::DataObjectPointerType |
Definition at line 86 of file otbPipelineMemoryPrintCalculator.h.
typedef itk::DataObject otb::PipelineMemoryPrintCalculator::DataObjectType |
Definition at line 85 of file otbPipelineMemoryPrintCalculator.h.
typedef ::itksysFundamentalType_UInt64 otb::PipelineMemoryPrintCalculator::MemoryPrintType |
Definition at line 88 of file otbPipelineMemoryPrintCalculator.h.
typedef itk::SmartPointer<Self> otb::PipelineMemoryPrintCalculator::Pointer |
Definition at line 79 of file otbPipelineMemoryPrintCalculator.h.
typedef std::set<const ProcessObjectType*> otb::PipelineMemoryPrintCalculator::ProcessObjectPointerSetType |
Definition at line 92 of file otbPipelineMemoryPrintCalculator.h.
typedef ProcessObjectType::Pointer otb::PipelineMemoryPrintCalculator::ProcessObjectPointerType |
Definition at line 84 of file otbPipelineMemoryPrintCalculator.h.
typedef itk::ProcessObject otb::PipelineMemoryPrintCalculator::ProcessObjectType |
Useful typedefs
Definition at line 83 of file otbPipelineMemoryPrintCalculator.h.
Standard class typedefs
Definition at line 77 of file otbPipelineMemoryPrintCalculator.h.
typedef itk::Object otb::PipelineMemoryPrintCalculator::Superclass |
Definition at line 78 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
Referenced by otb::StreamingManager< TInputImage >::EstimateOptimalNumberOfDivisions().
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< TInputImage >::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 120 of file otbPipelineMemoryPrintCalculator.h.
Referenced by otb::StreamingManager< TInputImage >::EstimateOptimalNumberOfDivisions().
|
private |
Bias correction factor
Definition at line 150 of file otbPipelineMemoryPrintCalculator.h.
|
private |
Pointer to the last pipeline filter
Definition at line 147 of file otbPipelineMemoryPrintCalculator.h.
|
private |
The total memory print of the pipeline
Definition at line 144 of file otbPipelineMemoryPrintCalculator.h.
|
private |
Visited ProcessObject set
Definition at line 153 of file otbPipelineMemoryPrintCalculator.h.
|
static |
Const conversion factor
Definition at line 121 of file otbPipelineMemoryPrintCalculator.h.