4cd791932b
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. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
OptionParser.h | ||
Testing.h | ||
TestingMath.h | ||
UnitTestBinaryOperators.cxx | ||
UnitTestBinaryPredicates.cxx | ||
UnitTestBounds.cxx | ||
UnitTestCellShape.cxx | ||
UnitTestExceptions.cxx | ||
UnitTestHash.cxx | ||
UnitTestListTag.cxx | ||
UnitTestMath.cxx | ||
UnitTestMatrix.cxx | ||
UnitTestNewtonsMethod.cxx | ||
UnitTestNoAssert.cxx | ||
UnitTestPair.cxx | ||
UnitTestRange.cxx | ||
UnitTestTesting.cxx | ||
UnitTestTransform3D.cxx | ||
UnitTestTypeListTag.cxx | ||
UnitTestTypes.cxx | ||
UnitTestTypeTraits.cxx | ||
UnitTestUnaryPredicates.cxx | ||
UnitTestVecAxisAlignedPointCoordinates.cxx | ||
UnitTestVecFromPortal.cxx | ||
UnitTestVecFromPortalPermute.cxx | ||
UnitTestVectorAnalysis.cxx | ||
UnitTestVecTraits.cxx | ||
UnitTestVecVariable.cxx | ||
VecTraitsTests.h |