36#include <boost/bind.hpp>
37#include <boost/test/tools/floating_point_comparison.hpp>
38#include <boost/test/unit_test.hpp>
54 double buf1[] = {1, 4, 7, 2, 5, 8, 3, 6, 9};
55 double buf2[] = {10, 15, 19, 11, 16, 20, 12, 17, 21};
62 BOOST_CHECK(result.GetRows() == 3);
63 BOOST_CHECK(result.GetColumns() == 3);
65 double epsilon = 1e-12;
66 BOOST_CHECK_CLOSE(*result(0, 0), 97.0, epsilon);
67 BOOST_CHECK_CLOSE(*result(0, 1), 103.0, epsilon);
68 BOOST_CHECK_CLOSE(*result(0, 2), 109.0, epsilon);
70 BOOST_CHECK_CLOSE(*result(1, 0), 229.0, epsilon);
71 BOOST_CHECK_CLOSE(*result(1, 1), 244.0, epsilon);
72 BOOST_CHECK_CLOSE(*result(1, 2), 259.0, epsilon);
74 BOOST_CHECK_CLOSE(*result(2, 0), 361.0, epsilon);
75 BOOST_CHECK_CLOSE(*result(2, 1), 385.0, epsilon);
76 BOOST_CHECK_CLOSE(*result(2, 2), 409.0, epsilon);
87 double buf1[] = {1, 4, 7, 2, 5, 8, 3, 6, 9};
88 double buf2[] = {10, 11, 12};
94 BOOST_CHECK(result.
GetRows() == 3);
96 double epsilon = 1e-12;
97 BOOST_CHECK_CLOSE(result[0], 68.0, epsilon);
98 BOOST_CHECK_CLOSE(result[1], 167.0, epsilon);
99 BOOST_CHECK_CLOSE(result[2], 266.0, epsilon);
107 double buf1[] = {1, 4, 7, 10, 2, 5, 8, 11, 3, 6, 9, 12};
108 double buf2[] = {10, 11, 12};
114 BOOST_CHECK(result.
GetRows() == 4);
116 double epsilon = 1e-12;
117 BOOST_CHECK_CLOSE(result[0], 68.0, epsilon);
118 BOOST_CHECK_CLOSE(result[1], 167.0, epsilon);
119 BOOST_CHECK_CLOSE(result[2], 266.0, epsilon);
120 BOOST_CHECK_CLOSE(result[3], 365.0, epsilon);
134 double buf1[] = {1, 4, 7, 2, 5, 8, 3, 6, 9};
135 double buf2[] = {10, 15, 19, 11, 16, 20, 12, 17, 21};
137 std::shared_ptr<NekMatrix<double>> lhsInnerMatrix(
139 std::shared_ptr<NekMatrix<double>> rhsInnerMatrix(
147 BOOST_CHECK(result.GetRows() == 3);
148 BOOST_CHECK(result.GetColumns() == 3);
150 double epsilon = 1e-12;
151 BOOST_CHECK_CLOSE(*result(0, 0), 582.0, epsilon);
152 BOOST_CHECK_CLOSE(*result(0, 1), 618.0, epsilon);
153 BOOST_CHECK_CLOSE(*result(0, 2), 654.0, epsilon);
155 BOOST_CHECK_CLOSE(*result(1, 0), 1374.0, epsilon);
156 BOOST_CHECK_CLOSE(*result(1, 1), 1464.0, epsilon);
157 BOOST_CHECK_CLOSE(*result(1, 2), 1554.0, epsilon);
159 BOOST_CHECK_CLOSE(*result(2, 0), 2166.0, epsilon);
160 BOOST_CHECK_CLOSE(*result(2, 1), 2310.0, epsilon);
161 BOOST_CHECK_CLOSE(*result(2, 2), 2454.0, epsilon);
172 double buf1[] = {1, 4, 7, 2, 5, 8, 3, 6, 9};
173 double buf2[] = {10, 11, 12};
175 std::shared_ptr<NekMatrix<double>> innerMatrix(
181 BOOST_CHECK(result.
GetRows() == 3);
183 double epsilon = 1e-12;
184 BOOST_CHECK_CLOSE(result[0], 136.0, epsilon);
185 BOOST_CHECK_CLOSE(result[1], 334.0, epsilon);
186 BOOST_CHECK_CLOSE(result[2], 532.0, epsilon);
194 double buf1[] = {1, 4, 7, 10, 2, 5, 8, 11, 3, 6, 9, 12};
195 double buf2[] = {10, 11, 12};
197 std::shared_ptr<NekMatrix<double>> innerMatrix(
203 BOOST_CHECK(result.
GetRows() == 4);
205 double epsilon = 1e-12;
206 BOOST_CHECK_CLOSE(result[0], 204.0, epsilon);
207 BOOST_CHECK_CLOSE(result[1], 501.0, epsilon);
208 BOOST_CHECK_CLOSE(result[2], 798.0, epsilon);
209 BOOST_CHECK_CLOSE(result[3], 1095.0, epsilon);
unsigned int GetRows() const
BOOST_AUTO_TEST_CASE(TestStandardFullTimesStandardFull)