Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main Repositories
otb
Commits
c134a480
Commit
c134a480
authored
7 years ago
by
Guillaume Pasero
Browse files
Options
Downloads
Patches
Plain Diff
BUG: #1526: add a per-instance default ram value in StreamingManager
parent
24823227
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!32
Bugfix RAM parameter not used
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Modules/Core/Streaming/include/otbStreamingManager.h
+8
-3
8 additions, 3 deletions
Modules/Core/Streaming/include/otbStreamingManager.h
Modules/Core/Streaming/include/otbStreamingManager.txx
+11
-3
11 additions, 3 deletions
Modules/Core/Streaming/include/otbStreamingManager.txx
with
19 additions
and
6 deletions
Modules/Core/Streaming/include/otbStreamingManager.h
+
8
−
3
View file @
c134a480
...
@@ -88,6 +88,9 @@ public:
...
@@ -88,6 +88,9 @@ public:
* GetNumberOfSplits() returns. */
* GetNumberOfSplits() returns. */
virtual
RegionType
GetSplit
(
unsigned
int
i
);
virtual
RegionType
GetSplit
(
unsigned
int
i
);
itkSetMacro
(
DefaultRAM
,
MemoryPrintType
);
itkGetMacro
(
DefaultRAM
,
MemoryPrintType
);
protected:
protected:
StreamingManager
();
StreamingManager
();
~
StreamingManager
()
ITK_OVERRIDE
;
~
StreamingManager
()
ITK_OVERRIDE
;
...
@@ -111,11 +114,13 @@ private:
...
@@ -111,11 +114,13 @@ private:
StreamingManager
(
const
StreamingManager
&
);
//purposely not implemented
StreamingManager
(
const
StreamingManager
&
);
//purposely not implemented
void
operator
=
(
const
StreamingManager
&
);
//purposely not implemented
void
operator
=
(
const
StreamingManager
&
);
//purposely not implemented
/* Compute the available RAM from configuration settings if the input parameter is 0,
/** Compute the available RAM in Bytes from an input value in MByte.
* otherwise, simply returns the input parameter */
* If the input value is 0, it uses the m_DefaultRAM value.
* If m_DefaultRAM is also 0, it uses the configuration settings */
MemoryPrintType
GetActualAvailableRAMInBytes
(
MemoryPrintType
availableRAMInMB
);
MemoryPrintType
GetActualAvailableRAMInBytes
(
MemoryPrintType
availableRAMInMB
);
/** Default available RAM in MB */
MemoryPrintType
m_DefaultRAM
;
};
};
}
// End namespace otb
}
// End namespace otb
...
...
This diff is collapsed.
Click to expand it.
Modules/Core/Streaming/include/otbStreamingManager.txx
+
11
−
3
View file @
c134a480
...
@@ -31,6 +31,7 @@ namespace otb
...
@@ -31,6 +31,7 @@ namespace otb
template <class TImage>
template <class TImage>
StreamingManager<TImage>::StreamingManager()
StreamingManager<TImage>::StreamingManager()
: m_ComputedNumberOfSplits(0)
: m_ComputedNumberOfSplits(0)
, m_DefaultRAM(0)
{
{
}
}
...
@@ -47,9 +48,16 @@ StreamingManager<TImage>::GetActualAvailableRAMInBytes(MemoryPrintType available
...
@@ -47,9 +48,16 @@ StreamingManager<TImage>::GetActualAvailableRAMInBytes(MemoryPrintType available
if (availableRAMInBytes == 0)
if (availableRAMInBytes == 0)
{
{
otbMsgDevMacro(<< "Retrieving available RAM size from configuration");
if (m_DefaultRAM != 0)
// Retrieve it from the configuration
{
availableRAMInBytes = 1024*1024*ConfigurationManager::GetMaxRAMHint();
availableRAMInBytes = 1024*1024*m_DefaultRAM;
}
else
{
otbMsgDevMacro(<< "Retrieving available RAM size from configuration");
// Retrieve it from the configuration
availableRAMInBytes = 1024*1024*ConfigurationManager::GetMaxRAMHint();
}
}
}
otbMsgDevMacro("RAM used to estimate memory footprint : " << availableRAMInBytes / 1024 / 1024 << " MB")
otbMsgDevMacro("RAM used to estimate memory footprint : " << availableRAMInBytes / 1024 / 1024 << " MB")
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment