| 1000 | //---------------------------------------------------------------------------- |
| 1001 | template <class ArrayMapperT> |
| 1002 | bool TestAbstractArray(vtkAbstractArray* array1, vtkAbstractArray* array2, ArrayMapperT&& mapper, |
| 1003 | double toleranceFactor, vtkUnsignedCharArray* ghosts = nullptr, unsigned char ghostsToSkip = 0) |
| 1004 | { |
| 1005 | std::atomic_bool success{ true }; |
| 1006 | |
| 1007 | auto decider = [&success](bool equals, vtkIdType id1, vtkIdType id2) |
| 1008 | { |
| 1009 | if (!equals) |
| 1010 | { |
| 1011 | vtkLog(ERROR, "Tuples mapped at id " << id1 << " and " << id2 << " do not match."); |
| 1012 | success.store(false, std::memory_order_release); |
| 1013 | } |
| 1014 | }; |
| 1015 | |
| 1016 | auto aborter = [&success] { return !success.load(std::memory_order_relaxed); }; |
| 1017 | |
| 1018 | DispatchArrays<SMPLauncher>(array1, array2, IdentityMapper(mapper.Size), |
| 1019 | std::forward<ArrayMapperT>(mapper), |
| 1020 | MakeVectorMatchingProcessor(toleranceFactor, decider, aborter), ghosts, ghostsToSkip); |
| 1021 | |
| 1022 | return success.load(std::memory_order_acquire); |
| 1023 | } |
| 1024 | |
| 1025 | //============================================================================ |
| 1026 | template <class DataSetT> |
no test coverage detected