Skip to content

Commit

Permalink
COMP: Remove compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hjmjohnson committed Jan 28, 2025
1 parent 540ee4f commit be8f990
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/PerformanceBenchmarkingInformation.cxx.in
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ PerformanceBenchmarkingInformation ::PerformanceBenchmarkingInformation()
m_InformationInstance = this; // threads need this
m_InformationInstance->UnRegister(); // Remove extra reference

@MAPPING_VALUES@
@MAPPING_VALUES @
}

} // end namespace itk
8 changes: 6 additions & 2 deletions test/itkHighPriorityRealTimeProbeTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,17 @@ itkHighPriorityRealTimeProbeTest(int, char *[])
// time a task
localTimer.Start();

double sum = 0.0;
for (unsigned int i = 0; i < 1e6; ++i)
double sum = 0.0;
constexpr unsigned int big_stopping_criteria = 1e6;
for (unsigned int i = 0; i < big_stopping_criteria; ++i)
{
sum += i;
}

localTimer.Stop();
// Need to use the variable sum to ensure that it is not optimized away.
std::cout << " Time for simple addition summing loop with " << big_stopping_criteria
<< " iterations: " << localTimer.GetMean() << " sum = (" << sum << ")\n";
}

if (!CheckTimeProbe(localTimer))
Expand Down
6 changes: 4 additions & 2 deletions test/itkHighPriorityRealTimeProbesCollectorTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ TestTransformPhysicalPointToIndex(T * image)
for (int i = 0; i < 1000; i++)
{
point3D[0] = static_cast<typename itk::NumericTraits<typename T::PointType>::ValueType>(i);
image->TransformPhysicalPointToIndex(point3D, index3D);
index3D = image->TransformPhysicalPointToIndex(point3D);
}
}
if (k == 5)
std::cout << point3D << std::endl;
{
std::cout << point3D << " at " << index3D << std::endl;
}
}
}
//-------------------------
Expand Down
9 changes: 6 additions & 3 deletions test/itkTimeProbeTest2.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,16 @@ itkTimeProbeTest2(int, char *[])
// time a task
localTimer.Start();

double sum = 0.0;
for (unsigned int i = 0; i < 1e6; ++i)
double sum = 0.0;
constexpr unsigned int big_stopping_criteria = 1e6;
for (unsigned int i = 0; i < big_stopping_criteria; ++i)
{
sum += i;
}

localTimer.Stop();
// Need to use the variable sum to ensure that it is not optimized away.
std::cout << " Time for simple addition summing loop with " << big_stopping_criteria
<< " iterations: " << localTimer.GetMean() << " sum = (" << sum << ")\n";
}

if (!CheckTimeProbe(localTimer))
Expand Down
6 changes: 4 additions & 2 deletions test/itkTimeProbesTest2.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ TestTransformPhysicalPointToIndex(T * image)
for (int i = 0; i < 1000; i++)
{
point3D[0] = static_cast<typename itk::NumericTraits<typename T::PointType>::ValueType>(i);
image->TransformPhysicalPointToIndex(point3D, index3D);
index3D = image->TransformPhysicalPointToIndex(point3D);
}
}
if (k == 5)
std::cout << point3D << std::endl;
{
std::cout << point3D << " at " << index3D << std::endl;
}
}
}
//-------------------------
Expand Down

0 comments on commit be8f990

Please sign in to comment.