1 #include <Tpetra_MultiVectorFiller.hpp> 11 using Tpetra::Details::sortAndMergeIn;
15 allEntries[k] = 2 * k;
24 sortAndMergeIn<int> (allEntries, allEntries.view (0, 5), newEntries());
26 result.
size() != 8, std::logic_error,
27 "Returned ArrayView should have size 8, but instead has size " 28 << result.
size() <<
".");
30 allEntries.size() < 8, std::logic_error,
31 "Input/output Array argument should have size at least 8, but instead has " 32 "size " << allEntries.size() <<
".");
37 if (result[k] != allEntries[k]) {
44 success, std::logic_error,
"Returned ArrayView and the input/output " 45 "Array argument don't match. First nonmatching array index is " 46 << firstBadIndex <<
".");
49 expectedEntries[0] = -1;
50 expectedEntries[1] = 0;
51 expectedEntries[2] = 2;
52 expectedEntries[3] = 3;
53 expectedEntries[4] = 4;
54 expectedEntries[5] = 6;
55 expectedEntries[6] = 8;
56 expectedEntries[7] = 11;
58 if (expectedEntries[k] != result[k]) {
65 "and the expected results don't match. First nonmatching array index is " 66 << firstBadIndex <<
".");
Namespace Tpetra contains the class and methods constituting the Tpetra library.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)