void test_mapstride() { for(int i = 0; i < g_repeat; i++) { EIGEN_UNUSED int maxn = 30; CALL_SUBTEST_1( map_class_vector<Aligned>(Matrix<float, 1, 1>()) ); CALL_SUBTEST_1( map_class_vector<Unaligned>(Matrix<float, 1, 1>()) ); CALL_SUBTEST_2( map_class_vector<Aligned>(Vector4d()) ); CALL_SUBTEST_2( map_class_vector<Unaligned>(Vector4d()) ); CALL_SUBTEST_3( map_class_vector<Aligned>(RowVector4f()) ); CALL_SUBTEST_3( map_class_vector<Unaligned>(RowVector4f()) ); CALL_SUBTEST_4( map_class_vector<Aligned>(VectorXcf(internal::random<int>(1,maxn))) ); CALL_SUBTEST_4( map_class_vector<Unaligned>(VectorXcf(internal::random<int>(1,maxn))) ); CALL_SUBTEST_5( map_class_vector<Aligned>(VectorXi(internal::random<int>(1,maxn))) ); CALL_SUBTEST_5( map_class_vector<Unaligned>(VectorXi(internal::random<int>(1,maxn))) ); CALL_SUBTEST_1( map_class_matrix<Aligned>(Matrix<float, 1, 1>()) ); CALL_SUBTEST_1( map_class_matrix<Unaligned>(Matrix<float, 1, 1>()) ); CALL_SUBTEST_2( map_class_matrix<Aligned>(Matrix4d()) ); CALL_SUBTEST_2( map_class_matrix<Unaligned>(Matrix4d()) ); CALL_SUBTEST_3( map_class_matrix<Aligned>(Matrix<float,3,5>()) ); CALL_SUBTEST_3( map_class_matrix<Unaligned>(Matrix<float,3,5>()) ); CALL_SUBTEST_3( map_class_matrix<Aligned>(Matrix<float,4,8>()) ); CALL_SUBTEST_3( map_class_matrix<Unaligned>(Matrix<float,4,8>()) ); CALL_SUBTEST_4( map_class_matrix<Aligned>(MatrixXcf(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) ); CALL_SUBTEST_4( map_class_matrix<Unaligned>(MatrixXcf(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) ); CALL_SUBTEST_5( map_class_matrix<Aligned>(MatrixXi(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) ); CALL_SUBTEST_5( map_class_matrix<Unaligned>(MatrixXi(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) ); CALL_SUBTEST_6( map_class_matrix<Aligned>(MatrixXcd(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) ); CALL_SUBTEST_6( map_class_matrix<Unaligned>(MatrixXcd(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) ); } }
void test_mapped_matrix() { for(int i = 0; i < g_repeat; i++) { CALL_SUBTEST_1( map_class_vector(Matrix<float, 1, 1>()) ); CALL_SUBTEST_1( check_const_correctness(Matrix<float, 1, 1>()) ); CALL_SUBTEST_2( map_class_vector(Vector4d()) ); CALL_SUBTEST_2( map_class_vector(VectorXd(13)) ); CALL_SUBTEST_2( check_const_correctness(Matrix4d()) ); CALL_SUBTEST_3( map_class_vector(RowVector4f()) ); CALL_SUBTEST_4( map_class_vector(VectorXcf(8)) ); CALL_SUBTEST_5( map_class_vector(VectorXi(12)) ); CALL_SUBTEST_5( check_const_correctness(VectorXi(12)) ); CALL_SUBTEST_1( map_class_matrix(Matrix<float, 1, 1>()) ); CALL_SUBTEST_2( map_class_matrix(Matrix4d()) ); CALL_SUBTEST_11( map_class_matrix(Matrix<float,3,5>()) ); CALL_SUBTEST_4( map_class_matrix(MatrixXcf(internal::random<int>(1,10),internal::random<int>(1,10))) ); CALL_SUBTEST_5( map_class_matrix(MatrixXi(internal::random<int>(1,10),internal::random<int>(1,10))) ); CALL_SUBTEST_6( map_static_methods(Matrix<double, 1, 1>()) ); CALL_SUBTEST_7( map_static_methods(Vector3f()) ); CALL_SUBTEST_8( map_static_methods(RowVector3d()) ); CALL_SUBTEST_9( map_static_methods(VectorXcd(8)) ); CALL_SUBTEST_10( map_static_methods(VectorXf(12)) ); CALL_SUBTEST_11( map_not_aligned_on_scalar<double>() ); } }
void test_eigen2_map() { for(int i = 0; i < g_repeat; i++) { CALL_SUBTEST_1( map_class_vector(Matrix<float, 1, 1>()) ); CALL_SUBTEST_2( map_class_vector(Vector4d()) ); CALL_SUBTEST_3( map_class_vector(RowVector4f()) ); CALL_SUBTEST_4( map_class_vector(VectorXcf(8)) ); CALL_SUBTEST_5( map_class_vector(VectorXi(12)) ); CALL_SUBTEST_1( map_class_matrix(Matrix<float, 1, 1>()) ); CALL_SUBTEST_2( map_class_matrix(Matrix4d()) ); CALL_SUBTEST_6( map_class_matrix(Matrix<float,3,5>()) ); CALL_SUBTEST_4( map_class_matrix(MatrixXcf(ei_random<int>(1,10),ei_random<int>(1,10))) ); CALL_SUBTEST_5( map_class_matrix(MatrixXi(ei_random<int>(1,10),ei_random<int>(1,10))) ); CALL_SUBTEST_1( map_static_methods(Matrix<double, 1, 1>()) ); CALL_SUBTEST_2( map_static_methods(Vector3f()) ); CALL_SUBTEST_7( map_static_methods(RowVector3d()) ); CALL_SUBTEST_4( map_static_methods(VectorXcd(8)) ); CALL_SUBTEST_5( map_static_methods(VectorXf(12)) ); } }