Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMP: Fix warning in PointSetToPointSetMetricv4 #1820

Merged
merged 2 commits into from
May 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputation

PointIdentifierRanges ranges = this->CreateRanges();
std::vector<CompensatedSummation<MeasureType>> threadValues(ranges.size());
std::function<void(unsigned int)> sumNeighborhoodValues =
[this, &threadValues, &ranges, &virtualTransformedPointSet, &fixedTransformedPointSet](unsigned int rangeIndex) {
std::function<void(SizeValueType)> sumNeighborhoodValues =
[this, &threadValues, &ranges, &virtualTransformedPointSet, &fixedTransformedPointSet](SizeValueType rangeIndex) {
CompensatedSummation<MeasureType> threadValue = 0;
PixelType pixel;
NumericTraits<PixelType>::SetLength(pixel, 1);
Expand All @@ -210,7 +210,7 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputation

// Sum per thread
MultiThreaderBase::New()->ParallelizeArray(
(PointIdentifier)0, (PointIdentifier)ranges.size(), sumNeighborhoodValues, nullptr);
(SizeValueType)0, (SizeValueType)ranges.size(), sumNeighborhoodValues, nullptr);
// Join sums
CompensatedSummation<MeasureType> value = 0;
for (unsigned int i = 0; i < threadValues.size(); i++)
Expand Down Expand Up @@ -281,9 +281,9 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputation
std::vector<CompensatedSummation<MeasureType>> threadValues(ranges.size());
using CompensatedDerivative = typename std::vector<CompensatedSummation<ParametersValueType>>;
std::vector<CompensatedDerivative> threadDerivatives(ranges.size());
std::function<void(unsigned int)> sumNeighborhoodValues =
std::function<void(SizeValueType)> sumNeighborhoodValues =
[this, &derivative, &threadDerivatives, &threadValues, &ranges, &calculateValue, &numberOfLocalParameters](
unsigned int rangeIndex) {
SizeValueType rangeIndex) {
// Use STL container to make sure no unesecarry checks are performed
using FixedTransformedVectorContainer = typename FixedPointsContainer::STLContainerType;
using VirtualPointsContainer = typename VirtualPointSetType::PointsContainer;
Expand Down Expand Up @@ -386,7 +386,7 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputation

// Sum per thread
MultiThreaderBase::New()->ParallelizeArray(
(PointIdentifier)0, (PointIdentifier)ranges.size(), sumNeighborhoodValues, nullptr);
(SizeValueType)0, (SizeValueType)ranges.size(), sumNeighborhoodValues, nullptr);

// Sum thread results
CompensatedSummation<MeasureType> value = 0;
Expand Down