@@ -119,8 +119,10 @@ void binary_scalar_tester_impl(const F& f, const T1& x, const T2& y) {
119119 EXPECT_THROW (f (nest_x, nest_y_small), std::invalid_argument);
120120 EXPECT_THROW (f (nest_x_small, nest_y), std::invalid_argument);
121121
122- std::vector<std::vector<plain_type_t <T1>>> nest_nest_x{nest_x, nest_x, nest_x};
123- std::vector<std::vector<plain_type_t <T2>>> nest_nest_y{nest_y, nest_y, nest_y};
122+ std::vector<std::vector<plain_type_t <T1>>> nest_nest_x{nest_x, nest_x,
123+ nest_x};
124+ std::vector<std::vector<plain_type_t <T2>>> nest_nest_y{nest_y, nest_y,
125+ nest_y};
124126 auto nestnestvec_nestnestvec = f (nest_nest_x, nest_nest_y);
125127 auto nestnestvec_scal = f (nest_nest_x, y[0 ]);
126128 auto scal_nestnestvec = f (x[0 ], nest_nest_y);
@@ -142,7 +144,6 @@ void binary_scalar_tester_impl(const F& f, const T1& x, const T2& y) {
142144 EXPECT_THROW (f (nest_nest_x_small, nest_nest_y), std::invalid_argument);
143145}
144146
145-
146147/* *
147148 * Implementation function which checks that the binary vectorisation
148149 * framework returns the same value as the function with scalar inputs,
@@ -155,14 +156,13 @@ void binary_scalar_tester_impl(const F& f, const T1& x, const T2& y) {
155156 * @param y Second vector input to which operation is applied.
156157 * @param f functor to apply to inputs.
157158 */
158- template <typename F, typename T1, typename T2,
159- typename T1_plain = plain_type_t <T1>,
160- require_eigen_matrix_t <T1>* = nullptr ,
161- require_std_vector_t <T2>* = nullptr >
159+ template <
160+ typename F, typename T1, typename T2, typename T1_plain = plain_type_t <T1>,
161+ require_eigen_matrix_t <T1>* = nullptr , require_std_vector_t <T2>* = nullptr >
162162void binary_scalar_tester_impl (const F& f, const T1& x, const T2& y) {
163163 auto vec_vec = f (x, y);
164164 for (int r = 0 ; r < x.rows (); ++r) {
165- for (int c = 0 ; c < x.cols (); ++c) {
165+ for (int c = 0 ; c < x.cols (); ++c) {
166166 EXPECT_FLOAT_EQ (f (x (r, c), y[r][c]), vec_vec (r, c));
167167 }
168168 }
@@ -177,8 +177,9 @@ void binary_scalar_tester_impl(const F& f, const T1& x, const T2& y) {
177177 auto nestvec_nestvec = f (nest_x, nest_y);
178178 for (int i = 0 ; i < 3 ; ++i) {
179179 for (int r = 0 ; r < x.rows (); ++r) {
180- for (int c = 0 ; c < x.cols (); ++c) {
181- EXPECT_FLOAT_EQ (f (nest_x[i](r, c), nest_y[i][r][c]), nestvec_nestvec[i](r, c));
180+ for (int c = 0 ; c < x.cols (); ++c) {
181+ EXPECT_FLOAT_EQ (f (nest_x[i](r, c), nest_y[i][r][c]),
182+ nestvec_nestvec[i](r, c));
182183 }
183184 }
184185 }
@@ -194,7 +195,7 @@ void binary_scalar_tester_impl(const F& f, const T1& x, const T2& y) {
194195 for (int i = 0 ; i < 3 ; ++i) {
195196 for (int j = 0 ; j < 3 ; ++j) {
196197 for (int r = 0 ; r < x.rows (); ++r) {
197- for (int c = 0 ; c < x.cols (); ++c) {
198+ for (int c = 0 ; c < x.cols (); ++c) {
198199 EXPECT_FLOAT_EQ (f (nest_nest_x[i][j](r, c), nest_nest_y[i][j][r][c]),
199200 nestnestvec_nestnestvec[i][j](r, c));
200201 }
@@ -207,14 +208,13 @@ void binary_scalar_tester_impl(const F& f, const T1& x, const T2& y) {
207208 EXPECT_THROW (f (nest_nest_x_small, nest_nest_y), std::invalid_argument);
208209}
209210
210- template <typename F, typename T1, typename T2,
211- typename T2_plain = plain_type_t <T2>,
212- require_std_vector_t <T1>* = nullptr ,
213- require_eigen_matrix_t <T2>* = nullptr >
211+ template <
212+ typename F, typename T1, typename T2, typename T2_plain = plain_type_t <T2>,
213+ require_std_vector_t <T1>* = nullptr , require_eigen_matrix_t <T2>* = nullptr >
214214void binary_scalar_tester_impl (const F& f, const T1& x, const T2& y) {
215215 auto vec_vec = f (x, y);
216216 for (int r = 0 ; r < y.rows (); ++r) {
217- for (int c = 0 ; c < y.cols (); ++c) {
217+ for (int c = 0 ; c < y.cols (); ++c) {
218218 EXPECT_FLOAT_EQ (f (x[r][c], y (r, c)), vec_vec (r, c));
219219 }
220220 }
@@ -229,8 +229,9 @@ void binary_scalar_tester_impl(const F& f, const T1& x, const T2& y) {
229229 auto nestvec_nestvec = f (nest_x, nest_y);
230230 for (int i = 0 ; i < 3 ; ++i) {
231231 for (int r = 0 ; r < y.rows (); ++r) {
232- for (int c = 0 ; c < y.cols (); ++c) {
233- EXPECT_FLOAT_EQ (f (nest_x[i][r][c], nest_y[i](r, c)), nestvec_nestvec[i](r, c));
232+ for (int c = 0 ; c < y.cols (); ++c) {
233+ EXPECT_FLOAT_EQ (f (nest_x[i][r][c], nest_y[i](r, c)),
234+ nestvec_nestvec[i](r, c));
234235 }
235236 }
236237 }
@@ -246,7 +247,7 @@ void binary_scalar_tester_impl(const F& f, const T1& x, const T2& y) {
246247 for (int i = 0 ; i < 3 ; ++i) {
247248 for (int j = 0 ; j < 3 ; ++j) {
248249 for (int r = 0 ; r < y.rows (); ++r) {
249- for (int c = 0 ; c < y.cols (); ++c) {
250+ for (int c = 0 ; c < y.cols (); ++c) {
250251 EXPECT_FLOAT_EQ (f (nest_nest_x[i][j][r][c], nest_nest_y[i][j](r, c)),
251252 nestnestvec_nestnestvec[i][j](r, c));
252253 }
0 commit comments