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
007de87e
Commit
007de87e
authored
8 years ago
by
Rashad Kanavath
Browse files
Options
Downloads
Patches
Plain Diff
COMP: hide -Wshadow warning from vrtdataset.h
parent
fe1ce99c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Modules/MPI/MPIVrtWriter/include/otbMPIVrtWriter.h
+16
-9
16 additions, 9 deletions
Modules/MPI/MPIVrtWriter/include/otbMPIVrtWriter.h
with
16 additions
and
9 deletions
Modules/MPI/MPIVrtWriter/include/otbMPIVrtWriter.h
+
16
−
9
View file @
007de87e
...
...
@@ -30,15 +30,23 @@
#include
<gdal.h>
#include
<gdal_priv.h>
#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wshadow"
#include
<vrtdataset.h>
# pragma GCC diagnostic pop
#else
#include
<vrtdataset.h>
#endif
#include
<ogr_spatialref.h>
namespace
otb
{
/**
*\brief Write image data to multiple files with MPI processus and add a VRT file.
*
* The image is divided into several pieces.
*
* The image is divided into several pieces.
* Each pieces is distributed to a MPI processus.
* Each MPI processus write their pieces into a separate
* file.
...
...
@@ -49,13 +57,13 @@ namespace otb {
*\param availableRAM Available memory for streaming
*\param writeVRTFile Activate the VRT file writing
*/
template
<
typename
TImage
>
void
WriteMPI
(
TImage
*
img
,
const
std
::
string
&
output
,
unsigned
int
availableRAM
=
0
,
bool
writeVRTFile
=
true
)
template
<
typename
TImage
>
void
WriteMPI
(
TImage
*
img
,
const
std
::
string
&
output
,
unsigned
int
availableRAM
=
0
,
bool
writeVRTFile
=
true
)
{
typename
otb
::
MPIConfig
::
Pointer
mpiConfig
=
otb
::
MPIConfig
::
Instance
();
unsigned
int
myRank
=
mpiConfig
->
GetMyRank
();
unsigned
int
nbProcs
=
mpiConfig
->
GetNbProcs
();
typedef
otb
::
ImageFileWriter
<
TImage
>
WriterType
;
typedef
otb
::
NumberOfDivisionsTiledStreamingManager
<
TImage
>
StreamingManagerType
;
typedef
itk
::
RegionOfInterestImageFilter
<
TImage
,
TImage
>
ExtractFilterType
;
...
...
@@ -107,7 +115,7 @@ template <typename TImage> void WriteMPI(TImage *img, const std::string &output,
joins
.
push_back
(
itksys
::
SystemTools
::
GetFilenamePath
(
output
).
append
(
"/"
));
joins
.
push_back
(
itksys
::
SystemTools
::
GetFilenameWithoutExtension
(
output
));
std
::
string
prefix
=
itksys
::
SystemTools
::
JoinPath
(
joins
);
// Data type
std
::
string
dataTypeStr
=
"Float32"
;
...
...
@@ -142,7 +150,7 @@ template <typename TImage> void WriteMPI(TImage *img, const std::string &output,
{
writer
->
SetAutomaticAdaptativeStreaming
(
availableRAM
);
}
// Pipeline execution
try
{
...
...
@@ -161,7 +169,7 @@ template <typename TImage> void WriteMPI(TImage *img, const std::string &output,
mpiConfig
->
barrier
();
// Write VRT file
try
try
{
if
(
writeVRTFile
&&
(
myRank
==
0
))
{
...
...
@@ -242,7 +250,7 @@ template <typename TImage> void WriteMPI(TImage *img, const std::string &output,
tileIndexY
,
//yOffDest
tileSizeX
,
//xSizeDest
tileSizeY
,
//ySizeDest
"near"
,
"near"
,
VRT_NODATA_UNSET
);
}
...
...
@@ -265,4 +273,3 @@ template <typename TImage> void WriteMPI(TImage *img, const std::string &output,
}
// End namespace otb
#endif //__otbMPIVrtWriter_h
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