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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
David Youssefi
otb
Commits
5806e71f
Commit
5806e71f
authored
14 years ago
by
Emmanuel Christophe
Browse files
Options
Downloads
Patches
Plain Diff
STYLE: remove french
parent
288705e6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Common/otbPipelineMemoryPrintCalculator.cxx
+24
-28
24 additions, 28 deletions
Code/Common/otbPipelineMemoryPrintCalculator.cxx
Code/Common/otbPipelineMemoryPrintCalculator.h
+2
-2
2 additions, 2 deletions
Code/Common/otbPipelineMemoryPrintCalculator.h
with
26 additions
and
30 deletions
Code/Common/otbPipelineMemoryPrintCalculator.cxx
+
24
−
28
View file @
5806e71f
...
...
@@ -19,7 +19,7 @@
namespace
otb
{
const
double
PipelineMemoryPrintCalculator
::
Oc
te
t
ToMega
Oc
te
t
=
1.
/
vcl_pow
(
2.0
,
20
);
const
double
PipelineMemoryPrintCalculator
::
By
teToMega
by
te
=
1.
/
vcl_pow
(
2.0
,
20
);
PipelineMemoryPrintCalculator
::
PipelineMemoryPrintCalculator
()
...
...
@@ -30,10 +30,6 @@ PipelineMemoryPrintCalculator
m_BiasCorrectionFactor
(
1.
)
{}
PipelineMemoryPrintCalculator
::~
PipelineMemoryPrintCalculator
()
{}
void
PipelineMemoryPrintCalculator
::
PrintSelf
(
std
::
ostream
&
os
,
itk
::
Indent
indent
)
const
...
...
@@ -74,7 +70,7 @@ PipelineMemoryPrintCalculator
}
// Apply bias correction factor
m_MemoryPrint
*=
m_BiasCorrectionFactor
;
m_MemoryPrint
*=
m_BiasCorrectionFactor
;
// Compute the optimal number of stream division
m_OptimalNumberOfStreamDivisions
=
vcl_ceil
(
m_MemoryPrint
...
...
@@ -91,7 +87,7 @@ PipelineMemoryPrintCalculator
// Retrieve the array of inputs
ProcessObjectType
::
DataObjectPointerArray
inputs
=
process
->
GetInputs
();
// First, recurse on each input source
for
(
unsigned
int
i
=
0
;
i
<
process
->
GetNumberOfInputs
();
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
process
->
GetNumberOfInputs
();
++
i
)
{
// Retrieve the data object
DataObjectType
*
input
=
inputs
[
i
];
...
...
@@ -114,7 +110,7 @@ PipelineMemoryPrintCalculator
ProcessObjectType
::
DataObjectPointerArray
outputs
=
process
->
GetOutputs
();
// Now, evaluate the current object print
for
(
unsigned
int
i
=
0
;
i
<
process
->
GetNumberOfOutputs
();
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
process
->
GetNumberOfOutputs
();
++
i
)
{
double
localPrint
=
this
->
EvaluateDataObjectPrint
(
outputs
[
0
]);
print
+=
localPrint
;
...
...
@@ -134,35 +130,35 @@ PipelineMemoryPrintCalculator
{ \
itk::Image<type,2> * image = dynamic_cast<itk::Image<type,2> *>(data); \
return image->GetRequestedRegion().GetNumberOfPixels() \
* image->GetNumberOfComponentsPerPixel() * sizeof(type) *
Oc
te
t
ToMega
Oc
te
t
; \
* image->GetNumberOfComponentsPerPixel() * sizeof(type) *
By
teToMega
by
te; \
} \
if(dynamic_cast<itk::VectorImage<type,2> * >(data) != NULL) \
{ \
itk::VectorImage<type,2> * image = dynamic_cast<itk::VectorImage<type,2> *>(data); \
return image->GetRequestedRegion().GetNumberOfPixels() \
* image->GetNumberOfComponentsPerPixel() * sizeof(type) *
Oc
te
t
ToMega
Oc
te
t
; \
* image->GetNumberOfComponentsPerPixel() * sizeof(type) *
By
teToMega
by
te; \
} \
// Call the macro for each pixel type
OTB_IMAGE_SIZE_BLOCK
(
unsigned
char
)
OTB_IMAGE_SIZE_BLOCK
(
char
)
OTB_IMAGE_SIZE_BLOCK
(
unsigned
short
)
OTB_IMAGE_SIZE_BLOCK
(
short
)
OTB_IMAGE_SIZE_BLOCK
(
unsigned
int
)
OTB_IMAGE_SIZE_BLOCK
(
int
)
OTB_IMAGE_SIZE_BLOCK
(
unsigned
long
)
OTB_IMAGE_SIZE_BLOCK
(
long
)
OTB_IMAGE_SIZE_BLOCK
(
float
)
OTB_IMAGE_SIZE_BLOCK
(
double
)
OTB_IMAGE_SIZE_BLOCK
(
std
::
complex
<
float
>
)
OTB_IMAGE_SIZE_BLOCK
(
std
::
complex
<
double
>
)
typedef
itk
::
FixedArray
<
float
,
2
>
FloatFixedArray2Type
;
typedef
itk
::
FixedArray
<
float
,
2
>
DoubleFixedArray2Type
;
OTB_IMAGE_SIZE_BLOCK
(
FloatFixedArray2Type
)
OTB_IMAGE_SIZE_BLOCK
(
DoubleFixedArray2Type
)
// If we are still here, none of the macro call succeed
return
0
;
OTB_IMAGE_SIZE_BLOCK
(
char
)
OTB_IMAGE_SIZE_BLOCK
(
unsigned
short
)
OTB_IMAGE_SIZE_BLOCK
(
short
)
OTB_IMAGE_SIZE_BLOCK
(
unsigned
int
)
OTB_IMAGE_SIZE_BLOCK
(
int
)
OTB_IMAGE_SIZE_BLOCK
(
unsigned
long
)
OTB_IMAGE_SIZE_BLOCK
(
long
)
OTB_IMAGE_SIZE_BLOCK
(
float
)
OTB_IMAGE_SIZE_BLOCK
(
double
)
OTB_IMAGE_SIZE_BLOCK
(
std
::
complex
<
float
>
)
OTB_IMAGE_SIZE_BLOCK
(
std
::
complex
<
double
>
)
typedef
itk
::
FixedArray
<
float
,
2
>
FloatFixedArray2Type
;
typedef
itk
::
FixedArray
<
float
,
2
>
DoubleFixedArray2Type
;
OTB_IMAGE_SIZE_BLOCK
(
FloatFixedArray2Type
)
OTB_IMAGE_SIZE_BLOCK
(
DoubleFixedArray2Type
)
// If we are still here, none of the macro call succeed
return
0
;
}
}
// End namespace otb
This diff is collapsed.
Click to expand it.
Code/Common/otbPipelineMemoryPrintCalculator.h
+
2
−
2
View file @
5806e71f
...
...
@@ -67,7 +67,7 @@ class ITK_EXPORT PipelineMemoryPrintCalculator :
public:
/** Standard class typedefs */
typedef
PipelineMemoryPrintCalculator
Self
;
typedef
itk
::
Object
Superclass
;
typedef
itk
::
Object
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
...
...
@@ -111,7 +111,7 @@ protected:
PipelineMemoryPrintCalculator
();
/** Destructor */
virtual
~
PipelineMemoryPrintCalculator
();
virtual
~
PipelineMemoryPrintCalculator
()
{}
;
/** PrintSelf method */
void
PrintSelf
(
std
::
ostream
&
os
,
itk
::
Indent
indent
)
const
;
...
...
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