Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Cresson Remi
LSGRM
Commits
f98e8f75
Commit
f98e8f75
authored
Oct 30, 2017
by
remi cresson
Browse files
FIX: deals with the (percentMemory>1) case
parent
8adb0e7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/lsgrmController.txx
View file @
f98e8f75
...
...
@@ -331,7 +331,7 @@ void Controller<TSegmenter>::GetAutomaticConfiguration()
// In the following steps, we will optimize tiling layout, starting from a number
// of tiles equal to "minimumNumberOfTiles", up to a number of tiles equal to
//
twice
the number of tiles (that is
memory usage about 50%
)
//
4 times
the number of tiles (that is
double rows/cols
)
unsigned int maximumNumberOfTiles = minimumNumberOfTiles * 4;
// Search for layout which minimizes the criterion
...
...
@@ -364,7 +364,7 @@ void Controller<TSegmenter>::GetAutomaticConfiguration()
tileHeight += 2*maxMargin;
// Memory use efficiency
float percentMemory = tileWidth * tileHeight / (float) maximumNumberOfNodesInMemory; //
]0, 1]
float percentMemory = tileWidth * tileHeight / (float) maximumNumberOfNodesInMemory; //
is > 0. Could be greater than 1 in some cases!
// Compactness
float perimeter = tileWidth + tileHeight;
...
...
@@ -384,7 +384,7 @@ void Controller<TSegmenter>::GetAutomaticConfiguration()
<< " Size (with margin): " << tileWidth << "x" << tileHeight
<< " (margin=" << maxMargin << "/nb. iter=" << maxIter << ")" );
if (criterion < lowestCriterionValue)
if (criterion < lowestCriterionValue
&& percentMemory <= 1.0
)
{
lowestCriterionValue = criterion;
m_NbTilesX = layoutNCol;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment