MCPcopy Create free account
hub / github.com/Kitware/VTK / TestAbstractArray

Function TestAbstractArray

Testing/Core/vtkTestUtilities.cxx:1002–1023  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1000//----------------------------------------------------------------------------
1001template <class ArrayMapperT>
1002bool 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//============================================================================
1026template <class DataSetT>

Callers 3

DataSetPointMapperMethod · 0.85
TestFieldDataFunction · 0.85
CompareAbstractArrayMethod · 0.85

Calls 4

IdentityMapperClass · 0.85
storeMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected