Skip to content

Commit f349aca

Browse files
committed
Use explicit counter type to prevent templated lambda
1 parent 917fe3a commit f349aca

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/pbat/sim/vbd/Integrator.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void Integrator::Step(Scalar dt, Index iterations, Index substeps, Scalar rho)
3131
// Store previous positions
3232
data.xt = data.x;
3333
// Compute inertial target positions
34-
tbb::parallel_for(IndexType(0), nVertices, [&](auto i) {
34+
tbb::parallel_for(IndexType(0), nVertices, [&](IndexType i) {
3535
auto xtilde = kernels::InertialTarget(
3636
FromEigen(data.xt.col(i).head<3>()),
3737
FromEigen(data.v.col(i).head<3>()),
@@ -41,7 +41,7 @@ void Integrator::Step(Scalar dt, Index iterations, Index substeps, Scalar rho)
4141
data.xtilde.col(i) = ToEigen(xtilde);
4242
});
4343
// Initialize block coordinate descent's, i.e. BCD's, solution
44-
tbb::parallel_for(IndexType(0), nVertices, [&](auto i) {
44+
tbb::parallel_for(IndexType(0), nVertices, [&](IndexType i) {
4545
auto x = kernels::InitialPositionsForSolve(
4646
FromEigen(data.xt.col(i).head<3>()),
4747
FromEigen(data.vt.col(i).head<3>()),
@@ -64,7 +64,7 @@ void Integrator::Step(Scalar dt, Index iterations, Index substeps, Scalar rho)
6464
for (auto const& partition : data.partitions)
6565
{
6666
auto const nVerticesInPartition = static_cast<std::size_t>(partition.size());
67-
tbb::parallel_for(std::size_t(0), nVerticesInPartition, [&](auto v) {
67+
tbb::parallel_for(std::size_t(0), nVerticesInPartition, [&](IndexType v) {
6868
auto i = partition[v];
6969
auto begin = data.GVGp[i];
7070
auto end = data.GVGp[i + 1];
@@ -104,7 +104,7 @@ void Integrator::Step(Scalar dt, Index iterations, Index substeps, Scalar rho)
104104

105105
if (bUseChebyshevAcceleration)
106106
{
107-
tbb::parallel_for(IndexType(0), nVertices, [&](auto i) {
107+
tbb::parallel_for(IndexType(0), nVertices, [&](IndexType i) {
108108
auto xkm2eig = data.xchebm2.col(i).head<3>();
109109
auto xkm1eig = data.xchebm1.col(i).head<3>();
110110
auto xkeig = data.x.col(i).head<3>();
@@ -117,7 +117,7 @@ void Integrator::Step(Scalar dt, Index iterations, Index substeps, Scalar rho)
117117
}
118118
// Update velocity
119119
data.vt = data.v;
120-
tbb::parallel_for(IndexType(0), nVertices, [&](auto i) {
120+
tbb::parallel_for(IndexType(0), nVertices, [&](IndexType i) {
121121
auto v = kernels::IntegrateVelocity(
122122
FromEigen(data.xt.col(i).head<3>()),
123123
FromEigen(data.x.col(i).head<3>()),

0 commit comments

Comments
 (0)