| 275 | |
| 276 | template<typename MatrixType> |
| 277 | void data_and_stride(const MatrixType& m) |
| 278 | { |
| 279 | Index rows = m.rows(); |
| 280 | Index cols = m.cols(); |
| 281 | |
| 282 | Index r1 = internal::random<Index>(0,rows-1); |
| 283 | Index r2 = internal::random<Index>(r1,rows-1); |
| 284 | Index c1 = internal::random<Index>(0,cols-1); |
| 285 | Index c2 = internal::random<Index>(c1,cols-1); |
| 286 | |
| 287 | MatrixType m1 = MatrixType::Random(rows, cols); |
| 288 | compare_using_data_and_stride(m1.block(r1, c1, r2-r1+1, c2-c1+1)); |
| 289 | compare_using_data_and_stride(m1.transpose().block(c1, r1, c2-c1+1, r2-r1+1)); |
| 290 | compare_using_data_and_stride(m1.row(r1)); |
| 291 | compare_using_data_and_stride(m1.col(c1)); |
| 292 | compare_using_data_and_stride(m1.row(r1).transpose()); |
| 293 | compare_using_data_and_stride(m1.col(c1).transpose()); |
| 294 | } |
| 295 | |
| 296 | EIGEN_DECLARE_TEST(block) |
| 297 | { |
no test coverage detected