| 289 | } |
| 290 | |
| 291 | void test_sparse_block() |
| 292 | { |
| 293 | for(int i = 0; i < g_repeat; i++) { |
| 294 | int r = Eigen::internal::random<int>(1,200), c = Eigen::internal::random<int>(1,200); |
| 295 | if(Eigen::internal::random<int>(0,4) == 0) { |
| 296 | r = c; // check square matrices in 25% of tries |
| 297 | } |
| 298 | EIGEN_UNUSED_VARIABLE(r+c); |
| 299 | CALL_SUBTEST_1(( sparse_block(SparseMatrix<double>(1, 1)) )); |
| 300 | CALL_SUBTEST_1(( sparse_block(SparseMatrix<double>(8, 8)) )); |
| 301 | CALL_SUBTEST_1(( sparse_block(SparseMatrix<double>(r, c)) )); |
| 302 | CALL_SUBTEST_2(( sparse_block(SparseMatrix<std::complex<double>, ColMajor>(r, c)) )); |
| 303 | CALL_SUBTEST_2(( sparse_block(SparseMatrix<std::complex<double>, RowMajor>(r, c)) )); |
| 304 | |
| 305 | CALL_SUBTEST_3(( sparse_block(SparseMatrix<double,ColMajor,long int>(r, c)) )); |
| 306 | CALL_SUBTEST_3(( sparse_block(SparseMatrix<double,RowMajor,long int>(r, c)) )); |
| 307 | |
| 308 | r = Eigen::internal::random<int>(1,100); |
| 309 | c = Eigen::internal::random<int>(1,100); |
| 310 | if(Eigen::internal::random<int>(0,4) == 0) { |
| 311 | r = c; // check square matrices in 25% of tries |
| 312 | } |
| 313 | |
| 314 | CALL_SUBTEST_4(( sparse_block(SparseMatrix<double,ColMajor,short int>(short(r), short(c))) )); |
| 315 | CALL_SUBTEST_4(( sparse_block(SparseMatrix<double,RowMajor,short int>(short(r), short(c))) )); |
| 316 | } |
| 317 | } |
nothing calls this directly
no test coverage detected