| 356 | } |
| 357 | |
| 358 | void operator()(vtkIdType begin, vtkIdType end) |
| 359 | { |
| 360 | if (this->Processor.GetAbort()) |
| 361 | { |
| 362 | return; |
| 363 | } |
| 364 | |
| 365 | ArrayT1& array1Ref = this->Array1; |
| 366 | ArrayT2& array2Ref = this->Array2; |
| 367 | |
| 368 | auto execute = [this, &array1Ref, &array2Ref](vtkIdType id) |
| 369 | { |
| 370 | this->Processor.template Execute<N>( |
| 371 | this->Mapper1.Map(id), array1Ref, this->Mapper2.Map(id), array2Ref); |
| 372 | }; |
| 373 | |
| 374 | if (!this->Ghosts || (this->Ghosts && !this->GhostsToSkip)) |
| 375 | { |
| 376 | for (vtkIdType id = begin; id < end && !this->Processor.GetAbort(); ++id) |
| 377 | { |
| 378 | execute(id); |
| 379 | } |
| 380 | } |
| 381 | else |
| 382 | { |
| 383 | auto ghosts = vtk::DataArrayValueRange<1>(this->Ghosts); |
| 384 | for (vtkIdType id = begin; id < end && !this->Processor.GetAbort(); ++id) |
| 385 | { |
| 386 | if (!(ghosts[this->Mapper1.Map(id)] & this->GhostsToSkip)) |
| 387 | { |
| 388 | execute(id); |
| 389 | } |
| 390 | } |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | ArrayT1&& Array1; |
| 395 | ArrayT2&& Array2; |