Stokhos: Add Stokhos_MP_Vector_MaskTraits.hpp and its UnitTest
Created by: kliegeois
@trilinos/stokhos @etphipp
Description
Add Mask class for ensemble type class. The class allows masked operations on ensemble values and allows boolean reduction such as AND, OR, and XOR. The pull request includes a UnitTest cpp file that tests the functionalities of the class.
Motivation and Context
It allows the writing of comparisons for ensemble type in a way which is consistent with usual scalar types. It allows the writing of if-else statement based on masked operations such that it is still consistent with usual scalar types.
Related Issues
None
How Has This Been Tested?
It has been tested using Teuchos UnitTest and
ctest -R Stokhos_SacadoMPVectorUnitTestMaskTraits_MPI_1
Test project /Users/kimliegeois/dev/TrilinosB
Start 49: Stokhos_SacadoMPVectorUnitTestMaskTraits_MPI_1
1/1 Test #49: Stokhos_SacadoMPVectorUnitTestMaskTraits_MPI_1 ... Passed 1.09 sec
100% tests passed, 0 tests failed out of 1
Subproject Time Summary:
Stokhos = 1.09 sec*proc (1 test)
Total Test time (real) = 1.11 sec
Tested on a MacBook Pro with icpc (ICC) 18.0.1 20171018.
Checklist
-
My commit messages mention the appropriate GitHub issue numbers. -
My code follows the code style of the affected package(s). -
My change requires a change to the documentation. -
I have updated the documentation accordingly. -
I have read the code contribution guidelines for this project. -
I have added tests to cover my changes. -
All new and existing tests passed. -
No new compiler warnings were introduced. -
These changes break backwards compatibility.
Additional Information
It is my first pull request to the Trilinos project. Let me know if I can improve anything for the next ones.