vtk-m2/vtkm/testing
Allison Vacanti 4cd791932b Ensure that Pair and Vec are trivial classes.
For std::copy to optimize a copy to memcpy, the valuetype must be both
trivially constructable and trivially copyable.

The new copy benchmarks highlighted an issue that std::copy'ing pairs
and vecs were not optimized to memcpy. For a 256 MiB buffer on my
laptop w/ GCC, the serial copy speeds were:

UInt8:                 10.10 GiB/s
Vec<UInt8, 2>           3.12 GiB/s
Pair<UInt32, Float32>   6.92 GiB/s

After this patch, the optimization occurs and a bitwise copy occurs:

UInt8:                 10.12 GiB/s
Vec<UInt8, 2>           9.66 GiB/s
Pair<UInt32, Float32>   9.88 GiB/s

Check were also added to the Vec and Pair unit tests to ensure that
this classes continue to be trivial.

The ArrayHandleSwizzle test was refactored a bit to eliminate a new
'possibly uninitialized memory' warning introduced with the default
Vec ctors.
2017-10-18 14:58:35 -04:00
..
CMakeLists.txt Update copyright for Sandia 2017-09-20 15:33:44 -06:00
OptionParser.h Enable highest level of warnings(W4) under MSVC 2017-09-22 13:04:28 -04:00
Testing.h Add more options to the device adapter algorithm benchmark. 2017-10-17 16:21:17 -04:00
TestingMath.h Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestBinaryOperators.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestBinaryPredicates.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestBounds.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestCellShape.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestExceptions.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestHash.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestListTag.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestMath.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestMatrix.cxx Enable highest level of warnings(W4) under MSVC 2017-09-22 13:04:28 -04:00
UnitTestNewtonsMethod.cxx Update Newton's Method to return solution status 2017-10-10 14:01:41 -04:00
UnitTestNoAssert.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestPair.cxx Ensure that Pair and Vec are trivial classes. 2017-10-18 14:58:35 -04:00
UnitTestRange.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestTesting.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestTransform3D.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestTypeListTag.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestTypes.cxx Ensure that Pair and Vec are trivial classes. 2017-10-18 14:58:35 -04:00
UnitTestTypeTraits.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestUnaryPredicates.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestVecAxisAlignedPointCoordinates.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestVecFromPortal.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestVecFromPortalPermute.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestVectorAnalysis.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestVecTraits.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestVecVariable.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
VecTraitsTests.h Update copyright for Sandia 2017-09-20 15:33:44 -06:00